1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
weeeeeb [17]
3 years ago
15

Here's something to stop you from getting repetitive when writing essays. Write a program that reads multiple lines of plain tex

t from the user, then prints out each different word in the input with a count of how many times that word occurs. Don't worry about punctuation or case – the input will just be words, all in lower case. Your output should list the words in alphabetical order.

Computers and Technology
1 answer:
Marianna [84]3 years ago
7 0

Answer:

The output is attached below

Explanation:

d = {}

while True:

line = input("Enter line: ")

if len(line)==0:

break

token = line.split(' ')

for var in token:

try:

if len(var)==0:

continue

count = d[var]

d[var] = count + 1

except KeyError:

d[var] = 1

pass

for word in sorted(d):

print(word , d[word])

------------------

You might be interested in
You typed the word "weather" when you meant to type the word "whether. " When will Writer or Word flag this as a misspelling or
Alenkasestr [34]

The word flag shows misspelling while typing word "weather" instead of "whether"  is depends on the rest of the sentence and how you have your settings for grammar and spell checker.

<h3>What is word flag or spell checker?</h3>

Word flag or spell checker is the tool or software which helps to identify the misspelling or a grammar problem while typing.

The word "weather"  is typed when there was  to type the word "whether. "

Now, before checking that, when will Writer or Word flag this as a misspelling or a grammar problem, first we have to understand the meaning of both the word.

Word "weather"  is the state of atmosphere for different conditions of temperature, pressure, and humanity. While the word "whether " is the expression of confusion between two things.

The option given for this problem are,

  • Depends on the rest of the sentence and how you have your settings for grammar and spell checker
  • Never
  • All the time.

Word flag, tells the incorrect word, spelling or grammatical error in a sentence.

To identify a particular word which is misplaced in place of another almost similar spelled word, it checks the other word and sentence.

If the particular word does not match with the sentence, the  word flag or spell checker shows the error.

Hence, the word flag shows misspelling while typing word "weather" instead of "whether"  is depends on the rest of the sentence and how you have your settings for grammar and spell checker.

Learn more about the spell checker here;

brainly.com/question/515655

6 0
2 years ago
The ________ simulates your work area.
xz_007 [3.2K]
I believe it is, A. taskbar
5 0
3 years ago
ANSWER QUICKLIY
lidiya [134]

Answer:

Explanation:

Allow you to view the document in different ways. Sorry if I am wrong. I am dumb

God bless, stay safe, and good luck! :)

4 0
3 years ago
Read 2 more answers
What methods do phishing and spoofing scammers use?
Misha Larkins [42]

Answer:

please give me brainlist and follow

Explanation:

There are various phishing techniques used by attackers:

Installing a Trojan via a malicious email attachment or ad which will allow the intruder to exploit loopholes and obtain sensitive information. Spoofing the sender address in an email to appear as a reputable source and request sensitive information

4 0
3 years ago
1. Which of the following describes a way of memorizing a poem using a mnemonic device?
xenn [34]

Answer:

Singing the words of the poem to the tune of Happy Birthday"

Explanation:

Mnemonic devices are those tools which can be used to improve a persons ability to remember something efficiently. In short, it a technique to memorize something in short period of time and remember it for longer period of time.

Memorizing a poem by singing it to the tune of Happy birthday is also a technique to remember the poem and memorizing it efficiently.

3 0
3 years ago
Other questions:
  • Databases can have various objects some of which are tables, queries, forms or views, and reports objects. Each of these has fie
    14·1 answer
  • Which of the following illustrates the proper declaration of a variable and data type to hold a whole number?
    13·1 answer
  • The IT person most involved with system development is the _________
    14·1 answer
  • Which of the following illustrates an example of a Boolean data type?
    15·1 answer
  • Create a program in Python that prompts the user to enter an integer number within the range of 1 to 10 inclusive. The program s
    15·2 answers
  • AYUDAAAA!!!!! URGENTE!!!!!!1<br> ¿para que sirve la "BIG DATA"?
    9·1 answer
  • Which of the following statements are true regarding models? Select 3 options.
    11·1 answer
  • You are setting up a small network. The customer has decided to change his internet service provider (ISP) to EtherSpeed. The IS
    9·1 answer
  • You are starting a small web hosting business and
    11·1 answer
  • How can you protect your information when using wireless technology
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!