st_id = [20197492, 20195440, 20162383, 20196349,
20189041, 20196787, 20078627, 20171338,
20183410, 20176422, 20095244, 20151810,
20078891, 20172167, 20005891, 20151379,
20188170, 20195497, 20191857, 20196846]
name = ['가람', '겨레', '고운', '나나',
'나래', '난새', '노아', '다슬',
'다온', '든솔', '라라', '로와',
'모듬', '바다', '보아', '세찬',
'솔찬', '아란', '지니', '초롬',]
exam = [46, 98, 96, 65,
69, 60, 61, 35,
26, 73, 52, 85,
51, 66, 48, 54,
65, 26, 59, 50]
hw1 = [21, 4, 23, 2,
1, 4, 27, 19,
19, 23, 21, 20,
30, 11, 21, 28,
18, 4, 26, 22]
hw2 = {20197492: 28, 20195440: 5, 20162383: 20, 20196349: 12,
20189041: 15, 20196787: 30, 20078627: 5, 20171338: 23,
20183410: 18, 20176422: 26, 20095244: 19, 20151810: 21,
20078891: 10, 20172167: 30, 20005891: 18, 20151379: 19,
20188170: 2, 20195497: 25, 20191857: 10, 20196846: 19}
for i in list(map(lambda a, b, c, id, name:(id, name, a + b + c), exam, hw1, hw2.values(), st_id, name)):
print("{} : {} : {}".format(i[0], i[1], i[2]))
20197492 : 가람 : 95
20195440 : 겨레 : 107
20162383 : 고운 : 139
20196349 : 나나 : 79
20189041 : 나래 : 85
20196787 : 난새 : 94
20078627 : 노아 : 93
20171338 : 다슬 : 77
20183410 : 다온 : 63
20176422 : 든솔 : 122
20095244 : 라라 : 92
20151810 : 로와 : 126
20078891 : 모듬 : 91
20172167 : 바다 : 107
20005891 : 보아 : 87
20151379 : 세찬 : 101
20188170 : 솔찬 : 85
20195497 : 아란 : 55
20191857 : 지니 : 95
20196846 : 초롬 : 91
map과 lambda를 이용한 배열을 한번에 연산하기.
|
2021.04.11 14:20:36
|
2022.04.23 13:11:41
|
406
|
Aiden
Total of Attached file
0.00 Bytes of 0 files
2023.04.29
2022.08.30
2022.08.17
2021.05.30
2021.05.29
2021.04.11
2020.09.09
2020.08.30
2020.08.23
2020.08.23
2020.08.22