This code works with even numbers too, but he must skip them. What i did wrong? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

This code works with even numbers too, but he must skip them. What i did wrong?

n = int(input()) while n%2 == 0: continue for x in range(1, n): if x % 3 == 0 and x % 5 == 0: print("SoloLearn") elif x % 3 == 0: print("Solo") elif x % 5 == 0: print("Learn") else: print(x)

25th Jan 2022, 4:25 PM
Maks Kamerrer
0 Answers