Questions tagged [cs50x]

The tag has no usage guidance.

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

Looking at Posts with regards to Academic Honesty

Does anyone know if getting help from a post that contains spoilers is considered academically dishonest? I'm not sure because even though the spoiler code in the post isn't an outright solution to ...
0
votes
1answer
31 views

How do I get my old workspace(settings) back:CS50 workspace/terminal was closed and after opening a new one all settings where changed

I closed my workspace in cs50 during the programming course. Pressing F6 opens a new terminal called workspace/ - "" instead of the workspace/ that you see in examples(blue background), I can work ...
0
votes
1answer
41 views

Domain Name and IP address

I have some questions on Week 5 short lecture on Internet Primer, in particular on the host and ip address table that was being showed at 11.37 of the video. The questions are as follow: In the the ...
0
votes
1answer
42 views

register not inserting credentials and returning invalid username/password

I almost spent a whole day on this. I saw every letter in the function, but still didn't got any progress. When I register, It show like this here's my code: @app.route("/register", methods=...
0
votes
1answer
204 views

please help ! till yesterday my app was working almost fine but today its not even starting ! can someone pls explain this to me?

flask.cli.NoAppException: Failed to find application in module "application". Are you sure it contains a Flask application? Maybe you wrapped it in a WSGI middleware or you are using a factory ...
0
votes
1answer
144 views

scratch submission issue

1.the "download to computer" (in file menu) of scratch does not do anything when I click on it... 2.so I just went to the file option in the safari menu bar and clicked on save as 3.then I get a box ...
0
votes
0answers
6 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
0answers
11 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 ...
1
vote
1answer
240 views

implicit declaration of function 'get_int' is invalid in C99

#include<cs50.h> #include<stdio.h> int main(void) { int i = get_int("Integer: "); printf("hello %i\n",i); } Error : implicit declaration of function 'get_int' is invalid in C99 ...
0
votes
1answer
121 views

Run Time Error on PSET 5 Speller

quick question- I am getting a runtime error that looks like this: dictionary.c:93:14: runtime error: null pointer passed as argument 1, which is declared to never be null /usr/include/string.h:130:...
0
votes
1answer
23 views

Unable to complie PSET3

I tired compiling my code, many time but it shows :( tideman compiles code failed to compile. Can anyone take a look. Another thing that i want to ask is my code well written? Because i feel it's too ...
0
votes
1answer
69 views

What is if __name__ == "__main__": doing in compare pset6?

I read the documentation, but I still can't pinpoint exactly what it is this line of code is doing in compare. The code of compare is as follows: #!/usr/bin/env python3 import argparse import re ...
0
votes
1answer
60 views

Crack program compiles but appears stuck when executed

So I've looked up a few posts with similar issues and taking the advice of commenters I've put printf after every For loop to see where the program gets stuck. It was initially was printing one ...
0
votes
1answer
14 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
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
98 views

CASH NOT UPDATING - FINANCE SELL

so everything I have so far is working except the part where I need to update the cash right after I sell a stock. As you can see in the table below what's happening is that everytime I sell a stock ...
0
votes
1answer
91 views

Pset1 Cash less comfortable - not running for 0.41 and 0.01

-- hi im running into a problem with my code. It's executed pretty well with many inputs except for 0.41 and 0.01. It didn't print out any answer but just ran indefinitely... #include <stdio.h> #...
0
votes
1answer
341 views

CS50 PSET2 code will not compile

I would appreciate any help that could be given with my code below (+ error codes below that): My code will not compile and the primary error apparently is an "undeclared identifier" refering to ...
0
votes
1answer
197 views

register.php in Problem Set 7 - How to let user enter cash other than 10000.0000

For register.php, how do I handle situations where the user enters a value other than 10,000.0000 for cash? I'm sorry if this is a stupid question or if it seems like I just want the answer on a ...
0
votes
2answers
50 views

Pset3 - move function - Keep getting an "Initialize the variable" message

bool move(int tile) { int xaxis = d - 1; int yaxis = d - 1; int tile_i; int tile_j; search_the_board(tile); if (tile_i == xaxis + 1 || tile_i == xaxis - 1) if (tile_j == ...
0
votes
1answer
30 views

What mistake am I doing in the below "buy" and "sell" code.? I get the below errors from check50

I get the below error from check50: :( buy handles invalid ticker symbol application raised an exception (see the log for more details) :( buy handles fractional, negative, and non-numeric shares ...
0
votes
1answer
103 views

Pset4 Recover issues

I am having a number of problems with recover in pset4. First, my program is not finding a beginning of a jpeg. But, to test that, I have to first compile it, and I cannot because for some reason on ...
0
votes
1answer
59 views

Having problem with vigenere in cs50. Keeps returning segmentation error, even though I solved all the errors compiler pointed out

#include <cs50.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> char argument_upper (int key, char plaintext); char argument_lower (int ...
0
votes
1answer
513 views

Opening phpLiteAdmin in cs50 IDE

I know this is a silly question, but how do you open phpLiteAdmin? I forgot the command for it while flask is running.
0
votes
1answer
238 views

Problem with caesar cipher encryption

I'm trying to solve pset2 Cesar encryption.Everything seems fine and encryption is working but when I hit check50 I get errors: :( encrypts "a" as "b" using 1 as key expected prompt for input, ...
1
vote
1answer
15 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
2answers
58 views

pset3: What is wrong with my code? (game of fifteen)

I've been trying to make the game of fifteen and everytime i check my code it fails for the last two checks.I dont really understand why. :) fifteen.c exists :) fifteen.c compiles :) init initializes ...
0
votes
1answer
84 views

CS50 Pset3 "Fifteen" Works but doesn't pass Check50

My code for pset3 "fifteen" works perfectly when I play it—board sizes fit, goes in descending order, blank space prints as a 0 etc. etc. but for some reason, it won't pass any check50 checks past "...
0
votes
1answer
2k views

cs50 pset 6 DNA. How to compare my results with the databse to print out the answer?

I got to a point in this problem where my code was working alright for the small csv, but it was clumsy and repetitive, so I tried to make it more elegant by making more complicated nested loops to ...
0
votes
1answer
216 views

vigenere python help

https://pastebin.com/DHEbSYWV help i have been stuck for the last couple of day but i feel like i am really close just need the push in the right direction. mainly for the this question. how do i go ...
0
votes
1answer
10 views

CS50 ide. Not being being able to compile program

Whenever i try to compile the program in the cs50 ide this error shows up- make: *** No rule to make target 'string'. Stop. Can someone please help me out. Thanks!
0
votes
1answer
13 views

How can I change my certificate name?

I have finished the course in the past month and noticed there were a typo on the certificate name. Is there any way to fix that? Where is CS50 picking my name?
0
votes
1answer
488 views

CS50W - Wiki with Django - I want to edit a wiki entry, but I don't know how to send the default value to the template if I use Django forms

I've tried to do this: class editPage(forms.Form): title = forms.CharField() textContent = forms.CharField(widget=forms.Textarea(attrs={'class' : 'textContent'})) def edit(request,name): ...
0
votes
1answer
8 views

error : function definition not allowed here pls help

i got this error message pls help $ make triangle clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow triangle.c -lcrypt -lcs50 -...
0
votes
1answer
286 views

2 check50 error pset5

No sure where the problem is : https://sandbox.cs50.net/checks/58b8a6fbbc464ad88eb9e8ac9ba16d37 :) dictionary.c, dictionary.h, Makefile exist :) speller compiles :( handles most basic words properly ...
0
votes
0answers
8 views

error: address of stack memory associated with local variable

I have the following function: string encipher( string plaintext, string key) { int size = strlen(plaintext); char ciphertext[size]; // For each alphabetic charaters determine what letter ...
0
votes
0answers
22 views

Why do Escape Sequences in C work differently when I compile code by using GCC?

Why do Escape Sequences in C work differently when I compile code by using GCC? For example, Input: #include <stdio.h> int main(void){ printf("Hello world\n"); } Output in CS50 ...
0
votes
1answer
407 views

pset1 Mario Help?

So I understand the bases of the project, what I'm suppose to do etc, but when I prompt the user I get a bug, it also loops forever when I enter a negative integer is that normal? The do and while ...
0
votes
1answer
161 views

vigenere.py help

please guys i am really stuck, first of i have a question as to how to debug python code. like the debug50. and my second is with my code for vigenere. import cs50 import sys def main(): # make ...
0
votes
3answers
48 views

Even though I get correct output check50 shows error in pset3 plurality problem

#include <cs50.h> #include <stdio.h> #include <string.h> // Max number of candidates #define MAX 9 // Candidates have name and vote count typedef struct { string name; int ...
0
votes
0answers
25 views

Pset9 problem at check50 tests

hello, i've tried "112.00" in my solution and cs50's solution and the result is same "invalid shares" but i don't know why this error occur. i'm really stuck any help please
0
votes
1answer
487 views

Pset5. How to make speller code take less time?

//define node structure typedef struct node { bool is_word; struct node *children[27]; } node; //pointer to the first element of trie node *root; //counts number of words int words = 0; //...
0
votes
1answer
90 views

PSET 4 Filters CS50

void reflect(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE temp[height][width]; for (int i = 0 ; i < height ; i++) { for (int j = 0 ; j < width ; j++...
0
votes
1answer
13 views

pset2//caesar : strspn result

I'm struggling to understand : (argc != 2 || argv[1][strspn(argv[1], "1234567890")]) It works, but I'm trying to understand what's going on inside the if evaluation, and the value argv[1][...
0
votes
1answer
278 views

Pset7 check50 buy error :( buy handles valid purchase

:( buy handles valid purchase expected to find "112.00" in page, but it wasn't found Log sending POST request to /login sending POST request to /buy checking that "112.00" is in ...
0
votes
1answer
72 views

Pset 3: Breakout initBricks implementation

I don't understand why my implementation of initBricks isn't working. I noticed that most people have been using nested loops for the ROWS and COLS and I don't particularly mind using doing that too, ...
0
votes
1answer
155 views

CS50 resize.c image problems... Whats wrong?

I'm having trouble with my program. It compiles and everything but 1) large.bmp appears as an "Invalid or Unsupported Image Format" and 2) I fail all the Check50 tests. I've been editing my code for ...
0
votes
1answer
45 views

Cannot find "free" certificate

I completed now in November2020, how do I obtain the "link" of the online free certificate? To be honest I'm not even sure if there is a free certificate so please tell me if there is one. ...
0
votes
1answer
179 views

sell in pset7 - delete and update query bug

I hope I can get some help here (and hopefully this isn't too much of a duplicate of another thread). I've got some code here that I want to have checked to see why this weird thing is happening and ...
0
votes
2answers
58 views

CS50 pset4 filter reflect issue

i am missing something here...but not sure what... it doesn't work on normal images... check50 passes for 1X2 and 1X3 images but fails for 3x3 and 4x4 images (so i guess it is an issue of iterating ...

1
2 3 4 5
18