Can I use else statement after loop stops? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can I use else statement after loop stops?

6th Jul 2016, 7:06 PM
Carlos Alexandre
Carlos Alexandre - avatar
2 Answers
0
yes u can use the else statement but it will only run if the condition given in the while statement is false.
8th Jul 2016, 6:45 PM
Deepanshu Jha
Deepanshu Jha - avatar
0
@Deepanshu Jha Thanks
9th Jul 2016, 6:12 AM
Carlos Alexandre
Carlos Alexandre - avatar