def computepay(xh, xr):
if xh > 40:
xh = 40 + (xh-40) * 1.5
return xh*xr
xh = float(input("Enter Hours:"))
xr = float(input("Enter Rate:"))
p = computepay(xh, xr)
print("Pay", p)
결과
'모두를 위한 Python 특화과정 > 20171047 김동훈' 카테고리의 다른 글
python 데이터 구조-1 (0) | 2022.07.19 |
---|---|
Programming for Everybody (Getting Started with Python)-7 (0) | 2022.07.19 |
Programming for Everybody (Getting Started with Python)-5 (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 |