Python으로 환전 프로그램 만들기
def exchange(money, country): if country in country_list: code = country_list.index(country) else: print("해당 국가 정보가 없습니다.") return result = round(money / rate[code], 2) print(money, "원은", result, unit[code], "입니다") country_list = ['중국', '미국', '유럽', '일본'] unit = ['위안', '달러', '유로', '엔'] rate = [190.36, 1330.00, 1432.15, 979.96] money = int(input("환전 금액(원)을 입력하세요 :")) country = input("국가를 입력하세요 :")..
더보기