1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # # µû¶óÇÏ¸ç ¹è¿ì´Â ÆÄÀ̽ã°ú µ¥ÀÌÅÍ°úÇÐ(»ý´ÉÃâÆÇ»ç 2020) # LAB 10-6 Æò±Õ°ú Áß¾Ó°ª °è»êÇϱâ, 273ÂÊ # import numpy as np players = np.zeros( (100, 3) ) players[:, 0] = 10 * np.random.randn(100) + 175 players[:, 1] = 10 * np.random.randn(100) + 70 players[:, 2] = np.floor(10 * np.random.randn(100)) + 22 heights = players[:, 0] print('½ÅÀå Æò±Õ°ª:', np.mean(heights)) print('½ÅÀå Áß¾Ó°ª:', np.median(heights)) weights = players[:, 1] print('üÁß Æò±Õ°ª:', np.mean(weights)) print('üÁß Áß¾Ó°ª:', np.median(weights)) ages = players[:, 2] print('³ªÀÌ Æò±Õ°ª:', np.mean(ages)) print('³ªÀÌ Áß¾Ó°ª:', np.median(ages)) | cs |