+ 1

How can I use the 'elif' function properly like in the case of the fizzbuzz challenge in python 3?. How do I use "continue"?

The fizzbuzz challenge where you have to skip even numbers

24th Nov 2020, 8:48 PM
KungfuPanda
KungfuPanda - avatar
1 Réponse
+ 2
In your loop use the following code first to skip even numbers where num is the variable for the current number. After you can use an if-elif with similar modulo operations to give the correct output for the current iteration. if num % 2 == 0: continue ... if-elif ...
24th Nov 2020, 8:54 PM
ChaoticDawg
ChaoticDawg - avatar