- 1

Explain the answer

FizzBuzz is a well known programming assignment, asked during interviews. 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.

13th Dec 2020, 8:20 AM
Ravi Kumar
Ravi Kumar - avatar
4 Réponses
+ 6
Arvind Kumar I already gave you 4-5 hint with proper explaination. Do self and come back if facing problem.
13th Dec 2020, 8:26 AM
A͢J
A͢J - avatar
+ 4
Arvind Kumar,If you are a real programmer you should do it yourself not to copy answer from other.I Am Groot ! already gave you the hint. So please try it yourself.If you can't solve this. Read the lessons of python and we cannot give you the full code as it is against sololearn rules.
13th Dec 2020, 8:31 AM
The future is now thanks to science
The future is now thanks to science - avatar
0
Arvind Kumar You have to print "Solo" when number is multiple of 3 and print "Learn" when number is multiple of 5 and "SoloLearn" if number is multiple of both 3 and 5. Do not print anything if number is multiple of 2. Remember 10 is multiple of 2 but it's also multiple of 5 so you have to print "Learn" in this case.
13th Dec 2020, 8:23 AM
A͢J
A͢J - avatar
- 7
I Am Groot ! Bro can you send me the solution
13th Dec 2020, 8:25 AM
Ravi Kumar
Ravi Kumar - avatar