Python problem Ask the user to enter their company name to validate it based on the database list(COMPANYLIST). If the user enters invalid inputs (which means it is not in the database list), after the second invalid input, your code should show (print) the list of the company names. #company database list COMPANYLIST = ["Amazon", "Apple", "Facebook", "Google", "Uber"] Ask the user the rate and the hours and validate them to be a numeric and positive value Save the inputs in a dictionary like theDict = { "rate":50, "hours": 120, "compan_name": "Google"} If "hours" is greater than 40, multiply 1.5 by the rate for the overtime print the pay stub Use modules and import them to the main file Your main file can be like this: from getInputsFile import getInputs from computePayFile import computePay from printPayFile import printPay def payProcess(): ''' This function is to process all other functions to get inputs, calculate and print the pay stub ''' theDict = getInputs() theDict = computePay(theDict) printPay(theDict) if __name__ == '__main__': payProcess() Add at least two outputs (results after you run your code) at the end of your code as a multi-line comment, you can format it like this: ''' The output of your code after running it '''
Python problem Ask the user to enter their company name to validate it based on the database list(COMPANYLIST). If the user enters invalid inputs (which means it is not in the database list), after the second invalid input, your code should show (print) the list of the company names. #company database list COMPANYLIST = ["Amazon", "Apple", "Facebook", "Google", "Uber"] Ask the user the rate and the hours and validate them to be a numeric and positive value Save the inputs in a dictionary like theDict = { "rate":50, "hours": 120, "compan_name": "Google"} If "hours" is greater than 40, multiply 1.5 by the rate for the overtime print the pay stub Use modules and import them to the main file Your main file can be like this: from getInputsFile import getInputs from computePayFile import computePay from printPayFile import printPay def payProcess(): ''' This function is to process all other functions to get inputs, calculate and print the pay stub ''' theDict = getInputs() theDict = computePay(theDict) printPay(theDict) if __name__ == '__main__': payProcess() Add at least two outputs (results after you run your code) at the end of your code as a multi-line comment, you can format it like this: ''' The output of your code after running it '''
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
Python problem
- Ask the user to enter their company name to validate it based on the
database list(COMPANYLIST). If the user enters invalid inputs (which means it is not in the database list), after the second invalid input, your code should show (print) the list of the company names.
#company database list
COMPANYLIST = ["Amazon", "Apple", "Facebook", "Google", "Uber"]
- Ask the user the rate and the hours and validate them to be a numeric and positive value
- Save the inputs in a dictionary like theDict = { "rate":50, "hours": 120, "compan_name": "Google"}
- If "hours" is greater than 40, multiply 1.5 by the rate for the overtime
- print the pay stub
- Use modules and import them to the main file
- Your main file can be like this:
from getInputsFile import getInputs
from computePayFile import computePay
from printPayFile import printPay
def payProcess():
'''
This function is to process all other functions to get inputs,
calculate and print the pay stub
'''
theDict = getInputs()
theDict = computePay(theDict)
printPay(theDict)
if __name__ == '__main__':
payProcess()
- Add at least two outputs (results after you run your code) at the end of your code as a multi-line comment, you can format it like this:
'''
The output of your code after running it
'''
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 2 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