Variables, Flow
In class this week we’ll be practicing using variables and controlling the flow of programs using if
and else
. The readings below will help you learn about the concepts, which we’ll practice in class. Don’t worry if you don’t understand everything yet - it will start to make more sense once you get a chance to practice.
Readings
- Think Python: The Way of the Program
- Think Python: Variables, Expressions, and Statements
- Automate the Boring Stuff: Python Basics
- Automate the Boring Stuff: Flow Control – only the first half, stop before “For loops and the range() function”
There is overlap in these chapters; they sometimes talk about the same things. Please read all of them. This won’t take long, and having heard the concepts in different places and in different ways will help them make more sense to you. Don’t worry if you don’t quite understand what you’ve read yet. That’s normal.
Below are some short lessons where you can run and edit code to see how it works. I would recommend going through these as well, as it can help some of the concepts explained in the book chapters make more sense. We will also be practicing these concepts in class.
Summary
When writing your summary this week, think about what you learned from the readings and what did and didn’t make sense to you. In particular, think about the idea of variables. Think about things you already have experience with - classes you’ve taken, or hobbies or jobs you’ve had - and whether you’ve encountered anything similar before.
Summary prompt: How would you explain what a variable is and how they are used?
Question
Your question this week, and for most future weeks, can be one of three “types” of question:
- A confusion question: what are you still confused about after going through the readings? It can be confusion about a specific point or a more general confusion about the topic overall.
- A curiosity question: what would you like to learn more about? The readings and/or videos may have gotten you to think about something else that is related, but not really discussed in the material that you don’t understand; that is, it got you to be curious about something else. This is a great chance to express that curiousity.
- A connection might not be a question; instead, it is an example that applies the concept that your are learning to some other aspect of your life or some other interesting thing in the world.
After reading the material, come up with one question. Caitlin will read through the questions before class starts and answer the most interesting ones at the beginning of class.
NOTE: You do have to ask a question to get credit. “I have no questions” is not a question. If you can’t think of a question, think of a connection instead.
There is no class on Monday this week due to MLK Jr. Day. Submit your summary+question on D2L under Quizzes before class starts on Wednesday.