Newest Questions

0 votes
2 answers
22 views

Plurality: Bubble Sort Implementation, Exception Occurred (Segmentation Fault)

I am implementing a bubble sort algorithm for Problem Set 3, Plurality. In the function print_winner, I am to count for the maximum number of votes after I successfully sorted the candidates, ...
Mestica's user avatar
  • 101
0 votes
1 answer
12 views

No such file or directory #include <cs50.h>

sorry to bother"unknown type name "string"], but I was trying again to follow the video instructions, and error again: "unknown type name "string", and another error: No ...
Alex Miami's user avatar
0 votes
0 answers
7 views

cannot open-source file "cs50.h"

I'm on week 1, following video instructions. Doing the same as shown in the video but got the same error, says: "cannot open source file "cs50.h" which has to teach my terminal how to ...
Alex Miami's user avatar
0 votes
1 answer
26 views

CS50SQL(2024) - PSET 3 - Meteorite Cleaning - New table "meteorites" order by year and name check50 output difference

I am having problems matching the check50 output with my code, even though it properly orders the meteorites by year and name, from my opinion. Moreover, it assigns the IDs starting with 1 from the ...
Angel's user avatar
  • 1
0 votes
1 answer
18 views

Help with Pset2 readability

My word counter doesn't work no matter what I try. It either counts less than what it supposed to or too much. I feel like crying. int count_words(string paragraph) { int counter = 1; int ...
dustblackrose's user avatar
0 votes
1 answer
14 views

tideman cs50 - add_pairs

recently I've been stuck on problem set 3's Tideman, so I went online to search for some enlightenment and I found a simple fix. My original code was using preferences[i][j] > voter_count / 2.0 , ...
Edward's user avatar
  • 3
0 votes
1 answer
10 views

Having trouble taking two courses in parallel... Week 0 SQL dB not available

I started the CS50P course several days ago, and just launched the CS50 SQL course to keep things interesting. While watching the first lecture, the instructor asks us to type ls into the terminal to ...
Lewkrr's user avatar
  • 101
0 votes
0 answers
31 views

wht is wrong with my buy function and sell function

it keeps showing :( buy handles valid purchase expected to find "112.00" in page, but it wasn't found @app.route("/buy", methods=["GET", "POST"]) @...
dhan8293's user avatar
0 votes
1 answer
10 views

Not sure how to throw an custom error for `try:`

For Problem Set 3, I cannot determine how to throw an error if the denominator or a fraction is larger than the numerator (which is not a built-in error in python). How to I define my own, custom ...
Lewkrr's user avatar
  • 101
0 votes
1 answer
25 views

Filter (More) Edges - Doesn't Filter Right/Bottom Edge Correctly

I've been at this for a while and everything is working execpt the right and bottom edges, I can't for the life of me figure out why. When using check50, the values are close but too low, on the edges ...
MintJungle's user avatar
0 votes
0 answers
27 views

check50 error with CS50AI pset6 parser task

I got this error below. when I try to do check50 for pset6 Parser task. It looks, that ntlk library needs an update (see the full error log in the bottom), I have updated it in my CS50.dev to run ...
Pavel Malyshev's user avatar
0 votes
1 answer
14 views

CS50 Python, Response Validator problem ... trying to "pip install validator-collection" ... Does the error shown in RED below matter?

The errors shown in RED in the picture - do these matter? Am I going to get part way thru the assignment and get stuck?
Andy Foelsche's user avatar
0 votes
2 answers
27 views

CS50 declaration shadows a variable in the global scope

#include<cs50.h> #include<stdio.h> //CONSTANT const int T; //Protopye float average(int T, int score[]); int main(void) { //Get how many times of scores const int T = get_int(&...
Phát Phạm Quang's user avatar
0 votes
0 answers
2 views

Why is my code not working to play sound using Javascript?

var gamePattern = []; var randomNumber = 0; var randomChosenColor; function nextSequence() { randomNumber = Math.floor(Math.random() * 4); randomChosenColor = buttonColors[randomNumber]; ...
Gugaan Shanmugam's user avatar
0 votes
1 answer
12 views

flying the nest 2024

why does it make me need to exit a file (such as a hello.c file) to render any change in code that i make i ran gcc and it runs without any errors but the file doesn't change it's still the same only ...
Ahmed's user avatar
  • 1

15 30 50 per page