Looping statement in python
Basic looping structure in python Python supports basic loop structures through iterative statements.iterative statements are decision control statements that are used to repeat the execution of a list of statements.python language supports two types of iterative statements - while loop and for loop. While loop: The while loop provides a mechanism to repeat one or more statements while a particular condition is true. Syntax: statement x while (condition): block of statement statement y A while loop is also referred to as a top-checking loop since control condition is places as the first line of the code. if the condition evaluates to false, then the statement enclosed in the loop are never executed ... now look following examples: Q. write a program in python to calculate the sum and average of first 10 number. i = 0 s = 0 while (i<= 10 ): s = s+i i=i+ 1 avg = float (s)/ 10 print ( "the sum of first 10