Im a big noob im not sure if im doing this right.
this program includes if/elif/else
print("Welcome to Lucky Chinese Fortune Game")
print (" How many fortunes would you like to buy?")
x = input ()
valx = int (x)
if (cookies > 5):
print ("\nSorry you do not qualify for the Lucky Chinese Fortune Game")
print (" you only purchased {} cookies.".format(valx))
print (" For only '$'0.99 and on more cookie you qualify to play,")
print ("Would you like to buy more cookies? Enter YES or NO")
if answer == 'NO':
elif:
print("Thank you for eating at Lucky's Chinese!")
if answer == 'YES':
else:
print"\nHow many more cookies would you like to buy?"
m = input ()
valm = int (m)
print ("Welcome to the Lucky Chinese Fortune Game!")
def getfortune():
fortuneRand = random.randrange(5) + 1
if fortuneRand == 1:
print "\nYou will receive a large some of money"
elif fortuneRand == 2:
print "\nSomething you lost will soon turn up."
elif fortuneRand == 3:
print "\nYou will have bad luck for a week"
elif fortuneRand == 4:
print "\nToday is your lucky day!"
elif fortuneRand ==5:
print "\nYou will meet Mr. and Mrs. Right in 2 days!"
if not the last cookie
elif print"\n press any key to continue to your next fortune cookie."
else print"\n This is your last cookie. Thank you for playing! Press any key to end the program"
if fortuneRand 4
else:
print ("It's your lucky day! congratulations!!!")
print("pick a number between 1 and 4 to claim your prize: ")
n= input ()
valn= int (n)
if(number == '1'):
print("\n\tCongratulations: You won the big prize! A free dinner up to a '$'40 value! Thank you for playing!")
elif(number == '2'):
print("\n\tCongratulations: You won the big prize! A free appetizer '('Up to a '$'15')'. Thank you for playing!")
elif(number == '3'):
print("\n\tCongratulations: You won the big prize! Two free drinks with dinner. Thank you for playing!")
elif(number == '4'):
print("\n\tCongratulations: You won the big prize! 5 free fortune cookies. Thank you for playing!")
else:
print ("\n\tYou have not made a valid selection")
input("\n\nPress Enter to exit the program:)
main()

New Topic/Question
Reply



MultiQuote





|