Questions tagged [cs50x2017]

The tag has no usage guidance.

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

CS50 2017 vigenere.py Issues "TypeError: not all arguments converted during string formatting"

As the title suggests, I have a "TypeError: not all arguments converted during string formatting" error in vigenere.py for Pset6. Here's the code: import cs50 import sys if len(sys.argv) == 1 or ...
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
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
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
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
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. ...
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
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
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
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
178 views

Problem Set 6 CS50 2017 Caesar Issue TypeError: 'str' object does not support item assignment

As the title suggests, when I tried to run my current code for Caesar.py, I got the error message "TypeError: 'str' object does not support item assignment" from the interpreter. My code is like this:...
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
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
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
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
1k views

byte-compiling disabled? Warning when running "pip3 install --user -r requirements.txt" command

When I ran the command "pip3 install --user -r requirements.txt" to download the dependencies for Sentiments in Pset6, it give me these messages as a result: Requirement already satisfied (use --...
0 votes
2 answers
832 views

PHP removal from CS50

Hello dear CS50 folks, I was wondering - just out of curiosity - why PHP was removed from CS50 ? And why choose Python instead ? If someone could give me an elaborate answer, explaining the ...
0 votes
1 answer
379 views

How to represent current date and time of purchase in table

I need to know how to represent the date and time of purchase correctly in my table for storing who bought what at what price and when (as per the specs for buy). I tried to use datetime.datetime.now(...
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
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 ...
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
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 ...
-1 votes
1 answer
902 views

Pset7 CS50x2017 CS50 Finance register route

Could someone please point to where I can see how to check in the register route if a username already exists in the database and also whether the user entered the same password in the confirmation ...
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
8k views

Jinja template exception: "jinja2.exceptions.TemplateSyntaxError"

I have an exception thrown from a template, which reads like this: "jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'holding'. Jinja was looking for the following tags: 'endfor' or '...
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: :) ...
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("...
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
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
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
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
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
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 ...
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
1 answer
997 views

Pset6 2017 - 'str' object has no attribute 'isaplha' - caesar.py

My code for caesar.py receives errors when it checks if the plaintext is alphabetical, lowercase, or uppercase. The terminal says: 'str' object has no attribute 'isaplha' Am I using the isalpha ...
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
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
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
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
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
509 views

Pset6 2017 application.py Sentiments

I can't tell how to get the correct scores for positive, negative and neutral under the "TODO" in application.py, here: # TODO positive, negative, neutral = 0.0, 0.0, 100.0 That isn't all we have ...
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
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
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
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 ...