3,645 questions
-7
votes
0
answers
63
views
Failing CS50P Week 4 Bitcoin Price Index problem w/ TracebackError [closed]
Bitcoin price index problem on cs50p course uses an API to recieve the value of a Bitcoin at the time of search. Whenever I attempt to use check50, (command to check if solution is correct in cs50p) ...
0
votes
0
answers
25
views
CS50 Python PSET5 Refueling Pytest Is Passing But Check50 disagrees [duplicate]
So I am doing the [refueling] problem as mentioned above(https://cs50.harvard.edu/python/psets/5/test_fuel/) and my check50 is giving me this output
:) test_fuel.py exist
:( correct fuel.py passes all ...
0
votes
1
answer
91
views
Why does this code get marked as not working? CS50 Plurality [closed]
I'm doing the cs50 basic course task plurality. Now I have the problem that all input I used got the right output, but the cs50 correctness check says otherwise.
Is this because I don't use a sorting ...
1
vote
1
answer
89
views
CS50 Speller Valgrind error: Jump or move depends on uninitialized value(s)
I am currently completing the introductory CS course CS50 only and got stuck on the problem "speller" from problem set 5. In this problem, one is given a set of prewritten .c-files, ...
0
votes
0
answers
166
views
CS50P Problem Set 4, Little Professor displays number of problems incorrectly
I'm running into problems resolving the little professor exercice in CS50P. I tested my program manually and I fail to see what could have gone wrong. The error message suggests that there is a ...
1
vote
1
answer
113
views
C program creates too many JPEG files when recovering images from raw data
I'm working on a program to recover JPEGs from a raw memory card image using C (as part of CS50's "Recover" problem). The idea is to read 512-byte chunks and write each JPEG to a separate ...
0
votes
1
answer
49
views
CS50W Project network, can't figure how to implement the Paginator
I've been trying to implement the paginator function for about two months now. I've tried many different approaches, but they always lead to new bugs.
In views.py, I load the posts and send them to ...
2
votes
1
answer
111
views
CS50 Recover - cannot understand why there's memory leak issue
I'm very very new to programming, and I'm working on the Recover problem set. To create images, I'm using recursion, but there's always a valgrind issue and I can't understand where my code's wrong.
...
1
vote
0
answers
33
views
I'm stuck at cs50's filter problem It blur's image as expected but produces errors in check50
Here's my code from the problem set. The copy_img(), malloc_img(), free_img() functions are for copying image to a temporary image and for memory allocation, freeing allocated memory respectively.
...
0
votes
1
answer
91
views
How do I fix a traceback error in a CS50 Credit Pset in Python?
Been working on a Credit Pset in python. Decided to use regular expressions. Everything was fine before I got to the Lunh's algorithm part. Now I get traceback errors and don't know what to do with ...
-1
votes
1
answer
158
views
cs50's python "bank testing" question is flaging the 4th condition, what is it wanting me to do? Thank you
file to be tested:
'''
def main():
use_input = input("Greeting: ").strip()
x = value(use_input.lower())
print(f"${x}")
def value(greeting):
# if greeting starts ...
1
vote
1
answer
102
views
Working on a CS50 Filter problem. Check50 fails at the "Blur" function
I am working on the Filter problem set for CS50 and run into a problem related to check50 (which is the program that checks my solution for correctness).
"Blur" function calculates the ...
0
votes
1
answer
177
views
How to execute code in CS50 Codespace (correct directory and file)
enter image description hereI am trying to execute my Python code on the command line in the CS50 Codespace IDE. After I enter the command, I get a "can't open file" error message. How to I ...
0
votes
2
answers
86
views
Python IPv4 Validation Only Checking First Byte Instead of All Four Bytes
I'm writing a Python function to validate IPv4 addresses. for a Task of CS50 Python. My function should:
Ensure the format is X.X.X.X, where each X is a number between 0-255.
Return True for valid ...
0
votes
0
answers
49
views
CS50p Question "Outdated" Check failure for one scenario
I just completed the Problem "Outdated" in QuestionSet 3 of Harvard Python CS50p 2022 version.
using Check50 v3.3.11, the automatic check function tried several scenarios and all passed with ...