
Student5 Saxon
2,525 PointsMy quit doesn't work and I don't really understand why.
while True: print("Behold the dungeon!") print("You're in room{}".format(player)) print("You can move{}".format(", ".join(get_moves(player)))) print("Enter QUIT to quit")
move = input(">") move = move.upper
if move == 'QUIT': break if move in valid_moves: player = move_player(player, move) else: print("\n ** you ran into a wall!") continue
2 Answers

Shreyas Papinwar
2,371 Pointsmove = input(">")
move = move.upper
# Change this code to -
# and Note that when you call a method (such as upper), you need parentheses after it:
move = input("> ").upper()
it will work fine

Stuart Wright
41,071 PointsNote that when you call a method (such as upper), you need parentheses after it:
move = move.upper()