- 1

FizzBuzz

Please help me with FizzBuzz code

4th Jan 2021, 6:59 AM
ŠôĘŠĖá.Šö™ ŠöĪ ōĻ ‚Ąį Áą™ ŠéĮ ŗļĀ
ŠôĘŠĖá.Šö™ ŠöĪ ōĻ ‚Ąį Áą™ ŠéĮ ŗļĀ - avatar
6 Réponses
+ 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