A-Language- Python Write a fully functioning program that correctly uses a list, reads, and writes from/to an external file.   Megan owns a small neighborhood coffee shop, and she has fifteen employees who work as baristas. All of the employees have the same hourly pay rate. Megan has asked you to design a program that will allow her to enter the number of hours worked by each employee and then display the amounts of all the employees’ gross pay. You determine that the program should perform the following steps:   The text that is in the file is stored as one sentence. Incorporate the code that reads the file’s contents and calculates the following: total number of words in the file total average number of words per sentence total number of characters in the file total average number of characters per sentence Use function(s) to accommodate this word and character analysis of the file   B For each employee: Get the employee name from the file named employee_names.txt (attached in Blackboard). Here is a snapshot for your reference. George Thomas Melinda Harris Norah Jeddery Jorge Ortiz Samantha Gregory Tanvi Gupta William Edwards Tania Gomez Erica Sanders Gracie Lou Freebush Tony Montana Obi-Wan Kenobi Cruella De Vil Marty McFly Napoleon Dynamite Get the number of hours worked for the employee from the user/keyboard(input) write a try/except statement to gracefully respond to a ValueError exception for hours.

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
icon
Related questions
Question

A-Language- Python

Write a fully functioning program that correctly uses a list, reads, and writes from/to an external file.  

Megan owns a small neighborhood coffee shop, and she has fifteen employees who work as baristas. All of the employees have the same hourly pay rate. Megan has asked you to design a program that will allow her to enter the number of hours worked by each employee and then display the amounts of all the employees’ gross pay. You determine that the program should perform the following steps:

 

  1. The text that is in the file is stored as one sentence. Incorporate the code that reads the file’s contents and calculates the following:
  2. total number of words in the file
  3. total average number of words per sentence
  4. total number of characters in the file
  5. total average number of characters per sentence

Use function(s) to accommodate this word and character analysis of the file

 

B

  1. For each employee:
    1. Get the employee name from the file named employee_names.txt (attached in Blackboard). Here is a snapshot for your reference.
  2. George Thomas
  3. Melinda Harris
  4. Norah Jeddery
  5. Jorge Ortiz
  6. Samantha Gregory
  7. Tanvi Gupta
  8. William Edwards
  9. Tania Gomez
  10. Erica Sanders
  11. Gracie Lou Freebush
  12. Tony Montana
  13. Obi-Wan Kenobi
  14. Cruella De Vil
  15. Marty McFly
  16. Napoleon Dynamite
    1. Get the number of hours worked for the employee from the user/keyboard(input)
      1. write a try/except statement to gracefully respond to a ValueError exception for hours.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Graphical User Interface
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.
Similar questions
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education