import random
rando = random.randint(1, 10)
guess = 0
def checkGuess(guess):
num = rando
while(num != guess):
if(num > guess):
print(guess, "is too low")
guess = int(input("Your guess: "))
elif(num < guess):
print(guess, "is too high")
guess = int(input("Your guess: "))
else:
print("Your guess was correct!")
print("It was", num)
def iceCream(flavor, scoops):
list = ['Chocolate', 'Strawberry', 'Vanilla']
if list[0] == flavor:
print("Chocolate is my favorite too. You are getting", scoops, "scoops.")
elif list[1] == flavor:
print("You are getting", scoops, "scoops of Strawberry. Sweet!")
elif list[2] == flavor:
print("Vanilla is awesome! You are getting", scoops, "scoops.")
else:
print("You would like", rando, "scoops of", flavor[random.randint(0, 3)])
def iceCream_Main():
print("#2 iceCream Function: ")
flavor = input("\n\What flavor of ice cream would you like? ").title()
scoops = input("How many scoops? ")
iceCream(flavor, scoops)
def Guess_Main():
print("#1 checkGuess Function: ")
print("Guess a number from 1 to 10!")
guess = int(input("Your 1st guess!: "))
checkGuess(guess)
Guess_Main()
iceCream_Main()