0
Pls what should I change here
n = int(input()) 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)
7 Respostas
+ 2
《 Nicko12 》 Khadeejah Fahm It is a code coach question .So i think his code fails against certain test cases .There's no problem with his code .Just the for loop should be like :
for x in range(1,n,2) :
That's it ....
+ 1
Khadeejah Fahm It seems to be working fine though. What output do you want?
+ 1
Alphin K Sajan Oh you're right, now I remember it should iterate odd numbers only.
+ 1
《 Nicko12 》 Yes 👍
0
Khadeejah Fahm Change the for loop
0
Thanks
- 1
Depends on what you want the code to do? 🤔