Questions tagged [cs50x2017]
The cs50x2017 tag has no usage guidance.
73
questions
0
votes
0
answers
37
views
Map not appearing
I implemented the configure() function. It worked for a few days but after that the map did not appear. There is only the search textbox which also doesn't work now. When I check the javascript ...
0
votes
1
answer
327
views
Google is not letting me get API key
In pset8, I went to developers.google.com/maps/web as mentioned in the documentation. But google redirected me to developers.google.com/maps/overview. And there is no option to get an API key in the ...
0
votes
1
answer
320
views
IDE is not letting me hash the password. Should I change th hashing algorithm as it tells me to?
I implemented the register function for pset7. It went to the register page that I had implemented. I gave the required credentials and clicked Register. But instead of registering with the ...
0
votes
1
answer
199
views
Pset8 - mashup (2018 or 2017): Downloading distribution code does not include txt files
I'm having some issues with downloading the distribution code for Pset8 (mashup). I am getting everything except US.txt and readme.txt. I do get the other text file, requirements.txt. Is anyone ...
0
votes
1
answer
52
views
Submissions from previous courses
I finished cs50x a few days ago and I would like to get a certificate at edX. However, cs50x2018 has started and my scores from 2017 have disappeared at cs50.me. Is there any way to recover them?
0
votes
1
answer
206
views
Can I complete CS50 for a verified certificate after 31 Dec via Edx?
I don't know if I can make the CS50 course by 31 Dec. I planned to get a certificate. What would happen if I upgrade the course to get a verified certificate and then not finish it this year, but some ...
0
votes
1
answer
51
views
Check50 for find-less in ps3 shows me a './sort' error
I implemented the helpers for sort and search. Using basic implementations of quicksort and binarysearch. When I ran check50 cs50/2017/x/find/less there was a weird error for the sorting part:
:) ...
2
votes
1
answer
549
views
Pset4 resize/less - rewrite (Hint needed)
I was trying to implement the rewrite method. the code compiles without error but I always get a weird result bitmap.
Here is the code I wrote:
#include <stdio.h>
#include <stdlib.h>
#...
0
votes
1
answer
86
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
1
answer
289
views
How are script.js and application.py linked?
Question
Why am I able to pipe variables from my database into my script.js file? I was able to pipe in "{{place_name}}, {{admin_name1}}, {{postal_code}}".
script.js
// configure typeahead
$("#...
0
votes
1
answer
531
views
Pset7 Finance register NameError: name 'pwd_context' is not defined
def register():
session.clear()
if request.method == "POST":
if not request.form.get("username"):
return apology("Missing Username!")
elif not request.form.get("...
2
votes
2
answers
240
views
PSET2, crack.c Did this problem fall out of the sky from week 115? Am I overthinking this?
This is the spec:
Specification
Design and implement a program, crack, that cracks
passwords.
Implement your program in a file called crack.c in a directory called
crack.
Your ...
0
votes
1
answer
64
views
Vigenere's bug: applies cipher to spaces (all characters)
I'm working on the Vigenere problem and I've came up with the following code:
for (int i = 0, j= 0, p = strlen(s); i < p; i++, j++)
{
int b= (j % strlen(argv[1]));
if (isupper(s[i]))
{...
0
votes
0
answers
25
views
Enjoying CS50, asked a question on SO (before I knew about this) and some of the comments have me concerned about CS50 now
Check out the comments in this answer to my question:
https://stackoverflow.com/a/46768605/8561378
What's going on here? How can the reputation of CS50 be bad, or the "first chapters" definitely be ...
0
votes
1
answer
431
views
PSET5: Segmentation Fault in Speller
I realise there are probably lots of other errors in my code (which you are welcome to point out...PLEASE) but when I use debug on this code, it shows a segmentation fault when calling the HASH ...
0
votes
1
answer
499
views
CS50 2017 crack.c not working properly
Can't understand why my code is not working.
Tried 2 different loops to arrive at the solution but the first one does not arrive at anything and keeps on going:
#include <stdio.h>
//#include &...
0
votes
1
answer
18
views
I need a hint only!
#include <stdio.h>
int main(void)
{
float no1, no2, result;
printf("Type your 1'st Number: \n");
scanf("%f", &no1);
printf("Type your 2'nd Number: \n");
scanf("%f", &...
0
votes
1
answer
26
views
Can someone help with what is wrong with this code? Seems something is being overwritten
Firstly, I am getting some valgrind errors. Secondly when I debug the code it seems as if trav gets overwritten. As in, if I am reading caterpillar from the dictionary, it seems to start over again a ...
0
votes
1
answer
199
views
How can i implement this speller unload function resursively?
I am having problems implementing the unload function in speller. I am trying to do recursion but running into some issues. Here is unload with the function below that I am calling. I am getting the ...
0
votes
0
answers
133
views
After update50, my texts shown in text editor are still plain white
I am ready to do pset2! However, after I run update50 and close and re-open terminals, I found that my texts in text editor are all white as below:
I found a question asked before here, and I did run ...
0
votes
2
answers
63
views
pset4 recover Segmentation fault
my code can compile but when running it will return Segmentation fault.
And when I apply "echo $?" to the code, it would return 139.
Here is my code.
/**
* Copies a BMP piece by piece, just because.
...
1
vote
0
answers
58
views
CS50 Final Project: Unique URL for each user of my flask app (2 of 2)
I have a pending question here: CS50 Final Project: Unique URL for each user of my flask app (posted two days ago) regarding the implementation of unique URLs. This unanswered question was in fact ...
0
votes
2
answers
41
views
Give a Function access to earlier value
If the main block of code gets a value from the user, assigns it to an integer, and then changes that interger's value, is there a way for a function (created outside the main block of code) to access ...
0
votes
1
answer
76
views
CS50 Pset7: Pset7 questions in preparation for final project
I have two questions arising from this problem set which I think can eventually help me with implementing my final project:
Atop every page of the stock trading website, whether it be the LOGIN, ...
0
votes
1
answer
64
views
game of fifteen help
yet again. i started working on the game of fifteen, i got it to work. But i had a lot of struggle with the won function. although it now works, i still don't know why it works. it was pretty much ...
0
votes
1
answer
382
views
cs50 pset 6 caesar
I imported the below mention libraries but still getting this tracback error
anyone who can help
import cs50
import sys
def main():
if len(sys.argv) is not 2:
print("Please give me valid key")
...
0
votes
0
answers
101
views
Vigenere - is there a simpler logic behind it?
My code for vigenere.c works for check50, but ends up being much longer than caesar.c in the encipher part.I was wondering if I was missing a simple point and have meandered through the logic behind ...
0
votes
1
answer
240
views
cs50 pset 6 greedy
import cs50
def main():
count = 0
while True:
print(" O hai ! How much change is owed ?")
input = cs50.get_float()
if input >= 0:
break
input = ...
0
votes
1
answer
224
views
CS50 : pset4 resize(less comfortable)
I have worked on the code for 6 hour and finally on checking manually these codes are working fine. I have tried both small and large bmp from 1 to 6. It worked. But same is not working in check50.
...
0
votes
1
answer
9k
views
Can someone please tell me how to use help50 in the CS50 IDE terminal window?
I want to understand error my program using help50. I would be very grateful if someone tells me the command for this.
0
votes
1
answer
70
views
caesar.c questions
I have, I think, finished caesar.c. However passing it through check50, returns the following.
Yet from what I can see in my code, and when i run my program vs the one in /home/cs50/pset2/caesar.c,...
0
votes
1
answer
80
views
CS50 Vigenere code gives incorrect when detecting a non-alphabet char for plaintext
My vigenere code works fine when a single char or string is entered, however as soon as it detects a space in plaintext it gives wonky values. Please help!
#include <cs50.h>
#include <stdio....
0
votes
1
answer
235
views
Here's my code for "Greedy" . It works perfectly. Yet I got a score of 69. Could someone please tell me what's wrong with it?
#include<cs50.h>
#include<stdio.h>
int main ()
{
**float f;
do**
{
**printf("O hai! How much change is owed?\n");
f = get_float();**
}
**while(f<0);
...
0
votes
1
answer
32
views
Everything's working in manual testing, but cs50 says 4x4 not working (pset3 fifteen)
Source code for init:
void init(void)
{
int k=(d*d)-1;
for(int row=0; row<d; row++){
for(int col=0; col<d; col++){
board[row][col]=k;
if((d%2==0)&&(k==3)){
...
0
votes
1
answer
238
views
Caesar PSet2: Check50 deems correct looking outputs incorrect
I'm making my way through Caesar.c in PSet2, and am struggling to overcome all these check50 issues. They look identical to me, but I'm sure I made some sort of mistake. Let me know if seeing some ...
0
votes
1
answer
27
views
Can anyone explain that attendence algoritm of week 0 lecture?
The week 0 lecture of CS50 edx. I was not able to understand how did we come to 546 student.
0
votes
2
answers
75
views
CS50 Pset7: Final Questions before Wrap-Up
I am finally done with implementing my stock-trading website. Anyhow, I have some last questions before wrapping up and hope that someone can help me out to make sure I understand everything in this ...
0
votes
2
answers
1k
views
any idea how to fix Mario more comfortable problem "expected output"
when I executed i have this error
:) mario.c exists
:) mario.c compiles
:) rejects a height of -1
:) handles a height of 0 correctly
:) handles a height of 1 correctly
*:( handles a height of 2 ...
0
votes
3
answers
379
views
Pset1: Water- Infinite Loop
Ive encountered an infinite loop while writing code for the water assignment of pset1
Yeah, I realise Ive made a complete mess.
Now Im lost as to how I should proceed further.
Also I did the same ...
0
votes
1
answer
12k
views
Pset1 error: expected identifier or '('
I want to create a simple program wherein the user inputs any number but only a postive integer is accepted (like the kind mentioned in the CS50 pset1 water walkthrough video)
Ive been onto this for a ...
0
votes
1
answer
144
views
Pset1: ~/workspace/pset1/ not working
Ive gone through a range of questions on stackexchange regarding this problem but nothing seems to solve it.
The problem is that
When i use "~/workspace/ $ make hello" the program is running ...
1
vote
1
answer
191
views
New users not being entered into database
I'm trying to code the register function for 2017 pset7.
The proper screen comes up, and the program behaves correctly for missing username, missing password, incorrectly repeated passwords, and ...
0
votes
1
answer
127
views
crack.c something weird is happening to the generated keys
This is how I am generating all of the keys and checking them (for debugging purposes I'm printing them out too)
char salt[] = "50";
char key[4] = { 0 };
char alphabet[] = "...
3
votes
1
answer
1k
views
How to get and download edX CS50 verified certificate?
I have completed all psets and final project in 2017 and verified my ID with edX. However, I cannot find where the verified CS50 certificate is. Does anyone have idea?
0
votes
1
answer
126
views
Problem with Total (stock price * number of shares) and Number of Shares Value in Portfolio on Index
Just recently, on my implementation of CS50 Finance, I bought 4 shares of Netflix, and then another 2, but instead of showing 6 shares on the Portfolio, it's only showing 2. The "Total" value for the ...
0
votes
1
answer
51
views
Limits of data type as explained in Week-1
In week-1 of CS50 course to introduction to computer programming, we are explained about the limitations of data types that are used in computers nowadays and how the computation 1/10 to 50 decimal ...
0
votes
1
answer
204
views
No markers are showing and gives me a 500 error
I am slowly progressing, first I couldn't see the map and I fixed that issue but I cannot see articles, locations, etc. Every time I type a place it gives me the error 500. Any help would be ...
0
votes
1
answer
54
views
Sorting a List Based on Stock Symbols in CS50x2017 Problem Set 7 Index
Would this be the way to sort a list of stock information with sorted using stock symbols as the key to sort on? new_translactions_info = sorted(transactions_info, key=lambda transactions_info: i....
0
votes
0
answers
47
views
Logic error in "index" CS50x2017 Finance (and also help needed in "buy")
I need some help in index and buy. I'll get back to sell after that again as there are some problems in there still.
First, here's a screenshot of my transactions table: https://1drv.ms/i/s!...
0
votes
1
answer
47
views
Logic error on `sell` route code - Info for one stock whose shares are owned not showing
Everything else seems to be working for the index and sell routes, but there's still a problem. My Portfolio isn't showing any Netflix shares' info even though the database still shows that I have 1 ...