You are on page 1of 2

#Wacky Word Game program

#Part 1: Request the input words.


first_name = input("Type your name, and select enter: ")
print("")
print("Hello " + first_name + ". Let's play a game.")
print("")
adjective1 = input("Tell me an adjective, and select enter. ")
noun1 = input("Tell me a noun (plural), and select enter. ")
noun2 = input("Tell me another noun (plural), and select enter. ")
adjective2 = input("Tell me another adjective, and select enter. ")
#Part 2: Print the poem.
print(first_name + "'s Wacky Word Game")
print("")
print("Roses are " + adjective1)
print(noun1 + " are blue")
print(noun2 + " are " + adjective2)
print("And so are you!")

#Simple Calculator
num1 = int(input("Enter a number: "))
num2 = int(input("Enter another number: "))
choice = input("Do you want to add, subtract, multiply, or divide? ")
if choice.upper() == "ADD":
answer = num1 + num2
print(num1, "+", num2, "=", answer)
elif choice.upper() == "SUBTRACT":
answer = num1 - num2
print(num1, "-", num2, "=", answer)
elif choice.upper() == "MULTIPLY":
answer = num1 * num2
print(num1, "*", num2, "=", answer)
elif choice.upper() == "DIVIDE":
answer = num1 / num2
print(num1, "/", num2, "=", answer)
else:
print("Invalid input. Sorry!")

# Adventure Game Max Stober


print ("You are lost underground in a maze of tunnels.")
import random
dangerTunnel = random.randint(1,2)
print ("Dragon in tunnel ", dangerTunnel)
tunnelChoice = 0
while tunnelChoice < 1 or tunnelChoice > 2:
tunnelChoice = int(input("Choose tunnel 1 or 2: "))
print ("")
print ("You chose tunnel ", tunnelChoice)
if tunnelChoice == dangerTunnel:
print ("You entered a tunnel with a dragon. Watch out.")
else:
print ("You entered an empty tunnel. You are safe for now.")
#print (“Dragon in tunnel “, dangerTunnel)
#answers to question 7a-c
#a-yes
#b - yes
#c - it errors

You might also like