Á¤¼ºÈÆ
    lab_7_6.py (±³Àç)
  http://itsys.hansung.ac.kr/cgi-bin/onlineTest/viewpy4AI/onlinePy4AI.cgi?source=src/py/Ch07/lab_7_6.py



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
# µû¶óÇϸ砹è¿ì´Â ÆÄÀ̽ã°ú µ¥ÀÌÅÍ°úÇÐ(»ý´ÉÃâÆÇ»ç 2020)
# LAB 7-6 µµ½ÃÀÇ À̸§°ú Àα¸¸¦ Æ©Ç÷Π¹­¾îº¸ÀÚ, 192ÂÊ
#
 
# ´ÙÀ½°ú °°Àº ¸®½ºÆ®°¡ »ý¼ºµÇ¾î ÀÖ´Ù.
city_info = [('¼­¿ï'9765), ('ºÎ»ê'3441), ('ÀÎõ'2954), 
             ('±¤ÁÖ'1501), ('´ëÀü'1531)]
 
max_pop = 0
min_pop = 999999999999999999
total_pop = 0
 
max_city = None
min_city = None
 
for city in city_info:
   total_pop += city[1]
   if city[1> max_pop :
       max_pop = city[1]
       max_city = city
   if city[1< min_pop :
       min_pop = city[1]
       min_city = city
 
print('ÃÖ´ëÀα¸: {0}, Àα¸: {1} Ãµ¸í'.format(max_city[0], max_city[1]))
print('ÃÖ¼ÒÀα¸: {0}, Àα¸: {1} Ãµ¸í'.format(min_city[0], min_city[1]))
print('¸®½ºÆ® µµ½Ã Æò±Õ Àα¸: {0} Ãµ¸í'.format(total_pop / len(city_info)) )
cs

  µî·ÏÀÏ : 2022-02-21 [01:46] Á¶È¸ : 677 ´Ù¿î : 0   
 
¡â ÀÌÀü±Ûch7.ipynb (¿¹Á¦ Àüü)
¡ä ´ÙÀ½±Ûlab_7_6.py (ù¹ø° Ç׸ñÀ» ÀÌ¿ëÇÏ´Â »õ·Î¿î ¹æ¹ý)
Python for AI ½Ç½À°Ô½ÃÆÇ
¹øÈ£ ¨Ï Á¦ ¸ñ Á¶È¸ µî·ÏÀÏ
lAnaconda3 ¼³Ä¡
lColabTurtlePlus
l½Ç½À ¸ñ·Ï
lColab ½Ç½À
l½Ç½À ½Ã ÇлýµéÀÌ ÀÚÁÖÇÏ´Â ½Ç¼ö ¿¹µé
221    ¦¦❷ µµÀü¹®Á¦ 7.5 (¸ð¹ü ´ä¾È) 846 03-29
220 ¦¦❶ µµÀü¹®Á¦ 7.4 939 03-29
219    ¦¦❷ µµÀü¹®Á¦ 7.4 (¸ð¹ü ´ä¾È) 602 03-29
218 ¦¦❶ µµÀü¹®Á¦ 7.3 854 03-29
217    ¦¦❷ µµÀü¹®Á¦ 7.3 (¸ð¹ü ´ä¾È) 695 03-29
216 ¦¦❶ µµÀü¹®Á¦ 7.2 1055 03-29
215    ¦¦❷ µµÀü¹®Á¦ 7.2 (¸ð¹ü ´ä¾È) 626 03-29
214 ¦¦❶ µµÀü¹®Á¦ 7.1 960 03-29
213    ¦¦❷ µµÀü¹®Á¦ 7.1 (¸ð¹ü ´ä¾È) 675 03-29
212 ¦¦❶ lch7.ipynb (¿¹Á¦ Àüü) 1008 03-01
211 ¦¦❶ llab_7_6.py (±³Àç) 677 02-21
210    ¦¦❷ lab_7_6.py (ù¹ø° Ç׸ñÀ» ÀÌ¿ëÇÏ´Â »õ·Î¿î ¹æ¹ý) 418 05-19
209 ¦¦❶ llab_7_5.py (±³Àç) 917 02-21
208 ¦¦❶ lcode_7_14.py (±³Àç) 671 02-21
207 ¦¦❶ lcode_7_13.py (±³Àç) 734 02-21
206 ¦¦❶ llab_7_4.py (±³Àç) 660 02-21
205 ¦¦❶ lcode_7_11.py (±³Àç) 661 02-21
204    ¦¦❷ lcode_7_11_2.py (±³Àç) 744 02-21
203    ¦¦❷ lcode_7_11_1.py (±³Àç) 719 02-21
202 ¦¦❶ lcode_7_8.py (±³Àç) 774 02-21

[1][2][3][4][5][6][7][8][9][10]-[Next][20]