분기.py
·
python
## if weather = input("오늘 날씨는 어때요? : ") if weather == "비"or"눈": print("우산을 챙기세요") elif weather == "미세먼지": print("마스크를 챙기세요") else : print("준비할 필요 없어요.") # input은 무조건 string type으로 들어가기 때문에 int형으로 변경 필요. temp = int(input("기온은 어때요? : ")) if temp >= 30: print("너무 더워요. 나가지 마세요") elif temp =10: print("날씨가 좋아요") # temp =0 대신 하나로 합쳐 사요할 수 있다. elif 0 0~n-1까지의 범위 for waiting..