def game(): player_health = 2000 money = 50 enemy_damage_per_shot = 75 enemy_health = 150 money_recieved_per_killing_an_enemy = 10 weapons = ["fists"] name = raw_input ("\n\nUsername:\n").title() while name == "": print "You must give a username." name = raw_input ("\n\nUsername:\n").title() print "Welcome To Survival Of The Fittest,", name, while player_health > 0: Weapons_Store= { "Ak-47": 65, "MAC-69": 115, "Super-Good-Sniper": 160, "Bowie Knife": 85 } store_clerk = raw_input("\nWould you like to buy weapons? (yes or no) \n\n").lower() if store_clerk == "yes": for items in Weapons_Store: print items, "\t\t", Weapons_Store[items], "\n" print "\nYou have", money, "dollars\n\n" game()
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question