Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE PYTHON, ANSWER QUESTION WITH CODE AND SHOW OUTPUT COPY AND PASTE BELOW INTO A TEXT DOCUMENT CALLED PythonSummary.txt, THIS WILL BE YOUR TEST FILE

USE PYTHON, ANSWER QUESTION WITH CODE AND SHOW OUTPUT

image text in transcribed

COPY AND PASTE BELOW INTO A TEXT DOCUMENT CALLED "PythonSummary.txt", THIS WILL BE YOUR TEST FILE FOR THE WORD COUNT

Welcome! Are you completely new to programming? If not then we presume you will be looking for information about why and how to get started with Python. Fortunately an experienced programmer in any programming language (whatever it may be) can pick up Python very quickly. It's also easy for beginners to use and learn, so jump in!!

Installing Python is generally easy, and nowadays many Linux and UNIX distributions include a recent Python. Even some Windows computers (notably those from HP) now come with Python already installed. If you do need to install Python and aren't confident about the task you can find a few notes on the BeginnersGuide/Download wiki page, but installation is unremarkable on most platforms.

If you want to know whether a particular application, or a library with particular functionality, is available in Python there are a number of possible sources of information. The Python web site provides a Python Package Index (also known as the Cheese Shop, a reference to the Monty Python script of that name). There is also a search page for a number of sources of Python-related information. Failing that, just Google for a phrase including the word python and you may well get the result you need. If all else fails, ask on the python newsgroup and there's a good chance someone will put you on the right track.

Write a word count program in Python that does the following ( 25 points): a. Prompt the user to enter a word b. Parse Pythonsummary.txt and count the number of times the word occurs in the file c. Tell the user how many times the word occurs d. Note: It should find the word regardless of case (upper or lower) or punctuation e. Example: i. The user enters: python ii. The program should print: The word python occurs 13 times

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

More Books

Students also viewed these Databases questions

Question

6. Explain the strengths of a dialectical approach.

Answered: 1 week ago

Question

2. Discuss the types of messages that are communicated nonverbally.

Answered: 1 week ago