πŸ“š μŠ€ν„°λ””/파이썬 μŠ€ν„°λ”” 과제 제좜

[3νŒ€/κΉ€μ€μˆ˜] 3μ°¨μ‹œ 파이썬 과제 - 쑰건문

lyra8 2023. 3. 24. 19:23

1번 → 2번

 

2번→4번, 5번

 

3번→5번

 

4번→4번

 

5번→2번

 

6번 shirt

 

7번

age = int(input("λ‚˜μ΄λ₯Ό μž…λ ₯ν•˜μ„Έμš” : "))
if age < 8 and age >= 1:
    print("8μ„Έ 미만 μ–΄λ¦°μ΄μ˜ μ§€ν•˜μ²  ꡐ톡 μš”κΈˆμ€ 450원 μž…λ‹ˆλ‹€.")
elif age >= 8 and age < 19:
    print("8μ„Έ 이상 19μ„Έ μ΄ν•˜μ˜ μ²­μ†Œλ…„ μ§€ν•˜μ²  ꡐ톡 μš”κΈˆμ€ 720원 μž…λ‹ˆλ‹€.")
elif age >= 20:
    print("20μ„Έ μ΄μƒμ˜ 성인 μ§€ν•˜μ²  ꡐ톡 μš”κΈˆμ€ 1250원 μž…λ‹ˆλ‹€.")

8번

# 성적계산기 λ§Œλ“€κΈ°

score=int(input("성적을 μž…λ ₯ν•˜μ„Έμš” :"))

if score >= 90 and score < 100:
    print("A")
elif score >= 80 and score < 89:
    print("B")
elif score >= 70 and score < 79:
    print("C")
elif score >= 60 and score < 69:
    print("D")
else:
    print("F")