## 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: dGP0=dWage [name [0] ] *40 +1.5 * dWage [name [0]]* (dHours [name [0]]-40) dGPO = dWage [name [0] ] *dHours [name [0]] else: if dHours [name [1]]>40: dGP1 = dWage [name [1]]*40 +1.5 * dWage [name [1]]* (dHours [name [1]]-40) dGP1 = 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) dGP2 = 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) dGP3= dWage [name [3]] *dHours [name [3]] else: else: else: ## Display variable and results. print (name [0], 'worked', dHours [name [0]], 'at', dWage [name [0]], '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]], 'making', round (dGP3, 2)) worked worked worked worked at at at at making making making making
## 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: dGP0=dWage [name [0] ] *40 +1.5 * dWage [name [0]]* (dHours [name [0]]-40) dGPO = dWage [name [0] ] *dHours [name [0]] else: if dHours [name [1]]>40: dGP1 = dWage [name [1]]*40 +1.5 * dWage [name [1]]* (dHours [name [1]]-40) dGP1 = 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) dGP2 = 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) dGP3= dWage [name [3]] *dHours [name [3]] else: else: else: ## Display variable and results. print (name [0], 'worked', dHours [name [0]], 'at', dWage [name [0]], '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]], 'making', round (dGP3, 2)) worked worked worked worked at at at at making making making making
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
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
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education