Skip to content

Commit f5c3d06

Browse files
committed
mode
1 parent 67aa3bb commit f5c3d06

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

Day-09/test.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
print("abhishek") #copying and printing the same is complicated
2+
print("abhishek")
3+
print("abhishek")
4+
print("abhishek")
5+
6+
for i in range(10): #used loop here avoiding copy
7+
print("abhishek")
8+
print(i) #sequence indexing
9+
10+
colors = ["yellow", "green", "blue"] #lists
11+
12+
for x in colors:
13+
print(x)

Day-09/test_loop_manipulation.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
numbers = [1, 2, 3, 4, 5]
2+
for number in numbers:
3+
if number == 3:
4+
break #will break the execution
5+
print(number)
6+
7+
digits = [6, 7, 8, 9]
8+
for digit in digits:
9+
if digit == 7:
10+
continue #will continue with the execution after stopping at 3
11+
print(digit)

0 commit comments

Comments
 (0)