+ 7
Why my code isn't registered as "solved"?
First 5 examples(Sample) are registered as successful, but last two are not. At first I thought It's because of nums aren't formatted(with intervals between them),..... but not. So,...Could You Please, help me. https://code.sololearn.com/c8079345nepI/?ref=app
8 ответов
+ 7
Thanks a lot, I've done it but the problem continues to egxist.
+ 7
I've tried with "! =" but the problem continues to egxist.
+ 7
So... what I have to do?
+ 7
I solved it
+ 7
... if len(revrs2) ==16:
for j in range (16)
if revrs2[j] >9:
.............."
+ 1
if 16<len(my_list)<16:
print('not valid')
It's the same as:
if len(my_list)>16 and len(my_list)<16:
print("not valid")
if the length of my_list is greater than 16 and less than 16, it will print not valid.
How this can even execute in any condition?
It should be:
if len(my_list)>16 or len(my_list)<16:
print("not valid")
+ 1
# try:
if len(my_list) != 16:
print("not valid")
0
because if length is equals to 16, your code print a space, and then continue to do the rest of your code (other checks) and finally print "valid" or "not valid" even if the length is different from 16 ^^