cs50 / check50

This is check50, a command-line program with which you can check the correctness of your programs.
GNU General Public License v3.0
401 stars 268 forks source link

CS50P problem_set4 guessing game #328

Closed Kaazeeb closed 8 months ago

Kaazeeb commented 8 months ago

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

curiouskiwi commented 8 months ago

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

curiouskiwi commented 8 months ago

Fixed with above change. Thanks!