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
Yakvenalex [24]
2 years ago
7

Write a program to prompt the user for hours worked to compute a gross pay for an employee, and he is paid 100/hour. If he worke

d for 50 hours in a week then he will get overtime pay for the extra hours he worked i.e. he will be paid 1.5 times of M100.00 for 10 hours (50-40)
Computers and Technology
1 answer:
Elenna [48]2 years ago
6 0

Answer:

rate = 100

hours_worked = eval(input('enter number of hours worked'))

gross_pay = hours_worked * rate

if hours_worked <= 40 :

print(gross_pay)

else:

print(gross_pay + (1.5*rate*(hours_worked -40)))

Explanation:

Using python 3 :

The rate of pay is defined using the rate variable

The user is the prompted to enter the number of hours worked.

Gross_pay gives the mathematical evaluation of the amount paid base in rate and hours worked.

Since hours beyond 40 are paid as overtime. Then we have to add that to those who worked above 40 hours.

If hours_worked is 40 and below, then use gross pay

If gross pay is above 40 ; then the overtime fee is added to gross pay using the rate provided.

You might be interested in
(100 points) why does file explorer look like this and how do I fix it? I'm not good with computers, and I kinda need help
Degger [83]

Go To View -> Navigation Pane -> Then Click Navigation Pane

7 0
2 years ago
What is the maximum number of columns in a spreadsheet that you can sort in one instance in software like OpenOffice Calc?
MakcuM [25]
The correct answer is D
6 0
3 years ago
Read 2 more answers
What is the best website to get a iphone
sveticcg [70]
Generally I'd recommend not buying one online, tends to be cheaper from a shop - and better used, although their are some risks with 2nd hand devices, I think the big price cut it worth it. 

If you did want to buy online, maybe Amazon or Ebay?
7 0
3 years ago
Read 2 more answers
The cost of a CLEP exam is about__<br><br> A$100 <br> B $50 <br> C$80<br> D$170
Elanso [62]

Your answer is C or $80

When averaging the costs of credit hours at public and private community colleges and four-year institutions, the median cost for a three-hour class in 2017 was $1,782. Conversely, each CLEP exam costs $85.

5 0
3 years ago
Read 2 more answers
Database developers use the ________ to create relationships in the database.
madreJ [45]
Is it multiple choice ?<span />
7 0
3 years ago
Other questions:
  • The syntax used for referencing cells with their worksheet names is the sheet name, followed by ____, then the usual column lett
    8·1 answer
  • Summarize who you believe cyber criminals are, and why?
    8·1 answer
  • A low concentration of market power has positive affects. A low concentration of market share has which of the following effects
    7·1 answer
  • Which of the following operating systems is able to join a domain a) Microsoft office pro b) Microsoft surface R.T. c) google an
    9·2 answers
  • Develop a C++ program that will determine whether a department store customer has exceeded the credit limit on a charge account.
    13·1 answer
  • Match the elements of a web page with their descriptions?
    15·2 answers
  • Ramjac Company wants to set up k independent file servers, each capable of running the company's intranet. Each server has avera
    9·1 answer
  • Teenagers and their parents will never understand each other-the generation gap is too big. Its for my grade 11 English speech​
    10·2 answers
  • You're making great progress on your assignment. You've defined the purpose of your message, identified both the primary and sec
    9·1 answer
  • Both IT professionals and governments must apply ethical principles to certify that emerging technologies are to society.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!