syntax for control statements

A. Give the syntax for control statements supported by Python.

 

B. Explain the working of the while loop with a flowchart.

C. What happens if we create a loop that never ends?

D. What is meant by nested loops?

E. Find the bugs in the following programs.

a. count = 0

s=0

while count<>

s += count

count=count+1

print(s)

b. count=0

for i in range(10,0,-1)

print(i)

Leave a Reply

Your email address will not be published.