Created
February 16, 2012 17:50
-
-
Save JMScheiner/1846712 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while True: | |
def r1(): | |
loc = raw_input("room 1") | |
if loc == "2": | |
return loc | |
elif loc == "3": | |
return loc | |
def r2(): | |
loc = raw_input("room 2") | |
if loc == "1": | |
return loc | |
elif loc == "3": | |
return loc | |
def r3(): | |
loc = raw_input("room 3") | |
if loc == "1": | |
return loc | |
elif loc == "2": | |
return loc | |
if r1() == "2": | |
r2() | |
elif r1() == "3": | |
r3() | |
else: | |
print "no" | |
if r2() == "1": | |
r1() | |
elif r2() == "3": | |
r3() | |
else: | |
print "no" | |
if r3() == "1": | |
r1() | |
elif r3() == "2": | |
r2() | |
else: | |
print 'no' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment