-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.py
More file actions
29 lines (21 loc) · 1008 Bytes
/
Copy pathproject.py
File metadata and controls
29 lines (21 loc) · 1008 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
print(
"""Welcome to Employee Salary Portal.
Here will show you how much salary you owe to the Company.
Please provide some info to calculate your salary."""
)
# taking name input from user. And converting hourly rate to float data type
your_name = input("\nWhat is your Name? ")
hourly_wage_rate = float(input("what is your Hourly Wage Rate? "))
hours_worked_this_week = int(input("Hours hours_worked_this_week? "))
# checking first condition:
if hours_worked_this_week > 40:
wage_without_ot = hourly_wage_rate * 40
ot = (hourly_wage_rate * 1.10) * (hours_worked_this_week - 40)
total_wage = wage_without_ot + ot
print(f"{your_name}! Your Total Wgae is {total_wage}. Gross Wage is {wage_without_ot} and Overtime is {ot}.")
# checking secondt condition:
elif hours_worked_this_week == 40:
print(f"{your_name}! Your total wage is {hourly_wage_rate * hours_worked_this_week}.")
# writing default condition:
else:
print(f"{your_name}! You didn't work this Week.")