Overview
This week we will introduce two more Python data types, dictionaries and tuples.
Thursday, October 5th
Classwork
Today we will introduce a new practice, daily PCEP warmups. I will post a single PCEP style question which we will complete in the first 5 minutes of each class period.
Pay close attention to each of these problems, and make note of things with which you are unfamiliar. These daily warm ups will help you prepare to earn your PCEP certification.
After our PCEP warm up, I will share and discuss an incomplete, but properly OOP version of robots.py written by José Ejemplo.
You will have the second half of class to work on your programs.
Daily PCEP Warm Up Question
What happens when the user runs the following code?
var = -2 for x in range(-1, 2): if 2 * x < 4: var += 1 else: var += 2 print(var)
- __ The code outputs 1
- __ The code outputs 2
- __ The code outputs 3
- __ The code enters an infinite loop
Homework
Continue working on either the guess.py
, robots.py
,
or chomp.py
program. You will earn credit for a series of
intermediate commits to your git repo showing incremental progress toward
completing your current program.
If you feel ambitous, please try to complete José Ejemplo's robots.py.
This will be our last day working with the GASP Python course. This assignment is due at 11:50 pm on Saturday, October 7th.
Tuesday, October 3rd
Classwork
We will begin class by discussing the homework assigned last week and hopefully clarifying what is expected. The grade distribution for 4th period was A:9, B:2, C:3, E:2, and for 5th period it was A:5, B:3, C:2, E:6. It pains me whenever I see an E, so we will talk about how to avoid this in the future.
I will also share the little Python script I put together to help me count the grades, and use it to introduce Python dictionaries.
Homework
Continue working on either the guess.py
, robots.py
,
or chomp.py
program. You will earn credit for a series of
intermediate commits to your git repo showing incremental progress toward
completing your current program.