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]
4 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]4 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
8. Why is it important not to download pictures to your school or workplace network if you do not plan to use them?
Anni [7]

Answer:

not appropriate use of technology.

Explanation:

7 0
3 years ago
The major computer operations include what?
Goryan [66]

Answer:

The major computer operations include sequence and looping. ... Visual Basic, C++, and Java are all examples of computer programming languages.

7 0
3 years ago
What do you need to do before you can sort and filter data in a database?
Airida [17]
You need to first format the table becfor you can sort and filter data in a <span>database. ♥</span>
5 0
3 years ago
Public-key cryptography (a form of asymmetric cryptography) is an encryption method that's widely used because: 1) it is computa
rosijanka [135]

Answer:

C.

Explanation:

7 0
3 years ago
How to see the range of values of vty lines?
PSYCHO15rus [73]

Answer:

To get the range of very lines in a switch or a router, in the global mode, type " line very" and the question mark after the space. It displays the ranges of valid very lines in the device.

Explanation:

Routers and switches are intermediate components of a computer network. They are used to connect various nodes and networks. For a remote connection, they use the virtual interface called vty to connect to computers for management purposes. These vty lines allows for SSH and telnet access from workstations and the range of very lines are predetermined and limited and varies for all switches and routers.

7 0
4 years ago
Other questions:
  • Paying attention to the trends that might impact your future career is called
    15·2 answers
  • A new object, Object Y, was discovered outside our solar system. Object Y is small and rocky, is not a satellite of any other ob
    6·2 answers
  • If wire rope guard rails are used what must also be done?
    10·1 answer
  • Write a method that accepts a String object as an argument and returns a copy of the string with the first character of each sen
    14·1 answer
  • During the name resolution process, which technique is used to avoid congestion when querying a server
    8·1 answer
  • Write a program named SortWords that includes a method named SortAndDisplayWords that accepts any number of words, sorts them in
    10·1 answer
  • (k + 3)by the power of 3​
    9·1 answer
  • The CTRL, ALT, and WINDOWS keys are commonly used for keyboard shortcuts, which are keystrokes that can quickly perform an opera
    9·1 answer
  • Convert 12 bits to bytes​
    13·1 answer
  • Weak passwords are a(n) ___________ threat
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!