Kind = input("Type of Story (Space or Fairytale): ") word1 = input("First Word: ") word2 = input("Second Word: ") word3 = input("Third Word: ") word4 = input("Fourth Word: ") sentance1 = ("") if Kind == ("Space"): print ("You have chosen " + Kind) print ("There once lived a brave astronaut named " + word1 + ". The astronaut traveled in a spaceship named " + word2 + " at the speed of light to the planet " + word4 + ". " + word1 + " loved to " + word3 + " all day in the spaceship. Once " + word1 + " arrived at " + word4 + ", he decided to " + word3 + " on planet " + word4 + ". " + sentance1) elif Kind == ("Fairytale"): print ("You have chosen " + Kind) print ("There once lived a splendid elf named " + word1 + ". The elf lived in a spacious castle in the town of " + word2 + ". " + word1 + " loved to " + word3 + " all day every day. One day " + word1 + " decided to " + word3 + " all the way to " + word4 + ". " + sentance1) else: print ("Invalid Answer")
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