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
Which devices are managed through device management?
Ratling [72]
Answer:
computers and Mobile phones ( including game consoles and tablets) are managed through device management
Explanation:
Device management includes a type of security software used to monitor,secure and manage systems such as mobile phones computer laptops and desktops, Tablets and smart televisions as well as Game consoles. It as well involves the management,operation and maintenance of the physical aspect of the systems from external threats/intruders
Anti virus software is an example of a device management software used to protect systems from malware, by detecting and removing them and also by preventing them.
Firewall is a complete device management tool because it detects and prevents intruders and virus from penetrating the system software
7 0
1 year ago
Which of the following is a Reach Key on your keyboard?
zhannawk [14.2K]

Answer:J key

Explanation:I want my brainlyiest pls

6 0
2 years ago
You enter a hardware store where you have an account, pick up a pair of $5.00 pliers, and wave them at the manager as you leave
Gemiola [76]
Shoplifting! Did he pay for those?!?!
6 0
2 years ago
How do u change the wallpaper on an Apple Watch
Mandarinka [93]
Go to Settings and display or settings and wallpaper.
7 0
3 years ago
What is the nmap command line syntax for running an ms08-067 vulnerability scan against 172.30.0.30 (targetwindows04)?
IceJOKER [234]

The command line syntax is

nmap –script=smb-check-vulns –script-arg=unsafe=1 -p445 172.30.0.30

6 0
3 years ago
Other questions:
  • Which of the following criteria would not make a person eligible to receive medicare benefits?Which of the following criteria wo
    12·2 answers
  • When TCP/IP translates a network layer address into a data link layer address, it sends a special ____________ to all computers
    15·2 answers
  • Dora electronically transferred $591.68 from her checking account to Matt's checking account. In what column of the check regist
    14·2 answers
  • Write a program that reads numbers from a file (or allow user to input data) and creates an ordered binary tree. The program sho
    8·1 answer
  • How will you identify a file type on your computer? A file type is the standard used to and information in a computer. All file
    14·2 answers
  • An error occured trying to answer a question on brainly. What should I do?
    11·2 answers
  • The first step when entering data is _
    6·1 answer
  • A circuit breaker will do which of the following
    12·1 answer
  • True or false a mirrorless camera has a pentaprism
    14·2 answers
  • Write an if statement that assigns 0.2 to commission if sales is greater than or equal to 10000.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!