+ 1
Can we create a loop using conditional statements
3 Antworten
+ 2
yes.
num = 0
while num < 10:
print(num)
num += 1
+ 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.
+ 1
U mean to say dat while using loop u want to use if, if else statement...