Skip to main content
6 votes
Accepted

Check50 and style50 not working: pset1

So apparently markupsafe was upgraded and soft_unicode does not exist in it anymore. I downgraded markupsafe to 2.0.1 and it fixed the issue for me: pip install markupsafe==2.0.1
Wajeeha Abid's user avatar
3 votes
Accepted

Dues style matter for p-set 1?

That applies to Harvard/Yale students only. If you are taking the course via edX, your psets are graded for correctness only. edit to add in answer to comment It's still important to style your code,...
curiouskiwi's user avatar
  • 18.7k
2 votes
Accepted

Too much whitespace in vigenere.c, style50 error in pset2

Consider removing the typecasting, because it is essentially redundant. A char is a one-byte integer; the system does it's own internal "casting". Perhaps rewatch the caesar walkthrough. Starting ...
DinoCoderSaurus's user avatar
2 votes

Too much whitespace in vigenere.c, style50 error in pset2

Change (int) alphabet to ((int) alphabet). The parentheses won't change the meaning (as typecast has higher precedence than binary minus operator), but they silence style50 (and are my preferred ...
Blauelf's user avatar
  • 20.9k
2 votes
Accepted

Style50 provides improvement suggestions I don't understand. What should I do with the code?

This output is indeed not very helpful. I guess they create a "properly formatted" version of the script and apply a generic diff tool (you can learn more about those later in the course, in the "...
Blauelf's user avatar
  • 20.9k
1 vote
Accepted

style50 for python insists on putting two empty lines after comments

PEP 8 is pretty clear on that. https://www.python.org/dev/peps/pep-0008/#blank-lines Blank Lines Surround top-level function and class definitions with two blank lines. [...] Do you have an example ...
Blauelf's user avatar
  • 20.9k
1 vote
Accepted

Style50 not working for pset5 speller

I see long parts of code without a comment. style50 tends to notice that too ... When running this code through style50, I see that it complains about the first 2 for loops. Didn't it highlight ...
Peter Pesch's user avatar
1 vote

pset1 - don't understand why style50 asks me that

I had this exact issue. Seems it's because style50 doesn't like very long single lines of code. If you break it down, you should be good. Also in your number validation instead of say ...
45ACP1911's user avatar
1 vote
Accepted

Is there a program to check the style50? how to do it?

style50 program.c will test your code against the CS50 Style Guide.
curiouskiwi's user avatar
  • 18.7k
1 vote

style50: Unknown file type for JS files

There's a bug in the grading, as style50 should not be run for all files. If you give me your github username, I can get your grade fixed.
curiouskiwi's user avatar
  • 18.7k
1 vote

Too much whitespace in vigenere.c, style50 error in pset2

Interesting question. In my opinion, your code is correctly styled. Both of the other answers provide a solution to the problem. But, the real problem is style5050 itself. Again, in my opinion, this ...
Cliff B's user avatar
  • 68.8k
1 vote
Accepted

How should I wrap lines on long conditions?

There are no hard and fast rules on how to split a long test condition. It's mostly about doing what makes sense and what makes it easiest to read. For instance, putting one test condition per line ...
Cliff B's user avatar
  • 68.8k

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