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

Answers

Answer 1

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

   for item in myList:

       if item in freq:

           freq[item] += 1

       else:

           freq[item] = 1

This iterates through the dictionary

   for item in freq:

This prints each dictionary item and the frequency separated by -

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


Related Questions

You are designing an ecommerce web application that will scale to hundreds of thousands of concurrent users. Which database technology is best suited to hold the session state in this example

Answers

Answer: Amazon DynamoDB

Explanation:

The database technology that is best suited to hold the session state in this example is the Amazon DynamoDB.

Amazon DynamoDB is a document database which helps in delivering high quality and fast cperformance at any scale. It can be used to scale to hundreds of thousands of concurrent users as it's multi-active, and has a durable database that has built-in security.

Pascal system . write the program that will calculate the perimeter of a rectangle if its area is A (m²) and one of its sides has a length of B (m). A and B are entered from the keyboard.​

Answers

Answer:

The program in Pascal is as follows:

Program Perimeter;

Uses Crt;

Var

 Length : Real;

 Width : Real;

 Area    : Real;

 Perim : Real;

Begin

 Clrscr;

 Write('Area: ');

 Readln(Area);

 Write('Length : ');

 Readln(Length);

 Width := Area/Length;

 Perim := 2 * (Length + Width);

 Write('Perimeter: ' ,Perim:5:2,'.');

End.

Explanation:

This declares all variables as real

Var

 Length : Real;

 Width : Real;

 Area    : Real;

 Perim : Real;

The program execution begins here

Begin

This clears the screen

 Clrscr;

This prompts the user for Area

 Write('Area: ');

This gets input for Area

 Readln(Area);

This prompts the user for Length

 Write('Length : ');

This gets input for Length

 Readln(Length);

This calculates the width

 Width := Area/Length;

This calculates the perimeter

 Perim := 2 * (Length + Width);

This prints the calculated perimeter

 Write('Perimeter: ' ,Perim:5:2,'.');

This ends the program

End.

which processor is compatible with an AM2+ socket

Answers

Answer:

Amd phenom x4 9950 black edition

Explanation:

Help! ASAP! 1 Question.........°○°​

Answers

Answer: I think D)?

Explanation: Or B)

Debug the following program.


REM "Program to generate 2 2 4 6 10. 16... up to 10th terms" CLS

A=2

B=3

For I=1 to 10

Display A; B;

A=A+B

B=A+B

NEXT X

END​

Answers

Answer:

The debugged program is as follows:

A=2

B=2

For I=1 to 10

PRINT A

TEMP = A

A=B

B=TEMP+A

NEXT I

END

Explanation:

First, the value of B should be changed to 4 (because the second term of the sequence is 2

Next, change Display to Print because Q-basic uses the print keyword to display output

The sequence is not properly generated. So, I update that part of the program to:

For I=1 to 10

PRINT A

TEMP = A

A=B

B=TEMP+A

NEXT I

Lastly, the loop is controlled by variable I (not X).

So change NEXT X to NEXT I

Andy is working on a project to build an accounting software program for his firm. He uses old programming modules that contained code to perform various processes and links them to create a complete system. Which approach does he apply to the program design?
A.
structured programming
B.
non-structured programming
C.
top-down approach
D.
bottom-up approach
E.
modular programming

Answers

Answer:

E.  modular programming

Explanation:

Andy is applying a design known as modular programming. This is basically a design in which the entire project is broken down into various parts known as modules. Each one of these modules performs a very different and unique task. As the modules are created they are linked together like pieces of a puzzle in order to form the entire project. This makes tackling a large project much easier and makes debugging problems much easier as well.

Question 6 [10 marks] a) How does a company's use of information systems affect its corporate strategies? (7 marks) b) Provide an example. (3 marks)

Answers

Answer:

following are the responses to the given question.

Explanation:

