Questions tagged [cs50x]

The tag has no usage guidance.

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

Game of Fifteen - Move function issue

I'm a beginner so please bear with me. For the game of fifteen I have successfully implemented the Draw function but I'm not having the same luck with Move. It is very erratic, sometimes the tiles ...
1
vote
2answers
182 views

PSET3 : fifteen: how to identify board edges in move function?

Hi I am working on pset3 : fifteen and trying to implement move function. I'm not quite sure how to identify board edges and deal with this. My swap is also not working as the tile I want to move ...
1
vote
1answer
373 views

pset6: /hello.php?name=david shows up in URL but hello.html page content loads

Currently working on pset6 server.c. All of my pages load properly except for one thing: when I submit a name in the text box from hello.html, the query properly shows up in the URL, but the hello....
0
votes
2answers
3k views

PSET4 Filter: Blur help

While trying to create an algorithm to come up with the average of the color for all nine pixels (if using 9) I realized I would need a way to see how many surrounding pixels are used in the ...
0
votes
1answer
245 views

Week 2 - Readability.c Grade Level Off By 1 (Sometimes)

I get the correct grade level output sometimes when running this code, but usually the grade level is off by one. This question has been asked before: CS50 Inconsistency of Results Inaccuracy in ...
0
votes
1answer
117 views

Pset2 initials problem with printing extra initials

I'm struggling with printing the initials after the first name, I'm following the less comfortable specs, my pseudocode; //prompt user for name and store as string //convert strlen to an integer //...
0
votes
1answer
42 views

Code not working - cash

Can someone please help me, as far as I think this code should give back the number of coins needed but it is not working.
5
votes
1answer
33k views

How to get a value using flask, from a selected option in a drop down list?

I have the following code for my form in HTML: <div class="container-fluid" id="feedback"> <p><h2>Give us your feedback on the cafe!</h2> <h4><em>...
2
votes
2answers
1k views

Hello world error

I was trying to make this simple Hello World program, however I receive the following errors. Someone can explain me why? Program: #include <cs50.h> #include <stdio.h> int main (void) { ...
1
vote
1answer
82 views

Explain the syntax for function render in PSET 7

I don't completely understand this line of render. function render($view, $values = []) I know it passes two arguments, the second is an empty array that you can fill I think? I used this in 'Quote'...
1
vote
2answers
988 views

Resubmitting work from my previous CS50x Course

In short, I took CS50x when it was last offered, everything through EdX, I actually found out late, and tried to clear CS50x in two weeks in order to achieve the honor code certificate from HarvardX. ...
0
votes
2answers
224 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
45 views

Cs50 Sepia properly coded

I did the sepia filter for the cs50 week 4 problem "filter) and although it works, I've been wondering, is there is not a more "proper" way to write the code, that is with out repeating ...
0
votes
1answer
450 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
376 views

CS50 Readability - Inconsistency in results

This is my 1st post here. I am taking CS50 and I am stuck trying to figure out why the results for this weeks problem set are delivering inconsistent results. My code is below. It passes most of the ...
0
votes
1answer
331 views

cs50 pset4 resize 're-copy' implementation

The code I wrote (using the pseudo-code of Zamyla's video on resize) make the image proper for some cases while not for others. I really need help in finding the flaw in the code. pseudo-code 1. ...
0
votes
0answers
214 views

PSET3 \ expected an exit code of 0, not 1 (find.c)

I successfully built my program and went on to check it using check50 only to discover this :) helpers.c exists :) helpers.c compiles :) finds 42 in {42,43,44} :) finds 42 in {41,42,43} :) finds 42 ...
0
votes
2answers
858 views

I just enrolled for CS50x on edx please can someone explain to me how this programv works?

I just enrolled on edx for this course I reside in Nigeria. If my question seems naïve please forgive me because this is my first time of taking CS and also my first time of taking online course. ...
0
votes
1answer
291 views

Credit Card Test Confusion

I am supposed to find if cc numbers are valid based on these rules: Multiply every other digit by 2, starting with the number’s second-to-last digit, and then add those products' digits together. ...
0
votes
1answer
242 views

Insert a node at the beginning of an existing linked list

The following code tries to add a node to the beginning of a linked list. Can anyone explain to me why my insert function doesn't work? The program passed in a pointer nodePtr and modified it inside ...
0
votes
1answer
1k views

Pset 7 buy - help!!

So I'm implementing "buy" in pset7 CS50 Finance, and having trouble with it. When I type in my stock and shares, the error is: "TypeError: unorderable types: list() > float()". This seems to be ...