물의 상태
https://www.codetree.ai/missions/4/problems/state-of-water?&utm_source=clipboard&utm_medium=text
n = int(input())
if n < 0:
print("ice")
elif n >= 100:
print("vapor")
else:
print("water")
시력 검사 2
https://www.codetree.ai/missions/4/problems/eye-test-2?&utm_source=clipboard&utm_medium=text
e = float(input())
if e >= 1.0:
print("High")
elif e >= 0.5:
print("Middle")
else:
print("Low")
살 수 있는 물건
https://www.codetree.ai/missions/4/problems/things-able-to-buy?&utm_source=clipboard&utm_medium=text
n = int(input())
if n >= 3000:
print("book")
elif n >= 1000:
print("mask")
else:
print("no")
'코딩테스트 > 프로그래밍 기초 | 조건문' 카테고리의 다른 글
[코드트리] if if 조건문 (1) | 2024.09.10 |
---|---|
[코드트리] if elif elif else 조건문 (0) | 2024.09.10 |
[코드트리] 삼항 연산자 (0) | 2024.08.31 |
[코드트리] if else 조건문 (0) | 2024.08.27 |
[코드트리] if 조건문 (0) | 2024.08.26 |