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

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...
icon
Related questions
Question
  1. Create a Python file named employee_program.py, open it in your Python editor, and copy your Python template into the new file.
  2. 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.
  3. 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.
    1. program_title = "*** Employee Program ***"
    2. employee_id_prompt = "Please enter the employee ID: "
    3. last_name_prompt = "Please enter the employee last name: "
    4. first_name_prompt = "Please enter the employee first name: "
    5. department_prompt = "Please enter the department name: "
    6. salary_prompt = "Please enter the employee annual salary: "
    7. table_name = "Employee Data"
    8. bar = '-' * CONSOLE_WIDTH
    9. dept_header = "DEPARTMENT"
    10. id_header = "ID"
    11. emp_name_header = "EMPLOYEE NAME"
    12. salary_header = "SALARY"
    13. program_complete = "Program complete"
  4. Add code to print the program title to the center of the console using an f-string.
  5. Add code to get the inputs from the user.  Use the prompt strings to prompt the user.  Do any necessary data conversions.
  6. Print the output
    1. Print the table title
    2. Print a separator bar
    3. Print the column headers
    4. Print a separator
    5. Print the employee data
    6. Print a separator
  7. Print a message stating that the program is complete.  Use the pre-defined string value and an f-string.
  8. Call the main() function
  9. Run the program with the following values:
    1. Employee ID: 123
    2. Last Name: Doe
    3. First Name: John
    4. Department: Marketing
    5. Salary: 55000
  10. Run the program with the following values:
    1. Employee ID: 456
    2. Last Name: Sebastiano
    3. First Name: Fredericko
    4. Department: Sales
    5. Salary: 65000
  11. Run the program with the following values (and pay close attention to the results in the output):
    1. Employee ID: 789
    2. Last Name: Williamson
    3. First Name: William
    4. Department: Research and Development
    5. Salary: 70000
  12. Zip your completed Python program
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
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 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)
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
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY