xh = float(input("Enter Hours:"))
xr = float(input("Enter Rate:"))
if xh > 40:
xh = 40 + (xh-40) * 1.5
xp = float(xh) * float(xr)
print(xp)
결과
score = input("Enter Score: ")
score = float(score)
try:
if score >= 0.9:
print('A')
elif score >= 0.8:
print('B')
elif score >= 0.7:
print('C')
elif score >= 0.6:
print('D')
elif score < 0.6:
print('F')
except:
print('i want eat')
quit()
'모두를 위한 Python 특화과정 > 20171047 김동훈' 카테고리의 다른 글
Programming for Everybody (Getting Started with Python)-7 (0) | 2022.07.19 |
---|---|
Programming for Everybody (Getting Started with Python)-6 (0) | 2022.07.19 |
Programming for Everybody (Getting Started with Python)-4 (0) | 2022.07.19 |
Programming for Everybody (Getting Started with Python)-3 (0) | 2022.07.19 |
Programming for Everybody (Getting Started with Python)-2 (0) | 2022.07.19 |