0

Explain this output please.

Got this in one of the challenge questions.... for i in 1 .. 5 next if i % 2 == 0 print i end Output : 135 How?? Detailed explanations are very much welcome :)

20th Sep 2020, 3:01 PM
Srishti Chhabra
Srishti Chhabra - avatar
1 Respuesta
+ 2
Srishti Chhabra , it skips even numbers => in the if condition. That's why it prints the even numbers in the range 1-5.
20th Sep 2020, 3:23 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar