Write a program to compute an employee's weekly pay and produce a pay slip showing name, gross, pay, deductions, and net pay. The program should first prompt the user for: a. Family name b. Given name c. Hourly rate of pay d. Number of hours worked that week (Any hours over 40 are paid at double the normal hourly rate) e. A letter indicating the employee's tax category A. No tax deduction B. Tax is 10% of gross pay C. Tax is 20% of gross pay D. Tax is 29% of gross pay E. Tax is 35% of gross pay f. Either a Y or an N to indicate whether or not the employee wants $20 deducted from the weekly pay as a contribution to the United Way Charity

Answers

Answer 1

Answer:

# get the employee data

family_name = input("Enter family name: ")

given_name = input("Enter given name: ")

hourly_rate = int(input("Enter hourly rate of pay: "))

hours = int(input("Enter hours worked for the week: "))

tax_cat = input("Enter tax category from a through e: ")

is_charit = input("Do you want to donate $20 to charity y/n: ")

gross_pay = 0

net_pay = 0

deductions = ""

# gross_pay

if hours > 40:

   gross_pay = hours * (2 * hourly_rate)

else:  

   gross_pay = hours * hourly_rate

# net_pay and deduction

if tax_cat == 'a':

   if is_charit == 'y':

       net_pay = gross_pay - 20

       deduction = "$20 charity donation"

   else:

       net_pay = gross_pay

       deduction = "0% tax"

elif tax_cat == 'b':

   if is_charit == 'y':

       net_pay = gross_pay - ( 0.1 * gross_pay) - 20

       deduction = "$20 charity donation and 10% tax"

   else:

       net_pay = gross_pay - (0.1 * gross_pay)

       deduction = "10% tax"

elif tax_cat == 'c':

   if is_charit == 'y':

       net_pay = gross_pay - ( 0.2 * gross_pay) - 20

       deduction = "$20 charity donation and 20% tax"

   else:

       net_pay = gross_pay - (0.2 * gross_pay)

       deduction = "20% tax"

elif tax_cat == 'd':

   if is_charit == 'y':

       net_pay = gross_pay - ( 0.29 * gross_pay) - 20

       deduction = "$20 charity donation and 29% tax"

   else:

       net_pay = gross_pay - (0.29 * gross_pay)

       deduction = "29% tax"

if tax_cat == 'e':

   if is_charit == 'y':

       net_pay = gross_pay - ( 0.35 * gross_pay) - 20

       deduction = "$20 charity donation and 35% tax"

   else:

       net_pay = gross_pay - (0.35 * gross_pay)

       deduction = "35% tax"

# output of the employee's weekly pay.

print(f"Employee name: {given_name} {family_name}")

print(f"Gross pay: ${gross_pay}")

print(f"Net pay: {net_pay}")

print(f"Deductions: {deduction}")

Explanation:

The python program uses the input built-in function to prompt and get user data for the program. The gross pay returns the total pay of the employee without any deduction while net pay returns the pay with all deductions included.


Related Questions

please help please I will count your answer brainiest if you help!
In what ways are math and computer science similar? How are they different?

Answers

Answer:

Without mathematics, computer science would not exist. Computers use algorithms to obtain certain information, and output certain information. Linear equations and algebra are used to create gaming graphics.

Have you ever wondered how your online quizzes were made? Inside the online quizzes there is code behind it, this code uses variables, integers, and booleans.

Variables use equations like x and y to find sum. A boolean is a basic algebraic notation, it's a binary variable.

Everything uses math, nothing would exist without math, including even digging dirt.

what is CPU ????....................​

Answers

Cumputor its just a short way to say it

Answer: Central Processing Unit

Explanation: The CPU is the “brain” of the computer. It means Central Processing Unit!

hope this helps ;)

Which tab would help you toggle between views?

Answers

Please further explain this question I would love to help you

The View tab enables you to toggle between different views

View tab

The View tab enables you to toggle between different views, selecting either Normal or master Page, single or Two-Page Spread views.

The view tab also provides several options such as rulers, boundaries, layout.

By default, the view used while working is the normal view, but this view can be toggled to the one you want.

Find out more on or view tab at: https://brainly.com/question/25629383

to generate a series of first ten counting number of algorithm​

Answers

uhh i need points so i don’t fail math.

A section at the top of the page that makes it easy for the recipient to respond to a letter is called a(n

Answers

Answer:

Address block.

Explanation:

A proprietary software license allows users to install and use the software on any number of computers. install and use the software after agreeing to the terms of the license. inspect, modify, and redistribute the software. copyright and resell the software.

Answers

Answer:

install and use the software after agreeing to the terms of the license.

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer how to perform a specific task and to solve a particular problem.

Basically, softwares are categorized into two (2) main categories and these are;

I. Open-source software.

II. Proprietary software.

A proprietary software is also known as a closed-source software and it can be defined as any software application or program that has its source code copyrighted and as such cannot be used, modified or distributed without authorization from the software developer. Thus, it is typically published as a commercial software that may be sold, licensed or leased by the software developer (vendor) to the end users with terms and conditions.

Some examples of proprietary software are Microsoft Windows, macOS, Adobe photoshop etc.

Hence, a proprietary software license allows users to install and use the software after agreeing to the terms of the license.

A proprietary software license allows users to install and use the software after agreeing to the terms of the license.

Thus, option (b) is correct.

Users are required to agree to these terms before they can legally install and use the proprietary software. The license agreement may outline specific restrictions, limitations, and permitted usage scenarios.

Installing and using the software on any number of computers: This is not necessarily true for proprietary software.

Inspecting, modifying, and redistributing the software: These activities are typically not allowed under a proprietary software license, as they generally provide limited or no access to the source code and impose restrictions on modifications and redistribution.

Copyrighting and reselling the software: These rights are typically retained by the software's copyright holder and are not granted to users under a proprietary software license.

Therefore, install and use the software after agreeing to the terms of the license.

Thus, option (b) is correct.

Learn more about Software installation here:

https://brainly.com/question/7548929

#SPJ6

The question attached are seems to be incomplete, the complete question is:

A proprietary software license allows users to :

install and use the software on any number of computers.install and use the software after agreeing to the terms of the license.inspect, modify, and redistribute the software.copyright and resell the software.

Write negative impacts of ICT in our lives. atleast 4​

Answers

Answer:

#1: Reduced physical activity

#2: Eye strain/ easily prone to headaches

#3: Poor social skills

#4: Decline in mental health

Answer:

Reduced physical activity: A third negative effect of ICT is that users may adopt a more sedentary lifestyle. This can lead to health problems such as obesity, heart disease, and diabetes.

What is the size of 5th generation of computer and what language does they use??​

Answers

Answer:

The period of fifth generation is 1980-till date. In the fifth generation, VLSI technology became ULSI (Ultra Large Scale Integration) technology, resulting in the production of microprocessor chips having ten million electronic components

Fifth-generation languages are used mainly in artificial intelligence research. OPS5 and Mercury are examples of fifth-generation languages. as is ICAD, which was built upon Lisp. KL-ONE is an example of a related idea, a frame language

Explanation:

1980 until the present is the fifth generation's time frame. When VLSI technology evolved into ULSI (Ultra Large Scale Integration) technology in the fifth generation, microprocessor chips with 10 million electronic components were created.

What is 5th generation computer?

Artificial intelligence research is the principal application for fifth-generation languages. Examples of fifth-generation languages are OPS5 and Mercury. ICAD, which is based on Lisp, is also. KL-ONE is an illustration of a frame language, a related concept.

After the creation of the fourth-generation computers, the fifth generation was introduced. Modern computers, also referred to as fifth-generation computers, are currently under development and are based on artificial intelligence.

In 1982, the FGCS was developed in Japan (Fifth Generation Computer System). This generation of computers uses parallel processing and microelectronic technology, which has a high processing capacity.

Therefore, 1980 until the present is the fifth generation's time frame. When VLSI technology evolved into ULSI (Ultra Large Scale Integration) technology in the fifth generation, microprocessor chips with 10 million electronic components were created.

To learn more about computers, refer to the link:

https://brainly.com/question/21080395

#SPJ2

is amoug us cool

cus i dont know

Answers

Is: be present

among: being a member or members of (a larger set).

us: used by a speaker to refer to himself or herself and one or more other people as the object of a verb or preposition.

cool: (INFORMAL) fashionably attractive or impressive.

There is the meaning of ur sentence

Answer:

yes

Explanation:

It where u have imposters versus crewmates u have to get all ur assignments done before everyone gets killed and you

in which genre of games do players most often have the power to shape how the story will end?

platformer games
shooter games
role-playing games
puzzle games

Answers

Role playgames are the most customizable

Answer:

role-playing games

Explanation:

Which symbol is used for exponentiation in QBASIC ?
Short answer​

Answers

Answer:

The symbol which is used for exponentiation in QBASIC is '^' .

explain Text align , Text Decoration, colour, Text shadow..​

Answers

Answer:

Text align, text decoration and text shadow are all some of the important features in CSS.

Explanation:

CSS is a programming language. It stands for Cascading Style Sheets. It is the style sheet language that is used for describing a presentation of any document that is basically written in HTML.

Text Align : This property allows the horizontal alignment of a text in an element. A text can be right align, left align, justified or centered.

Text Decoration : The text decoration features in CSS helps to set or helps to remove the decorations from the text. These are drawn across the descendant text elements.

Text shadow : This property simply allow us to add or put a shadow to the text.

What are presenter notes?

Answers

Presenter notes are for showing to other people

Answer:

notes on like a presenting app that will help you present better so like your notes

Explanation:

1.portable hard drive is an example of internal memory true or false

2.Command i’m user interface are using currently true or false

3. Temperature sensor is an input device true or false

4. Draft few headers and footers are visible true or false

Answers

1. false

2. false

3. false

4.true

1.False
2.False
3.False
4.True

when a plant responds to changes in the length of day by flowering during certain seasons,it is called​

Answers

Answer:

It occurs in plants and animals. Photoperiodism can also be defined as the developmental responses of plants to the relative lengths of light and dark periods. They are classified under three groups according to the photoperiods: short-day plants, long-day plants, and day-neutral plants.

PLEASE HELP!!! You saved the definition of the vehicle class in a file called vehicleClass.py.


Which line of code will allow you to use the class in another program?


A. from * import vehicleClass

B. from vehicle import

C. from * import vehicle

D. from vehicleClass import*

Answers

Answer:

D. from vehicleClass import*

Explanation:

Answer:

from vehicleClass import*

Explanation:

Creation of ____________will help you to study the behavior of the real system

Answers

Answer:

I don't know but....I think (Sorry if I am wrong)

Explanation:

Psychology

Ok can someone tell me why I can’t do this? I’m trying to put a video as my background but it won’t show up when I go to add video there is no video

Answers

Answer: money

Explanation:

You are considering implementing a backup scheme for a server. After researching options, you decide on a method that does not reset the archive bit after a backup. Which method have you chosen?

Answers

Answer:

C. A cold site is a leased facility that contains only electrical and communications wiring, air conditioning, plumbing, and raised flooring. No communications equipment, networking hardware, or computers are installed at a cold site until it is necessary to bring the site to full operation.

Explanation:

According to the video, what kinds of projects would Computer Programmers be most likely to work on? Check all that apply.

educational software
financial planning software
computer hardware
games
installing networks

Answers

Answer:

educational software

financial planning software

and games

Explanation:

The kind of projects that would Computer Programmers be most likely to work on are educational software, financial planning software, and games The correct options are a, b, and d.

What are computer programmers?

A computer programmer designs computer codes for websites, while an Information Support Specialist oversees the design and maintenance of websites. Computer programming has a close relationship with mathematics.

Code and scripts are written by computer programmers, modified, and tested to ensure that software and applications work as intended. They convert the blueprints made by engineers and software developers into computer-readable instructions.

Therefore, the correct option is

a. educational software

b. financial planning software

d. games

To learn more about computer programmers, refer to the link:

https://brainly.com/question/30307771

#SPJ6

For each obstacle, select the best solution. failing to find other members for a club: failing a class: failing to get the credits necessary to graduate from high school: not having enough money to pay for culinary school: not getting a job or promotion:

Answers

Answer:                                                                                                             Failing an high school math class:getting study help,and retaking the class. Failing to get the credits necessary to graduate from high school: retaking any additional classes needed. not finding an apprenticeship opportunity: joining an organization or school that connects its members or students with apprenticeships. not finding a job: asking family,friends, and acquaintances about job opportunities.                                                                    

Explanation:                    

Answer:

getting study help

retaking any additional classes needed

joining an organization or school that connects its members students with apprenticeship

asking family, friends, and acquaintances about job opportunities  

Explanation:

Compared with traditional methods, the entire rapid application development (RAD) process is expanded and, as a result, the new system is built, delivered, and placed in operation much later.

Answers

Answer:

False

Explanation:

Note, the Rapid Application Development (RAD) software development approaches are noteworthy not for its expanded design details but for its simplicity of the software development process.

In other words, the RAD approaches while taking user preferences into the software development process, focuses on making the software design process more flexible, such as by employing the use of prototypes, and less unnecessary details.

PLEASE HURRY!!!
Wyatt has a database to keep track of an enormous collection of videos. How can Wyatt find the record for the game Lost on Mars?
a)sort the data
b)filter the data
c)query the data
d)edit the data

