Analyze the following code and fill in the output. # Employee List name - ["Joe","Janice", "Ahmed", "Maria"] # create dictionaries for wages and hours # Use variable names as keys dWage - {"Joe":17.55, "Janice":12.35, "Ahmed":22.95, "Maria":18.75) dHours - ("Joe":40, "Janice":42, "Ahmed":37, "Maria":45) # Caluculate gross pay for each employee if dHours (name [0]]>40: AGPO - dwage [name [0]]*40 + 1.5 * dWage [name [0]] dHours (name [0]]-40 else: AGPO - dWage [name [0]]*dHours [name [1 if dHours (name [1]]>40: dGP1 - dwage [name [1]]*40 + 1.5 * dWage [name [1]] dHours (name [1]]-40 else: dGP1 - dwage [name [1]]*dHours (name [1]]
Analyze the following code and fill in the output. # Employee List name - ["Joe","Janice", "Ahmed", "Maria"] # create dictionaries for wages and hours # Use variable names as keys dWage - {"Joe":17.55, "Janice":12.35, "Ahmed":22.95, "Maria":18.75) dHours - ("Joe":40, "Janice":42, "Ahmed":37, "Maria":45) # Caluculate gross pay for each employee if dHours (name [0]]>40: AGPO - dwage [name [0]]*40 + 1.5 * dWage [name [0]] dHours (name [0]]-40 else: AGPO - dWage [name [0]]*dHours [name [1 if dHours (name [1]]>40: dGP1 - dwage [name [1]]*40 + 1.5 * dWage [name [1]] dHours (name [1]]-40 else: dGP1 - dwage [name [1]]*dHours (name [1]]
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 8RQ
Related questions
Question
![Analyze the following code and fill in the output.
## Employee List
name = ["Joe", "Janice", "Ahmed","Maria"]
## create dictionaries for wages and hours
## Use variable names as keys
dWage = {"Joe":17.55, "Janice":12.35, "Ahmed":22.95, "Maria":18.75}
dHours = {"Joe":40, "Janice":42,"Ahmed":37, "Maria":45}
## Caluculate gross pay for each employee
if dHours (name [0]]>40:
AGPO = dWage [name [0]]*40 + 1.5 * dWage [name [0]]* dHours [name [0]]-40
else:
AGPO = dWage [name [0]] *dHours [name []
if dHours [name [1]]>40:
AGP1 = dWage [name [1]]*40 + 1.5 * dWage [name [1]]* dHours [name [1]]-40
else:
AGP1 = dWage [name [1]]*dHours [name [1]]
if dHours [name [2]]>40:
dGP2 = dWage [name [2]]*40 + 1.5 * dWage [name [2]]* dHours [name [2]]-40
else:
AGP2 = dWage [name [2]]*dHours [name [2]]
if dHours [name [3]]>40:
dGP3 = dWage [name [3]]*40 + 1.5 * dWage [name [3]]* dHours [name [3]]-40
else:
AGP3 = dWage [name [3]] *dHours (name [3]]
## Display variable and results
print (name [0], 'worked', dHours [name [0]],'at', dWage [name [0]1, 'making', round (dGP0, 2))
print (name [1], 'worked', dHours [name [1]],'at', dWage [name [1]], 'making', round (dGP1,2))
print (name [2], 'worked', dHours [name [2]],'at', dWage [name [2]], 'making',round (dGP2,2))
print (name [3], 'worked', dHours [name [3]],'at', dWage [name [3]1, 'making', round (dGP3,2))](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F0e198fbe-fc90-4a57-ae7d-fdafc83c823d%2Ffb6f0117-f5cc-408a-b5e4-198e59a181c6%2Fc6bqkws_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Analyze the following code and fill in the output.
## Employee List
name = ["Joe", "Janice", "Ahmed","Maria"]
## create dictionaries for wages and hours
## Use variable names as keys
dWage = {"Joe":17.55, "Janice":12.35, "Ahmed":22.95, "Maria":18.75}
dHours = {"Joe":40, "Janice":42,"Ahmed":37, "Maria":45}
## Caluculate gross pay for each employee
if dHours (name [0]]>40:
AGPO = dWage [name [0]]*40 + 1.5 * dWage [name [0]]* dHours [name [0]]-40
else:
AGPO = dWage [name [0]] *dHours [name []
if dHours [name [1]]>40:
AGP1 = dWage [name [1]]*40 + 1.5 * dWage [name [1]]* dHours [name [1]]-40
else:
AGP1 = dWage [name [1]]*dHours [name [1]]
if dHours [name [2]]>40:
dGP2 = dWage [name [2]]*40 + 1.5 * dWage [name [2]]* dHours [name [2]]-40
else:
AGP2 = dWage [name [2]]*dHours [name [2]]
if dHours [name [3]]>40:
dGP3 = dWage [name [3]]*40 + 1.5 * dWage [name [3]]* dHours [name [3]]-40
else:
AGP3 = dWage [name [3]] *dHours (name [3]]
## Display variable and results
print (name [0], 'worked', dHours [name [0]],'at', dWage [name [0]1, 'making', round (dGP0, 2))
print (name [1], 'worked', dHours [name [1]],'at', dWage [name [1]], 'making', round (dGP1,2))
print (name [2], 'worked', dHours [name [2]],'at', dWage [name [2]], 'making',round (dGP2,2))
print (name [3], 'worked', dHours [name [3]],'at', dWage [name [3]1, 'making', round (dGP3,2))
![worked
at
making
worked
at
making
worked
at
making
worked
at
making](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F0e198fbe-fc90-4a57-ae7d-fdafc83c823d%2Ffb6f0117-f5cc-408a-b5e4-198e59a181c6%2Frxyrhhg_processed.jpeg&w=3840&q=75)
Transcribed Image Text:worked
at
making
worked
at
making
worked
at
making
worked
at
making
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT