Skip to content

Commit 63fed04

Browse files
committed
update
1 parent 27fb26a commit 63fed04

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

Python Tutorial/While Loop.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,27 @@ while x:
3939
print(x)
4040
x -= 1
4141
```
42-
42+
```python
43+
i=1
44+
number=0
45+
b=9
46+
number = int(input("Enter the number:"))
47+
while i<=10:
48+
print("%d X %d = %d \n"%(number,i,number*i))
49+
i = i+1
50+
output :
51+
Enter the number:10
52+
10 X 1 = 10
53+
10 X 2 = 20
54+
10 X 3 = 30
55+
10 X 4 = 40
56+
10 X 5 = 50
57+
10 X 6 = 60
58+
10 X 7 = 70
59+
10 X 8 = 80
60+
10 X 9 = 90
61+
10 X 10 = 100
62+
```
4363
#### Break in while Loop
4464
Python break statement is used to exit the loop immediately. It simply jumps out of the loop altogether, and the program continues after the loop.
4565
```python

0 commit comments

Comments
 (0)