Python Loop

 Loop : The execution of a specific code may need to repeated several number of times.

1. For Loop

2. While Loop

 

 Program 1

N  = Int (Input (" Enter any no ")

For i in range (1,11 ):
        c = n*i
        print ( N , "*", i , " = ", C)

Program 2. 

i = 1
While ( i < = 10 ):
        Print ( i )
        i = i +1

 










Comments

Popular posts from this blog

Jonita Gandhi

Current Affair 2023

Cyber Security (Syllabus )