+ 1

The given code solves the FizzBuzz problem and uses the words "Solo" and "Learn" instead of "Fizz" and "Buzz". It takes an input n and outputs the numbers from 1 to n. For each multiple of 3, print "Solo" instead of the number. For each multiple of 5, prints "Learn" instead of the number. For numbers which are multiples of both 3 and 5, output "SoloLearn". You need to change the code to skip the even numbers, so that the logic only applies to odd numbers in the range. n = int(input()) for x in range(1, n): if x % 3 == 0 and x % 5 == 0: print("SoloLearn") continue elif x % 3 == 0: print("Solo") elif x % 5 == 0: print("Learn") continue else: print(x)

2nd Nov 2020, 11:04 AM
M.sharmila
+ 13
2nd Nov 2020, 11:37 AM
Lothar
+ 11
If you need help, you can post the code you're struggling with. Try to search for similar questions or answers. Â âą https://www.sololearn.com/post/75089/?ref=app
2nd Nov 2020, 12:58 PM
Danijel IvanoviÄ
+ 5
You forgot to say what is it that you didn't understand. You can write that part in the Description â
2nd Nov 2020, 11:22 AM
Ipang
+ 4