Question: File Screenshot: PYTHON 1. Read Song (10 points) a. Create a file called YOUR_NAME_ReadSong.py b. Write a program that does the following i. Open in

 File Screenshot: PYTHON 1. Read Song (10 points) a. Create a

File Screenshot:

file called "YOUR_NAME_ReadSong.py" b. Write a program that does the following i.

PYTHON

1. Read Song (10 points) a. Create a file called "YOUR_NAME_ReadSong.py" b. Write a program that does the following i. Open in the file "song.txt" ii. Read each line of the file individually iii. Count the number of lines in the file iv. Create a dictionary that counts how many times each word occurs v. Print the total number of lines in the file vi. Print the dictionary vii. Print the total number of words in the dictionary viii. Print the keys of the dictionary ix. Print the values of the dictionary Havana oh na na Half of my heart is in havana oh na na He took me back to East Atlanta na na na Oh but my heart is in Havana

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!