1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Licemer1 [7]
3 years ago
10

Create a program to calculate the wage. Assume people are paid double time for hours over 60 a week. Therefore they get paid for

at most 20 hours overtime at 1.5 times the normal rate. For example, a person working 70 hours with a regular wage of $20 per hour would work at $20 per hour for 40 hours, at 1.5 * $20 for 20 hours of overtime, and 2 * $20 for 10 hours of double time. For the total wage will be:
20 * 40 + 1.5 * 20 * 20 + 2 * 20 * 10 = 1800

The program shall include the following features:

a. Prompt the user to enter the name, regular wage, and how many work he/she has worked for the week.
b. Print the following information:NameRegular wageHours worked in one weekTotal wage of the week
Computers and Technology
1 answer:
Rus_ich [418]3 years ago
4 0

Answer:

Written in Python

name = input("Name: ")

wageHours = int(input("Hours: "))

regPay = float(input("Wages: "))

if wageHours >= 60:

->total = (wageHours - 60) * 2 * regPay + 20 * 1.5 * regPay + regPay * 40

else:

->total = wageHours * regPay

print(name)

print(wageHours)

print(regPay)

print(total)

Explanation:

The program is self-explanatory.

However,

On line 4, the program checks if wageHours is greater than 60.

If yes, the corresponding wage is calculated.

On line 6, if workHours is not up to 60, the total wages is calculated by multiplying workHours by regPay, since there's no provision for how to calculate total wages for hours less than 60

The required details is printed afterwards

Note that -> represents indentation

You might be interested in
Match the items with their respective descriptions.
kap26 [50]

a is 3

b is 1

c is 2

d is 4

7 0
3 years ago
Read 2 more answers
Which property of a text element controls how the browser handles text that does not fit within the element box?
BaLLatris [955]
Margin because it is always on the end of document
6 0
4 years ago
You hear someone make the following comment: "A blueprint is a design for a house. A carpenter can use the blueprint to build th
max2010maxim [7]

Answer:

The answer is "classes are the blueprints"

Explanation:

According to the class definition, it is a collection of data members and member methods, in which all the data members can't return any value, and member methods or functions return a value.

  • In this question, the carpenter uses the blueprint to build the house, if he uses class and object model.
  • This model also known as an entity blueprint, which sets the properties and functions with an object type.
4 0
4 years ago
For a data structure, such as a stack, who is responsible for throwing an exception if the stack is empty and a pop() is called:
lubasha [3.4K]

Answer:

D. End-User Programmer.

Explanation:

A stack data structure is used to holds data for programs. The first data to go into a stack is always the last to be extracted (First-in-Last-out). Data is read into the stack with the push function and retrieved with the pop function.

When the stack is empty, it means there are no data left to pop from it. If a pop function is issued at this time, the program conventionally throws an error, there is no need for the end-user to write an exception handler for it because the end-user programmer has done that already.

4 0
3 years ago
What is the difference between a prefix and postfix in Java?
Doss [256]

Answer:

prefix comes first

Explanation:

pre means before, and post means after.

7 0
3 years ago
Other questions:
  • Processing is handled by the computer’s central processing unit (cpu).​ <br> a. True <br> b. False
    6·1 answer
  • In Java the ______________are not objects. All of the rest areobjects, or any ___________ is called as object.
    10·1 answer
  • CJ is developing a new website blogging about cutting-edge technologies for people with special needs. He wants to make the site
    8·1 answer
  • Microsoft Word is ________________ software.
    8·1 answer
  • 4.2 Code Practice: Question 1
    14·1 answer
  • To do a good job of searching periodicals at your library, you should use A) the Library of Congress Authorities webpage. B) web
    10·1 answer
  • 9. A change in the appearance of a value or label in a cell
    5·1 answer
  • Write a function to output an array of ints on a single line. Funtion Should take an array and an array length and return a void
    9·1 answer
  • Hioo ^U^
    8·1 answer
  • An array called numbers contains 35 valid integer numbers. Determine and display how many of these values are greater than the a
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!