cs50/check50

CS50P problem_set4 guessing game

Kaazeeb opened this issue · 2 comments

"""
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.

@Kaazeeb check50 is incorrectly expecting 0 to be valid. This will be fixed. Thanks.

Fixed with above change. Thanks!