1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # # µû¶óÇÏ¸ç ¹è¿ì´Â ÆÄÀ̽ã°ú µ¥ÀÌÅÍ°úÇÐ(»ý´ÉÃâÆÇ»ç 2020) # LAB 8-1 ÆíÀÇÁ¡ Àç°í °ü¸® ÇÁ·Î±×·¥À» ¸¸µéÀÚ, 204ÂÊ # items = { "Ä¿ÇÇÀ½·á": 7, "Ææ": 3, "Á¾ÀÌÄÅ": 2, "¿ìÀ¯": 1, "Äݶó": 4, "Ã¥": 5 } while True: option = int(input("¸Þ´º¸¦ ¼±ÅÃÇϽÿÀ 1) Àç°íÁ¶È¸ 2) ÀÔ°í 3) Ãâ°í 4) Á¾·á : ")) if option == 1: name = input("[Àç°íÁ¶È¸] ¹°°ÇÀÇ À̸§À» ÀÔ·ÂÇϽÿÀ: ") print('Àç°í :', items[name]) elif option == 2: name, count = input("[ÀÔ°í] ¹°°ÇÀÇ À̸§°ú ¼ö·®À» ÀÔ·ÂÇϽÿÀ : ").split() items[name] += int(count) elif option == 3: name, count = input("[Ãâ°í] ¹°°ÇÀÇ À̸§°ú ¼ö·®À» ÀÔ·ÂÇϽÿÀ : ").split() items[name] -= int(count) elif option == 4: print('ÇÁ·Î±×·¥À» Á¾·áÇÕ´Ï´Ù.') break | cs |