I'm new to python and this is my first real program. Heres the code:
def home():
print ('game....play-1..options-2..rules-3..exit-4..')
answer = input()
print(repr(answer))
if answer == '1':
play()
elif answer == '2':
options()
elif answer == '3':
rules()
elif answer == '4':
end()
def rules():
print ('rules...main menu-1...exit-2..')
answerRules = input ()
print(repr(answerRules))
if answerRules == '1':
home()
elif answerRules == '2':
end()
home()
The main problem i get here is that it works fine in the python shell but not with command prompt. In command prompt home()
works however once you enter an answer, e.g. 3. the program just ends.