Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Collections (2016, retired 2019) Dungeon Game Movement

My 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
Shreyas Papinwar
2,371 Points
move = 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
Stuart Wright
41,119 Points

Note that when you call a method (such as upper), you need parentheses after it:

move = move.upper()