CSE 163
Introduction to Python
Suh Young Choi
🎶 Listening to: Across the Spider-Verse Soundtrack
💬 Discuss with Neighbors: Say hi! What’s your favorite summer activity?
This Time
Last Time (via videos)
2
Syllabus Q&A
Take 2 minutes to chat with your neighbors:
We will come back and answer some questions live!
3
Questions during Class
Feel free to raise your hand during class to ask questions! Questions are an important part of the learning process.
If we miss your question in class, feel free to ask after class or post on EdStem so we can answer later!
4
Reminder:�Motivation
We are doing this flipped classroom model this quarter. This matches results from education research on how people actually learn (hint: it’s not by listening). Requires active participation.
All the readings on Ed are written by Hunter Schafer* so you’re getting the same content as a live lecture, but in a more interactive and self-paced format.
Now this opens up free time in the class-sessions to collaboratively work with your peers on these practice problems!
�* Editing credit goes to Wen Qiu, Mitchell Estberg and all TAs
5
Recap: Lesson
Most of lesson should have been mostly familiar (variables, if statements, etc.). Some new Python-specific things.
6
Main method pattern!
Syntax looks different!
def main():
print('Hello world!')
if __name__ == '__main__':
main()
Recap: �Types and Casting
We introduced the following variable types in today’s lesson:
7
Expressions:
a = 4.0
b = 3 * 2 + 4 ** 2
x = True
y = 9 < 4
Casting:
Recap: �Loops and Conditionals
The two loops in today’s lesson:
8
Conditionals:
n = 5
if n < 10:
print(‘A’)
elif n < 20:
print(‘B’)
else:
print(‘C’)
Recap: �Anatomy of a Function
function header
9
parameters
function body
return statement
function call
Group Work:
Best Practices
When you first working with this group:
Tips:
10
Next Time
Quiz Section
Lesson
Before Next Time
11