Skip to content

Commit af8fb54

Browse files
committed
expenes
1 parent 6b8a495 commit af8fb54

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

data_structures/2_Arrays/expenses.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
lst= [2200,2350,2600,2130,2190]
2+
3+
4+
# 1
5+
print(f"${lst[1] - lst[0]}")
6+
7+
# 2
8+
print(f"You spent ${lst[0] + lst[1] +lst[2]} ")
9+
10+
# 3
11+
12+
13+
for expense in lst:
14+
if expense == 2000:
15+
print(expense + " is exactly 2000")
16+
print("month is $2000")
17+
18+
lst.append(1980)
19+
20+
21+
lst[3] = lst[3] - 200
22+
23+
print(lst[3])

data_structures/2_Arrays/marvel.py

Whitespace-only changes.

0 commit comments

Comments
 (0)