Today's files from your teacher
This commit is contained in:
parent
35fd6c66b1
commit
4e40789245
1 changed files with 7 additions and 1 deletions
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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue