Questions tagged [cs50x]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
11 views

How can I create a loop to read end of the card.raw file?

I'm using the basic expressions have been taught in the short videos but probably I'm implementing them wrong, especially I believe I'm using the wrong data types for my variables :/ My loop ...
0
votes
1answer
10 views

CS50 Recover (pset4). Images dont seem to load

my program compiles successfully but it doesn't seem to produce any images at all. I tried using debug50 and it seems like the if condition for buffer[0] through to buffer[3] isn't fulfilled, or the ...
1
vote
1answer
18 views

Is there a place to submit cs50x or cs50ap feature requests?

Is there a page for cs50 feature requests? Is there an interest for curriculum suggestions from fellow educators?
0
votes
1answer
229 views

CS50 Finance 2019 Check50 errors

I have been stuck on this for a while now. No matter how I change my code nothing works it's the same 3 errors. I think the issue is in my register.html but I can't find anything wrong with it. Here ...
0
votes
2answers
93 views

Why does my Cs50 recover programme correctly recover all images except the first one?

I wrote the below code and it recovers 51 images: 000.jpg to 050.jpg- all images except img 000 seem to have been found correctly. I'm not sure why the code isn't working? include include include ...
0
votes
0answers
15 views

Students only passing 4/6 the last two showing concatnation error but works locally somebody help

