0
#CREDIT CARD VALIDATOR
Again, I wrote this code in an attempt to solve a code coach but test case #6 and #7 won't acknowledge it.However, I believe I shouldn't get myself frustrated knowing that you are always there to lend a hand when needed. Kindly have a look at it. https://sololearn.com/compiler-playground/ccN2JwwG9IvH/?ref=app
4 Respuestas
+ 2
Thanks brother Denise Roßberg it works indeed...and the information you gave about not including print statements that are not in question is really valuable
+ 1
Hello Kambi Alii Kalu
Remove line 15 and 16. Check the length at the end:
if sum_of_numbers % 10== 0 and len(third_operation) == 16:
print ("valid")
else:
print ("not valid")
by the way, you should not insert your own print statements. If only “valid” or “not valid” is expected, deviating print statements will always cause an error.
+ 1
and you checked the length == 16?
for me this code works:
https://sololearn.com/compiler-playground/c4KsrvISPqLX/?ref=app
0
Hello Denise Roßberg I've tried removing lines 15 and 16 but the response won't change