728x90
#quiz 2
employee_name = input("Enter employee name: ")
hourly_wage = input("Enter the hourly rate ($) : ")
hourly_wage = float(hourly_wage)
worked_hours = input("Enter the number of hours worked in the past week (h) : ")
worked_hours = float(worked_hours)
if worked_hours > 168 :
print("Out of range")
elif worked_hours < 0 :
print("Out of range")
elif worked_hours > 40 :
overtime = worked_hours - 40
total_wage = 40 * hourly_wage + overtime*1.5*hourly_wage
else :
total_wage = hourly_wage*worked_hours
print("Employee : "+employee_name)
print("The pay will be $"+ str(total_wage)+"for "+str(worked_hours)+" hours of work"
친구를 위해...
'쌉소리 일지' 카테고리의 다른 글
티스토리 웹 버그 리포트 하고 싶음 진심; (0) | 2024.04.03 |
---|---|
모두들 잠든 새벽 3시 나는 카톡에 들어갔죠 (0) | 2024.03.29 |
워킹데이 계산기 with python (0) | 2024.03.27 |
화면 보호기로 뜬 물개사진이 위장처럼 생김 (0) | 2024.03.27 |
2022년 3월 28일 생각 (0) | 2024.03.23 |