Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

Looking for the book? They have it at the Engineer's Bookstore at 748 Marietta St NW. Here is there website: http://www.engrbookstore.com/ - Monica

Hotspots: Slides and CodeTA CornerComments?AnnouncementsFAQStatic Webspace
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Spring 2006 Lab 2 Questions





After saving the picture with A_tasteful_picture_of_myself.jpg name and with the appropriate path, I still cannot locate any picture with such name in that folder. why is that so?
gth820p


that last message was from Tabitha Turner at gth549b. im gonna try and correct some of those mistakes on my main computer, however.

for some reason on my laptop earlier today, the media sources needed for JES wouldn't download so I had to retype the address. I encountered a few other problems, but this was the major setback.

i saved lab2.py on my document. when i sturt JES i click on open and click on this file it opnes it ok. then when i shut JES off and try to start lab2.py file without uing JES the computer doesn't recognizes it. what is wrong?
I tried retrieving my submission and when I clicked on the lab2.py icon, it would not open. THe only thing that appears is the JES publisher box thing in the beginning and then that's it!
This question has already been addressed below. -Blake O'Hare


Similar question as the one below. I can only open lab2.py if I am already in JES. When I double click on the lab2.py file in My Documents the JES box pops up but does not open the program. Is this going to be a problem when it comes to grading my lab?

Thanks,
David Gricius
This question has already been addressed below. -Blake O'Hare

When I tried to run my JES program after I retrieved it, it said Windows could not open it becuase it wasn't familiar with the program that created it. I browsed to try to pull JES up to run it, but it was not listed as a program on my computer. Does this mean I need to resend my lab or what?

Thanks! gth850x
This question has already been addressed below. -Blake O'Hare

When i try to turn in Lab 2 i get an ERROR message. What do i do???
Please read the last paragraph of this page. -Blake O'Hare


When I added a page break before the ASCII picture it made a whole new (blank) page. Is that ok?
Are you sure you didn't add 2 page breaks? Are you sure the font is the correct size? -Blake O'Hare

I posted my question twice, but no one answered. PLEASE HELP! I can not do lab 2, or any of the other labs/homeworks this semester if I can not get jes to work on my computer. I also do not want to ruin my desktop.

I downloaded/extracted jes-216.zip for windows from the coweb address correctly. I double-click the jes.exe snake icon and the loading screen comes up. Then, before the program starts, my computer restarts and a major windows error message appears. WHAT COULD BE WRONG?

Please respond or email gtg855y with any reasons this might be happening.
JES is not an application that runs natively on your computer. It runs on top of Java. This means something is seriously wrong with your Java installation on your computer and needs to be fixed. You can probably talk to OIT about this. In the mean time, ALL assignments for this class can be completed on terminals on campus (library, student center, etc). -Blake O'Hare

I contacted my TA and she said she had problems with downloading jes from the cd, and could only instruct me to download jes from coweb or if I have a laptop, bring it in to a TA's office hours to get it checked. But, I did download jes from coweb, and I do not have a laptop.
I am not sure what you are asking. -Blake O'Hare

I have also tried contacting other students in the class as well to use their computer for now, but no one has responded. I can come by one of the TA's office hours but it would be unfair for me to use their computer for every assignment due in this class. Therefore, if my computer does not get fixed, there is no way I can participate in this class. Thanks.

You can use the library. Amanda Bennett

We're supposed to spell check the Word doc and ignore "technical" terms - one of the words that spellcheck catches is "writibility." Is this supposed to be a technical term? Otherwise it isn't a word, since spellcheck has nothing close as a suggeston.

Thanks,
gtg316h
That is not a technical term. Amanda Bennett

When i try to submit my JES codes and answers for grading and i try to retrieve it, it doesnt open. And when i try to open it from where i saved it, it still doenst show up. So im worried that it isnt gonna show up when it reaches my TA fro grading. SO whenever i want to open my JES files i have to redo it. -gth816g
This question has already been answered, see below. Amanda Bennett

