New answers tagged

1 vote
Accepted

CS 50 Pset 1 cash: non-void function does not return a value

You've created 5 functions that each is required to return an int value, yet there's not a single return statement anywhere. That won't get past the cs50 compilers. The code needs to be changed to ...
user avatar
  • 63.1k
0 votes

:( Little Professor generates 10 problems before exiting

I'm surprised your code passed with that change. The project specification says generate_integer() "should return a randomly generated non-negative integer with level digits", not a tuple of ...
user avatar
  • 142
0 votes

:( Little Professor generates 10 problems before exiting

i used randint instead of randrange to generate unique questions. dunno why it didnt work with randrange. if level == 1: num1 = random.randint(0, 9) num2 = random.randint(0, 9) ...
user avatar
1 vote
Accepted

check50 issue on Problem Set 1: cash

It pays to read this if you missed it. It explains why your program will not compile.
user avatar
  • 18.3k

Top 50 recent answers are included