Hot answers tagged

3 votes
Accepted

python invalid syntax end=""

I added a space in there and it took the flag away. The rest of the print lines without the space are not flag. I'm wondering if this is a bug with the IDE or am I not understanding something? This ...
user avatar
  • 41
2 votes
Accepted

how to check with check50 for 2017 users

http://docs.cs50.net/problems/hello/hello.html#code-check50-code clearly states that the command for calling check50 for hello is check50 2016.hello hello.c (assuming you're in the same directory as ...
user avatar
  • 20.7k
2 votes
Accepted

pset4 resize invalid or unsupported image

Duh! Read right through it and missed the problem myself. Should have seen it earlier. The problem is that the code reads from the input file to populate the two headers for the input file, and ...
user avatar
  • 64.2k
2 votes

i am unable to submit my work in pset1 of marioless. It shows me a comment in yellow which says invalid slug.What should I do?

An invalid slug error means that the parameter following check50 or submit50 is incorrect. Go back to the problem spec and see what it's supposed to look like. I'll guess a missing slash or ...
user avatar
  • 64.2k
2 votes
Accepted

Resize Invalid Image Format

There is a significant flaw in the code. The header vars are changed (probably correctly) but then stored in the original headers for the input file, bi, bf. Then the output file headers are written ...
user avatar
  • 64.2k
2 votes
Accepted

Recover code makes 000.jpg to 049.jpg, but jpgs are corrupt

Haven't seen this problem in a few months. I understand your frustration because it's a very subtle problem to find! ;-) This is a good example of why it's important to run a program through a ...
user avatar
  • 64.2k
1 vote
Accepted

PSET 4 RECOVER - My program outputs 50 images however they all have an invalid format

A quick glance at the code and I found a significant problem, there may be more. When the code finds a signature, it goes through the process of closing the old file, opening the new file, and ...
user avatar
  • 64.2k
1 vote
Accepted

check50 not working 2017 for initials

Be sure to run update50 first, and then close and re-open any terminal windows! There's been a new release of check50 which will allow you to check with the syntax shown in the problem set ...
user avatar
1 vote
Accepted

Pset6 credit.py always outputs INVALID

Check this simple program, and see what happens when you get a float from the user using get_float() and then cast it to str. See what is wrong with it and how your program fails? import cs50 def ...
user avatar
  • 7,326
1 vote

how to use check50 on mario pset1?

It is explained in the Check50 section of the spec.
user avatar
1 vote

How to check if input is invalid with C

It can be challenging specially that you're still in the first few weeks. There are many I/O functions in the C standard library that you can use for that purpose. One of them is fgetc. Execute man ...
user avatar
  • 17.4k
1 vote
Accepted

Pset 1; Greedy; probably quite a lot wrong with my code

You have a bit of work to do. Just try to push you in the right direction. You have variables declared outside of the main function (ni, f) , unless it is unavoidable you want to give variables ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible