Python Loops-tccicomputercoaching.com

Page 1

Python Loops-tccicomputercoaching.com Python programming language provides following types of loops to handle looping requirements.

Sr.No.

Loop Type & Description

1

while loop Repeats a statement or group of statements while a given condition is TRUE. It tests the condition before executing the loop body.

2

for loop Executes a sequence of statements multiple times and abbreviates the code that manages the loop variable.

3

nested loops You can use one or more loop inside any another while, for or do..while loop.

3 sections of Loop: 1. Initialization: i=1 2. Codition i<=10 or i<11 3. Updation(increment/decrement) i=i+1 or i+=1


Python has two primitive loop commands: 

while loops



for loops

To learn Python Programming Language at TCCI, Ahmedabad.

Call us @ 9825618292 Visit us @ http://tccicomputercoaching.com/course/


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.