Write a program in python that calculates the salary of employees. The program should prompt the user to enter hourly rate and number of hours of work a day. Then, the program should display the salary daily, bi-weekly (5 days a week), and monthly.
Sample program:
Enter your hourly rate: >>> 20 Enter how many hours you work a day: >>> 8 Your daily salary is: $160 Your bi-weekly salary is: $1600 Your monthly: $3200
rate = int(input("Enter your hourly rate: "))
working_hours = int(input("Enter how many hours you work in a day: "))
# Daily salary will be equal to the product of working hours
annd rate of each hour
daily_salary = rate*working_hours
# bi_weekly_salary will be the salary of two weeks
# there are 10 working days in two weeks
bi_weekly_salary = daily_salary*10
# monthly salary will be the salary of 4 weeks
# monthly salary will be double of bi-weekly salary
monthly_salary = bi_weekly_salary*2
print("Your daily salary is: $",daily_salary)
print("Your bi-weekly salary is: $",bi_weekly_salary)
print("Your monthly salary is: $",monthly_salary)
OUTPUT:
Get Answers For Free
Most questions answered within 1 hours.