Is it legal to just use spaces to make the ASCII art look right? No matter how much I play with the text box constraints, it will not affect the lines that need to be fixed.
gth694q

Just make it look as good as you can. Amanda Bennett

how do I go back to change line 15 to whatever Jython is telling me to do?
>>>example2()
makePicture(filename): There is no file at .\pickAFile
An error occurred attempting to pass an argument to a function.
Please check line 15 of C:\jes-216\jes-216\lab2.py
gth819g
Whate does the rest of your example2 function look like. If you want you can email me the function. albert@gatech.edu. -Albert d'Heurle

If we use a picture from Media Sources and not our own computer, do we need to write it to a different file folder or can we just write it to media sources?
The media sources folder is fine. -Albert d'Heurle

This is how i have written example 2
def example2():
  file = pickAFile()
  picture = makePicture(file)
  show(picture)
  for pixel in getPixels(picture):
    redValue = getRed(pixel)
    newColor = makeColor( redValue, 0, 255 - redValue)
    setColor(pixel,newColor)
  repaint(picture)
  writePictureTo(picture, 'C:\\Documents and Settings\\Administrator\\My Documents\\you-never-know.jpg')

the response i get is "function example2 at 26705251"
Can you help?
gth342a at mail.gatech.edu
It worked on my computer. Did you make sure to put () after example2? -Albert d'Heurle

I know the lab says something about having two backslashes but my example2 part looks like- writePictureTo(picture, 'C:\JES\MediaSources\\mypicture.jpg'). It seems to work fine I was just confused on the "two backslashes" comment on the lab directions
Usually you need double backslahes to make things work correctly. Maybe since you have one set of double backslashes it works. To be on the safe side I would use double backslashes. -Albert d'Heurle

I have submitted my programs, and I have retrived them but I can only open my lab2.doc not lab2.py. It looks like it is going to open but then it never does. PLEASE help me! I've been trying to open the program for a long time and it still doesn't work. Thanks, gth857q
See below. -Albert d'Heurle

I have everything aligned properly in the text box for the ASCII art except for a few diagonal lines; is that ok? I mean literally everything else has lined up prefectly. Thanks for your time, Toni Walden gth694q@mail.gatech.edu
I would try to get everything lined up correctly... -Albert d'Heurle

I have the same problem as someone earlier. I have submitted my programs. I have retrived them but I can only open my lab2.doc not lab2.py. It looks like it is going to open but then it does not. I saw that someone said to type in the C://...... and I did and it was in there but it still does not open. Help!
See below. your questions has already been answsered -Albert d'Heurle

I am editing my MS Word document and when I add the photo from the JES lab, it comes up red; it changed in JES and the original color photo is longer in mediasources. Is it OK to submit a red photo like this–or did I screw up?
I believe that the lab says to insert the picture you modified using JES and not the orginal one. -Albert d'Heurle

Error: this should not happenError: this should not happenError: this should not happenJES will not open on my computer. It was downloaded corrected, and extracted correctly, but every time it tries to load/open, it restarts my computer. WHAT IT WRONG?Error: this should not happenError: this should not happenError: this should not happen

JES allows me to Load my program as is, but when I type example2() into the command box, it opens up the pickAFile dialog box. Any idea what I'm doing wrong? This is what my code looks like:
  1. Add example2() here:
def example2():
file = pickAFile()
picture = makePicture(File)
show(picture)
for pixel in getPixels(picture):
redValue = getRed(pixel)
newColor = makeColor( redValue, 0, 255 - redValue)
setColor(pixel,newColor)
repaint(picture)
writePictureTo('C:\\Documents and Settings\\Chanee Jackson\\Desktop\\PicsOffCam\\CuteMe 052.jpg')
Reply 2 chanee at gatech.edu
Then your program is working correctly. When the pickAFile box opens, you should find the picture that you want to alter. In your case it would be the "cuteMe 052.jpg" file. Then this program will alter it, and in the end, re-save it to the location in the writePictureTo command. Liz Helms

I downloaded jes_216 for windows, then extracted it using winrar. when I double-clicked on the snake icon for jes, however, my computer restarted and an error message came up. What's wrong?

When I tried to reopen my lab2 in JES and tried the example1() and example2() I got the message: "A local or global name could not be found. You need to define the function or variable before you try to use it in any way." I'm not quite sure what that means but when I checked it before I submitted it, it seemed to be working correctly.
Did you press the load button? -Blake O'Hare

Hi, I'm the same person who had problems with opening the retrieved submissions. I tried to download winzip and it still didn't work.
If that didn't work then you should probably go see a TA. Something more sinister is at work here! -Blake O'Hare

When we are adding writePictureTo() under the example2, do we add the name of a picture of our choice to the code- for example:
writePictureTo(picture, 'C:\\JES\\MediaSources\\ourpicturename.JPG') or does it stay as
writePictureTo(picture, 'C:\\JES\\MediaSources\\A_tasteful_picture_of_myself.jpg') like shown in the directions.
Name it however you want. -Blake O'Hare


I keep trying to retrieve my lab2 from webwork and the written part is the only part that opens. My JES stuff looks like it's going to open, but then it never does. What should I do? -Rachel Sedlack gth857q
To open the .py file you have to first open JES, then click on file -> open. Browse to where you saved the .py file, and then select the .py file. Double clicking the .py file will not open JES. -Albert d'Heurle

I saved my new picture in the Media Sources
folder, in the JES program, where it says
writePictureTo (picture, 'C:\\....jpg')
but I don't see it there when I go back
and try to retrieve it.

Ji.iN Chung

If it didn't give you an error, then it must be there. One way to find it is to copy the path (the C:\\ thing all the way up to but not including the actual file name) and go to start → run and pasting it in there. That will bring up the folder that JES swears it put it in. -Blake O'Hare

when is this lab due?
It is due on Friday (1-20-06). -Stephanie SellersRemember all assignments are due by 7pm on the due date Liz Helms

The instructions to lab 2 says to put the path to waikiki.jpg in single quotes, but when I put the path using single quotes into the program area and try to load it, JES gives me the error "Your code contains at least one syntax error, meaning it is not legal jython." But when I change it to double quotes, there is no problem- everything works fine. So should we use double quotes?

Whatever works for you. Later in the course you will see the difference of the two. I believe that double quotes are fine now. Liz Helms

In the instructions where it writes the command writePictureTo(picture, 'C:\\JES\\MediaSources\\A_tasteful_picture_of_myself.jpg') what is "picture" and what is the file path. Is picture the name that we are assigning to the jpg whose file path is given? And when we type in example2() into command area, are we picking the same file as we did for writePictureTo? Because after running the above command, I can't find any file named "picture" in my Media Sources folder.

The first picture part is saying take the picture you are using in your program, and then save it to the location in quotes. The picture will now be called A_tasteful_picture_of_myself.jpg in your Media Sources folder, not "picture." Hope this clears things up Liz Helms



In the Word portion of the lab, it says to: "Hightlight the ASCII diagram and put a text box around it. Resize the box for the ASCII diagram to display correctly." How do I know when the diagram is displayed correctly?
You should be able to tell visually... as long as it doesnt look funky. If you are still worried, you could ask a TA to look at it and approve. Liz Helms

I noticed that when running example2(), the picture saved to the MediaSources folder is of a lower quality than the one that the function shows at the end. Is there a reason for this? Is there a way to change it so they are the same quality?
Darryl Zuk
It's probably due to the transformation, dont worry about the quality for now, it will be fine. Liz Helms

