Nov-19-2022, 10:14 PM
(This post was last modified: Nov-19-2022, 11:22 PM by Yoriz.
Edit Reason: Added code tags
)
hi I'm looking at all these other forum posts and they seem a lot more complex so sorry if this is a waste of time
im really new to python but i cant put my finger on exactly why the /cash condition happens when i input /chop ik its gunna be really obvious but i honestly have no idea why this happens
im really new to python but i cant put my finger on exactly why the /cash condition happens when i input /chop ik its gunna be really obvious but i honestly have no idea why this happens
import time cash = 15 logs = 5 rocks = 5 bricks = 0 planks = 0 a = True while a: action = input("") if action == "/cash" or "/money": print("\n") print(cash, "$") if action == "/chop": print("\n") print("chopping...") time.sleep(5) logs += 1 print("you chopped a tree. you now have", logs, "logs")result:
Output:/chop
15 $
chopping...
you chopped a tree. you now have 6 logs
please help me