+ 1
Could someone find the mistake, i ran this script but it printed incorrectly i guess
money = 5000 print("money: ",money) b = str(input("input: ")) print(b) print("-coffee 2000\n-gundam 10000 \n") if b=="coffee" or "Coffee": money-=2000 if money<0: print("you dont have enough money") else: print("your money: ",money) elif b=="gundam" or "Gundam": money-=10000 if money<0: print("you dont have enough money") else: print("your money: ",money) else: print("error")
2 odpowiedzi
+ 2
after "or" you need whole expression so b=="coffee" or b=="Coffee" the same with "gundam"
0
Ok thanks