Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 HavanaStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started