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
SVEN [57.7K]
3 years ago
12

Create pseudocode that could be used as a blueprint for a program that would do the following: An employer wants you to create a

program that will allow her to enter each employee’s name, hourly rate of pay, number of hours worked in one week, overtime pay rate, payroll deductions (such as medical insurance, savings, etc.), and tax rate. The program should output the employee’s gross pay (before taxes and deductions) and net pay (after taxes and deductions) for each employee for one week.
Computers and Technology
1 answer:
mestny [16]3 years ago
8 0

Answer:

START LOOP FOR EACH EMPLOYEE:

   INPUT employee’s name, hourly rate of pay, number of hours worked, overtime pay rate, payroll deductions, tax rate

   SET gross pay = (hourly rate of pay x *weekly hours) + (overtime pay rate x (number of hours worked - *weekly hours))

   PRINT gross pay

   SET net pay = gross pay - (payroll deductions + (gross pay * tax rate/100 ))

   PRINT net pay

END LOOP

* weekly hours (how many hours an employee needs to work to earn overtime pay rate) is not given in the question

Explanation:

Create a loop that iterates for each employee

Inside the loop, ask for name, hourly rate, number of hours worked, overtime pay rate, payroll deductions, tax rate. Calculate the gross pay and print it. Calculate the net pay and print it

You might be interested in
Each JavaScript command line ends with a(n) ____ to separate it from the next command line in the program.
kykrilka [37]
The answer is :
semicolon (;)
8 0
2 years ago
Extend to also calculate and output the number of 1 gallon cans needed to paint the wal. Hint: Use a math function to round up t
Crank

Answer:

Here is the Python program:

import math #import math to use mathematical functions

height = float(input("Enter wall height (feet): ")) #prompts user to enter wall height and store it in float type variable height

width = float(input("Enter wall width (feet): ")) #prompts user to enter wall width and store it in float type variable width

area = height *width #computes wall area

print('Wall area: {} square feet'.format(round(area))) #displays wall area using round method that returns a floating-point number rounded

sqftPerGallon = 350 #sets sqftPerGallon to 350

paintNeeded = area/ sqftPerGallon #computes needed paint

print("Paint needed: {:.2f} gallons".format(paintNeeded)) #displays computed paint needed up to 2 decimal places

cansNeeded = int(math.ceil(paintNeeded)) #computes needed cans rounding the paintNeeded up to nearest integer using math.ceil

print("Cans needed: {} can(s)".format(cansNeeded)) #displays computed cans needed

colorCostDict = {'red': 35, 'blue': 25, 'green': 23} #creates a dictionary of colors with colors as key and cost as values

color = input("Choose a color to paint the wall: ") #prompts user to enter a color

if color in colorCostDict: #if the chosen color is present in the dictionary

    colorCost = colorCostDict.get(color) #then get the color cost from dictionary and stores it into colorCost using get method that returns the value(cost) of the item with the specified key(color)

    cost = cansNeeded * colorCost #computes the cost of purchasing paint of specified color per cansNeeded

  print("Cost of purchasing {} paint: ${}".format(color,colorCostDict[color])) #displays the real cost of the chosen color paint

print("Cost of purchasing {} paint per {} gallon can(s): ${}".format(color,cansNeeded, cost)) #displays the cost of chosen color paint per cans needed.

Explanation:

The program first prompts the user to enter height and width. Lets say user enter 20 as height and 50 as width so the program becomes:

Wall area computed as:

area = height *width

area = 20 * 50

area = 1000

Hence the output of this part is:

Wall area: 1000 square feet                                                                                                                     Next program computes paint needed as:

paintNeeded = area/ sqftPerGallon

Since sqftPerGallon = 350 and area= 1000

paintNeeded = 1000 / 350

paintNeeded = 2.86

Hence the output of this part is:

Paint needed: 2.86 gallons

Next program computes cans needed as:      

cansNeeded = int(math.ceil(paintNeeded))

This rounds the computed value of paintNeeded i.e. 2.86 up to nearest integer using math.ceil so,

cansNeeded = 3                                                                  

Hence the output of this part is:

Cans needed: 3 can(s)                                                                                                                            Next program prompts user to choose a color to paint the wall

Lets say user chooses 'blue'

So the program get the cost corresponding to blue color and multiplies this cost to cans needed to compute the cost of purchasing blue paint per gallon cans. So

cost = cansNeeded * colorCost

cost = 3 * 25

cost = 75

So the output of this part is:

Cost of purchasing blue paint per 3 gallon can(s): $75                                                                                        The screenshot of the program along with its output is attached.

5 0
2 years ago
Write the addReview method, which adds a single product review, represented by a ProductReview object, to the ReviewCollector ob
maw [93]

Answer:

Explanation:

namespace Jeroen\ReviewIntegration\Observer;

use Magento\Framework\Event\ObserverInterface;

class ProductReview implements ObserverInterface

{

    protected $_storeManager;

    protected $_request;

    public function __construct(

        \Magento\Store\Model\StoreManagerInterface $storeManager,

        \Magento\Framework\App\Request\Http $request

    ) {

        $this->_storeManager = $storeManager;

        $this->_request = $request;

    }

    public function execute(\Magento\Framework\Event\Observer $observer)

    {

         return 'test';

    }

}

5 0
2 years ago
Draw a flowchart that solve the problem of calculating the average of 5 numbers.
KatRina [158]

Answer:

Draw a flowchart that solve the problem of calculating the Area of circle

Pie x r x2

Explanation:

3 0
1 year ago
How to delete the last element in array
svlad2 [7]

Answer:

Hey mate.....

Explanation:

This is ur answer.....

<em>To remove the last n elements from an array, use arr. splice(-n) (note the "p" in "splice"). The return value will be a new array containing the removed elements.</em>

<em />

Hope it helps!

Mark me brainliest pls.....

FOLLOW ME! :)

4 0
2 years ago
Other questions:
  • Dan is a Civil Engineer for a company that builds nuclear power plants throughout the world. Which best describes the places he
    14·2 answers
  • What would you recommend for data segregation if using cloud software
    12·2 answers
  • What is Processor to Memory Mismatch problem?
    15·1 answer
  • There was a thunderstorm in your area and the power is out. The traffic lights are not functioning. Explain what you should do w
    8·2 answers
  • T FROW PYCW GCYN TA T ODYHP WQROW TW<br><br> Someone decode pls
    14·1 answer
  • Robert works in a call center and receives a call from Kathy. Kathy says she can no longer access the online reporting applicati
    13·1 answer
  • Tom and his brother caught 100 finish on a weeklong fishing trip. The total way of the fish was 235 pounds. What is the weight o
    9·1 answer
  • What made it possible to develop personal computers?
    10·2 answers
  • How are comments in a Java program treated by the compiler?
    14·2 answers
  • Viruses that load from usb drives left connected to computers when computers are turned on are known as.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!