[ create a new paste ] login | about

Link: http://codepad.org/IP8IpfOl    [ raw code | output | fork ]

Python, pasted on Apr 4:
class whiteroom():
	""" Pick a door: red, blue, green, or black. """
	
	do = raw_input("> ")
	
	if "red" in do:
		print "You entered the red room."

	elif "blue" in do:
		print "You entered the blue room."

	elif "green" in do:
		print "You entered the green room."

	elif "black" in do:
		print "You entered the black room."

	else:
		print "You sit patiently but slowly begin to stave.  You're running out of time."
		return whiteroom()

game = whiteroom()
game


Output:
1
2
3
  Line 20
    return whiteroom()
SyntaxError: 'return' outside function


Create a new paste based on this one


Comments: