The good news: The only
deliverables here are under headings 3 and 4 below, and you
don't have to do all that much. The bad news (which
is not all that bad): This assignment is due just two
days from now. Starting with Assignment 1, you will
have a week for each problem set. It is strongly
recommended that you complete steps 1 and 2 before the first lab
discussion sections on Monday and Tuesday, so you can address
any issues that arise.
1. Install the software.
Install Python 3.7.0 from here
click on the link that says Download Python 3.7.0 (more details
To test if your installation works, navigate to the folder for
Python (in the Applications folder on a Mac, or wherever all
your programs are listed on Windows) and double-click on the
icon marked IDLE. You should see a window open with a message
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26
[Clang 6.0 (clang-600.0.57)] on darwin
Type "copyright", "credits" or "license()" for more
with a blinking cursor after the '>>>'. Type any
number (say, 3) and hit enter. You should see the number
printed on the next line. Your installation was
If you ran into problems, your TA can help you complete the
installation during the first discussion section.
2. Download and run the sample programs
Make a folder called CS1 (or, really, anything else you care to
call it), in which you will store all your work for this course.
Download the programs helloworld.py
from the course
website and save them in this folder.
Open the file helloworld.py from the File
menu in IDLE,
and then select Run Module
from the Run
menu. You should see the message
appear in the Python Shell window in IDLE.
Now repeat the procedure with the file happyface.py.
Instead of seeing a message in the IDLE window, a rocket ship
will appear. Click on this and you will see the window
with the smiley face. Terminate the program by closing this
3. Revise the Hello, World program
Remove the comment with my name and replace it with your
own. Now add new statements to print additional lines
of text, whatever you like.
You might make a few
mistakes along the way--that's fine, that's how you learn--but
make sure your program runs before you submit it.
4. Revise the Happy Face program
Similarly, change the comment. Then make a change to one or
more of the four drawing instructions;
it doesn't matter
what you do, as long as you change something
resulting program runs. If you're feeling lazy, you don't
have to try to understand any of this code: you can do something
very simple like change the color of the face or the eyes.
(Python understands quite a large number of color names.) If
you're more ambitious, you might want to read the explanation of the drawing commands
modify the size of the face and eyes, put in irises and pupils,
change the smile to a frown (not so easy), experiment with the create_rectangle
function and see if you can reproduce the picture that
illustrates this assignment.
5. What to Hand In
These are the standard instructions for submitting all homework
assignments. Make sure your name appears in a comment in each of
the revised .py files. Put these files in a folder, and
name it YourFirstInitialYourLastName
.HW0 (for example,
if I were a student I would name the folder
HStraubing.HW0). Compress the folder and submit the .zip
file through Canvas. Do not submit the .py files
6. Optional Reading
Chapter 1 of the Think Python
textbook is breezy
reading. (Make sure you've got the second edition!
The first is for Python 2.)