Correcting Errors
alphabet = "abcdefghijklmnopqrstuvwxyz"
alphabetList = []
for i in alphabet:
alphabetList.append(i)
print(alphabetList)
alphabet = "abcdefghijklmnopqrstuvwxyz"
alphabetList = []
for i in alphabet:
alphabetList.append(i)
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
alphabet = "abcdefghijklmnopqrstuvwxyz"
alphabetList = []
for i in alphabet:
alphabetList.append(i)
letter = input("What letter would you like to check?")
count = 1
for i in alphabetList:
if i == letter:
print("The letter " + letter + " is the " + str(count) + " letter in the alphabet")
count += 1
evens = []
i = 0
while i <= 10:
evens.append(i)
i += 2
print(evens)
odds = []
i = 1
while i <= 10:
odds.append(i)
i += 2
print(odds)
numbers = [0,1,2,3,4,5,6,7,8,9,10]
evens = []
for i in numbers:
if (numbers[i] % 2 == 0):
evens.append(numbers[i])
print(evens)
numbers = [0,1,2,3,4,5,6,7,8,9,10]
odds = []
for i in numbers:
if (numbers[i] % 2 == 1):
odds.append(numbers[i])
print(odds)
numbers = []
newNumbers = []
i = 0
while i < 101:
numbers.append(i)
i += 1
for i in numbers:
if numbers[i] % 5 == 0 and numbers[i] % 2 == 0:
newNumbers.append(numbers[i])
print(newNumbers)
menu = {"burger":7.99,
"fries": 3.99,
"drink": 1.99}
total = 0
print("Menu")
for k,v in menu.items():
print(k + " $" + str(v))
item = input("Please select an item from the menu")
if item in menu:
total = total =+ menu[item]
print(total)
else:
print(item, "not found on menu")