Skip to content

Commit 4be0fbe

Browse files
committed
whileloop.py
1 parent fb528d6 commit 4be0fbe

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

whileloop.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
count=1
2+
while(count <= 5):
3+
print(count)
4+
count += 1
5+
if count==3:
6+
break
7+
else:
8+
print("In else block")
9+
10+
11+
list1=[1,2,3,4,5]
12+
while list1:
13+
print("Hi,Jenny")
14+
list1.pop()
15+
16+
17+
i=1
18+
while i<1:
19+
print(i)
20+
i+=1
21+
else:
22+
print("in else block")
23+
print("out from block")

0 commit comments

Comments
 (0)