The capability to successfully utilize IT is mutually dependent on its ability to execute strategic strategy and set business goals. The ability to compete more and more relies on the capacity of an organization of using technology. In the future, what a company wants to do will rely on what its technologies can do. It may be an example of a company investing in information technology that allows a company to manufacture new products or improve the efficiency of the distribution system to the corporation's economic efficiency.

Pleaseeee hellppp!!!!!

Answers

Answer:

credit card info and delivery address

Explanation:

What is the difference between manual and computer typesetting?

Answers

Answer:

Manual typesetting: The form was placed in a press, inked, and an impression made on paper. During typesetting, individual sorts are picked from a type case with the right hand, and set into a composing stick held in the left hand from left to right, and as viewed by the setter upside down.

Computer typesetting: Computerized typesetting, method of typesetting in which characters are generated by computer and transferred to light-sensitive paper or film by means of either pulses from a laser beam or moving rays of light from a stroboscopic source or a cathode-ray tube (CRT).

In a school 50% of the students are younger than 10, 1/20 are 10 years old and 1/10 are older than 10 but younger than 12, the remaining 70 students are 12 or older. How many students are 10?

Answers

Answer: 10 students

Explanation:

Students younger than 10 = 50%

Students that are 10years old = 1/20 = 1/20 × 100 = 5%

Students that are older than 10 but younger than 12 = 1/10= 1/10 × 100 = 10%

Students that are 12 years or older

= 100% - (50% + 5% + 10%)

= 100% - 65%

= 35%

This means that 35% of the students are 12 years or older and we've been given the number as 70.

Let's say the total number of students is x. Therefore,

35% of x = 70

0.35 × x = 70

0.35x = 70

x = 70/0.35

x = 200

The total number of students is 200.

Therefore, the number of students that are 10years will be:

= 1/20 × 200

= 10 students

Therefore, 10 students are 10 years.

Sanjay has 38 blue beads. And 26 red beads. He needs 8 beads to make 1 wrist band. How many wristbands can Sanjay make if he uses all of his beads?

Answers

Answer:

8

Explanation:

In total, Sanjay has 64 beads. if you divide the 64 beads by the amount of beads it takes to make one band (8) the answer would be 8.

Answer:

make the top answer brainly

Explanation:

what are the answers for these question?

Answers

Answer:

tbh u gotta give more points in order for me to solve that:)

Explanation:

If you are worried that team members will not keep sensitive information private, you could ask them to sign a ________ agreement.
A. Non-confidentiality
B. Security
C. Non-disclosure

Answers

Answer:

C

Explanation:

It has legal reproduction if you break it, many nannys that work for a famous person/people have to sign a non-disclosure before they're hired.

In what way do graphs and charts help in decision-making? Select the most important point.

A.
They identify errors in the data.
B.
They can be included in slideshow presentations.
C.
They reveal patterns in data.
D.
They automate calculations.
E.
They can be inserted into documents.

Answers

I think c. They reveal patterns in data.

Los organos de los sentidos perciben de la misma manera un estimulo?porque?

Answers

Espero que te ayude!!!!

(25 POINTS)Which statement best reflects the importance of following safety guidelines?

Workplace injuries can result in losses to an organization’s profits.

OSHA responds to complaints of unsafe work environments, and can fine or take negligent employers to court.

Every year, thousands of people die as a result of workplace injuries.

Using equipment safely is faster and makes work more efficient.

Answers

Answer:

I think, Every year, thousands of people die as a result of workplace injuries.

Answer:

B

Explanation:

fill in the blanks with correct pronounce
i like watches.The nice watch is for ________​

Answers

Answer:

I like watches. This nice watch is for me.

Why are message board discussions moderated?

A.
to rectify spelling and grammar
B.
to delete irrelevant or offensive posts
C.
to facilitate communication between group members
D.
to ensure that discussions topics are interesting

Answers

A ibahg ninja idea a,c

Francesca wants to create a program that will produce the phrase “Hello, world” on the screen. Which of these functions should Francesca use?

Answers

Answer:

It would be print.

Explanation:

If you want to execute a function it should be print so it will show up in the output box.

Select all the correct answers.

John travels all over the country visiting various clients. He needs to access his documents and services on the go. Which of these technologies
allows him to access documents and software while on the move?

A:cloud computing
B: grid computing
C:mobile computing
D:green computing
E:virtualization

Answers

Answer:

acd

Explanation:

i cant explain

Answer:

A

C

D

Explanation:

Plato

Need answer ASAP!!!!

Answers

Hi,

I tried answering this. Lol. Look at the image.

edhesive assignment 2: room area?

Answers

Explanation:

a, b, c, d, e = input("A ="), input("B ="), input('C = '), input("D = "), input('E = ')

print(float(a*b + sqrt(c**2-(a/2)**2) * a/2 * 0.5))

a, b, c, d, e = input("A ="), input("B ="), input('C = '), input("D = "), input('E = ') print(float(a*b + sqrt(c**2-(a/2)**2) * a/2 * 0.5))

What is program?

The program is an illustration of functions. Functions are groups of code segments that are executed when called or evoked

The calendar program

The calendar program in Python, where comments are used to explain each line is as follows:

#This checks for leap year

def leap_year(y):

if y % 4 == 0:

return 1 else return 0

#This returns the number of days in the month

def number_of_days(m,y):

if m == 2:

return 28 + leap_year(y)

elif m == 1 or m == 3 or m == 5 or m == 7 or m == 8 or m ==10 or m == 12:

return 31

elif m == 4 or m == 6 or m == 9 or m == 11:

return 30

#This returns the number of days left in the month

def days(m,d):

dayList = [0,31,59,90,120,151,181,212,243,273,304,334]

return dayList[m-1] + d

#This returns the number of days left in the year

def days_left(d,m,y):

if days(m,d) <= 60:

return 365 - days(m,d) + leap_year(y) else:

return 365 - days(m,d)

#The main begins here

#This next three lines gets input for date

day=int(input("Day: "))

month=int(input("Month: "))

year=int(input("Year: "))

#This gets the choice from the user

menu=int(input("Press 1 to calculate the number of days in the given month.\nPress 2 to calculate the number of days left in the given year.\nChoice: "))

#This prints the number of days in the month

if menu == 1:

print(number_of_days(month, year))

#This prints the number of days left in the year

elif menu == 2:

print(days_left(day,month,year))

Read more about Python functions at:

brainly.com/question/14284563

#SPJ7

The complete part of the question will be:

Assignment 3: Chatbot

What the code for assignment 3: chatbot Edhesive.

explain what the hexadecimal code in a MAC address represents

Answers

Answer:

An Ethernet MAC address consists of a 48-bit binary value. Hexadecimal is used to identify an Ethernet address because a single hexadecimal digit represents 4 binary bits. Therefore, a 48-bit Ethernet MAC address can be expressed using only 12 hexadecimal values.

product of -6/13 and reciprocal of -7/16 is ____________​

Answers

Answer:

-250/91

Explanation:

Use a calculator

Match the organelles to their functions.
Golgi apparatus
lysosome
smooth endoplasmic reticulum
nucleus
produces lipids and fats
arrowRight
produces lysosomes
arrowRight
digests foreign material
arrowRight
commands other organelles
arrowRight

Answers

Answer:

I. Smooth endoplasmic reticulum.

II. Golgi apparatus.

III. Lysosomes.

IV. Nucleus.

Explanation:

A cell can be defined as the fundamental or basic functional, structural and smallest unit of life for all living organisms. Some living organisms are unicellular while others are multicellular in nature.

A unicellular organism refers to a living organism that possess a single-cell while a multicellular organism has many (multiple) cells.

Generally, cells have the ability to independently replicate themselves. In a cell, the "workers" that perform various functions or tasks for the survival of the living organism are referred to as organelles.

Some examples of cell organelles with their respective functions in all living organisms such as trees, birds, and bacteria include;

