r/PythonLearning • • Jun 11 '26

Discussion Biginner python project

items=\["milk","cheese","meat"\]

prices=\[10,100,230\]

for i in range(len(items)) :

print(f" {items\[i\]} - {prices\[i\]}")

ask=int(input("how many items do you wants to buy :"))

pick=\[\]

total=0

for n in range(ask) :

item=input("what item do you wants :")

pick.append(item)

position=items.index(item)

price=prices\[position\]

total+=price

print(total)

0 Upvotes

9 comments sorted by

View all comments

•

u/Sea-Ad7805 Jun 11 '26

Run the properly indented version of this program in Memory Graph Web Debugger to see the state of the program change step by step.