문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판이전 판다음 판 | 이전 판 | ||
| python:boolean [2024/11/14 00:53] – [boolean] taekgu | python:boolean [2025/04/15 10:05] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| + | ====== boolean ====== | ||
| + | <code python> | ||
| + | |||
| + | coffee = 5 | ||
| + | while True: | ||
| + | money = int(input(" | ||
| + | if money == 300: | ||
| + | print(" | ||
| + | coffee = coffee -1 | ||
| + | elif money > 300: | ||
| + | print(" | ||
| + | coffee = coffee -1 | ||
| + | else: | ||
| + | print(" | ||
| + | print(" | ||
| + | if coffee == 0: | ||
| + | print(" | ||
| + | break | ||
| + | </ | ||