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
crimeas [40]
3 years ago
12

Take a list of numbers that range in value from 0 to 9 and output how many occurrences of each number exist.

Computers and Technology
1 answer:
mel-nik [20]3 years ago
4 0

Answer:

The program in Python is as follows:

def count_occur(myList):

   freq = {}

   for item in myList:

       if item in freq:

           freq[item] += 1

       else:

           freq[item] = 1

       

   for item in freq:

       print(item," ",freq[item])

Explanation:

This gets the list from the main

def count_occur(myList):

This initializes an empty dictionary

   freq = {}

This iterates through the list and count the occurrence of each item

<em>    for item in myList:</em>

<em>        if item in freq:</em>

<em>            freq[item] += 1</em>

<em>        else:</em>

<em>            freq[item] = 1</em>

This iterates through the dictionary

   for item in freq:

This prints each dictionary item and the frequency separated by -

       print(item," ",freq[item])

You might be interested in
general electric always includes an owner registration form with its products. it asks customers for their names, addresses, pho
Marysya12 [62]

The registration, general electric can then sell the information and use it for its own buyer directory. Thus option (A) is correct.

<h3>What is information?</h3>

Information is a general term for everything with the capacity to inform. Information is most fundamentally concerned with the interpretation of what may be sensed. Any naturally occurring process that is not entirely random, as well as any discernible pattern in any medium, can be said to convey some level of information.

An international business based in America is called The General Electric Company (GE). GE has created the technology that will shape the industry for more than 125 years. For its work in the power, renewable energy, aviation, and healthcare sectors, GE is best known today.

Therefore, Thus option (A) is correct.

Learn more about the information here:

brainly.com/question/13629038

#SPJ1

8 0
1 year ago
Write the count below the rests. <br><br> How do I do I do this?<br> Help guys
leva [86]
Well 1234 for the first one
7 0
3 years ago
Who initially developed what is now known as the internet?
Lyrx [107]

in 1990, when computer scientist Tim Berners-Lee invented the World Wide Web.

5 0
3 years ago
TV stations in the U.S. normally broadcast horizontally-polarized signals. Is this TV antenna mounted correctly, or should it be
Marrrta [24]

Answer:basic computer skills

Explanation:

How to passed my test

3 0
4 years ago
4. _______ are miniature versions of the slides in a presentation. A. ScreenTips B. Thumbnails C. Window controls D. Shapes
Ber [7]
B.
Thumbnails is correct
6 0
4 years ago
Read 2 more answers
Other questions:
  • ¿Cuál fue el invento que revolucionó en la edad media?
    10·1 answer
  • What are the primary functions of motor oil? a. Reduce friction and prevent wear b. Keep engine surfaces clean c. Remove heat to
    11·1 answer
  • Computer ________ involves identifying, extracting, preserving, and documenting computer evidence. a. inoculation b. forensics c
    8·1 answer
  • 6. Which of the following is malware? (1 point)
    10·2 answers
  • While adding information to the employee information database, Neil's computer crashed, and the entire database was erased. Whic
    12·1 answer
  • Which commonly used animation effect makes text on a slide appear in the presentation?
    9·1 answer
  • Which of the following is a principle that can improve the efficiency of I/O?
    7·2 answers
  • When installing EMT conduit that will be exposed to wet conditions, _______ fittings should be used.
    5·2 answers
  • Which of the following allows computers to communicate with each other? RAM NIC Hard drive Floppy disk
    11·1 answer
  • you are a bank loan officer. carter has to come into your office and applied for a loan for a car.you ran his credit report, and
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!