The Problem to Solve: The user wishes to enter employee data and then display that data as a table. The employee data items are the employee ID, the last name, first name, department name, and annual salary. When printing the output, the name should be made of the last and first names in the form of last name, comma, space, and first name. Questions: What are the inputs needed to solve this programming problem (names and data types)? What are the desired outputs (data types and descriptions)? What are the formats for the outputs? The Python Program: Create a Python file named employee_program.py, open it in your Python editor, and copy your Python template into the new file. Following your instructor's instructions, define a constant at the top of the file, before def main(), called CONSOLE_WIDTH and assign it the value 80. Inside the main() function, define all of your hard-coded strings that will be printed for the user. This demonstrates the separation of the output text from the program logic. It also shows how easy it is to change the text to another human language for Internationalization. program_title = "*** Employee Program ***" employee_id_prompt = "Please enter the employee ID: " last_name_prompt = "Please enter the employee last name: " first_name_prompt = "Please enter the employee first name: " department_prompt = "Please enter the department name: " salary_prompt = "Please enter the employee annual salary: " table_name = "Employee Data" bar = '-' * CONSOLE_WIDTH dept_header = "DEPARTMENT" id_header = "ID" emp_name_header = "EMPLOYEE NAME" salary_header = "SALARY" program_complete = "Program complete" Add code to print the program title to the center of the console using an f-string. Add code to get the inputs from the user. Use the prompt strings to prompt the user. Do any necessary data conversions. Print the output Print the table title Print a separator bar Print the column headers Print a separator Print the employee data Print a separator Print a message stating that the program is complete. Use the pre-defined string value and an f-string. Call the main() function Run the program with the following values: Employee ID: 123 Last Name: Doe First Name: John Department: Marketing Salary: 55000 Run the program with the following values: Employee ID: 456 Last Name: Sebastiano First Name: Fredericko Department: Sales Salary: 65000 Run the program with the following values (and pay close attention to the results in the output): Employee ID: 789 Last Name: Williamson First Name: William Department: Research and Development Salary: 70000 Zip your completed Python program and submit the zip file to this assignment drop box.
The Problem to Solve: The user wishes to enter employee data and then display that data as a table. The employee data items are the employee ID, the last name, first name, department name, and annual salary. When printing the output, the name should be made of the last and first names in the form of last name, comma, space, and first name. Questions: What are the inputs needed to solve this programming problem (names and data types)? What are the desired outputs (data types and descriptions)? What are the formats for the outputs? The Python Program: Create a Python file named employee_program.py, open it in your Python editor, and copy your Python template into the new file. Following your instructor's instructions, define a constant at the top of the file, before def main(), called CONSOLE_WIDTH and assign it the value 80. Inside the main() function, define all of your hard-coded strings that will be printed for the user. This demonstrates the separation of the output text from the program logic. It also shows how easy it is to change the text to another human language for Internationalization. program_title = "*** Employee Program ***" employee_id_prompt = "Please enter the employee ID: " last_name_prompt = "Please enter the employee last name: " first_name_prompt = "Please enter the employee first name: " department_prompt = "Please enter the department name: " salary_prompt = "Please enter the employee annual salary: " table_name = "Employee Data" bar = '-' * CONSOLE_WIDTH dept_header = "DEPARTMENT" id_header = "ID" emp_name_header = "EMPLOYEE NAME" salary_header = "SALARY" program_complete = "Program complete" Add code to print the program title to the center of the console using an f-string. Add code to get the inputs from the user. Use the prompt strings to prompt the user. Do any necessary data conversions. Print the output Print the table title Print a separator bar Print the column headers Print a separator Print the employee data Print a separator Print a message stating that the program is complete. Use the pre-defined string value and an f-string. Call the main() function Run the program with the following values: Employee ID: 123 Last Name: Doe First Name: John Department: Marketing Salary: 55000 Run the program with the following values: Employee ID: 456 Last Name: Sebastiano First Name: Fredericko Department: Sales Salary: 65000 Run the program with the following values (and pay close attention to the results in the output): Employee ID: 789 Last Name: Williamson First Name: William Department: Research and Development Salary: 70000 Zip your completed Python program and submit the zip file to this assignment drop box.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
The Problem to Solve:
The user wishes to enter employee data and then display that data as a table. The employee data items are the employee ID, the last name, first name, department name, and annual salary. When printing the output, the name should be made of the last and first names in the form of last name, comma, space, and first name.
Questions:
What are the inputs needed to solve this programming problem (names and data types)?
What are the desired outputs (data types and descriptions)?
What are the formats for the outputs?
The Python Program:
Create a Python file named employee_program.py, open it in your Python editor, and copy your Python template into the new file.
Following your instructor's instructions, define a constant at the top of the file, before def main(), called CONSOLE_WIDTH and assign it the value 80.
Inside the main() function, define all of your hard-coded strings that will be printed for the user. This demonstrates the separation of the output text from the program logic. It also shows how easy it is to change the text to another human language for Internationalization.
program_title = "*** Employee Program ***"
employee_id_prompt = "Please enter the employee ID: "
last_name_prompt = "Please enter the employee last name: "
first_name_prompt = "Please enter the employee first name: "
department_prompt = "Please enter the department name: "
salary_prompt = "Please enter the employee annual salary: "
table_name = "Employee Data"
bar = '-' * CONSOLE_WIDTH
dept_header = "DEPARTMENT"
id_header = "ID"
emp_name_header = "EMPLOYEE NAME"
salary_header = "SALARY"
program_complete = "Program complete"
Add code to print the program title to the center of the console using an f-string.
Add code to get the inputs from the user. Use the prompt strings to prompt the user. Do any necessary data conversions.
Print the output
Print the table title
Print a separator bar
Print the column headers
Print a separator
Print the employee data
Print a separator
Print a message stating that the program is complete. Use the pre-defined string value and an f-string.
Call the main() function
Run the program with the following values:
Employee ID: 123
Last Name: Doe
First Name: John
Department: Marketing
Salary: 55000
Run the program with the following values:
Employee ID: 456
Last Name: Sebastiano
First Name: Fredericko
Department: Sales
Salary: 65000
Run the program with the following values (and pay close attention to the results in the output):
Employee ID: 789
Last Name: Williamson
First Name: William
Department: Research and Development
Salary: 70000
Zip your completed Python program and submit the zip file to this assignment drop box.
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 2 steps with 3 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY