Smith College, Computer Science 111 - Fall Semester, 2006
Part 1.
Log into beowulf.csc using your 111a-xx class account, as we did in the Lab (look at the Lab1 handout or Lab1.html web site if you are unsure of this).First, use the linux copy command, cp, to make a copy of your file hobbies.py under the new name hw1.py,
by typing, at the beowulf $ prompt
cp hobbies.py hw1.py
(that's a one, not an "ell"). If you now type ls, the linux command
for list, you will see that
your list of files
shows a new file called hw1.py
Now, type emacs hw1.py at the beowulf prompt. Use emacs to make the following changes in hw1.py:
final_year = 2010
month_cost = input("How much does it cost per month (e.g. 25.00) ")
add a new, but similar line that asks the user how many years to
calculate the total cost, and places that
information in a variable called num_years .final_year =
Next, import and run your program and make sure that it doesn't have any errors! Go back and edit the file using emacs, if it does have errors.
Programs that have errors when interpreted will not be given credit.
To get a printout (hard copy) of your program, type cprint hw1.py
at beowulf's prompt. cprint will show a list of printers. Find Engineering 203
and type in its number. The paper copy is for you. Your submission
is done on the computer.
When your program is ready, you should submit your file by issuing the command
submit homework1 hw1.py
Part 2.
Make sure you have read chapter 1 of each of the textbooks.