-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex087.py
More file actions
23 lines (23 loc) · 754 Bytes
/
ex087.py
File metadata and controls
23 lines (23 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
m = [[], [], []]
sumEven = sumRdColumn = highSecLine = 0
for l in range(0, 3):
for c in range(0, 3):
m[l].append(int(input(f'Enter a Number in position [{l}, {c}]: ')))
if m[l][c] % 2 == 0:
sumEven += m[l][c]
if c == 2:
sumRdColumn += m[l][c]
if l == 1:
if c == 0:
highSecLine = m[l][c]
elif m[l][c] > highSecLine:
highSecLine = m[l][c]
print('~~'*20)
for l in range(0, 3):
for c in range(0, 3):
print(f'[{m[l][c]:^5}] ', end='')
print()
print('~~'*20)
print(f'Sum of Even Values: {sumEven}')
print(f'Sum of Third Column Values: {sumRdColumn}')
print(f'Highest value of Second Line: {highSecLine}')