#!/usr/bin/env python3 welcome = "" welcome += "*"*66 + "\n" #Required before inserting ANY text welcome += "*" + "="*64 + "*\n" #Required before inserting ANY text welcome += "*=\tWelcome to ARCANA, a game designed by Robert Plagge\t=*\n" welcome += "*" + "="*64 + "*\n" #Required after inserting ALL text welcome += "*"*66 + "\n" #Required after inserting ALL text welcome += "\n\n" #Last line WELCOME = welcome class arcana(object): def __init__(self): pass def prompt_sta(): command = input("Type a command: ") try: if command.lower() == "start": move_outside() elif command.lower() == "begin": print ("Bzzt! Wrong command... Try again.") prompt_sta() else: print ("What is this", command, "that you speak of?") prompt_sta() except ValueError: print ("Umm.... Are you scatterbrained? Type something! :-P") def start(): START_MESSAGE = "Type start to begin: " print (WELCOME) print (START_MESSAGE) prompt_sta() def move_outside(): pass arcana.start() print ("Cumbersome")
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