All Questions

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

CS50 Web Wiki Edit Form. Form is returning empty in the edit function

I am having issues with an empty form being provided in the edit function. Everything works well but when I try to edit an entry I get a Value Error saying the HTTPResponse is None and that the ...
0
votes
1answer
9 views

for- loop stop if output A

on pset2/caesar and only when ciphertext[i] = A or a for loop stopped ????
0
votes
0answers
11 views

Mario hashes come out as equal height by width

for(int i = 0; i < height; i++) { for(int j = 0; j < height; j++) { printf("#"); } printf("\n"); } } So, that's the output portion I've written.
0
votes
1answer
4 views

Pset1 - Population

I'm having trouble with the last bit of code, where the years are calculated and printed. The loop seems to run once fine. If I put in something like 12 to start and want to get 13 it will give me the ...
0
votes
1answer
10 views

Is there a way in python to limit an API result?

I'm making a Web Application about movies and using IMDb's API. Here's the JSON result: {"items":[{ "id":"tt0111161", "rank":"1", "title":&...
0
votes
0answers
10 views

CS50 Bot - resend invitation?

I have some students in CS50x that did not accept the invitation from CS50 Bot. This was more than 7 days ago, and so the link doesn't work any more. How do I get CS50 Bot to resend the email?
0
votes
1answer
10 views

Flask Filter Search/List in Python

I created a country list on the python search page section, the data is sent to the Html table with jinja syntax “ The Html table also has a JavaScript function it functions correctly no help with ...
0
votes
0answers
4 views

Pset3: Tideman - Sort_pairs

Check50 says that my sort_pairs function is wrong, but with the tests I've used, everything is alright. Here's the code: void sort_pairs(void) { int biggest_strength_of_victory = preferences[pairs[0]....
0
votes
0answers
5 views

cs50 list.py creat_engine() error

I am using sql server 2019, what should be the create_engine() should be? print(os.getenv("DATABASE_URL")) returns None following works: server = 'SHAH4563' database = 'PythonCS50' conn = ...
0
votes
1answer
10 views

CS50 mario.c loop doesn't stop when asking for input, so I don't get the "stored" value

#include <stdio.h> int main(void) { int height; do height = get_int("height"); while(height < 1 & height > 8); return height; printf("Stored: %i&...
0
votes
1answer
13 views

Check50 says buy allows fractional, negative numbers but it doesn't. Where am I going wrong?

I'm down to my last check50 frown (:( buy handles fractional, negative, and non-numeric shares expected status code 400, but got 200) but my code doesn't allow for these, so I don't know what to do. ...
0
votes
1answer
5 views

unit16_t error while including library

Declaring Header is causing an error although <stdint.h> library is originally included in the distribution file, please help. Thanks in Advance.
0
votes
0answers
10 views

Q: CS50w project3. I keep getting this error: Uncaught (in promise) TypeError: Cannot read properties of null (reading 'appendChild') at new_thing

I am working on CS50 Web project 3 and I keep getting this error Uncaught (in promise) TypeError: Cannot read properties of null (reading 'appendChild') at new_thing here is my function function ...
0
votes
1answer
13 views

jinja code not working inside html file

I am using flask for the first time and jinja code is being displayed on the webpage. this is my html file: <!DOCTYPE html> <html lang="en"> <head> ...
0
votes
1answer
15 views

How to convert an unsigned char to a string?

I'm needing to collect byte by byte of an unsigned char and convert it to a string, how can I do that? I've tried everything but it didn't work. My example code: #include <stdio.h> #include <...
0
votes
0answers
8 views

Readability Pset2 - check50 multiple test fail

This is the code for readability problem set 2. The code is working but not properly as it's failing test cases. the output grade is either +-1 from the expected result. Is there something wrong while ...
0
votes
0answers
11 views

Error: use of undeclared identifier on an apparently declared variable

#include <stdio.h> #include <cs50.h> int main(void) { long creditcardno; do { creditcardno = get_long("enter"); } while (creditcardno<...
0
votes
1answer
7 views

Caeser Pset2: Segmentation Fault

#include <stdio.h> #include <math.h> #include <string.h> #include <ctype.h> #include <cs50.h> #include <stdlib.h> int main(int argc, char **argv) { if ((int)...
0
votes
1answer
18 views

Pset1- Credit: Length of the number by continuously dividing by 10

// Get card number long n = get_long("Number: "); // Count length int i = 0; long cc = n; while (cc > 0) { cc = cc / 10; i++; } Source: https://medium.com/swlh/cs50-pset-1-credit-...
0
votes
1answer
12 views

pset3, vote(); direct comparison failing but strcmp() working?

Why is if (strcmp(candidates[i], name) == 0) working, but: if (name == candidates[i]) not working? I have also tried with casting string on both sides, but doesn't work. I have checked via printf, ...
0
votes
1answer
8 views

PSET2 Substitution: Trouble only in encrypts all alphabetic characters using DWUSXNPQKEGCZFJBTLYROHIAVM as key

so this is my code. All problems are compiled successfully except this one. The output is "Segmentation fault" this is my code: #include <stdio.h> #include <cs50.h> #include <...
0
votes
1answer
22 views

Fiftyville: Can't find a logical way to find the thief

I have done the appropriate INTERSECTION between the person at the: atm, exiting the parking lot and the person on the first flight out of Fiftyville on the 29th. I am left with two people. I know who ...
0
votes
1answer
15 views

Help with check function (PSET5)

My check function is counting the right amount of words in dictionary and text, but it outputs words that are not misspelled. Here are all the functions of the problem, the arrays are used to locate ...
0
votes
0answers
13 views

Need help with check function, speller problem

When the program reaches this line of code: if (strcasecmp(seguido->word, word) == 0). It does nothing, it doesn't have an output or continues to the next iteration. Here are all the functions of ...
0
votes
0answers
9 views

Transitioning from CS50 IDE to VS Code

I recently finished with PSET9 and wanted to transition from CS50 IDE to VS Code for the Final Project. Problem is I don't know what exactly I need to setup to make it all work. I guessed that I just ...
0
votes
0answers
12 views

I have an error in register function (Week9 Finance)

I would like to ask for your help please with an error I keep getting on my code for the week 9 Finance. I have been receiving like this Here is my login/ register function below. @app.route("/...
0
votes
0answers
11 views

Week9, Finance " :| logging in as registered user succeeds "

I would like to ask for your help please with an error I keep getting on my code for the week 9 Finance. I have been receiving :| logging in as registered user succceeds can't check until a frown ...
0
votes
0answers
9 views

" can't check until a frown turns upside down " annoys me (Finance, week9)

I got like this: :| quote page has all required elements can't check until a frown turns upside down :| quote handles invalid ticker symbol can't check until a frown turns upside down :| quote ...
0
votes
0answers
9 views

CS50 Finance Error: Expected something but got other

I'm struggling with register function in application.py since I am having error messages in check50 That says: :) register page has all required elements :( registering user succeeds expected ...
0
votes
1answer
19 views

Speller code doesn't handle apostrophes and substrings properly

this is my code: https://pastebin.com/hJfQH6Vb Any help is appreciated.
0
votes
0answers
12 views

CS50 Week9 Finance I have an error in register

I'm struggling with register function in application.py since I am having error messages in check50 That says: :) register page has all required elements :( registering user succeeds expected ...
0
votes
1answer
19 views

Pset 2 (Substitution), time out (handling of incorrect chars)

The below code lost a mark; check50 gave the explanation just below. A different time-out query (by Abhijit) appears to have had a different cause. The check50 line used: check50 cs50/problems/2021/x/...
1
vote
1answer
26 views

Pset 5, Speller, What are the issues in my code(Check or load issues?)?

// Implements a dictionary's functionality #include <stdbool.h> #include <stdio.h> #include <string.h> #include<strings.h> #include<stdlib.h> #include <ctype.h> #...
0
votes
0answers
19 views

Need help figuring out the output of Caesar program. (Segmentation fault error)

I have implemented the encryption of plaintext to ciphertext and stored the output in array of char pointers. The program runs fine but the actual output i am getting has some extra characters tagging ...
0
votes
0answers
17 views

How to sort an array of strengt by victory using bubble sort (pset3: Tideman)

I wrote this code... void bubbleSort(void) { // loop to access each array element for (int step = 0; step < pair_count - 1; ++step) { // loop to compare array elements for (int i = 0; i < ...
0
votes
1answer
19 views

Do-while code for long integer input

It is mentioned in the problem: American Express uses 15-digit numbers, MasterCard uses 16-digit numbers, and Visa uses 13- and 16-digit numbers. So with get_long, I perhaps need to restrict input ...
0
votes
1answer
16 views

How does csv.DictReader know what to call the keys in the dictionaries it creates?

In Lab 6 - world cup - you are given a csv file with two columns of values. When reading that file, many solutions I found use csv.DictReader to read each row of the csv file as a dictionary. They go ...
0
votes
0answers
7 views

CS50W-NoReverseMatch Error?

Web Programming Project 1. I can't figure out what is causing this error. Tried searching for an answer everywhere. Error Message Reverse for 'edit' with no arguments not found. 1 pattern(s) tried: [...
0
votes
0answers
19 views

Invalid slug error

When trying to go through the steps in lab 1 for hello.c. I am getting the below error ~/ $ check50 cs50/problems/2021/pset1/hello ...
0
votes
1answer
23 views

Why does my lookup function keep returning "None"?

I have the latest (I think) distribution code and I have exported the API key. Here is my code and it keeps returning 'None'. I can't figure out why I can't look up a stock quote. Do I need to change ...
0
votes
1answer
13 views

Lab 4 problems when the audio is clearly altered

Source file: #include <stdint.h> #include <stdio.h> #include <stdlib.h> // Number of bytes in .wav header const int HEADER_SIZE = 44; int main(int argc, char *argv[]) { // ...
0
votes
0answers
10 views

How do I get an API key from IEX?

I've just started on pset9 finance, but I can't create an account with IEX. When I try, it tells me that my email address is already in use (this is definitely not true - I'm using a relatively new ...
0
votes
1answer
28 views

PSET9 / can't check until a frown turns upside down

I am getting this message in the following checks :| sell page has all required elements/ :| sell handles invalid number of shares :| sell handles valid sale I guess the problem is in by sell or buy ...
0
votes
0answers
11 views

pset4 blur filter invalid or unsupported image format

In pset4 Filter problem when I write blur function I get Invalid or Unsopported Image Format Error. The program compiles without errors and in check50 it also works fine. This is my code. I would ...
0
votes
1answer
18 views

My code gives error RuntimeError: no such table: File_Name

This is simplified version of my code from cs50 import SQL open("File_Name", "w").close() db = SQL("sqlite:///File_Name") id = 2 filename="hola" db.execute(&...
0
votes
0answers
7 views

CS50 Problem Set 4 filter less blur: please help debugging

//:( blur correctly filters 3x3 image expected "70 85 95\n80 9...", not "70 85 95\n80 9..." //:( blur correctly filters 4x4 image expected "70 85 95\n80 9...", not "...
0
votes
1answer
19 views

Valgrind invalid write and read

I recently made the speller excercise and it is working, has no memory leaks but I am getting some Invalid read and Invalid write errors from Valgrind in my check function. First I got a error because ...
1
vote
1answer
16 views

Mario problem: Program got stuck at user input

// ** Below is the code of mario pset1, its taking input of width multiple times and not executing step after input// #include <cs50.h> #include <stdio.h> #include <math.h> int main(...
0
votes
1answer
17 views

What is wrong with my Mario

could you please point out what I am doing wrong? I guess the problem is in the second loop - but how do I fix it? Thank you #include <cs50.h> #include <stdio.h> int main(void) { int ...
0
votes
1answer
35 views

Finance (buy) having trouble to update the table

So I'm trying to update the "share" column in an existing row in the table portfolio instead of creating a new one when buying a stock that the user already has, here is my code: def buy(): ...

15 30 50 per page
1
2 3 4 5
253