You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""
Prompts the user for a level, n. If the user does not input a positive integer, the program should prompt again.
Randomly generates an integer between 1 and n, inclusive, using the random module.
Prompts the user to guess that integer. If the guess is not a positive integer, the program should prompt the user again.
"""
The instructions for both 'level' and 'guess' specify that if a positive integer is not entered, the program should prompt the user again. However, the program is expected to accept 0 for 'guess' but not for 'level.' I believe 0 should not be classified as a positive integer, so perhaps the instructions should be updated to reflect consistent behavior for both inputs.
The text was updated successfully, but these errors were encountered:
Fixed test for "below range" to have it check input of 1 vs level of 2. (current test is for 0 which should be rejected due to not being positive)
Added test for "non positive" input.
to address: cs50/check50#328
"""
Prompts the user for a level, n. If the user does not input a positive integer, the program should prompt again.
Randomly generates an integer between 1 and n, inclusive, using the random module.
Prompts the user to guess that integer. If the guess is not a positive integer, the program should prompt the user again.
"""
The instructions for both 'level' and 'guess' specify that if a positive integer is not entered, the program should prompt the user again. However, the program is expected to accept 0 for 'guess' but not for 'level.' I believe 0 should not be classified as a positive integer, so perhaps the instructions should be updated to reflect consistent behavior for both inputs.
The text was updated successfully, but these errors were encountered: