FizzBuzz | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

FizzBuzz

Please help me with FizzBuzz code

4th Jan 2021, 6:59 AM
ᙢᖇ.ᚪ ᚱ ع ℰ 爪 Ꭿ ກ
ᙢᖇ.ᚪ ᚱ ع ℰ 爪 Ꭿ ກ - avatar
6 Answers
+ 2
Thanks
9th Jan 2021, 6:19 PM
ᙢᖇ.ᚪ ᚱ ع ℰ 爪 Ꭿ ກ
ᙢᖇ.ᚪ ᚱ ع ℰ 爪 Ꭿ ກ - avatar
+ 3
_ᙢǾሊỢȡΘŬ_ You need to change the code to skip the even numbers, so that the logic only applies to odd numbers in the range. for x in range(1, n, 2):
4th Jan 2021, 7:08 AM
Artem 🇺🇦
Artem 🇺🇦 - avatar
+ 2
HonFu hier
4th Jan 2021, 9:32 AM
Oma Falk
Oma Falk - avatar
+ 1
Please, share your attempt first.
4th Jan 2021, 7:02 AM
Artem 🇺🇦
Artem 🇺🇦 - avatar
0
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: continue Where error?
4th Jan 2021, 7:06 AM
ᙢᖇ.ᚪ ᚱ ع ℰ 爪 Ꭿ ກ
ᙢᖇ.ᚪ ᚱ ع ℰ 爪 Ꭿ ກ - avatar