[33mTraceback (most recent call last):[0m [33mFile "roster.py", line 34, in main()[0m [33mFile "roster.py", line 27, in main print(row[0] + " " + row[1]+" "+ ...
0
votes
1answer
69 views

Valgrind uninitialized values pset5

This is my solution for pset5's speller problem, which uploads a dictionary with a hash table and checks an inputed text to find misspelled words. My code works fine when I run, but valgrind says "...
1
vote
1answer
235 views

pset 7 survey: trying to redirect to /sheet returns invalid syntax error

For part of CS50's survey problem from pset7, I'm supposed to redirect from a route that checks if the user has entered in all the survey's fields / appends the values to a csv file --> a route that ...
0
votes
1answer
393 views

How to exit debug50 window?

Can anyone tell me, how to close degub50 window and terminate a programm so I don't have to run my code to the end if I've already found a bug?
0
votes
1answer
519 views

CS50 PS1 - Cash: Passing double to parameter of incompatible type

Hi and thanks for taking the time to read this I appreciate it! I hope this is not the wrong place to put this but I am currently working on my code and have written different aspects but it keeps ...
0
votes
1answer
93 views

Final Project with Google Maps ERR_EMPTY_RESPONSE reply for index

I am working on my final project using Google Maps to make a game, and I keep running into the same error: ide50-ssk4988.cs50.io didn’t send any data. ERR_EMPTY_RESPONSE This always seems to happen ...
0
votes
1answer
390 views

Readability wrong grade

I am right with other string but this one=> Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book ...
0
votes
1answer
112 views

PSET 6 DNA: How to get number of repeats for each value of STR's? [SPOILER: Full code]

I have written a code to count the highest number of consecutive repeats of specific DNA substring sequences in a long string of DNA...or so I thought. While my code can correctly count the longest ...
0
votes
1answer
57 views

pset3 runoff print_winner check50 error

So I have seen this issue mentioned here before and the others have suggested that printing a newline after the name is the solution. However, my code does print a newline and in my tests, I'm getting ...
0
votes
0answers
16 views

pset3 tideman cs502020 locked pairs error

I am new to coding and I am trying to solve the locked pairs part of the Tideman problem. Currently, I am receiving the following two errors: :) lock_pairs locks all pairs when no cycles :( lock_pairs ...
0
votes
0answers
17 views

Finance - Buy Implementation

I am getting the error message "500 Internal Server Error" when trying to buy shares. Can you please tell me what I am missing? The application.py code is: @app.route("/buy", ...
0
votes
2answers
112 views

adminer.cs50.net giving “Session expired, please login again.” error when attempting to login

This seems to have happened 11 Sept 2019 but it is occurring again. I tried logging into Adminer today and am receiving this error: "Session expired, please login again." I thought my Heroku ...
0
votes
1answer
84 views

CS50x Problem Set 4 Blur Function Issue. Does not work on 3x3 or 4x4 image

For some reason, my CS50 pset4 blur function is not returning the proper pixel values for a 3x3 or a 4x4 image. It passes the other check50 tests. I looked at the check50 output, and my code gets the ...
0
votes
1answer
79 views

Problem Set 1 (Credit) - More Comfortable - 'Else' Block Not Running

I attempted Problem Set 1's 'More Comfortable' Credit assignment today, which is essentially to implement Luhn's mod 10 algorithm for checking that a given debit/credit card number is valid. I've ...
0
votes
0answers
8 views

cs50 pset3 print winner function

Im strugling with print_winner function in Tideman election program. In my opinion function workes fine. It prints the candidate which has all false values in column under his name (number) in locked ...
0
votes
1answer
29 views

Check50 all green but my own tests fail

I completed Runoff with 100% pass in check50 but when i do my own tests i get wrong winners. I checked everything to the best of my abilities but i just can't find the problem and it's driving me ...
0
votes
1answer
14 views

Pset 2 - Caesar - segmentation fault when input is null

I recently started cs50 and I finished caesar after great difficulty. Everything is working when I run check50 except there is a segmentation error when the input is null. I did search a few forums ...
0
votes
1answer
14 views

Cash 50 - Less Comfortable. Trying to nest so the algorithm will consider all money levels. Not working

coder newbie here. As far as I understand, this should work. This is the logic of my code... I get the float input from the user, and keep asking until I receive a positive number. I change this into ...
0
votes
1answer
15 views

Pset 2 - Readability -> Wrong grade

I'm having problems with the Pset 2 problem: readability. The goal of exercise is to implement a program that computes the approximate grade level needed to comprehend some text using the Coleman-Liau ...
0
votes
1answer
17 views

Can I use if-statement or switch-statement instead of a for loop!

I just want to know if it is possible to use conditions instead of loop in the problem set 1 (Mario), because I think that it's easier to get to the intended output without much code!?
1
vote
0answers
19 views

Are we allowed to upload the class solutions to our personal Github account?

I just started the intro course for CS50 and I was hoping to upload my solutions onto my personal Github once completed. I do not remember seeing any rule against this but I wanted to be sure I was ...
0
votes
1answer
11 views

Error in CS50 IDE Terminal

I was working on the cs50 IDE and noticed this happen a couple of time - As you can see in the last terminal in the last entry the substitution changed to subst i don't know why. This happens mainly ...
0
votes
1answer
59 views

Pset4 'Recover' - Help! How can I solve this segmentation fault?

For pset4 'Recover', I'm facing a segmentation fault but I cannot find what I did wrong in my code. If I use echo$? to find where the bug is, it returns the value 1. Can someone help me to point me in ...
0
votes
1answer
68 views

My game of fifteen doesn't work

void init(void) { // TODO int fill = ((d * d) - 1); int brow = d; //fill entire grid except the bottom for(int i = 1; i <= d; i ++) { for(int j = 1; j <= d; j ++)...
0
votes
0answers
23 views

Skipping More Comfortable psets

People who have completed the psets how often did you skip the more comfortable psets and did you complete them all before submitting the course and if not did you miss out on stuff due to that?
0
votes
0answers
15 views

Private cs50 Repository

Whenever I submit the psets they are added to a private repository in my Github account. After I complete the course will I be able to make them public too? Is it a good idea to add a readme file ...
0
votes
0answers
14 views

What is the difficulty level of cs50 problems?

I am totally new to coding and I struggle a lot with each problem, I learn a lot this way as well. I was wondering what is the actual level of difficulty of these psets? Will someone who studies CS ...
1
vote
2answers
73 views

mario.c (comrfortable) error code

I ran the test and it was an error #include <cs50.h> #include <stdio.h> int Height; int space; int hash; int rows; int main(void) { do { printf("Welcome to Mario, ...
0
votes
1answer
43 views

Unsure of what my DATABASE_URL is

I am using windows 10 (64-bit) and am following the course "Web Programming with python and Javascript" in CS50, in which i wanted to use my computer as a local host to store the table content. I am ...
1
vote
1answer
439 views

PSET 6 DNA - PROBLEM COUNTING CONSECUTIVE STR SEQUENCES

Im struggling with the PSET6 DNA solution. So far I have opened the dna file and converted it into a dictionary as well as reading the text file. I'm trying to count the consecutive times an STR ...
0
votes
1answer
29 views

Pset2 Readability Not Working

I need help in executing the program here. This is my program and when I execute it, it asks me for a text. I copy-pasted the first HOW TO TEST YOUR CODE "One fish. Two fish. Red fish. Blue fish.&...
0
votes
0answers
16 views

Week 4 recover seg fault

#include <stdio.h> #include <stdlib.h> #define BYTE 512 #define NAME 8 int main(int argc, char *argv[]) { //check for valid input if(argc != 2) { //Promt user for valid input printf("...
0
votes
3answers
33 views

When to Start the Next Week?

I finished the pset from Week 1 however I am still unable to finish the credit problem. Should I move on to Arrays and come back at a later time or wait until I am able to solve it?
0
votes
1answer
19 views

check50 for plurality

Every example I try myself works perfectly fine but once I check50 it, I get error messages for not printing one,two, or all three winners. I saw some people having format issues with spaces, but I ...
0
votes
1answer
21 views

Extern keyword for referencing variables among different files

We know that we can share external variables between different c files using extern keyword but during declaration in second c file using extern keyword . Is memory also allocated to the variable ...
0
votes
0answers
16 views

Django form does not render in html template

so I've been trying to render a django form in an html template for about two hours now and I can't seem to get it to work. Any one with an idea or solution to this should kindly share, thanks :) Here'...
0
votes
1answer
33 views

cs50 2019 Vs 2020

I have just started with cs50 and registered via EdX as auditing the course, now I noticed the lectures linked on EdX are noted as 2019 on Youtube while a new session is going on as 2020 on Youtube. ...
0
votes
1answer
76 views

PSET4 Recover Segmentation Fault Help

Edit: It has been resolved. I figured it out. Anyone who has similar problem may check my answers below. Try to skip over my code to avoid spoiling yourself. // // // // I have been stuck with ...
0
votes
1answer
54 views

What is probably wrong in this while loop?

I'm getting positive integers from users. I used a do-while loop to check and validate that the user input is: 1. A positive integer. 2. The length (I.e size) is between 13 and 16 digits BUT NOT ...
0
votes
1answer
51 views

Issue with recording STRs in memory (PSET6 - DNA)

I'm trying to record the number of repetitions of each str in the sequence. I created a dictionary as below and another empty dict because i couldn't update a dict while iterating through it. But for ...
0
votes
1answer
18 views

How to add files to Desktop in CS50 Sandbox

I am wondering how to add files to the desktop in CS50 Sandbox. If you are wondering how to make a desktop, here is a list of step by step insturctions. Open CS50 Sandbox. Click on the plus. Click ...
0
votes
1answer
972 views

CS50 Pset6: cash.py not returning number of coins used for change

Below is my code for pset6 of CS50, in which the user is prompted for an amount of change in the form of a float, which is converted into cents (e.g. 1.25->125), and the fewest coins needed to make ...
0
votes
2answers
71 views

Pset1 Cash (in C) array increment error

Context; I'm trying to solve Cash by; Taking positive integer user input, saves as float "ch" for change. (this as an implementation detail) Create an array "coin_val" with coin value by descending ...
0
votes
2answers
24 views

How can I check my number of rows on pset7 movies?

I wanted to check my queries one by one as I am doing them, my 1.sql works fine but how I find out how many rows I am getting?
0
votes
1answer
49 views

Runoff pset 3, arrrays and indexing

I don't understand what's going on with the solutions to the voter preference and tabulate functions. I had set up a similar function to the answer with the exception that I had [voter][i] = rank; ...

1
2 3 4 5
16