What's exactly the problem? - Credit Hacker

credit

I've recently started the course and I though at least the first week I wouldn't have many problems so I tried the hacker exercises and I was progressing fine as my test cases where doing fine (I tried all the paypal cases and my program identified the cards perfectly) but when I try check50 I get these error messages:

:( identifies 378282246310005 as AMEX
   \ expected output, but not "Number: 378282246310005\nAMEX\n"
:( identifies 371449635398431 as AMEX
   \ expected output, but not "Number: 371449635398431\nAMEX\n"
:( identifies 5555555555554444 as MASTERCARD
   \ expected output, but not "Number: 5555555555554444\nMASTERCARD\n"
:( identifies 5105105105105100 as MASTERCARD
   \ expected output, but not "Number: 5105105105105100\nMASTERCARD\n"
:( identifies 4111111111111111 as VISA
   \ expected output, but not "Number: 4111111111111111\nVISA\n"
:( identifies 4012888888881881 as VISA
   \ expected output, but not "Number: 4012888888881881\nVISA\n"
:( identifies 1234567890 as INVALID
   \ expected output, but not "Number: 1234567890\nINVALID\n"

Which confuses me since it seems that it's working correctly and I'm identifying the cards correctly but my output is not exactly what I'm asked for?

Just to give you an idea this is what the user sees when using the program(since I'm not sure how much code one can show I'm avoiding that):

Insert card number: 4012888888881881
Number: 4012888888881881
VISA

So what's exactly the problem? I'm reading the numbers from right to left and I checked multiple times if I was doing it in the wrong order

EDIT: ok, this is seriously annoying me, because I had no problems with mario hacker, despite it seeming like everyone had a billion problems with it

Posted Aug 29, 2016, 11:27 PM UTC · edited

12
Loading comments…