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...


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.







Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here