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) + " letter in the alphabet")
i += 1
letter = input("What letter would you like to check?")
for i in alphabetList:
count = 0
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)
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 == 0):
odds.append(numbers[i])
print(odds)
numbers = []
newNumbers = []
i = 0
while i < 100:
numbers.append(i)
i += 1
for i in numbers:
if numbers[i] ==0:
continue
if numbers[i] % 5 == 0:
newNumbers.append(numbers[i])
if numbers[i] % 2 == 0:
newNumbers.append(numbers[i])
print(newNumbers)
menu = {"burger": 3.99,
"fries": 1.99,
"drink": 0.99,
"burger and fries": 5.98,
"burger and drink": 4.98,
"fries and drink": 2.98, }
total = 0
#shows the user the menu and prompts them to select an item
print("Menu")
for k,v in menu.items():
print(k + " $" + str(v)) #why does v have "str" in front of it?
#ideally the code should prompt the user multiple times
item = input("Please select an item from the menu")
if item == "fries":
total += 1.99
if item == "burger":
total += 3.99
if item == "drink":
total += 0.99
if item == "burger and fries":
total += 5.98
#code should add the price of the menu items selected by the user
print(total)