0
What's my mistake for fizzbuzz
5 Respostas
+ 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)
0
🅰🅹 🅐🅝🅐🅝🅣 which operator is used to skip
0
Akash Prasad continue
0
First se my code
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.