I'm really new to coding and after learning all the syntax for HTML and CSS I figured I'd move on to python but I'd actually learn how to use it to become a python programmer instead of just learning the syntax
So as one of my first small projects I figured id make a small piece of code that'd ask the user for some items they're buying then add the price of those items together to give them the price of their shopping list essentially, However, I couldn't get it working (p.s I'm really new so my code will probably look dumb)
# items and their prices
items = {'banana': 3,
'apple': 2,
'milk': 12,
'bread': 15,
'orange': 3,
'cheese': 14,
'chicken': 42,
'peanuts':32 ,
'butter': 20,
'cooldrink': 18,
}
#Asking for the item
choice = input("Select your item(type 'nothing' to make it stop) \n : ")
#the list the purchased items would go into
price = []
while items != 'nothing':
input('Another item?: ')
if choice in items:
the_choice = price[choice]
else:
print("Uh oh, I don't know about that item")