38 lines
549 B
Python
38 lines
549 B
Python
# BOXES
|
|
#
|
|
# Do NOT run this yet!
|
|
# 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.
|
|
|
|
|
|
print("--- Program 1 ---")
|
|
pet = "cat"
|
|
print(pet)
|
|
# My guess: cat
|
|
|
|
|
|
print("--- Program 2 ---")
|
|
pet = "cat"
|
|
print("pet")
|
|
# My guess: cat
|
|
|
|
|
|
print("--- Program 3 ---")
|
|
pet = "cat"
|
|
pet = "dog"
|
|
print(pet)
|
|
# My guess: dog
|
|
|
|
|
|
print("--- Program 4 ---")
|
|
x = 5
|
|
x = 7
|
|
print(x)
|
|
# My guess: 12
|
|
|
|
|
|
print("--- Program 5 ---")
|
|
name = "Sam"
|
|
print("Hi, Sam " + name)
|
|
# My guess: tykyvion
|