in python:
The mode of a list of numbers is the number listed most often. The median of a list of numbers is the value in the middle of the list if the list is arranged in order. For this software solution you will do the following:

Take 10 numbers as input from the user and display the number with the highest mode. If there is a tie, you will need to show all of those numbers.
Your program must create a user-defined function that takes an array of numbers as a parameter and returns the value that appears the most often in the array.
For those same 10 numbers your program must create a user-defined function that takes an array of numbers as a parameter and returns the value which is the median for those numbers.

please help!

Answers

Answer 1

Python can be used to implement central of tendencies such as mean, median and mode using the statistic module

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

#This imports the statistics module

import statistics

#This defines the function that calculates the mode

def calcMode(myList):

   #This prints the mode

   print(statistics.multimode(myList))

#This defines the function that calculates the median

def calcMedian(myList):

   #This prints the median

   print(statistics.median(myList))

#The main method begins here

#This initializes the list

myList = []

#The following iteration gets input for the list

for i in range(10):

   myList.append(int(input()))

#This calls the calcMode method

calcMode(myList)

#This calls the calcMedian method

calcMedian(myList)

Read more about similar programs at:

https://brainly.com/question/25026386


Related Questions

Which of the following is true regarding computer science careers?
A. There are a limited number of jobs in this field.
B. There are not different job types in this field.
C. The number will increase over the next several years.
D. You must be a programmer to work in this field.
(WILL MARK BRANLIEST IF CORRECT)

Answers

Answer: There are several different job types in this field.

Explanation: did the test and got it right

Answer:

A or C!

Explanation:

Im pretty sure its one of those answers. I think its C though! If I'm wrong, please tell me! I just did the test and I forgot if I got it right or not. It wont let me go back in-

- A FLVS student with a 99.91 percent in computer science (Totally not bragging!)

Can you give me three examples of agricultural technology, environmental technology, communication technology, biotechnology, manufacturing technology, construction technology, materials technology, energy and power technology, and nanotechnology? Please help, this is due in 30 mins. I will give you 80 points.

Answers

Answer:

The following outline is provided as an overview of and topical guide to technology: collection of tools, including machinery, modifications, arrangements and procedures used by humans. Engineering is the discipline that seeks to study and design new technology. Technologies significantly affect human as well as other animal species' ability to control and adapt to their natural environments.

The deliberate misuse of computers and networks, _____ use malicious code to modify the normal operations of a computer or network.

Answers

Answer:

Virusus

Explanation:

-

Hope that helps

Find the error in the following code fragment. int a: System.out.print(a):​

Answers

Answer:

If your using java, then its supposed to be "System.out.print("a")"    

Explanation:

its supposed to have quotations

which route would be used to forward a packet with a source ip address of 192.168.10.1 and a destination ip address of 10.1.1.1?

Answers

Considering the available options, the route that would be used to forward a packet with a source IP address of 192.168.10.1 and a destination IP address of 10.1.1.1 is "O 10.1.1.0/24 [110/65] via 192.168.200.2, 00:01:20, Serial0/1/0"

What is Route in IP address?

IP routing generally transmits packets from one network to another host on another remote network.

The process of IP routing involves evaluating routing tables to specify the following hop address of the packet that should be sent.

IP Routing in this case

Considering the IP address in the question, the best match is the route in the routing table that contains the highest number of far-left matching bits.

Hence, in this case, it is concluded that the correct answer is "O 10.1.1.0/24 [110/65] via 192.168.200.2, 00:01:20, Serial0/1/0"

The available options are:

C 192.168.10.0/30 is directly connected, GigabitEthernet0/1

S 10.1.0.0/16 is directly connected, GigabitEthernet0/0

O 10.1.1.0/24 [110/65] via 192.168.200.2, 00:01:20, Serial0/1/0

S* 0.0.0.0/0 [1/0] via 172.16.1.1

Learn more about IP Routing here: https://brainly.com/question/6991121

python Better Password Prompt
Write a program that uses a loop and a half to prompt a user for a password. You should prompt the user for the password. If they get it correct, break out of the loop. If they don’t get it correct, you should give them an error message and ask again.

Sample Run:

Enter password: 123123
Sorry, that did not match. Please try again.
Enter password: password
Sorry, that did not match. Please try again.
Enter password: CODEHS
Sorry, that did not match. Please try again.
Enter password: abc123
You got it!
Note: You need to set SECRET to abc123 to run the tests

Answers

We use an indefinite while loop to keep the user entering the password. In the loop, we use if-else structure to check the password. If it is "abc123", the password is found and stop the loop using a break. Otherwise, the password is not correct. Note that since we do not use any break statement in the else part, the loop will continue asking for the input

Comments are used to explain each line of the code.

You may see the output in the attachment.

#set the SECRET

SECRET = "abc123"

#create a loop

while True:

   

   #ask the user to enter a password

   password = input("Enter password: ")

   

   #check if the password is equal to SECRET

   # if it is, state that password is correct and stop the loop using a break

   # otherwise, state that password is not correct

   if password == SECRET:

       print("You got it!")

       break

   else:

       print("Sorry, that did not match. Please try again.")

Here is another question related to the loops:

https://brainly.com/question/25694810

What does it mean by does the author create an emotional connection toward the readers?

(Emotional connection reading definition)

Answers

Answer:

the author makes an emotional connection between you and the character

Explanation:

short version:you feel the characters emotion

Read each question below. Then, using the drop-down menus, decide if it represents the purpose, construction, or support aspect of choosing a website host.
Will the website be built by a programmer at a company?
What type of content will be on the website?
Will the website be used to share family pictures or as a professional site for posting news?
Will customers be making secure transactions on the website?
How extensive of a control panel, or location of login and website control, will be needed?

Answers

Answer:

ConstructionPurposePurposeSupportConstruction

Explanation:

Will the website be built by a programmer at a company? construction

What type of content will be on the website?  purpose

Will the website be used to share family pictures or as a professional site for posting news?  purpose

Will customers be making secure transactions on the website? support

How extensive of a control panel, or location of login and website control, will be needed?  Construction

__________________________________________________

Lenovo Diagnostics - UEFI Version is preloaded into the BIOS on all Lenovo products except for ____________________.

Answers

Based on the information given, it can be noted that Lenovo Diagnostics - UEFI Version is preloaded into the BIOS of their products except the Ideapad models.

It should be noted that Lenovo diagnostic tools are used primarily to diagnose any hardware problems that a computer may have.

Lenovo diagnostic tools are available as a Bootable or a downloadable package. Lenovo Diagnostics - UEFI Version is preloaded into the BIOS of their products except for the Ideapad models.

Learn more about Lenovo on:

https://brainly.com/question/25397058

To gain access to the functions and variables of a library module, use a(n) _________ statement. A. import B. export C. global D. library

Answers

Answer: import

Explanation:

what information about a cisco router can be verified using the show version command?

Answers

- the routing protocol version that is enabled.
- the value of the configuration register.
- the operational status of serial interfaces.
- the administrative distance used to reach networks.

Pomelo and Calamansi Trees are type of plants that suitable in this method.A. Cleft-Grafting B. Marcotting C. Layering D. T-Budding

Answers

Pomelo and Calamansi Trees are type of plants that suitable in this method.A. Cleft-Grafting

Can someone please help

Answers

Answer:

Explanation:

la reponse est le premier et le 3 eme pointcar en effet le premier point c est logiqye e le 2 e aussi  

The ________ font is applied to titles and the ________ font is applied to all other text in slides.

Answers

Answer:

cursive on tile and original micky fount in the storybook

Explanation:

almost every school or university has a or council or organization that works towards provision of providing education training and consultation

Answers

Answer:

In education, the term stakeholder typically refers to anyone who is invested in the welfare and success of a school and its students, including administrators, teachers, staff members, students, parents, families, community members, local business leaders, and elected officials such as school board members, city ...

Explanation:

Emily is deciding whether to buy the same designer jacket her friends have. The jacket is much more expensive than a similar one from a lesser-known brand. Which questions should she consider before she buys the jacket? Check all that apply. Is advertising influencing her? What are her motivations? Has she compared prices? Is she buying at the right time? Will her sister like the jacket too?

Answers

Is advertising influencing her?
What are her motivations?
Has she compared prices?
Is she buying at the right time?

The questions that she should consider before she buys the jacket are:

Is advertising influencing her?What are her motivations?Has she compared prices?Is she buying at the right time?

What  is buying?

The act of buying an item is known to be acquiring a specific possession, or ownership/ rights to the use that thing or services. This can only be done through payment that is mostly based on the use of money :

Note that before getting something, one must consider other things such as  prices and the reasons for buying the item before one can go ahead to purchase that thing.

Learn more about buying from

https://brainly.com/question/25745683

please help
Felicity wants to take her DSLR camera on vacation, but she can take only one bag. Why is taking a DSLR camera with her not a good idea?

Answers

The reason why taking a DSLR camera with her is not a good idea is because a DSLR camera and its accessories usually require their own bag and can be heavy.

A digital single-lens reflex (DSLR) camera is being used by photographers especially for shooting stunning landscapes or portrait images. DSLR cameras are durable and can be used with a variety of lenses and attachments, they have a long battery life, and provide faster shooting speeds with better autofocus.

Therefore, the reason why taking a DSLR camera with her is not a good idea is because a DSLR camera and its accessories usually require their own bag and can be heavy, whereas she can only take one bag with her.

Learn more about digital single-lens reflex (DSLR) camera here:

https://brainly.com/question/13972212

Answer:

I got the answer here:

Explanation:

when demonstrating 2022 altima’s parking assistance, what steering feature should you mention when pointing out how easy the vehicle is to steer at low speeds?

Answers

Based on automobile technology, when demonstrating 2022 Altima's parking assistance, the steering feature one should mention when pointing how easy the vehicle is to steer at speed is "the Cruise Control w/Steering Wheel Controls."

What is Cruise Control w/Steering Wheel Controls?

The Cruise Control w/Steering Wheel Controls allow the driver or the user to adjust the car's speed to the present rate, either lower or higher.

The Cruise Control feature assists in providing additional time and distance between the car and another one in front when parking or highway.

Hence, in this case, it is concluded that the correct is "the Cruise Control w/Steering Wheel Controls."

Learn more about the same parking assistance in an automobile here: https://brainly.com/question/4447914

The temperature at 8 AM was 44°F and at noon it was 64°F. what was the percent of change from 8 AM to noon?

Answers

Answer: 45.45%

Explanation:

Time Passed: 4 hours

Difference in Temperature: 20°F

20/44 = .45454545454545

.45454545454545*100 = 45.45%

Correct me if I am incorrect.

how does digital and hybrid computers differ in storage​

Answers

Digital computers perform functions like mathematical, complex calculations, media streaming, etc. While hybrid computers work with the duo combination of analog (analog Quantities like the voltage, temperature) and digital (mathematical functions, complex calculations, media streaming) computers at the same time.

linnea is researching a type of storage that uses a single storage device to serve files over a network and is relatively inexpensive. what type of storage is linnea researching?

Answers

Considering the situation described above, the type of storage Linnea is researching is "NAS."

What is NAS in storage?

NAS is an acronym for Network Attached Storage. It is used as a file-level computer data storage server attached to a computer network.

NAS is usually applied in serving the files over Ethernet. It is cheaper and can be set up quickly.

Different Components of NAS.

Components of Network Attached Storage include the following:

CPUNetwork Interface CardsOperating SystemNFS and CIFS protocol, etc.

Hence, in this case, it is concluded that the correct answer is NAS

Learn more about NAS here: https://brainly.com/question/25705115

hellowsss im bord :>
add my media pls its lil bunny(bunni) shoty (shawty)

Answers

Answer:

Bold

Italicized

Underlined

BOLDLY UNDERLINED

Okay! I will! ;)

I adore rabbits too!

I even made a book about them!

(It's not published tho :( )

Do you want to run a listing to see files that were used by the last access date is date does not display by default which command would you use to find additional properties of the files to reference.

Answers

Considering the situation and the computer application, the command you would use to find additional properties of the files to reference is "Get-childitem | get-member "

What is Get-childitem command?

Get-childitem command in computer applications is used to get the items in specific locations.

Get-childitem command can be used to gets the items inside a file container, usually referred to as child items.

Similarly, the Get-member command used to gets the members, the properties, and methods of files.

Hence, in this case, it is concluded that the correct answer is Get-childitem | get-member

Learn more about Computer commands here: https://brainly.com/question/25243683

If you know that a file for which you are searching starts with the letters MSP, you can type ____ as the search term.

Answers

Map I think it is the answer

congress are smart becuase.....

Answers

Answer:

If we are talking about government then they are smart bc of there two house policies, both are equal yet super unique. They make sure each state has an equal voice in the senate.

What are the steps for adding a Watch Window?
Select the cell to watch

Answers

Answer:

How to The Watch Window in Excel

Select the cell you want to watch.

Click the Formulas tab.

Click the Watch Window button. ...

Click the Add Watch. ...

Ensure the correct cell is identified and click Add.

Scroll to the area of the worksheet where you need to add or update values.

Update the cell values.

Which of the following is an example of an incremented sequence?

A.
1, 2, 3, 4

B.
4, 3, 2, 1

C.
North, South, East, West

D.
A, B, C, D

Answers

Answer:

A

Explanation:

When a sequence number is genrated, the sequence is incremented independent of the transaction committing or rolling back.

What is data communication.. ​

Answers

What is data communication?

The exchange of data between source and a receiver by way of transmission media such as a wire cable

Hope this helps you!!

How does the computer help me with school work

Answers

you are able to mark your answers on tests and save your work, while on paper, you get it taken away from you.
A computer can be helpful in completing your schoolwork by giving you access to countless sources of information, while educational games and programs can make learning fun. You'll also easily be able to submit neat, organized papers by using the computer's word processing, spreadsheet and presentation programs.

can’t be opened because apple cannot check it for malicious software.

Answers

Answer:

try to reset  your computer.

Explanation:

Other Questions
True or false: A person's family is what qualified them for a government job during the Han dynasty. what is an example of force pair Identify an equation in point-slope form for the line parallel to y = -2/3x+8 that passes through (4, -5). A. y-4=(x+5)B. y+5=2/3 (x-4) C. y+5 = 3/2(x-4)D. y-5=-2/3(x + 4) Pick the correct answer choice! Please.Osmosis is when:A) Water molecules move from a low concentration, to a low concentration, with the assistance of travel proteins.B) Salt molecules move from a high concentration, to a low concentration, with the assistance of travel proteins.C) Water molecules move from a high concentration, to a low concentration, with the assistance of travel proteins.D) Salt molecules move from a low concentration, to a low concentration, with the assistance of travel proteins. 2 examples of non fossil fuels ? what triangle does the pythagorean theorem relate to The sum of two numbers is 30. Their difference is 12. Use substitution to solve a system of equations to solve for the two numbers. Everyone does something different. Underline the correct form of the verb.1. Anastasia (corre/corres) todas las maanas.2. Yo (comes / como) un sandwich en la cafeteria.3. Mis amigos (hacemos hacen) mucha tarea.4. Penlope y yo (leen / leemos) un libro en la biblioteca.5. (Bebes / Beben) t leche en el desayuno? 22. A baker is planning to make a batch of sugar cookies for his bakery. For one large batch of cookies, the recipe calls for 6 eggs and 4 cups of sugar. The ratio for this 1 batch is 6 to 4 6:4 or The baker has to make 5 batches of cookies. How many eggs and cups of sugar she 4 will need to make these 5 batches. 6 22. eggs 23. cups of sugar 24. The Ratio in word form for the 5 batches of cookies: Calculate the number of moles in 1.622 grams of boron. Tina wants to sew a piece of fabric into a scarf in the shape of an isosceles triangle as shown in the accompanying diagram what are the values of x and y ? bag contains 8 blue marbles and 5 pink marbles. What is the ratio of pink marbles to blue marbles? The entire project just _____due to our mistake. A.blew up. B.blown up. C.blowed up. D.blow up ANSWER FAST PLZ I REALLY NEED HELP :(Mr. Wiley averages 12 mph when his boat is in still water. One day he goes 12 miles upstream and the same distance back. The round-trip takes two hours and 15 minutes. What is the speed of the current on that day? I really need help if u want to help me I will be ur best friend lol help me pls girls and boys! also, i neeeeeed you to not just use this for points, i actually need help ya'll Liquidity is a characteristic of money.What is the definition of liquidity?A. how quickly the money is spentB. the availability of money for conversion intocurrencyC. how much interest the money earns per year I need help bro please I love you convert active to passive voice.we welcomed them whole heartly. What can you learn about characters based on their viewpoints andreactions to situations? a/6 is greater than 1