Answers

Answer:

Wyatt could sort the data by month

Explanation:

Paul wants to store addresses and phone numbers for clients. Paul wants to use this information to send form letters. Paul should enter the addresses in a _____.

spreadsheet
graphic software
database
word processor

Answers

Answer:

Spreadsheet or database depending on how he's setting it up and what tools he's using.

The question makes it sound like Paul wants to store some arbitrary data and does not have any particular tool set up for it, so spreadsheet is probably the "correct" answer.

A database would be used more by developers to build a system that can be used to store such data (e.g. back end on a web site that takes the data).

Who knows songs that are sad,happy,excited, and calm

Tell me three 4 each i will give out brainliest

Also include the author

Answers

sad-

you broke me first

can we kiss forever

love the way you lie

happy-

Say Yes

Valerie

Walking on Sunshine

excited-

who let the dogs out

September

calm-

heather

put your records on

lonely

ASAP! Due by tonight!!!! Please help!!!

Answers

The answer is C. Start of mystery

Answer: e

Explanation:

Nadia has inserted an image into a Word document and now would like to resize the image to fit the document better.

What is the quickest way to do this?

keyboard shortcut
sizing handles
context menu
sizing dialog box

Answers

Sizing handles but I’m not super sure

Desktop computers are often provided in the workplace by organizations, and laptops may be as well. However, portable devices (such as tablets and smartphones) may more commonly be allowed on a BYOD basis. For a BYOD (personally-owned) device:

