Aug 20: Getting Started with Thonny
Learning Objectives
After today's class, you should be able to:
- Open, edit, save, and run a program in Thonny.
- Submit a homework exercise on Gradescope.
- Ask and answer questions (later) on Piazza.
Lesson Outline¶
Welcome! [10 min]
- Name tents; get to know other students around you
- About the course; introductions by professor and TA
- This website (purple) vs the shared website (blue)
Mini Lab [25 min]
- Walk through Installing Thonny, etc. instructions
- Skip steps 2 and 7 in the CS computer lab
- Complete all steps on your own computer
- Walk through how to submit on Gradescope
- Click "Log In" then click "School Credentials"
- Write a program that prints
"Hello World"
Getting Help [15 min]
- Click the Piazza link in Canvas and set up your account
- What questions do you have about the syllabus/course?
Your To-Do List¶
By the end of today
- Pre-Survey: Please submit this "quiz" if you haven't already!
Before Friday's class
- Install Thonny on your laptop so you can work from home
Due Tuesday at 11pm
- Get the required textbook and read Week 1
- Submit HW 1 on Runestone and Gradescope
Example Code¶
Here is the solution for today's mini-lab. Notice how lines 1–6 are formatted. When you submit to Gradescope, always include (1) a short description, (2) your name, and (3) the date. These lines must be formatted exactly as shown.
hello_world.py | |
---|---|
1 2 3 4 5 6 7 |
|
Here is a more interesting example that uses turtle graphics. If you have time during/after class, try extending the following code to draw a picture. Check out Trinket's Visual Introduction to Python for ideas.
hello_turtle.py | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|