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

readability, cs50 segmentation fault, core dump

This is why it's important that you cut and paste the code, rather than someone transcribing it from an image. Likely would have missed it otherwise. ;-) The seg fault occurs on line 17: for (int ...
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
0 votes
Accepted

VS code malfunction

Go to github https://github.com/codespaces remove the code space, Remember to copy call the codes before doing that Remember to copy call the codes before doing that Remember to copy call the codes ...
user avatar

Top 50 recent answers are included