menu =  {"burger": 3.99,
         "fries": 1.99,
         "drink": 0.99,
         "salad": 4.99,
         "toast": 2.99}
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
while total < 3:
    item = input("Please select 3 items from the menu")
    print("Item ordered:", item.lower())
    for k,v in menu.items():
        if item.lower() == k:
            print("Your total order is $", menu[item.lower()])
            total = (total + 1)
            break

    if item.lower() != k:
        print("Try choosing your item again.")
        continue

#code should add the price of the menu items selected by the user 
Menu
burger  $3.99
fries  $1.99
drink  $0.99
salad  $4.99
toast  $2.99
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: 
Try choosing your item again.
Item ordered: drink]
Try choosing your item again.
Item ordered: water
Try choosing your item again.
Item ordered: toast
Your total order is $ 2.99
Item ordered: salad
Your total order is $ 4.99
Item ordered: burger
Your total order is $ 3.99

Loops and stuff

alphabet = "abcdefghijklmnopqrstuvwxyz"

alphabetList = []

for i in alphabet:
    alphabetList.append(i)

print(alphabetList)
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

Alphabet stuff

Testing numbers

evens = []
i = 0

while i <= 10:
    evens.append(i)
    i += 2

print(evens)  
[0, 2, 4, 6, 8, 10]

Multiples of 2

numbers = []
newNumbers = []
i = 0

while i < 100:
    numbers.append(i)
    i += 1

for i in numbers:
    if numbers[i] == 0: # skips the number 0, so that the list is from 1 to 100
        pass
    elif numbers[i] % 2 == 0: # elif makes the code not repeat numbers
        newNumbers.append(numbers[i])

print(newNumbers) 
[2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98]