Skip to main content
10 votes

PS5 - Back to the Bank - check50 - expected exit code 0, not 1

This has been discussed on the CS50 ED Discussion Forums. Have you reviewed them? The first check is running your tests against their test "correct version" of bank.py (not your version). So,...
kcw78's user avatar
  • 922
8 votes

cs50p problemset 7 /working.py

This scenario has been described in the CS50 Python ED forum. When you get this error message: :( correct working.py passes all test_working checks expected exit code 0, not 1 It means check50 is ...
kcw78's user avatar
  • 922
5 votes

I hope CS50 community can help why I got expected exit code 0, not 1

Please have A look at my code, please upvote if helps,your code a kind of complicated. I tested with check50 as well, All Passed. fuel.py def main(): fraction = input("Fraction: ") ...
souttawther's user avatar
5 votes

Why does my CS50P PSET4 Professor implementation fail check50?

I had the same problem. Issue is in this line of code: return random.randint(10 ** (n - 1), 10**n - 1) the feedback from check50 is that you failed 'At Level 1, Little Professor generates addition ...
sarah zaccagni's user avatar
5 votes
Accepted

CS50P PSET3 outdated.py

The input " 9/8/1636 " contains the (trailing) space and the program does not account for that, therefore it is in the output as entered. "other than a missing comma." is a good ...
DinoCoderSaurus's user avatar
3 votes

cs50p problem set 1 - meal.py (don't understand prescribed structure)

Are you still working on this? If so, just modify your code to match the template format. Replace the last line: main() with these 2 lines: if __name__ == "__main__": main() Or add the ...
kcw78's user avatar
  • 922
3 votes

CS50P PSET5: test_bank passes Pytest but not check50

Re-read the instructions very closely: They say (in part): "restructure your code per the below, wherein value expects a str as input and returns 0 if that str starts with “hello”, 20 if that str ...
kcw78's user avatar
  • 922
3 votes
Accepted

input of EOF halts program expected exit code 0, not 1

Your program doesn't work when user choose to end the program via Ctrl-d without provide any input. When the user does so, your program jumps to the exception part of the code, which reference an ...
kbl's user avatar
  • 79
3 votes

CS50P PSET3 outdated.py

@DinoCoderSaurus is 100% correct. When you receive input, always make sure to strip() the input, unless specified that leading and trailing spaces are required. like this: date = input("Date: &...
Sifiso Lucolo Dhlamini's user avatar
2 votes

cs50p professor (can't check until a frown turns upside down)

i find the problem . in my code in generate_integer function when i pass a level = 1 my functions generates the numbers between 1 and 9 when i fixed that check50 worked compltly ok
Ehsan_hrz's user avatar
2 votes
Accepted

CS50P PSET7 Working Check50 Error

Debugging the test_ functions can be a challenge. The error message only hints at what pytest should be testing (small understatement). Some background: the pytest tests of test_working.py are ...
kcw78's user avatar
  • 922
2 votes

CS50P, Problem Set 6, CS50 P-Shirt – what more does check50 need here?

i fixed it by removing "method=0" from : ImageOps.fit(image, size, method=0, bleed=0.0, centering=(0.5, 0.5)) and then it worked
Yusif elkamshushi's user avatar
2 votes
Accepted

Why am I failing check50, Cs50p Little Professor

As per the spec: Structure your program as follows, wherein get_level prompts...... Program does not have a function named get_level..
DinoCoderSaurus's user avatar
2 votes
Accepted

CS50P Little Professor error

You need to structure the program as per the spec import random def main(): ... def get_level(): ... def generate_integer(level): ... if __name__ == "__main__": main()
DinoCoderSaurus's user avatar
2 votes
Accepted

scourgify.py problem

You are using incorrect keys for the columns in your output format. instead of firstname and lastname you need to use first and last respectively You need to follow instructions carefully. Read the ...
UpAndAdam's user avatar
  • 1,681
2 votes

"test_fuel catches fuel.py not printing % in gauge expected exit code 1, not 0"

"test" names should begin with test_. Running pytest --co test_fuel.py will show the tests that will run.
DinoCoderSaurus's user avatar
2 votes
Accepted

problem set 4, CS50P , Guessing Game ,

Review the spec. 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 ...
DinoCoderSaurus's user avatar
2 votes
Accepted

Python little professor problem set not passing 10 problems check

Are you still working on this? If so read on.... Turns out my previous advice is incorrect. (Seems like they used to check for unique problems and I had to implement to pass, but maybe not.) After ...
kcw78's user avatar
  • 922
1 vote

CS50P PSET 2 Vanity Plates

What does zero_first_digit return if there are no digits?
DinoCoderSaurus's user avatar
1 vote

adieu problem cs50p

I can't explain why check50 is OK when 1 & 2 names are entered, and it issues an error when 3 or more names are entered. However, I think that you are looking at the wrong symptom. Look closely at ...
kcw78's user avatar
  • 922
1 vote

CS50P, Problem Set 6, CS50 P-Shirt – what more does check50 need here?

Solved! :) It turned out that the problem was that my program was importing a package that I had written myself — as per Lecture 4 — to make the code tidier. I had written my own function to solve ...
Abaci's user avatar
  • 19
1 vote

CS50P - PSet 8 - Seaons of love - seasons.py

You should use date.today() //date object instead of datetime.today() classmethod and check50 will pick up.
Sumit Jaidka's user avatar
1 vote
Accepted

check50 error expected exit code 0, not 1

Look at the 5th test. You have: def test_omits_numbers(): assert shorten(123) == '123' When you read the user's input, input() ALWAYS returns a string, so calling shorten(123) triggers an error ...
kcw78's user avatar
  • 922
1 vote

Why does this class not require the __init__() method? This example is from the constants section of the Et Cetera lecture

the __init__() method is primarily used to create class objects with different attribute values. Since you are hard coding the attribute MEOWS=3 for every class instance, you don't need it. Suppose ...
kcw78's user avatar
  • 922
1 vote

cs50p check50 says my program doesn't pass all checks, but pytest says that it does

What I was missing was that check50 was not testing with my fuel.py but with its own fuel.py. After that, I was able to get a passing submission.
Aleksey Tsalolikhin's user avatar
1 vote
Accepted

CS50p pset4 Little professor "timed out while waiting for program to exit"

I should have noticed this yesterday. You have lev = get_level() AFTER while rounds > 0:. As a result, the user is prompted for the level on every round. That is not how it is supposed to work. You ...
kcw78's user avatar
  • 922
1 vote
Accepted

Outdated - Problem set 3

In your else: block, you split user_input on spaces, but don't verify there is a comma after the day of the month (see line parts = user_input.split()). Then you strip the expected comma from day (see ...
kcw78's user avatar
  • 922
1 vote
Accepted

CS50P PSET6 Scourgify check50 error

check50 tells it all "Did you mistakenly open your file in append mode?". Program does open the output file in append mode. This is a mistake when the output file already exists and contains ...
DinoCoderSaurus's user avatar
1 vote

CS50p professor ( timed out while waiting for program to exit)

Did you ever get a solution to this? Struggling with this problem myself Edit: I changed random.randrange() to random.randint() and for some reason that fixed it for me. I have absolutely no idea why, ...
NotEntirelyAwake's user avatar
1 vote

Taquería doesn't read my output correctly

The specification expects the output to be one number (the total) after each item is entered. This program will print a total for each item in the order every time an item is added to the order. ...
DinoCoderSaurus's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible