Questions tagged [cs50x]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

Gcc problem - C lang - visual studio code

I recently got into the CS50 course and they begin to work on the C lang, so when I tried to write the same tags and run it on the Terminal it give me ( Gcc is no recognized). Please can anyone helpe ...
user avatar
0 votes
1 answer
17 views

Pset4 (Filter-Less) Reflection: Not getting correct values on Check50

Image seems to be reflected correctly but the program doesn't pass check50. Code: void swap(RGBTRIPLE *a, RGBTRIPLE *b); void reflect(int height, int width, RGBTRIPLE image[height][width]) { for (...
user avatar
0 votes
1 answer
9 views

Pset4 (Filter-Less) Greyscale not passing check50

I tried implementing the GreyScale function but I didn't got the average values of the pixels correctly. I don't know what I'm doing wrong. Any hints will be appreciated. My code: void grayscale(int ...
user avatar
0 votes
0 answers
17 views

how to prevent input type from being definite type?

i am including cs50 library in my circle calculator so i can get get input from user about operation(circumference/area/volume)then radius,so i want to make sure that first input is number from 1 to 3 ...
user avatar
0 votes
1 answer
21 views

CS50 Readability solution unsolvable to me

I coded this solution myself, but I really can't figure out where I did wrong, I've spent days on this, and I would really appreciate any help!! Please, 😭 #include <cs50.h> #include <stdio.h&...
user avatar
  • 1
0 votes
1 answer
14 views

I've tried everything I can think of to get any other Answer out of this program. Please help! Unexpected never ending loop

#include <cs50.h> #include <stdio.h> #include <math.h> #include <stdlib.h> int cclengthfinder(long x) { return x == 0 ? 1 : (int)(log(labs(x)) / log(10)) + 1;} // This a ...
user avatar
0 votes
1 answer
14 views

CS50x PSET4 (Filter) - BLUR

This code is supposed to blur an image together with other supporting files as per CS50 Pset4. I am able to compile my code with no errors and run the program but it does not seem to blur my image ...
user avatar
0 votes
1 answer
11 views

declaration shadows a variable in the global scope [-Werror,-Wshadow]

#include <cs50.h> #include <stdio.h> int get_cents(void); int calculate_quarters(int cents); int calculate_dimes(int cents); int calculate_nickels(int cents); int calculate_pennies(int ...
user avatar
0 votes
0 answers
22 views

CS50P PSET4: Little Professor timed out

I'm solving this problem. My code works when I test it but it is failing check50 with the error :( Little Professor accepts valid level // timed out while waiting for program to exit Here is my code: ...
user avatar
  • 1
0 votes
0 answers
15 views

I'm having problems using cs50 library

The error i'm getting is (hello.c:2:10: fatal error: cs50.h: No such file or directory 2 | #include <cs50.h> | ^~~~~~~~ compilation terminated. make: *** [: hello] Error 1) I am very ...
user avatar
  • 1
0 votes
0 answers
45 views

Is problem set 7 on fiftyville updated to 2022?

The grader keeps saying I haven't solved the mystery. At first I tried making the phone call up to 1 minute and I got 3 possibilities. One had no bank account, so she couldn't use the cash withdrawal. ...
user avatar
  • 101
0 votes
0 answers
25 views

Cash Not Compiling When Using Check50 Although I Removed Functions

My cash.c for pset1 compiles and runs as intended when I compile it, check50 knows the file exists, but it does not compile. I don't use functions, and it doesn't compile. Here is my code: #include &...
user avatar
  • 1
0 votes
0 answers
14 views

Pset3 Tideman, I dont understand why the locked_pairs doesn’t work :(

the last few days I worked very hard on the Pset3. I worked out pretty much all of the functions in the tideman problem. But I just can’t get the locked_pairs function done. I try to fix it but with ...
user avatar
0 votes
1 answer
71 views

CS50P project6 shirt.py

question.. on CS50P project 6: shirt.py, I got an error message. I believe my error is on resizing the Moppest image but I don't know what else to do. I did what the instructions said but still having ...
user avatar
0 votes
0 answers
13 views

problems trying to login into codespace and using it

for the last 30 min I've been trying to work in my codespace account for cs50. It does open the interface to code, but I can't type code nor run anything in the terminal. The prompt has become a blue ...
user avatar
0 votes
1 answer
63 views

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

I have finish a program and it can run smoothly on other platform like replit... But one I run it on vs code it shows the following error and it also have something weird happen when I run check 50 ...
user avatar
0 votes
0 answers
11 views

How do i resolve "Ssh key is weak" error trying to add new SSH key to git hub

Please how do I fix error in the title I get this when I try to add new SSH key to GitHub the key was generated using ssh-keygen as instructed on the cs50x course on edx am unable to proceed with the ...
user avatar
0 votes
1 answer
28 views

readability, cs50 segmentation fault, core dump

Hi, I'm having trouble with this. Is there something wrong with my code line or should i just redo everything? #include <cs50.h> #include <stdio.h> #include <ctype.h> #include <...
user avatar
0 votes
2 answers
150 views

:( Little Professor generates 10 problems before exiting

hi i am solving this question >> https://cs50.harvard.edu/python/2022/psets/4/professor/ my code is 100% correct. i have tested it several times but check50 is not able to pass all the tests. ...
user avatar
0 votes
0 answers
5 views

No out-put after running facial-recognition codes while working on vscode

No out-put, images or otherwise after running facial-recognition codes. I will attach my code and terminal below. # Find faces in picture from PIL import Image import face_recognition # Load the ...
user avatar
0 votes
0 answers
5 views

Tips for entering the world of CS50 Beta?

What windows and what advice do you currently recommend for this 2022?
user avatar
0 votes
0 answers
16 views

I really am not comfortable using VS Codespaces or the CS50 IDE, is it possible that I could use Sublime Text instead?

I am not accustomed to programming with the VS Code or CS50IDE. If it is possible, can Harvard allow me to use Sublime Text. Only asking if it is possible otherwise I will use the suggested ones.
user avatar
0 votes
1 answer
90 views

Cant get Codespace to work

Im up to the "Hello" module, week 1. Ive never programmed before so setting up copespace has been quite frustrating. I cannot get it to work. Can someone please help me? I want to get ...
user avatar
0 votes
1 answer
14 views

Any idea why i am getting this error in pset4

#include "helpers.h" #include <math.h> // Convert image to grayscale void grayscale(int height, int width, RGBTRIPLE image[height][width]) { // comb trw each row for (int i = 0;...
user avatar
1 vote
1 answer
42 views

VS code malfunction

On this morning when I open my vs code I found this suddenly pop out. I ignore it and start coding. Afterward I found that I can save my codes, so I code it in notepad and I save it to vs code using ...
user avatar
0 votes
1 answer
37 views

CS50 problem set 3, vote function problem

Good evening. I have a problem with problem set 3 (plurality) https://cs50.harvard.edu/x/2022/psets/3/plurality/ "vote" function always return "false". I tried different ways, but ...
user avatar
0 votes
1 answer
40 views

Speller - My code keeps failing and I have no idea why

Running my dictionary.c code against the sample text with ./speller texts/lalaland.txt shows that I have the same number of misspelled words as the staff's solution, but for some reason I only have 1 ...
user avatar
0 votes
0 answers
10 views

How to have multiple anchors on the same page in html?

I'm having a problem while making the pset8, which is Homepage. I'm trying to put multiple anchors in one html file. All these anchor tags are linking to only one of the specified files (ideas.html). ...
user avatar
0 votes
1 answer
38 views

PSET 5 Speller - can't make load function work

I can't pass load stage and I can't check other functions as I can't seem to load the words to the hash table. I tried to see where is the issue and found out fscanf function(?) doesn't seem like ...
user avatar
  • 3
0 votes
0 answers
13 views

Flask Dropzone implementation in Final Project

I need to implement a dropzone in my final project. It should work as follows: When the user uploads a file by dragging a file in the dropzone, it should be saved to the system at defined PATH. app = ...
user avatar
0 votes
1 answer
27 views

Undefined reference to main, why? (C)

getting undefined reference to main but not sure why. The code is the same as the guy in the lecture but it seems to not work while his does? im very new, and very stupid..
user avatar
0 votes
2 answers
160 views

CS50 Plurality Check50 "print_winner function did not print winner of election"

I'm having issues with the plurality assignment for week 3. Even though it works during my testing check50 is saying it doesn't print the winner of the election. I'll acknowledge my code could ...
user avatar
0 votes
1 answer
117 views

cs50 can't check until a frown turns upside down

I am just wondering why the check result is like this: :) hello.c exists :( hello.c compiles code failed to compile :| responds to name Emma can't check until a frown turns upside down :| responds to ...
user avatar
0 votes
0 answers
13 views

My code works but wont simulate past the first two csv rows

CS50x code for world-cup simulations: every time i run the code, it doesn't go beyond the for two rows of my csv. When i run the code with the women's team version i get the same error. My code ...
user avatar
0 votes
0 answers
30 views

PSET2 SUBSTITUTION works fine ONLY if plaintext is UNDER 9 CHAR

I was approaching the end of the substitution problem of PSET2 when I hit a snag I could not solve. I have already written the code to check the key for the various conditions they provide. My problem ...
user avatar
0 votes
1 answer
20 views

collatz function

So in a week 3 short, Doug asks us to define a file collatz.c that returns the number of steps taken to do the collatz conjecture on different numbers and I ended up with this. #include <stdio.h>...
user avatar
0 votes
1 answer
52 views

check50 errors in pset3 plurality

#include <cs50.h> #include <stdio.h> #include <string.h> // Max number of candidates #define MAX 9 // Candidates have name and vote count typedef struct { string name; int votes; } ...
user avatar
0 votes
0 answers
60 views

11.sql Why my SQL SELECT query changes order?

When i execute this query: SELECT movie_id FROM ratings WHERE movie_id IN ( SELECT movie_id FROM stars WHERE person_id IN ( SELECT id FROM people WHERE name='...
user avatar
1 vote
1 answer
18 views

cs50 finance - RuntimeError: unsupported value: <function buy at 0x7f1c380cfd90>

@app.route("/buy", methods=["GET", "POST"]) @login_required def buy(): """Buy shares of stock""" if request.method == "POST": ...
user avatar
  • 15
0 votes
0 answers
244 views

Here is my cs50 finance /buy code

@app.route("/buy", methods=["GET", "POST"]) @login_required def buy(): """Buy shares of stock""" if request.method == "POST": ...
user avatar
  • 15
0 votes
1 answer
28 views

my cs50 finance buy do not update in in the portfolio

i have tried so many options but to no avail pls below are the code i wrote.`@app.route("/buy", methods=["GET", "POST"]) @login_required def buy(): """Buy ...
user avatar
  • 15
2 votes
1 answer
899 views

CS50 PSET6 DNA problem. Need advices to make my code more pythonic

I need some advises how i can improve my code and make it more pythonic. Cause i feel like my code is too long. This is my solution to cs50 DNA problem: import sys import csv if len(sys.argv) != 3: ...
user avatar
0 votes
1 answer
91 views

Unable to solve "can't check until a frown turns upside down"

I was doing the Cash problem. I entered all the possible output given in the question yet its showing error. Please help, here is my code below . . . . #include <cs50.h> #include <stdio.h> ...
user avatar
  • 1
0 votes
1 answer
167 views

Why are the CS50 header and Make aren't working?

yesterday I installed Ubuntu on my Windows 10 PC so I can install the CS50 library and use Make as well and I have been trying to diagnose the problem since, when I add #include <cs50.h> to my C ...
user avatar
  • 1
0 votes
0 answers
37 views

Problem with color in html CS50

I have a problem with the color of the html files in Visual Studio, when I create a new file .html there is no color in the text it just appears in black, I don't have the same problem with .css files ...
user avatar
0 votes
0 answers
34 views

Blur in cs50 problem set 4

My code for the blur filter works fine to edge, corner and middle pixels, but it doesnt work right for a whole 3x3 or 4x4 picture i've been trying everything but nothing seems to fix it. This is what ...
user avatar
1 vote
2 answers
35 views

PSet1 - Coins issue

While doing the Coins problem set, I am receiving an error while trying to compile and I can't figure out what the issue is. "cash.c:53:27: error: variable 'cents' used in loop condition modified ...
user avatar
1 vote
1 answer
109 views

Compiling Error: Make function not working

I'm just starting out, using VS code as my IDE. Here is my code #include <stdio.h> //here were are setting up a function //meow(void) means it takes no arguments //void at the beginning is ...
user avatar
1 vote
1 answer
47 views

Questions regarding pset4 Blur filter (less comfortable)

After tinkering for a while with why my filter didn't work, I finally succeded with the following code: // Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) { //make copy ...
user avatar
0 votes
1 answer
78 views

Speller segmentation fault

'''// Implements a dictionary's functionality #include <stdbool.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include "dictionary....
user avatar

1
2 3 4 5
19