okay. i submitted my stuff twice now, and when i say "retrieve submissions" and d/l the files and whatnot and unzip them, the word doc works fine but the JES program wont open. however, the JES start-up box get displayed, but nothing happens from there – no files are opened, nor is JES even started. what to do now?
JES is kind of tricky like that. When you want to open a file, you have to start JES first, then at the top click File...Open... and find your file that way to open it. If your word doc works then your code is probably fine. Liz Helms

After adding the text box in the word document, I can only see the figure in the print version. I can not see the footer page numbers or the figure in the normal view, only the print view. Will you be able to see it when it is turned in, or did I do something wrong?
That's fine. Amanda Bennett

I cannot re-open my jJES file we were told to name lab2.py that the picture was created in. I have saved the file and named it correctly but I cannot re-open it to view the code or run the program again. Any help?
See above, but when you have a python file, you cannot open it directly by double clicking on it. You have to open up JES, then open the file inside jes. Amanda Bennett

For the part where we are supposed to run the program on a pic of ourself is it really supposed to be named A_tasteful_picture_of_myself.jpg or just the name that we already have it as on our computer??
It can be anything, that's just an example. Amanda Bennett

"Resize the box for the ASCII diagram to display correctly." Is the ASCII diagram at the end of the document displayed correctly when we download it? The diagonal lines look to be off.
Darryl Zuk
It is not correct when you download it. Amanda Bennett

In the word document part when it says to highlight the headers, do we assume that "Homework" is also a header?
Sure! Amanda Bennett

When I save my lab2.py it doesn't have the little snake icon next to it, it's like my computer doesn't recognize the .py extension and doesn't know what program to open it with. Does this mean that it's not saved correctly?
It's fine if it doesn't have the python icon. As for the computer not knowing what to open the file with, that too is okay, because you will never want the computer to open the file for you :) You'll always want to open the file from INSIDE JES! (that's very important to know!) Amanda Bennett

I named the picture in the second example 'example2.jpg'. Is this acceptable? Should I change it to write to 'A_tasteful_picture_of_myself.jpg' even though it isn't a picture of me? Thanks-Eric Walker
That's fine. Amanda Bennett

I can't find waikiki.jpg in the MediaSources folder. Is it there?
Behold!
Uploaded Image: waikiki.jpg

I've done everything I can to change the ASCII box in the Word part, and I can't seem to find anything that looks normal. Is there a hint to a picture we're supposed to be making? They all look just as messed up as how it came.
I say ASCII art anything doesn't look normal in the first place, but if the box isn't behaving the way you want it, I'd say drop by one of our office hours or see your TA after recitation and show them what you're doing and we can tell you if what you've done to the ASCII diagram is acceptable or how to poke it if it isn't. -Blake O'Hare

When I made the JES program I tested everything and everything worked great. When I redownloaded it and opened it in JES it opened fine, but neither example1 nor example2 will work. What's going on?
Please be more specific...is it giving you an error message of some kind? It would probably be a good idea to show a TA what happens...because saying it doesnt work doesnt help us identify the problem :) Liz Helms

When I tried to send in lab2.py on JES via webwork, there was no problem. But when I tried to retrieve that file and opened it, it said that Windows is unable to open the file and that windows needs to know which program to use. It said that you could choose which program from the list but when I opened the list, JES was not there. I'm not sure then if lab2.py was sent in or not. What can I do?
Try it on a different computer or download WinZip. -Blake O'Hare

will we get points taken off our lab if our path to our pictures is not the same as the path in the examples?
no. Amanda Bennett

I have a mac and when I tried to retrieve my assignments they downloaded onto my desktop. when i clicked on LAB2 i saw both of my assignments, lab2.doc and lab2.py. my word document opened up when i clicked on it but my lab2.py didnt. in order for my computer to open up to see the lab on jes i had to go to File, Open on jes and then open it from my desktop...i just wanted to make sure that it would open up on a windows computer too b/c i assumed windows might open it up differently. thanks
Thats the only way to open a file in JES, double clicking it will not open it. Liz Helms