Skip to main content
2 votes

CS50x PSET1 Credit <class 'pexpect.exceptions.EOF'>

From the spec: your program’s last line of output [should] be AMEX\n or MASTERCARD\n or VISA\n or INVALID\n, nothing more, nothing less. This program will print "something more" if the ...
DinoCoderSaurus's user avatar
1 vote
Accepted

Credit : the checksum is correct for <10 digits, but for14,15,16 digits getting negative checksum

this is in need of major cleanup. organize your code and avoid repeating yourself. For example figure out how many digits are in the number once. save that value. Figure out the value of the i-th ...
UpAndAdam's user avatar
  • 1,311
1 vote
Accepted

How to Solve : expected identifier or '('

I'm thinking it has something to do with "break" being a keyword (like "for", "while", "continue", etc.) that shouldn't be used as a variable. Try using a ...
Cliff B's user avatar
  • 68.8k
1 vote
Accepted

pset1-credit I can't find the issue with my code

There are no dumb mistakes when one is learning; there's only "learning". At a quick glance, firsttwodigits = cc; is a big problem. At the 2nd iteration (when digits is 2), cc is still a &...
DinoCoderSaurus's user avatar
1 vote
Accepted

pset1 credit 2023 , do while loop with arrays/intervals

Admirable that you want to do input validation, but don't. ONLY do what the problem specification says, no more, no less. You'll be doing data validation in later problem sets. Also, check50 and ...
Cliff B's user avatar
  • 68.8k

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