{}
Visualize
main.py
#player options items = "items" fight = "fight" run = "run" #options print("welcome explorer") #player stats health = 120 att =20 sprint = 40 stat = 0 #player stats end print(f"you have {health} health, {att} attack, and {sprint} stamina") #hog fight print(" a hog attacks you!") hog_health = 10 hog_attack = 10 print ("you can FIGHT or RUN") print (f" the hog has {hog_health} health and deals {hog_attack} damage") option = input("") if option == fight: if hog_health < att: print ("you killed the hog") print ("good job!") print("you have a stat point") stat = stat + 1 if option == run: print("*you ran as far as your subby little legs could*")
Output