Answers

Answer:

Organizations may have requirements about how BYOD devices may be configured to access the information resources of the organization.

Explanation:

Desktop computers and laptops are often provided for the employees in the workplace. On a BYOD basis, portable devices such as tablets and smartphones may more commonly be used.

For a BYOD (personally-owned) device, organizations may have requirements about how BYOD devices may be configured to access the information resources of the organization.

How can your web page design communicate your personal style

Answers

Answer:

Web design is very unique, you can express your feelings through creating a page.

Brainly, ""helping you get better grades"
ahem im sorry but uh ur lying because i made a C on my exam and im really mad smh

Answers

Answer: What do you except? All of this is user generated..

Explanation:

Yikes- well I mean these are real people answering so they could make mistakes too
Other Questions
Does the fossil of Archaeopteryx support Darwin's idea? Explain your answer.(look at picture and read) In one week the price of gasoline rose from $1.71 to $2.15 at BJs. What is the percent of change? Find 30% of 320. Explain all your work B. Now write four more questions based on the picture. Take turns asking and answering them witha partner.ModeloEstudiante 1: Dnde est el profesor?Estudiante 2: El profesor est cerca de la pizarra,1. &2. 3. 4. :- According to the graph H(w) below, what happens when w gets close to zero? What animal, introduced by the Romans, greatly changed trade in Africa? 2(x + 14) = 40Can you please do all the steps of solving this?Ex:8(7+1)3=1928 x (7+1) x 3 88x8=64 64x3=192total=192 Perry Investments bought 2,000 shares of Able, Inc. common stock on January 1, 20X1, for $20,000 and 2,000 shares of Baker, Inc. common stock on July 1, 20X1 for $24,000. Baker paid $2,400 of previously declared dividends to Perry on December 31, 20X1. At the end of 20X1, the fair value of the Able stock was $18,000 and the fair value of the Baker stock was $28,000. The stocks were purchased for short-term speculation prior to the effective date of the change in accounting rules for equity investments. Perry owns 10% of each company. Perry should record the receipt of the Baker dividend as What are the correct steps to add the bill using the receipt capture feature in quick books online? A Force is applied onto a mass causing it to accelerate. If the same Force was applied to a SMALLER mass, what would happen to that acceleration?1. The acceleration would increase2. The acceleration would stay the same3. The acceleration would decrease4. The acceleration would change direction Name at least 2. What made the Director create these new rules? PLEASE HELP!!! ASAP WILL GIVE 50 points!! I just need your help (at least an ideaWRITING PROMPT: In the early Middle Ages, civilizations in differentregions of the world rose and fell. What causes a civilization to becomepowerful? What causes a civilization to decline? What might happenwhen a powerful civilization comes into contact with a civilization that is declining? Which of the following produces identical nuclei in cells? A pollination B miltosis C osmosis D fertilization which answer is true Which phrase from the excerpt from Sybil, or the Two Nations uses a physical description to reveal man's emotions?a single chamberto gain the best lightpale and care-wornhis daily task A 4 m^3 metal block is suspended using a cable in salt water with density 1030 kg/m^3. Tension on the cable is 42600N. What is the weight of the block. What is the density of the block? ANYONE can help me out pleaseee The number is scientific notation is written as a decimal. Click on the position of the decimal? 9.04 x 10 ^100009040000 look at chart C. Which estate might feel resentment towards the others? Explain The Laffer curve is the curve showing how tax revenue varies as the size of the tax varies. a. True b. False Hurryyyy Im giving brainliest Which statement describes the state of the stock market by the late 1920s?O The stock market became increasingly unstable as prices fell.O The stock market began to lose steam as more people bought on margin..The stock market became overvalued as more people invested.The stock market lost value as wealthy investors earned income elsewhere.