Questions tagged [pset]

The tag has no usage guidance.

0
votes
1answer
20 views

Pset 1: Cash help

I've put together my answer for the cash problem set, but when I run the program and enter an amount for "change owed" it always outputs 1. Being new to all of this, I'm not sure what I'm doing wrong ...
0
votes
1answer
19 views

Check50 has Blank Output

I am trying to run check50 on my code, but it does not return anything; the output is blank, and it only returns a link to a check on https://cs50.me. Anyone know how to fix this problem
0
votes
1answer
27 views

I need help with cash - again

Ok so this is my improved code: #include <stdio.h> #include <cs50.h> #include <math.h> int main (void) { float c; int a, n=0; do { c = get_float("Change: "); } while (...
0
votes
1answer
24 views

CS50 AP: Pennies

I'm wondering why a lot of my answers are off by 0.01 or a very small amount. Here are the results from check50: :) pennies.c exists :) pennies.c compiles :( 28 days, 1 penny on day one yields $...
1
vote
1answer
88 views

This should be right (Caesar)

After spending pretty much a whole day on this, I have gotten it to work fine, it does all that was demanded but when submitted, I am still getting 1/5 on correctness. :( someone tell me if I left ...
0
votes
1answer
30 views

music pset - semantic error

I implemented the music program in pc and I omitted the cs50.h library since I work offline most of the time. Everything's fine actually my code did not give me error messages and it compiled ...
3
votes
2answers
76 views

Which loop can be replaced for nested for loops for PSET 1 (Mario More Comfortable)?

According to the cs50 style guide for C, more than 3 variables for iteration is not a good practice. I have done Pset 1 (Mario more comfortable) with 5 for loops, so it has 5 iterations variables. Is ...
0
votes
1answer
100 views

Submissions via check50 does not appear on cs50.me

I have submitted my problem sets via check50 as instructed, but when I go onto my cs50.me page and check my scores, it says "No Submissions" next to each problem set. I have already linked my edx ...
0
votes
1answer
62 views

Handlebars.compile() not behaving as expected

I am trying to use handlebars.compile() to generate my HTML unordered list items in my getJSON() callback function: function addMarker(place) { ... // add event listener to open info window ...
0
votes
1answer
59 views

pset 4 resize please help

//CREATE A PROGRAM TO RESIZE A BITMAP FILE //include C libraries #include <stdio.h> #include <stdlib.h> #include <math.h> #include "bmp.h" int main(int argc, char* argv[]) { //...
0
votes
1answer
18 views

Why does the strcmp() give 17 instead of 0 between the second characters of dave and baca

int main(void) { int i; char* kw = get_string(Enter keyword: \n"); char* plntext = get_string(Enter plaintext: \n); for(i = 0;i < strlen(kw); i++) { printf("%s, ", kw[i])...
0
votes
1answer
89 views

pset1 cash.c Do While loop executing even when condition = false?

I am inputting 0.26 into cash.c, and after the first do while loop in my program, f = 0.00999999046 My second do while loop condition is f >= 0.10, yet it is executed even though f is less than that. ...
0
votes
1answer
64 views

CS50 Pset 4/Recover-retains 50 broken JPEGs

My code compiles/executes and retains 50 JPEGs, however, these JPEGs are broken, I have gone through my code many of times, have discarded other versions, I seem to be missing something I can't spot ...
0
votes
1answer
104 views

imprecision problem cs50 greedy

#include < cs50.h > #include < stdio.h > int main(void) { float change; int quarter = 25; int dime = 10; int nickel = 5; int penny = 1; int counter = 0; int c ...
0
votes
1answer
49 views

CS50 is great but I need some help

I like the course, it's for me the best CS course online but I need some resources. The Psets are getting a little hard to solve. I need some help with the C language in general to think more ...
0
votes
1answer
25 views

Trying to use functions to modify pset2 Caesar characters, get error: expression result unused for each function

So I'm working on pset2's Caesar and wanted decided it would be better to put the algorithm into functions, with each function operating based on whether a character is uppercase or lowercase. Now ...
0
votes
1answer
1k views

CS50 IDE undefined reference to `get_int'

I've created a new workspace on cloud9, and ran update50 as suggested in the answer to this similar question: Undefined reference to get_int However, I still receive the exception 'undefined ...
0
votes
1answer
111 views

Pset 3 helpers.c check 50 errors

#include <cs50.h> #include <stdio.h> #include "helpers.h" //TODO binearysearch, om te controlere van de waarde. bool search(int value, int values[], int n) { int left = 0; int ...
0
votes
1answer
142 views

Blank jpegs pset 4 recover

#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <cs50.h> int main(int argc,char *argv[]) { if (argc != 2) { fprintf(stderr, "usage: ./recover ...
0
votes
1answer
139 views

Unable to submit problem set 0 on edX

When I click the submit link, it takes me to the Week's 0 video short on Scratch. Where I can submit it?
0
votes
1answer
147 views

Pset5: Check returns all as misspelled (trie)

I can't, for the life of me, figure out why my check function doesn't work properly. I have triple-checked my load() every way I know how and believe the data structure is properly setup. Why doesn't ...
0
votes
1answer
71 views

pset2 Caesar, not able to print chypertext text

I'm trying to solve the Caesar problem. if you look at my code, I tried to iterate through the "plaintext" value with a for loop. My aim was at every alphabetical character to apply the chypher ...
0
votes
1answer
88 views

initialization; condition; update in mario.c less comfortable

I am really having a problem with developing the "initialization; condition; update" part of my for loop in my mario (less comfortable) code could anyone help me with understanding what to input
0
votes
1answer
39 views

any one having trouble opening Pset links

Have not been able to open any of Pset links, able to watch videos of lectures and shorts! any thoughts? Thanks
0
votes
1answer
286 views

pset2//caesar- relational operator result unused error

my code--> #include<stdio.h> #include<cs50.h> #include<string.h> #include<ctype.h> #include<stdlib.h> int main(int argc, string argv[]) { if(argc!=2) ...
0
votes
1answer
177 views

problem resizing horizontally

I've started out this problem as bad as it gets :( trying very hard to understand bitmab files and how they work (especially padding) for a few days(as I'm not a native English speaker). now that I ...
1
vote
2answers
801 views

Set foreign key in phpLiteAdmin

Does anyone know how to set a foreign key using the phpLiteAdmin interface? The docs for this application are lacking, and the recommended syntax for adding a column using SQLite does not appear to ...
0
votes
1answer
94 views

Recover is Producing Corrupt JPEGS

Here's my code. I've got print debugging statements in there. The output seems to indicated that everything is going well, but when I open up the files, they are blank. I inspected the JPEGS with ...
0
votes
1answer
109 views

so im working on skittles pset and

skittles.c:6:1: error: expected identifier or '(' { ^ this is my error and this is my uncleaned up code #include <stdio.h> #include <cs50.h> int main(void); { int tries = (0); int ...
0
votes
1answer
438 views

APCS50 Problem: Fahrenheit

ok so im in CS50AP which means for you who dont know mean im in high school so i could use some help with this right now my code for fahrenheit is: #include <cs50.h> #include <stdio.h> ...
0
votes
2answers
493 views

Questions regarding Pset1 water.c

Hi so I figured out the water.c problem but aside from the requirements, I want the user to input the positive number only (the program will keep asking the user to input "Minutes: " again and again ...
0
votes
1answer
37 views

PSET 2: Nested IF statement

I'm trying to solve Caesar cypher ploblem from the course by using an if statement inside another if statement (Nested IF statement? apologies if I'm using the term incorrectly.) My draft attempt in ...
1
vote
1answer
269 views

pset4 Resize - Trouble Understanding Padding

I'm having a hard time understanding pset4's resize. Although I understand the theory, it's difficult for me to turn it into a program. I do understand that the scan line's total width must be a ...
0
votes
1answer
295 views

pset 3 Binary search

I'm stuck on implementing the binary search function in pset3. I am trying to do the recursion method but I am stuck and have been for hours. It seemed easy enough but I am discovering that it's more ...
0
votes
1answer
65 views

How should I connect to the multiple databases?

I am trying to Merge several psets. But to do that I think I need to have multiple databases. My dumbest approach to that problem follows like this in constants.php define("DATABASE", "pset7"); ...
0
votes
1answer
18 views

Returning 2015 student (Starting fresh)

I started cs50 in 2015 on EDX but never really finished it. I would like to start again this year. But not with last year's grades. Is it possible to just resend the psets even though I've already ...
0
votes
1answer
49 views

What's wrong with my pset 3 fifteen.c code?e

having some trouble with pset3 fifteen.c. Not sure what is wrong. Watched the walkthrough. After the greeting message, nothing appears. Here is pastebin: http://pastebin.com/Vd48ENBc Here is ...
0
votes
2answers
1k views

No such file or directory, pset1

I have exercise 1 of pset1 ready to go. However, I seem unable to compile the program. I follow the below steps (in fact, I deleted everything and created it from scratch): Create New Folder, name it ...
0
votes
1answer
145 views

Need a little help with Recover.c , PSET4

I am having issues with this problem set. I am unable to recover all 50 pictures, only 49, all of these pictures are not more than a few pixels though. I have seen the whole pictures and there's a ...
0
votes
1answer
87 views

Pset 2 Vigenere -

Pset 2 Vigenere - getting this error -:( encrypts "BaRFoo" as "CaQGon" using "BaZ" as keyword \ expected output, but not "CaQGoh\n" Seems that it only happens when it's an upper case key letter ...
0
votes
1answer
724 views

pset4 - Recover - doesn't pass check50 but works

So, I have finished recover.c (2016 edition) and it recovers all 50 of the jpg-s, and labels tham from 000 to 049. I have looked at every jpg, and they seem intact, all of them (I opened each of them ...
2
votes
3answers
133 views

stuck at pset1 initials [duplicate]

I am having problem in pset2 initials i am getting only my first letter initialized infinitely .so, i need to know the problem to fix the errors. { // asks user for the name string s = ...
0
votes
1answer
26 views

upperConv and LowerConv?

I've been trying to use the functions upperConv and lowerConv in my program but I keep getting an 'undefined reference' error concerning the two functions. Does anyone know why? Do these functions not ...
0
votes
1answer
18 views

PSETS are not available

I just completed my pset1 and when i was searching for pset2 in harvard officials CS50 website, there was nothing except pset1 (scratch) Can anyone please tell me how to find other psets?
0
votes
1answer
72 views

Problem set 6 method not allowed

I am testing my pset6 code but it is given an error of 405 method not allowed and I do not understand why? Please help me !! Thank you in advance! //define elements to be checked int ...
0
votes
1answer
97 views

completed speller however a bug(works fine with small data shows 0 misspelling with large dictionary)

Guys I have a very weird problem. I have practically completed the speller pset. And I was practising with a small dictionary it worked fine with a small dictionary but with a large dictionary I ...
1
vote
1answer
34 views

spellchecker unload not freeing 1 block

What is not freeing!? [code snipped by mod] // end of load function (mod comment) return true; fclose(dict_file); } [code snipped by mod]
2
votes
1answer
315 views

Can I add the solutions to all the psets I solve to my GitHub account?

I just made my GitHub account. Can I add the coding questions I solve successfully to my GitHub account?
0
votes
1answer
93 views

Google Maps doesn't show map after cache cleared

While slowly implementing the solution for pset8, i wanted to check if the typeahead function was working well. It did not, and in some post i read that clearing the cache could just solve the problem....
1
vote
1answer
228 views

Unable to login, to submit pset0. Signed in with Google

I am not able to login to CS50.net, and cannot submit a pset. I signed in and enrolled using the google-signin-option. I saw one user who had this problem as well. Are there others here signed in ...