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
PLZ HELP ASAP
fenix001 [56]

Answer:

Did this computer get a virus.

Explanation:

The brother can't change the password because it required him to get the old password before changing it.

4 0
2 years ago
You’re creating a table for one of your slides, and need to make some modifications to your table structure. Which of the follow
lyudmila [28]

Create comment it’s the only one there

3 0
3 years ago
Read 2 more answers
The difference between a for loop and a while loop is that a for loop is a loop that happens for a certain number of times. A wh
Shalnov [3]

For loop, if you have to fill water in a bucket three times, It will fill water in a bucket three times. While loop, If you have to take water from the well multiple times but stop when the water is empty in the well.

Explanation:

  • For loop is used mostly static way of programming.
  • While loop is used for dynamic approach of programming.
  • Static approach has fix number of times the task is done.
  • Dynamic approach is conditional attempt to complete the entire task.
  • For loop uses discrete which means it uses the count approach.
  • While loop is basis on characteristic, It works mostly with alphabet.
  • Functions play major role in while loop to take a dynamic approach.
4 0
3 years ago
Image-editing software is used to_____
inn [45]

Edit images.

(have to spam so i ahve enough words)

apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple

7 0
3 years ago
A static class method can be accessed without referring to any objects of the class. True False
VLD [36.1K]

Answer:

True

Explanation:

This is true because a static class method can be accessed without referring to any objects of the class. When a class member is made static, it's very easy to access the object.

The member becomes static and becomes class level

4 0
3 years ago
Other questions:
  • What is the command to use the memory diagnostics tool?
    11·1 answer
  • when you cross or enter traffic from a full stop, how much space should you allow on city streets? on the highway?
    11·1 answer
  • Any parameter that receives a value and also sends a value outside the function must be declared as a reference parameter.
    8·1 answer
  • What piece of software tells the operating system how to use a specific hardware device? a. User interface b. System service c.
    14·1 answer
  • Which of the following does your textbook recommend for preparing PowerPoint slides? Group of answer choices
    9·1 answer
  • A bluetooth network consists of _____ primary device(s) and up to ____ secondary devices.
    8·1 answer
  • What icon is usually used to indicate an attachment feature?
    14·2 answers
  • Short note on first generation computer​
    10·1 answer
  • Can maybe someone play with me on Over-watch on the Xbox?
    8·1 answer
  • How do you describe Microsoft excel?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!