5th May 2021, 5:12 AM
Akash Prasad
Akash Prasad - avatar
5 odpowiedzi
+ 3
Akash Prasad You have to skip printing those numbers which are divisible by 2. See here right solution for x in range(1, n): if x % 2 == 0: continue 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)
5th May 2021, 5:31 AM
A͢J
A͢J - avatar
0
🅰🅹 🅐🅝🅐🅝🅣 which operator is used to skip
5th May 2021, 6:00 AM
Akash Prasad
Akash Prasad - avatar
0
Akash Prasad continue
5th May 2021, 6:23 AM
Scarlet Witch
Scarlet Witch - avatar
0
First se my code
5th May 2021, 6:27 AM
Akash Prasad
Akash Prasad - avatar
0
Akash Prasad continue used to skip current iteration. In this iteration nothing will happen and it will go for next iteration. So here we have skip printing when number is divisible by 2.
5th May 2021, 1:31 PM
A͢J
A͢J - avatar