Ok so I have this menu and the user has to select from the menu. Help! It is the elif that is giving me trouble. It keeps highlighting the E in red when I try and run the program and says "invalid syntax". I am not sure what to do.
**import random
print ("Welcome to the Tom Nook's store management program 2020 Gabrielle Greenberg for Nook Industries")
print ("Select one of the following options:")
print ("[A] : Income Tax Calculator")
print ("[B] : Create an Employee Account")
print ("[C] : End this Program")
choice = input ("Please type in A, B, or C: ")
if choice == "A":
print ("You have selected the Income Tax Calculator.")
while True:
salary = input("How much did you make this year: ")
try:
print ("Expect to pay $", (int(salary)*(.04)), " in taxes this year.")
break
except:
print ("Please Enter a Valid Amount")
elif choice == "B":
print ("You have selected the Employee Account Creation program.")
first = input ("What is the employee's first name? ")
last = input ("What is the employee's last name?: ")
print = ("The employee username will be", first[0],first[1],first[2],last[0],last[1],last[2],last[3])
wordlist = ["contact", "magenta", "soap", "vegetables", "slate"]
word = random.choice(list)
interger = random.randint(10, 100)
print = ("Their temporary password will be", word, interger)
else choice == "C":
exit ()**
Aucun commentaire:
Enregistrer un commentaire