Why my code isn't registered as "solved"? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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

21st Jun 2021, 6:27 AM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
8 Answers
+ 7
Thanks a lot, I've done it but the problem continues to egxist.
21st Jun 2021, 7:02 AM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
+ 7
I've tried with "! =" but the problem continues to egxist.
21st Jun 2021, 7:21 AM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
+ 7
So... what I have to do?
21st Jun 2021, 7:47 AM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
+ 7
I solved it
21st Jun 2021, 8:54 AM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
+ 7
... if len(revrs2) ==16: for j in range (16) if revrs2[j] >9: .............."
21st Jun 2021, 9:01 AM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
+ 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")
21st Jun 2021, 6:34 AM
The future is now thanks to science
The future is now thanks to science - avatar
+ 1
# try: if len(my_list) != 16: print("not valid")
21st Jun 2021, 7:12 AM
visph
visph - avatar
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 ^^
21st Jun 2021, 7:25 AM
visph
visph - avatar