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
Tysm for Ace! :O<br> Hurray!
professor190 [17]

Answer:

Good job!! You deserve it.

Explanation:

3 0
3 years ago
Read 2 more answers
What is virtual memory?
slega [8]
Not a real memory but it points to physical memory.
3 0
3 years ago
A ________ is a very large general-purpose computer that is capable of performing very many functions as if these are done simul
Soloha48 [4]

Answer:

Mainframe Computer is capable of doing all the functions which are listed in question.

Explanation:

A mainframe is a very large general-purpose computer (usually costing millions of dollars) that is capable of performing very many simultaneous functions, supporting very many simultaneous users, and storing huge amounts of data. A microcomputer is the type of computer you use.

3 0
3 years ago
Only class b and class c networks can be subnetted true or false
Alona [7]
Class b and c networks cannot be sub netted.
 false<span />
4 0
3 years ago
What is the use of an NDP?
Makovka662 [10]

Answer:

It defines five ICMPv6 packet types for router solicitation,router advertisement,neighbor solicitation,neighbor advertisement,and network redirects.

Explanation:

8 0
3 years ago
Other questions:
  • What information is not typically included in an e-mail header?​?
    15·1 answer
  • The tone a writer takes is referred to as the writing _____.
    7·2 answers
  • When using a template to compose a memorandum which key on the keyboard moves the cursor to the next field
    15·1 answer
  • An airline company would like to easily locate lost luggage. What technology would make it easier for them to locate the luggage
    6·2 answers
  • What’s the most popular operating system
    9·2 answers
  • How has technology effected the way we communicate?
    5·1 answer
  • Electronic evidence on computer storage media that is not visible to the average user is called​ ________.
    14·1 answer
  • What is the decimal number 86 when written as a
    9·1 answer
  • What happens if part of an ftp message is not delivered to the destination?
    14·1 answer
  • After Daniel performed poorly on a test, his teacher advised him to do some self-reflection to figure out how he could get a bet
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!