Write the syntax of for-loop.
Ans: The syntax for the loop is:
for (init ; condition ; increment )
{
statement (s) ;
}
Answers
Answered by
4
For I in range (n1, n2, step):
print(I)
I +=1
Answered by
2
while loop is executed once before the condition is checked. Its syntax is: do { // body of loop; } while (condition); ... If the condition evaluates to true , the body of the loop inside the do statement is executed again.
Similar questions