0

Need to fix these question.

What is the highest number output by this code? def print_nums(x): for i in range(x): print(i) return print_nums(10) Answer will be 0 so need to ask "What is the lowest number output by this code?"

16th Nov 2017, 12:31 AM
S M Sarwar
S M Sarwar - avatar
2 Respuestas
+ 9
The answer is 0 because any function stops when it reaches a return statement.
16th Nov 2017, 12:36 AM
qwerty
qwerty - avatar
+ 4
I think the question expects you to anticipate the ascending sequence of range() ... interrupted.
16th Nov 2017, 12:48 AM
Kirk Schafer
Kirk Schafer - avatar