미국유학/CTI (6) 썸네일형 리스트형 201 Module 7 - 8 - 9 - 10 201 Module 6 201 Module 5 201 Module 3, Module 4 # Prices of the grocery items prices = { 'Apple': 2.20, 'Banana': 1.50, 'Orange': 3.40, 'Melon': 4.10 } # Dictionary to keep track of the counts of each itemcounts = { 'Apple': 0, 'Banana': 0, 'Orange': 0, 'Melon': 0 } while True:item = input().strip() # Stop taking input when "CHECKOUT" is typed .. 241017 Python #1 #2 package = input().strip() # 'A', 'B', or 'C'. Don't worry about validating the input here.hours = int(input()) # An integer between 1 - 744if package == 'A': base_cost = 8.95 included_hours = 10 additional_rate = 1.50elif package == 'B': base_cost = 14.95 included_hours = 20 additional_rate = 1.00elif package == 'C': base_cost = 23.95 included_hours = 40 add.. 241005, 201 || Python - precedence to lowest 이전 1 다음