Question

Write a program in python that calculates the salary of employees. The program should prompt the...

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

Homework Answers

Answer #1

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:

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
In Python... Write a program that calculates a student’s final grade in this course. The program...
In Python... Write a program that calculates a student’s final grade in this course. The program should: Display a message stating its goal Prompt the user to enter a student’s average grade for the weekly assignments, grade for mid-course project and grade for final project Calculate the final grade based on these percentages... Assignments = 60% Mid-course & Final Project = 40% (20% each) A A- B+ B B- C+ C C- D+ D D- E 100-94 93-89 88-85 84-82...
Write a program in python language that calculates the salary of an employee who works under...
Write a program in python language that calculates the salary of an employee who works under an hourly wage contract in a company. To read his name, the working hours of the month, his hourly wage and whether he is married or unmarried. The reservations made to him depend on the amount of his salary. If the salary is up to € 1000 per month, it has 15% reservations, while otherwise it has 25% reservations. Also, if he is married,...
* Write a Java program that calculates and displays the Fibonacci numbers * First prompt the...
* Write a Java program that calculates and displays the Fibonacci numbers * First prompt the user to input a number, N * Then use a for loop to calculate and display the first N fibonocci numbers * For example, if the user enters 5, the output should be: * 1, 1, 2, 3, 5 * * if the user enters 10, the output should be: * 1, 1, 2, 3, 5, 8, 13, 21, 34, 55
Write a python program that calculates the area of triangle. The user will be asked to...
Write a python program that calculates the area of triangle. The user will be asked to enter the base (b) and the height (h). The formula to calculate the area is: Triangle_area=(bh)/2 Note: the program should print the area to the user: (for example: the area of the triangle is: 34.3)
Write most basic C++ program possible that calculates monthly savings account balance. Program will prompt user...
Write most basic C++ program possible that calculates monthly savings account balance. Program will prompt user to enter initial account balance, annual percentage rate, amount deposited each month, and total number of months. Validate user inputs allowing only positive numbers. B = initial account balance A = amount deposited each month R = annual percentage rate Total Balance = (R/12+1)B+A
Python Coding Federal law requires that hourly employees be paid “time and a half” for all...
Python Coding Federal law requires that hourly employees be paid “time and a half” for all work above 40 hours per week. Write a program that prompts the user to enter their hours worked and hourly wage (e.g. $20.00/hr) and then computes and prints their pay. The program should test the number of hours worked to determine if any overtime pay is due. As an example for regular pay (no overtime) suppose that a worker makes $10/hr and works 40...
python 3 A grocery store keeps track of the fruits it has sold. Currently it only...
python 3 A grocery store keeps track of the fruits it has sold. Currently it only tracks apples and bananas. Write a program that first asks the user to enter how many days he/she wants to record, then for each day prompts the user to enter the profit of selling apples and bananas respectively. The program should display the total profit made by selling the two fruits over all these days, and show which fruit -- apples or bananas --...
Please use Python 3 4). Write a program that asks the user to enter 10 numbers....
Please use Python 3 4). Write a program that asks the user to enter 10 numbers. The program should store the numbers in a list and then display the following data: • The lowest number in the list • The highest number in the list •The total of the numbers in the list • The average of the numbers in the list   Sample input & output: (Prompt) Enter Number 1: (User enter) 4 (Prompt) Enter Number 2: (User enter) 7...
Python Programming 4th Edition: - Write a program that test and display if a number enter...
Python Programming 4th Edition: - Write a program that test and display if a number enter is divisible by 2 and/or 3. Hints: - Use the correct operation - Prompt the user to enter a number The output should look like as follows - Enter an integer: --Number is divisible by 2 and 3 --Number is divisible by either 2 or 3, but not both --Number is not divisible by either 2 or 3
Python code only! (Do not include breaks or continue functions) Write a program that asks the...
Python code only! (Do not include breaks or continue functions) Write a program that asks the user to enter the amount that they budgeted for the month. A loop should then prompt the user to enter their expenses, one at a time and to enter 0 to quit. When the loop finishes, the program should display the the amount of budget left. (a negative number indicates the user is over budget and a positive number indicates the user is under...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT