Name_________________ net-id _______ Name_________________ net-id _______ Name_________________ net-id _______ Name_________________ net-id _______
These questions are based on the code GuessNumber.py
answer
and guess and their respective values assigned before the
loops
in the functions play_game_computerguess and
play_game_humanguess, respectively?
'none' and
-1 ensure the loops will be entered.
'none'
and -1 that are used.
raw_input.
play_game_humanguess there's no code
to process the return value "correct" returned by
get_status. Which is the best explanation for why
no code is needed to process this return value?
elif or else to handle a
case Python will automatically generate code to handle it.
secret != guess handles the case of a
correct
guess and it's the code executed after the elif.
"correct"
this means that the number of guesses reported is wrong after the loop finishes.