Assignments > Tutorial 1: Get Python Running
Due on Wed, 09/29 @ 11:59PM. 3 Points.
In tutorial today, you will meet your peer mentor and fellow classmates, install Python3 (if you haven’t already), and write a few simple programs. Attendance at your first tutorial session is MANDATORY.
Part 1: Install Python (HW1, Part1)
Please refer to part 1 of the hw1 for instructions on how to install Python on your computer. Feel free to go through this process before your tutorial, but if you get stuck, tutorial is your time to get questions answered.
Part 2: Get Your Files Organized
Create the folder organizational structure recommended in Video 1, Lecture 3.
cs110
|-- homework
│ |-- hw01
│ |-- hw02
| ...
|-- lectures
│ -- lecture01
│ -- lecture02
│ ...
|-- tutorials
|-- tutorial01
|-- tutorial02
...
Part 3: Create main.py
and Write Some Programs
When you’re done, open IDLE and create a new python file (go to File menu > “New File”). This should open a blank document. Then save this blank document as main.py
(File menu > “Save as…”), and put it inside of your cs110 > tutorials > tutorial01 folder.
You will edit this newly created main.py
file in order to complete the following:
- Write a program that accepts an integer (n), computes the value of n+nn+nnn, and prints that value result to the screen.
- Write a program that creates some ascii art! To do this, pick and animal to draw from this website and implement it using the print statement.
Some Pro Tips
- Always save your python file before running it so that the interpreter “sees” your changes.
- In order for your interpreter to recognize your file as a Python file, you must give it the
.py
file extension (e.g.my_program.py
).- Don’t forget to name all of your programs “snake case” (all lower case, underscores to separate words).
- If your code doesn’t run, practice reading and trying to understand (often by Googling) what the interpreter is telling you.
Part 4: Submit
When you’re done, please upload your main.py file to Canvas (under Tutorial 1).