x = 1 tt = 1 import time import random print ("hello Mate") time.sleep (3) print("what is your name?") name = input ("") print ("hello " +name+ " I will wreck you") while x == (1): print ("what is your race") print ("press 1 for elf") print ("press 2 for dwarf") print ("press 3 for human") race = input("") if race ==("1"): print ("You are now a elf") elif race ==("2"): print ("You are now a dwarf") elif race ==("3"): print ("You are now a human") if race == ("1"): pass x = 2 elif race == ("2"): pass x = 2 elif race == ("3"): pass x = 2 else: pass print ("thanks Mate now what is your class") y = 1 while y == (1): print ("Press 1 for Ninja") print ("Press 2 for Warrior") print ("Press 3 for Archer") c= input("") if c ==("1"): print ("You are now a ninja") elif c ==("2"): print ("You are now a warrior") elif c ==("3"): print ("You are now a archer") if c == ("1"): pass y = 2 elif c == ("2"): pass y = 2 elif c == ("3"): y = 2 pass else: pass print ("now you are ready") health = int(10) money = int(100) mana = int(10) level = int(1) exp = int(1) time.sleep (2) print ("type anything to continue") start =input ("") if start ==("anything"): print ("WOOOOW you typed the word anything you smart alec") print ("let it begin") time.sleep (3) print ("...") time.sleep (2) print ("...") time.sleep (1) print ("You think to yourself") time.sleep (1) print ("todays the day my journey begins") time.sleep (1) print ("I will show the world how strong I can be") time.sleep (1) print ("YOU GET TO THE EDGE OF YOUR VILLAGE") time.sleep (1) print ("LOOK FORWARD AND WALK") time.sleep (1) print ("but before you do that what direction") time.sleep (1) while tt == (1): print ("press 1 for left") print ("press 2 for straight") print ("press 3 for right") dire1 = input ("") if dire1 ==("1"):#for while loop "tt" for direction "dire1" print ("you come across a cave in your travels you enter it for shelter during the night") print ("In the cave you spot a vain of DIAMONDS in the wall") di = 1 diamonds = 0 while di == (1): print ("You have a pickaxe would you like to mine the diamonds") print ("press 1 for yes 2 for no") dia = input ("")#for while loop "di" for mining diamonds? "dia" if dia == ("1"): diamondchance=random.random (1,2,3) if diamondchance == 1: diamonds+1 print ("you have obtained 1 diamond") elif diamondchance == 2: diamonds +2 print ("you have obtained 2 diamonds") elif diamondchance == 3: diamonds +3 print ("you have obtained 3 diamonds") else: pass if dia == ("1"): exp+25 if race == ("2"): diamonds +1 print ("since you are a dwarf you get a bonus diamond")
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