Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

File Screenshot:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

Which of the following is NOT a challenge of data warehouse design?

Answered: 1 week ago