+ 1

Can we create a loop using conditional statements

24th May 2018, 8:05 AM
Nithin Makam
3 Answers
+ 2
yes. num = 0 while num < 10: print(num) num += 1
24th May 2018, 8:45 AM
Markus Kaleton
Markus Kaleton - avatar
+ 2
do you mean just by using if, you could do it check the condition and if met do something other wise jump to the top of the loop. not good practice as many will tell you though.
24th May 2018, 12:56 PM
Ben
Ben - avatar
+ 1
U mean to say dat while using loop u want to use if, if else statement...
24th May 2018, 9:15 AM
Harsh Agrawal
Harsh Agrawal - avatar