def checkDirection(chooseDirection):
print('You have now entered the maze.')
time.sleep(0.5)
if direction == str(Right or right):
print ('Congrats! You have turned the right way, you can live...')
time.sleep(1)
print ('For now o.O')
replace direction with chooseDirection because that is the argument you are trying to pass ( or take the value)
for if else if you use
if (direction == 'Right' or direction == 'Left'):
Also
def chooseDirection():
direction = input('''What way will you go? (Type Left or Right or Forward then press enter.) ''')
return chooseDirection
I think you want to return direction, not chooseDirection.
1
solved Python 3.4.2 | NameError: name ‘x’ is not defined