1. Nucleus : it controls all the activities taking place in the cell and the synthesis of proteins. Thus, it's the organelle that commands other organelles.

2. Mitochondria : it provides all the energy required in the cell by transforming energy forms.

3. Lysosomes : they are responsible for absorbing materials and breaking the materials taken in by the cells. Thus, it digests foreign material.

4. Chromosomes : they give sets of instructions for the synthesis of products.

5. Ribosomes : they are involved in the build up of proteins.

6. Smooth Endoplasmic Reticulum : this is where the ribosomes perform their tasks. Thus, it produces lipids and fats.

7. Cytoskeleton : they help to maintain and support the shape of the cells.

8. Vesicles : they ensure proteins are properly transported to the right and exact location.

9. Golgi apparatus : it prepares the protein for export by chemically tagging them. Also, this organelle produces lysosomes.

10. Cell membrane : is the wall of the cell and typically controls what leaves and enters the cell.

Answer:

Golgi Apparatus matched to lysosomes

Lysosomes matched to digesting foreign material

smooth endoplasmic reticulum matched to produces lipids and fats

Nucleus matched to commands other organelles

Explanation:

The golgi apparatus produces the lysosomes

the lysosomes are in the cell to digest things to smaller and more usable for the cell

the smooth endoplasmic reticulum produces the lipids and fats

the nucleus is the biggest organelle in a cell and commands every other organelle. It also has the DNA of the cell.

I hope I was helpful!

Have a good day.

Computers are able to think like human beings true or false?

Answers

Answer:

False. Cuz they work the way they are programmed, which can be like a human being, but is not exactly it. They are built this way so they work as what the user thinks. (e.g. being sure to delete a file/recommending what the user might like)

make me brainliestt :))

Why do people say badass

Answers

Answer:

ummm....

Explanation:

maybe they just think it sounds cool?

Badass is defined as something or someone cool or something or someone tough, rebellious or aggressive. Like for an example “yo look at my new motorcycle doesn’t it look badass (cool”

Look at the following partial class definition, and then respond to the questions that follow it:


public class Book


{


private String title;


private String author;


private String publisher;


private int copiesSold;


}


a. Write a constructor for this class. The constructor should accept an argument for each of the fields.


b. Write accessor and mutator methods for each field.


c. Draw a UML diagram for the class, including the methods you have written.

Answers

Solution :

a.

public Book([tex]$\text{String title}$[/tex], String author, [tex]$\text{String publisher}$[/tex], int [tex]$\text{copiesSold}$[/tex]) {

 this.[tex]$\text{title}$[/tex] = [tex]$\text{title}$[/tex];

 this.[tex]$\text{author}$[/tex] = [tex]$\text{author}$[/tex];

 this.[tex]$\text{publisher}$[/tex] = [tex]$\text{publisher}$[/tex];

 this.[tex]$\text{copiesSold}$[/tex] = [tex]$\text{copiesSold}$[/tex];

b). [tex]$\text{public String}$[/tex] getTitle() {

 return [tex]$\text{title}$[/tex];

}

[tex]$\text{public void}$[/tex] setTitle([tex]$\text{String title}$[/tex]) {

 this.[tex]$\text{title}$[/tex] = [tex]$\text{title}$[/tex];

}

[tex]$\text{public String}$[/tex] getAuthor() {

 return author;

}

[tex]$\text{public void}$[/tex] setAuthor(String author) {

 this.[tex]$\text{author}$[/tex] = [tex]$\text{author}$[/tex];

}

[tex]$\text{public String}$[/tex] getPublisher() {

 return [tex]$\text{publisher}$[/tex];

}

[tex]$\text{public void}$[/tex] setPublisher(String [tex]$\text{publisher}$[/tex]) {

 this.[tex]$\text{publisher}$[/tex] =[tex]$\text{publisher}$[/tex];

}

public int get[tex]$\text{copiesSold}$[/tex]() {

 return [tex]$\text{copiesSold}$[/tex];

}

[tex]$\text{public void}$[/tex] set[tex]$\text{copiesSold}$[/tex](int [tex]$\text{copiesSold}$[/tex]) {

 this.[tex]$\text{copiesSold}$[/tex] = [tex]$\text{copiesSold}$[/tex];

}

Which statement best describes a database?

Select one:
a. A collection of related tables.
b. Tables that are in sequence.
c. Tables of related information.
d. A collection of tables.

Answers

I think it's a. A collection of related tables

How do we calculate the BMI in python?
the formula is kg/m²

Answers

Answer:

height = float(input("Enter your height in m: "))

weight = float(input("Enter your weight in kg: "))

BMI = weight / (height/100)**2

print(f"You BMI is {BMI}")

Explanation:

The python code for calculating BMI is as follows -

height = float(input("Enter your height in m: "))

weight = float(input("Enter your weight in kg: "))

BMI = weight / (height/100)**2

print(f"You BMI is {BMI}")

Some conditions can also be added such as

if BMI <= 15:

   print("You are underweight.")

elif BMI <= 30:

   print("You are healthy.")

elif BMI <= 40:

   print("You are over weight.")

Other Questions
What led to the rise of totalitarian dictators after World War I?A. The rise of democracy led to free elections around the world.B. There was a need for stronger leadership during World War II.C. Capitalism overtook socialism as the main economic model.D. Widespread economic depression led to political unrest. .,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, Ben walks to the zoo, and then walks to the city park. What is the least number of blocks Ben walked? Match each term to the appropriate definition.-1argues the truth or falsity of a debatable fact or reason2presents cause and effect relationships 3establishes whether the issue or subject of discussion is good or bad4explores the nature of a problem and presents solutions to be implemented---aclaims of factbclaims of causecclaims of valuedclaims of policy(example: 1a, 2d, 4c, etc but actually correct and not random) This story is told from the perspective of anineteenth-century British officer and explorer.How might the story have been different if it hadbeen told from the perspective of someone fromthe twenty-first century?The author might have been less concerned aboutthe impact on the environment.The author might have been less willing to considerthe well-being of the elephants.The author might have suggested using moderntechnology to solve the problem.The author might have provided more insight intothe elephants' attitude. NEED HELP FASTNO LINK ANSWERS Identify the molecule shown by using the correct combination of the following terms:InorganicOrganicHydrocarbonProvide the Chemical Formula for the molecule shown.Identify whether this molecule is a monomer or polymer and explain your answer. Plsss help me, Im so confused!! Brainlist for correct answer Solve the following quadratic functionby utilizing the square root method.y = 25x2 - 100x = +[?] Maintaining high global biodiversity is important to provide ecosystem services to humans. Describe one cultural ecosystem service provided by diverse ecosystems. The heights of the girls on a basketball team are shown in the table.pls hurry the product of gordans age and 4 is 52 Helpppppppppopppppopjompmpnkbkbkbkhhhhhhhhhhhhhhhhhhhhhhhhhhhhghhhghhhhhhhh Solve equation by using the quadratic formula.6x 2x=8 The function graphed to the left is function. The curve has and continues infinitely in one direction. Each y-value is each corresponding x-value. Describe how you can make the line of best fit. Write the approximate slope and y-intercept of the line of best fit. Show your work, including the points that you use to calculate the slope and y-intercept. help me plz im begging :( ANSWER PLZANSWER PLZANSWER PLZANSWER PLZANSWER PLZANSWER PLZANSWER PLZANSWER PLZANSWER PLZANSWER PLZ Please help brainiest to correct answer It rains 7 out of every 10 days.What is the chance of rain on one day? Question 11 ptsWhich sentence is grammatically correct?A Oliver le gustan las frutas.O A Oliver le gusta las frutas.O A Oliver te gustan las frutas.Las frutas gustar a Oliver. True or false The lady or the Tiger, the conclusion is ambiguous since the reader does not know what is behind the door the young man was sent to