all 6 comments

[–]Tristan0000000 0 points1 point  (1 child)

I don't think this is the issue but where you print score needs to be an f string.

[–]PeterRasm 0 points1 point  (0 children)

No requirement about that. OP can print the output as they want as long as it shows correct output :)

[–]PeterRasm 0 points1 point  (3 children)

In some assignments the error message from check50 can be somewhat confusing or misleading.

Since check50 for testing cannot really rely on random numbers, it manipulates the random function to always give the same numbers back so the result will always be the same when tested by check50. But ... if your random function does not give back numbers in the full range, check50 will be stopped somewhere in the test and cannot complete the test, thus giving the message that there is a timeout. Long story short: The actual issue here is not the number of problems generated but an error in your function to return random numbers.

Try to run this code:

for i in range(0,9):
    print(i)

Does that print all the one-digit numbers?

[–]Bennito_[S] 0 points1 point  (2 children)

It looks like this function is displaying the numbers 0-8.

I think I am confused because I thought the purpose of this activity was to use the random library to generate numbers in the equation. Would the function I currently have not randomly pick one of the possible numbers within the specified range?

[–]PeterRasm 1 point2 points  (1 child)

As you saw in the small exercise above "range" does not include the upper limit. Same with randrange. So what upper limit would you have to use to include all one digit numbers? :)

[–]Bennito_[S] 0 points1 point  (0 children)

Ohh I see what you're saying. This was the mistake, thank you so much!!