All Questions

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

PSET 1 CASH stuck!

I am stuck with this problem. I'm wondering how to use the functions given to us at the top of the page (the template that was created after downloading the zip drive). There is a function about ...
0
votes
1answer
9 views

Week 4 lecture: calling free() after malloc() removes destination contents

In the lecture of week 4 in CS50x, David shows how to allocate memory using malloc() to clone a string, and how free() needs to be called whenever malloc() was called to free up allocated memory ...
0
votes
0answers
11 views

Week 4 lecture: can't reproduce string != string

In the lecture of week 4 in CS50x, David illustrates how two strings can't be compared with two equal signs (==), and instead, strcmp() has to be used. I can't reproduce this locally or on CS50's IDE ...
0
votes
1answer
7 views

Recover code runs but doesn't generate any jpegs

at sure I didn't know how to even begin, but slowly started realizing how i can tackle this problem. after a bit i was stuck on how some stuff works so i looked up some recover tutorials that helped ...
0
votes
1answer
5 views

Tideman - "lock_pairs skips final pair if it creates cycle" - Almost there!

Getting good results in test cases. Hoping someone can point out where I'm going wrong! I'm also open to general code comments. // Lock pairs into the candidate graph in order, without creating cycles ...
0
votes
1answer
7 views

PSet1 - No such file or directory

I am working on pset1, mario-less comfy, and while trying to test the code to prompt for height, I am running into an message stating that there's no such file or directory. Can someone please help ...
0
votes
1answer
6 views

Plurality: Code does not print out the winner

My code does not print out the winners at all...It only outputs their names. Is anybody able to pick out what's incorrect or if the code is missing something? Many thanks in advance :) #include <...
0
votes
0answers
11 views

How to rotate alphabetical characters by 26

#include<stdio.h> #include<ctype.h> #include<cs50.h> #include<string.h> int main(void) { string name = get_string("Enter: "); printf("Entered text by ...
0
votes
0answers
4 views

CS50 library on Google Cloud Platform: Is it possible to handle .db files with CS50?

