Python Program To Print Numbers From 1 to 10 Using While Loop

Problem Definition

Create a Python program to print numbers from 1 to 10 using a while loop.

Solution

In programming, Loops are used to repeat a block of code until a specific condition is met. The While loop loops through a block of code as long as a specified condition is true.

To Learn more about working of While Loops read:

Program

i = 1
while(i<=10):
    print(i)
    i += 1

Output

1
2
3
4
5
6
7
8
9
10

Support Django Central

If you appreciate my work, or if it has helped you along your journey. It would mean a lot to me if you could write a message on my wall and share a cup of coffee (or tea) with me.
Buy Me a Coffee at ko-fi.com

3 thoughts on “Python Program To Print Numbers From 1 to 10 Using While Loop”

Leave a Comment