Computer Science, asked by aishwarya200316, 11 months ago

What is the need for selection and looping constructs?​

Answers

Answered by Anonymous
5

We can see that while looks like if statement. The statement begins with keyword while followed by Boolean condition followed by colon (:). What follows next is block of statement(s).

The statement(s) in BLOCK 1 keeps on executing till condition in while remains True; once the condition becomes False and if the else clause is written in while, then else will get executed.

Example: A loop to print nos. from 1 to 10

Similar questions