728x90 파이썬 조건문 예제1 [파이썬 조건문] 조건문 예제 1234567891011121314151617#슈퍼from random import *슈퍼 = ["딸기", "바나나", "키위"]print(type(슈퍼)) if "딸기" in 슈퍼: st_price = randrange(5000, 20000, 500) print("오늘의 딸기 가격은", st_price, "원") if st_price >= 15000: print("딸기만 산다.") elif st_price >= 12000: print("바나나도 산다.") else: print("키위까지 산다.") Colored by Color Scriptercs 2022. 7. 19. 이전 1 다음 728x90