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]
3 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]3 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
The goal for me is that I need to identify the objects needed for the UNO card game and the actions that those objects perform,
Alik [6]

Answer:

Explanation:

//Java program

class UnoCard{

  private String color;

  private int value;

 

  public UnoCard(String color , int val) {

      this.color = color;

      value = val;

  }

  public String getColor() {

      return color;

  }

  //set the color of the card

  public void setColor(String color ) {

      this.color = color;

  }

  //get the value of the card

  public int getValue() {

      return value;

  }

  //set the value of the card

  public void setValue(int val) {

      value = val;

  }

  //return true if card has same value or

  //same color as the card

  //return false otherwise

  public boolean isMatch(UnoCard card) {

      return (this.value==card.value)||(this.color==card.color);

  }

}

public class Card {

  public static void main(String args[]) {

      UnoCard card1 = new UnoCard("Red",10);

      UnoCard card2 = new UnoCard("Green",10);

      UnoCard card3 = new UnoCard("Blue",15);

     

      if(card1.isMatch(card2))System.out.println("Match");

      else System.out.println("No Match");

     

      if(card2.isMatch(card3))System.out.println("Match");

      else System.out.println("No Match");

  }

}

6 0
4 years ago
In every programming language, when you access data stored in an array, you must use a ____ containing a value that accesses mem
Mariulka [41]
An array is an indexed collection of data elements. First you must declare an array, give its name and data. <span>Once your arrays are declared, you access the elements in an array with the array name, and the index number inside brackets [ ].
So, in every </span><span>programming language, when you access data stored in an array, you must use a command [] (brackets) containing a value that accesses memory occupied by the array.</span>
4 0
3 years ago
How to share excel file for multiple users office 365?.
Sholpan [36]

Answer:

You would need that person email to share it with them.

5 0
2 years ago
Read 2 more answers
Things stored in a computer ram __________.
kirza4 [7]
B.cannot be accessed from the GUI
8 0
3 years ago
What part of a waveform describes a sound's loudness?
torisob [31]

Answer:

B i believe

Explanation:

3 0
4 years ago
Read 2 more answers
Other questions:
  • Some might consider careers in the Construction industry to be quite flexible. Which statement supports this claim? Employees ca
    14·2 answers
  • Compare and contrast the following codes of ethics, including a listing of their similarities and differences: The ACM Code of E
    14·1 answer
  • Write a program named ArrayDemo that stores an array of 10 integers. (Note that the array is created for you and does not need t
    14·1 answer
  • What will you do to run a presentation from a computer on which you did not prepare the presentation, and how?
    13·1 answer
  • 2. The factorial of a positive integer n is the product of the integers from 1 to n. You can express the factorial of a positive
    6·1 answer
  • Based on the details in The Riddle of the Rosetta Stone, how did the career of Jean-Baptiste Fourier differ from that of Jacques
    9·2 answers
  • What is the primary purpose of the destination address?
    9·1 answer
  • Ummm, I hate to interrupt your day, but does anyone know where Mitch72 is????? Because he hasn't talked in a week, and he hasn't
    7·1 answer
  • What is the difference between a threat and an attack?
    7·1 answer
  • How will you maintain electrical tools and equipment?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!