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 :)
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.
...
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.
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)...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
2020 × 14pset3 × 3
pset6 × 3
cs50x × 3
dna × 3
runoff × 2
pset4 × 1
pset2 × 1
pset1 × 1
recover × 1
check50 × 1
vigenere × 1
mario × 1
python × 1
credit × 1
cs50-web-programming-with-python × 1
readability × 1
tideman × 1
plurality × 1
segfault × 1
project1 × 1
cs50ai × 1
syntax × 1
wiki × 1
2019 × 1