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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![George Lewiss](https://secure.gravatar.com/avatar/210abc67df1003fb9c07120cf41736a0?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
George Lewiss
1,219 Pointselse: return guess
Why do we add else: return guess in the get_guess function? Is that what is causing the good_guesses to be drawn on screen? If not, what is causing the good_guesses to be drawn on screen because we aren't using the draw function inside the game function to draw good_guesses. We only use that function for the bad_guesses. Sorry. I'm really confused.
1 Answer
![Rob Enderle](https://secure.gravatar.com/avatar/0c7d16ab21523a0a95fefb9ac1d43bb1?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Rob Enderle
2,164 PointsThe get_guess function takes two arguments, bad_guesses and good_guesses. The function asks for input and checks whether the user entered more than one letter, entered a number they have already guessed or they entered a non-alpha character.
If the user entered a valid, non-guessed letter, that letter is returned by the function. When something is returned by a function, you'll most likely want to do something with it. In the play function, the value of guess is assigned to whatever is returned by the get_guess function with the line guess = get_guess(good_guesses, bad_guesses).
The drawing of the guesses on screen takes place in the draw function, which is being called from within the play function, which is called from the last while loop
while True:
clear()
welcome()
play(done)
Chris Freeman
Treehouse Moderator 68,425 PointsChris Freeman
Treehouse Moderator 68,425 Pointschanged comment to answer