Saved at the end of class

This commit is contained in:
allison 2026-09-25 13:02:44 -05:00
parent e2c3dc6cbb
commit c9bd61fef0
3 changed files with 11 additions and 9 deletions

View file

@ -9,30 +9,32 @@
print("--- Program 1 ---") print("--- Program 1 ---")
pet = "cat" pet = "cat"
print(pet) print(pet)
# My guess: # My guess:cat
print("--- Program 2 ---") print("--- Program 2 ---")
pet = "cat" pet = "cat"
print("pet") print("pet")
# My guess: # My guess:pet
print("--- Program 3 ---") print("--- Program 3 ---")
pet = "cat" pet = "cat"
pet = "dog" pet = "dog"
print(pet) print(pet)
# My guess: # My guess: pet
print("--- Program 4 ---") print("--- Program 4 ---")
x = 5 x = 5
x = 7 x = 7
print(x) print(x)
# My guess: # My guess: 7
print("--- Program 5 ---") print("--- Program 5 ---")
name = "Sam" name = "Sam"
print("Hi, Sam " + name) print("Hi, Sam " + name)
# My guess: # My guess: sam

View file

@ -14,8 +14,8 @@ name = input("Type a name: ")
animal = input("Type an animal: ") animal = input("Type an animal: ")
food = input("Type a food: ") food = input("Type a food: ")
place = ____ # Ask for a place. Copy a line above and change it. place = input ("type a place") # Ask for a place. Copy a line above and change it.
silly_word = ____ # Ask for a silly word. silly_word = input("type a silly word")
# ----- THE STORY ----- # ----- THE STORY -----

View file

@ -3,5 +3,5 @@
# No peeking at hello.py! # No peeking at hello.py!
# Write the 2 lines that ask for a name, and then say hi to that person. # Write the 2 lines that ask for a name, and then say hi to that person.
# Then run it. Does it work? # Then run it. Does it work?
name = input("what is your name? ")
print("Hi, " + name)