CS303E Homework 0

Instructor: Dr. Bill Young
Due Date: September 1, 2021 at 11:59pm

Getting Familiar with the Tools

This first assignment is to get you started using the system. It will not be collected or graded. Don't submit it.

Take the following steps:

  1. Check that you have Python3 installed on the machine you plan to use to do your work this semester. When you start Python it will tell you what version you're using. Make sure it says Python 3.x.y (for any values of x and y).
  2. Check that you have IDLE installed on your machine. IDLE is a simple IDE (integrated development environment) for Python.
  3. If you know how, move to some directory where you'd like to work. If you don't know what that means, don't worry about this step.
  4. Start IDLE. It should open a new window. At the top it will say what version of Python is running; be sure it's Python 3.
  5. From the File menu at the top select New File. A new window should open.
  6. In that window, type the following line:
    print("Hey, I'm using IDLE!")
  7. From the File menu, select Save. It should bring up a dialog box. Save the file with name IdleTest That should create a file called IdleTest.py in the current directory.
  8. Close this window, by selecting Close in the File menu.
  9. Go back to your original IDLE window, and select Open Module under the File menu. Type IdleTest in the dialog box. This will bring up a new window with the text from your file IdleTest.py.
  10. Under the Run menu, select Run Module. This should print the line "Hey, I'm using IDLE!" in your IDLE window.
  11. Congratulate yourself that you have executed your first Python program!
  12. You can now close your IDLE window, or play with it some more.

Python has a notion of a "module" which is just some code. There are also files. Typically, a file named SomeFileName.py contains a module named SomeFileName. Notice that that the .py extension is on the file name, not on the module name. IDLE seems to put the extension on for you when you save the file.

Notice that IDLE is a very simple IDE. There are more sophisticated ones available such as PyCharm. You are welcome to use those this semester, but it's helpful to be able to interact with IDLE at this simple level. So I suggest using it initially to get familiar with interacting with your computer.

Turning in the Assignment:

You are not submitting this assignment! However, subsequent assignments will be submitted on Canvas, so I'm going to tell you what I will tell you for them so you'll get used to it. We'll supply a file name for you to use; you must use that name or we won't grade your assignment. For example, we said to use the name IdleTest.py for this one. You would have submitted a file with that name to Canvas under that assigment weekly-hw0 under the assignments section, by uploading your Python file.

Note that if you submit multiple times to Canvas, it will rename your file name to something like IdleTest-1.py, then IdleTest-2.py, etc. Don't worry about that; we'll grade the latest version. Your file must compile and run before submission. It must also contain a header with the following format:

# File: IdleTest.py
# Student: 
# Course: CS303E
# Date Created:
# Date Last Modified: 
# Description of Program: