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.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section: Chapter Questions
Problem 8PP: (Data processing) A bank’s customer records are to be stored in a file and read into a set of arrays...
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning