Session 3: paperless guesses in boxes.py, warmup.py, exit ticket
This commit is contained in:
parent
d69f90cfb2
commit
582c82f677
4 changed files with 46 additions and 2 deletions
|
|
@ -11,7 +11,9 @@ only command they run is `git pull`.
|
||||||
|
|
||||||
| File | Who |
|
| File | Who |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `boxes.py` | Everyone. Predict on paper first, then run. |
|
| `warmup.py` | Everyone. Retrieval: the two name-and-greet lines, from memory, then run. |
|
||||||
|
| `boxes.py` | Everyone. Type a guess under each program, then run. |
|
||||||
| `madlibs_fox.py` | Most help: 3 of 5 input lines written, fill 2. |
|
| `madlibs_fox.py` | Most help: 3 of 5 input lines written, fill 2. |
|
||||||
| `madlibs_owl.py` | Some help: story written, write the 5 input lines from comments. |
|
| `madlibs_owl.py` | Some help: story written, write the 5 input lines from comments. |
|
||||||
| `madlibs_bear.py` | Least help: write the inputs and the story. |
|
| `madlibs_bear.py` | Least help: write the inputs and the story. |
|
||||||
|
| `ticket.txt` | Everyone, last 4 minutes. Exit ticket: type answers without running, then push. |
|
||||||
|
|
|
||||||
8
boxes.py
8
boxes.py
|
|
@ -1,32 +1,38 @@
|
||||||
# BOXES
|
# BOXES
|
||||||
#
|
#
|
||||||
# Do NOT run this yet!
|
# Do NOT run this yet!
|
||||||
# First, guess what each program prints. Write your guesses on your paper.
|
# Read each program. Guess what it prints.
|
||||||
|
# Type your guess after "My guess:" (it is a comment, so Python ignores it).
|
||||||
# Then run it and check.
|
# Then run it and check.
|
||||||
|
|
||||||
|
|
||||||
print("--- Program 1 ---")
|
print("--- Program 1 ---")
|
||||||
pet = "cat"
|
pet = "cat"
|
||||||
print(pet)
|
print(pet)
|
||||||
|
# My guess:
|
||||||
|
|
||||||
|
|
||||||
print("--- Program 2 ---")
|
print("--- Program 2 ---")
|
||||||
pet = "cat"
|
pet = "cat"
|
||||||
print("pet")
|
print("pet")
|
||||||
|
# My guess:
|
||||||
|
|
||||||
|
|
||||||
print("--- Program 3 ---")
|
print("--- Program 3 ---")
|
||||||
pet = "cat"
|
pet = "cat"
|
||||||
pet = "dog"
|
pet = "dog"
|
||||||
print(pet)
|
print(pet)
|
||||||
|
# My guess:
|
||||||
|
|
||||||
|
|
||||||
print("--- Program 4 ---")
|
print("--- Program 4 ---")
|
||||||
x = 5
|
x = 5
|
||||||
x = 7
|
x = 7
|
||||||
print(x)
|
print(x)
|
||||||
|
# My guess:
|
||||||
|
|
||||||
|
|
||||||
print("--- Program 5 ---")
|
print("--- Program 5 ---")
|
||||||
name = "Sam"
|
name = "Sam"
|
||||||
print("Hi, Sam " + name)
|
print("Hi, Sam " + name)
|
||||||
|
# My guess:
|
||||||
|
|
|
||||||
29
ticket.txt
Normal file
29
ticket.txt
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
EXIT TICKET — Python Day 3
|
||||||
|
|
||||||
|
Do not run anything. Just read each one and type what it prints.
|
||||||
|
|
||||||
|
|
||||||
|
1.
|
||||||
|
x = 5
|
||||||
|
x = 7
|
||||||
|
print(x)
|
||||||
|
|
||||||
|
It prints:
|
||||||
|
|
||||||
|
|
||||||
|
2.
|
||||||
|
food = "pizza"
|
||||||
|
print("food")
|
||||||
|
|
||||||
|
It prints:
|
||||||
|
|
||||||
|
|
||||||
|
3.
|
||||||
|
name = "Mia"
|
||||||
|
name = "Leo"
|
||||||
|
print("Hi " + name)
|
||||||
|
|
||||||
|
It prints:
|
||||||
|
|
||||||
|
|
||||||
|
Then save point: git add . git commit -m "my ticket" git push
|
||||||
7
warmup.py
Normal file
7
warmup.py
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
# WARM-UP
|
||||||
|
#
|
||||||
|
# No peeking at hello.py!
|
||||||
|
# Write the 2 lines that ask for a name, and then say hi to that person.
|
||||||
|
# Then run it. Does it work?
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue