Skip to main content
5 votes

credit - Why this AMEX and MASTERCARD numbers are considered invalid?

Found it: American Express starts with 34 or 37, Master Card starts with 51, 52, 53, 54 or 55. This makes those two numbers INVALID despite good checksum :)
smajli's user avatar
  • 163
3 votes
Accepted

cs50 problem set 1 mario. check50 command returns error: 'You seem to be missing these required files: mario.c'

You MUST be in the same directory as the source code to run check50 and submit50. It doesn't work if you're not. The parameter isn't about where the code is located, it's about which tests to run. ...
Cliff B's user avatar
  • 69.3k
3 votes
Accepted

Why can't I print the entire string from the read file?

I guess you meant print(dna[i:i+len("AGATC")]). In Python, if the end of the substring is before the beginning, the substring is empty, so you are printing a bunch of empty strings.
Blauelf's user avatar
  • 21k
2 votes
Accepted

PSET3 runoff 2020

1) Because I can't modify the header, how can I use strcmp (hints ask for) without string.h ? You can include string.h as per the spec: (and the inclusion of additional header files, if you’d like)...
DinoCoderSaurus's user avatar
1 vote
Accepted

DNA code doesn't work sometimes

Ok, I`ve found the bug. It came out, that my code wasn't comparing the current sequnce lenth with the previous maximum, but just increased 'counter' value, if the STR lenth was greater than 1. It ...
Taras  Lysak's user avatar
1 vote

PSET3 runoff 2020

The file name would likely be a typo :) It's ok to add header includes to runoff.c. I guess that sentence got refactored a bit, and the part in parentheses should be moved to the where-to-change part ...
Blauelf's user avatar
  • 21k

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