Newest Questions

0 votes
1 answer
4 views

mario more in c - help!

Down below my code. I'm able to print the left part of the pyramid but the right part doesn't come up. What do I do wrong? #include <stdio.h> #include <cs50.h> #include <stdio.h> #...
Lisa Smit's user avatar
0 votes
1 answer
34 views

CS50P "Lines of code"

Assignment: "file called lines.py, implement a program that expects exactly one command-line argument, the name (or path) of a Python file, and outputs the number of lines of code in that file, ...
Kevin's user avatar
  • 1
0 votes
1 answer
10 views

"Correct numb3rs.py passes all tests" not checked in the check50: numb3rs.py cs50

I am implementing the code for IPv4numb3rs problem. The code works as expected and the test code too but I don't get why the the "correct nub3rs.py passes all test_numb3rs.py check" isn't ...
Grace 's user avatar
  • 39
0 votes
1 answer
14 views

cs50p lines.py not passing the last 3 tests

from sys import argv,exit def main(): try: if len(argv) < 2: exit("Too few command-line arguments") elif len(argv) > 2: exit("Too many ...
Hari's user avatar
  • 1
0 votes
0 answers
12 views

i have an error in debug50

When i try to debugging my code with debug50 it gives me this message even though it compiled (The preLaunchTask 'C/C++: gcc build active file' terminated with exit code -1.) + it happens in some ...
elfawall's user avatar
0 votes
0 answers
13 views

Code doesn't consider more than one digit numbers: numb3rs code

This is my code for the numb3rs.py assignment in cs50. Initially it was working well but when I lunched check50, it showed red for certain numbers. With time it started displaying an error when ...
Grace 's user avatar
  • 39
0 votes
1 answer
6 views

Project0 P2 Raise exception

I have 2 questions: 1. Can I invoke a function within the definition of another function? Since to define result() we need to check it's which player's move, I feel the need to use player() here. 2. ...
Skywalker's user avatar
0 votes
1 answer
8 views

General Doubt regaring CS50 Course

I knew that, CS50 provides the course completion certificate after we complete any course of CS50 by submitting all the assignments and projects provided with atleast 70% score. Is this same policy ...
Maniram Tatipamula's user avatar
0 votes
0 answers
14 views

pls! why ai made bool alternate = false and alternate != alternate and it can just make true instead of false

bool luhn_algorithm(long number) { int sum = 0; bool alternate = false; while (number > 0) { int digit = number % 10; if (alternate) { digit *= ...
elfawall's user avatar
0 votes
2 answers
32 views

PLEASE HELP!!! STUCK ON SPELLER FOR MORE THAN A MONTH NOW

Link to post on Reddit I started working on the pset last month, coded all the required functions (at least I thought I did) and check50 surprised the #&*# out of me, none of the checks were ...
sanya_timi's user avatar
0 votes
0 answers
10 views

"failed to connect extension server on port 1337" this is the message that is displayed when I try to use debug50 or style50

also during the lectures, I can see David's codespace having like 2 buttons on the upper right that are called design50 and style50 that aren't showing in my codespace "I,ve already tried to ...
Nor Khairy's user avatar
0 votes
0 answers
29 views

pset1 cs50ai: tic-tac-toe, TypeError: 'NoneType' object is not subscriptable error at minimax function

I am stuck at implementing the minimax function with alpha-beta pruning. This is were I'm at: def minimax(board): _, value = best_move(board) if value == None: return None else: ...
Margarita's user avatar
0 votes
1 answer
8 views

Unable to generate GUI in cs50-customized IDE (Offline, Local with VS Code, Docker Container)

I've been using the offline version of CS50.dev (in VS Code with docker container, offline, as instructed in the cs50 documentation). It is really convenient and I enjoy it. However, when I want to ...
Shiba's user avatar
  • 1
0 votes
2 answers
34 views

cs50 pset 1 credit.c not outputting correct answers in certain random(?) cases

My code works fine for most of cs50's checks except all AMEX card type checks and some VISA type checks where it just outputs INVALID instead of the actual answer. #include <cs50.h> #include <...
FriedToast's user avatar
-1 votes
3 answers
26 views

My convert function is broken and not passing tests but my program seems to do what i think it should

def main(): time= input("What time is it?: ") hour, min= time.split(":") if "a.m." in time: Min, t= min.split(" ") if 7 <= ...
Om Prakash Sahu's user avatar
0 votes
1 answer
10 views

When trying to implement the blur function in pset4, the image ends up blurred, but with odd star shapes in the middle of the image

void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE copy[height][width]; // Declares a copy of the array, so that the blurred pixels aren't affected by already blurred ...
ConorNE's user avatar
1 vote
1 answer
27 views

scourgify cs50 'cleans long csv file' check

Here is the code for the scourgify problems in cs50 python. The last check ingicates an error which I am pretty sure refers to the additional blank line of the before.csv file which was provided. How ...
Grace 's user avatar
  • 39
0 votes
1 answer
13 views

CS50 bash permission denied error

I keep getting the bash: Permission denied error. Do you know how I can fix this? Thank you.
TrN's user avatar
  • 3
0 votes
1 answer
24 views

unit tests test_twttr check50 results

I don't understand the check50 results for the test code for the twttr program and don't know how to fix it. The code is supposed to strip off vowels from a string and return the string without any ...
Grace 's user avatar
  • 39
0 votes
1 answer
25 views

Code for problem set one, Credit not working

I have completed the other set one problems, and wanted to test myself with "Credit". I read through the problem and walk through and wrote code that I believed would work. I tested the code ...
John Goossens's user avatar
0 votes
0 answers
13 views

PSET 9 Finance checking that "56.00" is in page: my solution

I spent 3 days working on this problem. I followed all of the advice I found on this site: pset7 finance check50 doesn't detect a valid sale despite portfolio updating correctly pset8 finance ...
Dan Costantino's user avatar
1 vote
1 answer
9 views

filter.c (more comfortable) -- rgb values only slightly too large

I'm working on filter.c and the AI duck says my logic looks right, but I keep failing the check50 tests (except for the upper left corner). I think it's a small addition problem, because my errors are ...
LP Anderson's user avatar
0 votes
0 answers
9 views

For finance, does anyone know how why it says my database file doesn't exist?

I haven't even touched this part of the code or the file it claims doesn't exist. I'm very confused and would be eternally grateful if someone could let me know why this is happening.
Sophie's user avatar
  • 1
0 votes
0 answers
5 views

My cs50.dev console didn't set up properly

I went to set up my cs50.dev workspace, but it didn't set up properly. normally you would tell the terminal something like: check50 cs50/problems... but that doesn't work for me. I also checked the ...
Derrick Kephart's user avatar
0 votes
0 answers
5 views

How do I access my directory?

trying to help one of my students, but her directory keeps showing this (see photo). We can't run/compile any programs.
Jacopo Stifani's user avatar
0 votes
0 answers
7 views

Error: Codespace Running in Recovery Mode After VS Code Update - 'Rebuild Container' not helping

Description of Issue: I have been trying to write in VS Code but every time I open it after the recent update, the following error message pops up: This codespace is currently running in recovery mode ...
Hamster1303's user avatar
1 vote
1 answer
24 views

Finance - "Expected to find "112.00" in page", but the Website Functions Properly

I have been stuck on this line of check50 for a while and I have no idea how to fix it. I added all the features and tried to fix some of the common mistakes others had made that prompted this but I'm ...
MintJungle's user avatar
0 votes
1 answer
17 views

CS50P - Seasons of Love output issues

I am unable to fix this error while running the program, kindly find the error S
AAQIL AHMED KULLDIK MANEGAR's user avatar
0 votes
1 answer
89 views

Why is it not possible to print a `string` returned by this function?

In the assignments Caesar and Substitution of Problem Set 2 of the CS50 course, students often attempt to create a separate function which enciphers the plaintext and returns the ciphertext as a ...
Andreas Wenzel's user avatar
0 votes
0 answers
16 views

CS50 Tideman : sort_pairs

sort_pairs is not returning successfully when I check the code. Can anyone help point me in the right direction? I spent quite a while on the previous functions getting them correct as I've been away ...
ModernRevolt's user avatar
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
0 votes
1 answer
34 views

Pointer comparison in c

#include <cs50.h> #include <stdio.h> int main(void) { string s = get_string("s: "); string t = get_string("t: "); string u = "Hi!"; string v =...
user1844's user avatar
1 vote
1 answer
22 views

pset 3 Tideman - vote function works differently using check50 than manual testing

My code for the vote function is as follows: bool vote(int rank, string name, int ranks[]) { // TODO for (int i = 0; i < candidate_count; i++) { if (strcmp(candidates[i], name) =...
Oscar Harding's user avatar
0 votes
0 answers
7 views

in scratch how do i make a sprite play a sound when a specific size has been reached?

I'm making this scratch project and I'm trying to make it so that when a sprite reaches size 150, they play a sound. but I don't know how to make it do that. anyone got some helpful information or ...
Cian Storey's user avatar
0 votes
1 answer
22 views

I am getting different test results for the same code

I am testing my substitution.c program, but I get every time different results for the same code. On the very 1.st time I got all good but :( does not encrypt non-alphabetical characters using ...
Michal Kotus's user avatar
0 votes
0 answers
6 views

I can't accsess the form I need to submit for my cs50w projects

when I try to submit the form for my cs50w projects, I get this: what should I do? please help me
Bahar-2009's user avatar

15 30 50 per page
1
2 3 4 5
272