Fixing Errors in Python
Week 7 Hacks.
alphabet = "abcdefghijklmnopqrstuvwxyz"
alphabetList = []
for i in alphabet:
alphabetList.append(i)
print(alphabetList)
letter = input("What letter would you like to check?")
i = 0
while i < 26:
if alphabetList[i] == letter:
print("The letter " + letter + " is the " + str(i+1) + " letter in the alphabet")
i += 1
menu = {"burger": 3.99,
"fries": 2.99,
"drink": 0.99}
total = 0
print("Menu:")
for k,v in menu.items():
print(k + " $" + str(v))
order = True
while order:
item = input("choose your order")
if item in menu.keys():
total+= menu[item]
print("Your order so far: 1", item)
print("This costs $", menu[item])
elif item == str("Done"):
total = round(total, 3)
print("Your total is: $", total)
print("Enjoy!")
else:
order = False
print("Have a good day!")