the CS50 library provides a very simple syntax to use SQL queries for database manipulation. However, when I try to deploy my final project on Google Cloud Platform (GCP), this line of code: db = SQL(&...
0
votes
0answers
4 views

My CS50 Web Project 1 Edit page is not updating entries

My edit function is shown below: def edit(request,entry): if request.method =="GET": text = util.get_entry(entry) return render(request, "encyclopedia/edit.html", { ...
0
votes
0answers
3 views

lab5 memory leakage - Why is the function not working even using calloc?

Tried many iterations and even changed the allocation to calloc() that i read it frees memory used by NULL or undefined data and still get the same error. in create_family(int_generations) // TODO: ...
0
votes
1answer
8 views

Pset0 - error & fatal error

How can I resolve this problem? Is it a library problems?Is there any mistake in setting? Appreciate before hand! https://i.stack.imgur.com/NVXxo.png
0
votes
0answers
7 views

Downloading and unzipping distribution codes in Pycharm

I've recently decided to move away from the CS50 IDE to be a bit more independent. However, I'm stuck at the very beginning as I don't know how to download and unzip the distribution code. In the CS50 ...
0
votes
0answers
6 views

Lab 4 not altering output file - using solution word for word

I have looked at all the solutions here on the exchange. I have two issues. Firstly: const int HEADER_SIZE = 44; This does not work for me in the context of initializing a header array. I either have ...
0
votes
0answers
6 views

pset1 credit.c file EMPTY?

this is my first question in this community. I just downloaded the zip file for pset1, problem credit (more comfortable) is the file actually empty ? could it be that I did something wrong? thank you ...
0
votes
0answers
9 views

Rotating alphabetical characters by 26

#include<stdio.h> #include<ctype.h> #include<cs50.h> #include<string.h> int main(void) { string name = get_string("Enter: "); printf("Entered text by ...
1
vote
2answers
24 views

Stumped on PSET 1 Mario Less Comfortable

I've been working on this for a while and feel stuck. I think that my "for" loops might be out of order or some other issue. Suggestions? Thanks
0
votes
1answer
19 views

bash: make: command not found

I'm using VS Code online version provided by CS50, if I'm not wrong. When I try to compile my code before running it via "make hello" I get this error: "bash: make: command not found.&...
0
votes
0answers
9 views

exception raised in application: RuntimeError: no such table: stocks

from cs50 import SQL from flask import Flask, flash, redirect, render_template, request, session from flask.helpers import get_flashed_messages from flask_session import Session from helpers import ...
0
votes
0answers
10 views

PSET9 finance: lookup always returns 404 None or 200 None

I reinstalled helpers.py and the entire IEX key is being submitted (IEX console shows credit is being used--see attached photo) but I keep getting: https://cloud.iexapis.com:443 "GET /stable/...
0
votes
0answers
9 views

Can't update sqlite3 on Mac (MacOS Monterey, M1 CPU)

In the VS Code seminar, the tutor walks us through installing (updating) sqlite3 on Mac, but I seem to be running into the same "permission denied" problems he had, and can't get through ...
0
votes
1answer
10 views

pset1 quarters doesnt return output correctly

{ // TODO int quarters = 0; do { cents -= 25; quarters++; } while (cents >= 25); return quarters; } above is what happens when i test the code. tried ...
0
votes
0answers
8 views

Why does the powerup not draw to the screen?

So, I made a powerup function to randomly draw powerups to the screen. However when I run powerup:render, nothing happens. I'm not sure where the problem is. This is the powerup:render code: if self....
0
votes
1answer
9 views

CS50 Pset 4 Reflect with Bubble Sort

I tried using bubble sort for Reflect, it goes something like this pretend I defined temp here for (int i = 0; i = height; i++) for (int j = 0; j = width - 1; j++) for (int k = 0; k = width - 1; k++) ...
0
votes
2answers
16 views

Caesar project: error: redefinition of 'i'

#include<stdio.h> #include<cs50.h> #include<string.h> int main(void) { string name = get_string("Enter: "); printf("%s\n",name); int n = strlen(name); printf(&...
0
votes
1answer
8 views

PSET 3 runoff is_tie function

New to this platform, forgive me if there are some norm or etiquette I may be missing. Please feel free to provide feedback on anything that is incorrect. This is for the is-tie function alone. I ...
0
votes
1answer
4 views

Not sure where this file exists? Week 1 Lecture 1 - C what do I do so I can run the code from 1:07?

Trying the run the code for addition. He started the screen share with a blank so I did too with only the ~ directory with only hello and hello.c. I created a new file as he did named Untitled1 but ...
0
votes
1answer
9 views

Caesar, trying to only accept digits help

I am trying to only accept digits. I turned Argv1 into an int with atoi, and used isdigit to confirm it is a digit being typed in. Why is it accepting both characters and digits?
0
votes
1answer
31 views

Problem with Pset1 cash 2022

I just try to do the Pset1 cash assignment and got a problem here(submit results). Got a message that expected prompt for input, found none for 41 cents, 160 cents, returns integer number of cents, ...
0
votes
1answer
7 views

Pset2(readability) problem in check50

[![can someone help me with this error in check50 cause I don't understand what's wrong!!][1]][1] this is a problem in check50, I was trying to check pset2 readability & I don't know what's wrong ...
0
votes
0answers
5 views

Not able to see GameObjects like : Helicopter, Airplane, Skyscrapers including Coins

I started project 8 I am facing an issue/bug in unity, that I cannot see few Game-objects like Helicopter, Skyscrapers including Coins. Take a look at this print:- Any help will be appreciated.
0
votes
0answers
13 views

Can someone help me with Tideman, specifically lock_pairs?

When I submit my code, every single section checks out, except, :( lock_pairs skips final pair if it creates a cycle. Could someone give some tips on what I should do to resolve this error? void ...
0
votes
1answer
36 views

pset 1 cash – manual tests fine but still getting an error when I run check50

I've just finished cash and it seems to be working as expected when I run a manual test. When I run Check50 though I get the following message: :( calculate_nickels returns 5 when input is 28 expected ...
0
votes
0answers
11 views

get_string() C function not working

I just began CS50 and was trying to copy some of the examples done on the lecture video. I use opensuse tumbleweed(also a little new to it) and I had installed the cs50 c library just as the ...
0
votes
0answers
7 views

Pset3 Tideman :( lock_pairs locks all pairs when no cycles

I can't understand why it wouldn't given my code and examples i have thought of for (int i = 0; i < pair_count; i++) { locked[pairs[i].winner][pairs[i].loser] = true; locked[...
0
votes
0answers
14 views

Timed Out in Check50 Pset5/Speller

Please help, have Checked and debugged the program and couldn't find the issue. Have moved the debug to only include individual functions and checked again but still couldn't find the issue. The ...
0
votes
1answer
204 views

pset1 cash 2022

hello guys I got en error from check50 2022 which you can see it in my screenshot I check it 100 times but I can't resolve the problem can you please help me? #include <cs50.h> #include <...
0
votes
1answer
10 views

pset4 recover not working due to segmentation fault

I have come up with this code for recover but there is a segmentation fault I can't figure out where. any pointers welcome. BYTE buffer[512]; int i = 0; FILE *jpeg = NULL; while (fread(...
0
votes
0answers
13 views

check50 doesn't work after cs50x migration to new VS ide

Your help is appreciated! check50 doesn't work in the new VS ide after migration (pset9): bash: cs50/problems/2022/x/finance: No such file or directory
0
votes
0answers
9 views

CS50 web: wiki edit NoReverseMatch

I'm working on CS50 Web's Project1. For some reason I keep getting this error message: In my interpretaion, the error message is raised because I didn't provide a required argument for the path, but ...
-1
votes
1answer
24 views

Can't figure out why my code fails check50

I spent a huge amount of time tring to figure out why, and couldn't so far. Thanks in advance :)
0
votes
0answers
26 views

pset1 Mario error: expected identifier

I really tried to find the solution for myself, but after a lot of hours I give up. Here is the error message and code if its possible please help me:) *#include <cs50.h> #include <stdio.h&...
0
votes
0answers
13 views

PSET9 - TypeError: 'NoneType' object is not subscriptable

My code for pset9 - Finance runs well on my IDE but some how Check50 still reports a log in error, which I don't know why since log in function was provided in the distribution code. Here is my code: ...
0
votes
1answer
15 views

How does continue; differ from break; in a loop

If i understand correctly, continue skips all the lines of the loops current iteration and starts again from the top whereas break exits the loop. Is this correct?
0
votes
0answers
6 views

Trying to get <cs50.h> on VIM Mac

I followed instruction from Github on how to add this library to mac. I went through the troubleshooting sections but my error did not show up as one of the common errors. Can anyone help? I don't ...
0
votes
0answers
5 views

How can we use GitHub Copilot best with CS50?

I got access to the GitHub Copilot preview and i really like my AI pair programmer. It's very helpful but i also want to learn and respect the academic honesty rules, some guidelines how to use it ...
0
votes
0answers
8 views

GitHub Codespaces

Noticed the Visual Studio Code for CS50 page, more info at the Docs; should i use this as an replacement for IDE? I do prefer Vscode as my editor and Codespaces seems better than IDE!
0
votes
1answer
26 views

DNA - String Compare

I have a question about DNA, specifically this while statement: while dna_string[char: char + length_str] == dna_string[char - length_str: char]: I'm not getting dna_string[char - length_str: char] ...
0
votes
1answer
15 views

How do I assign a variable to all possible values of another variable?

I hope my question was worded right but I'm trying to solved pset2 caesar and i don't understand how to print something only if all the possible values of a variable fit the condition. If I input &...
0
votes
1answer
23 views

Readability lab: Counting letters

#include <stdio.h> #include <string.h> #include <cs50.h> int main(void) { string enterword = get_string("input: "); int t = strlen(enterword); printf("%i\n&...

15 30 50 per page
1
2 3 4 5
256