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
Nadusha1986 [10]
3 years ago
9

In python:

Computers and Technology
1 answer:
egoroff_w [7]3 years ago
8 0

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:

brainly.com/question/25026386

You might be interested in
The function below takes two arguments: a dictionary of strings (keys) to integers (values) a_dict and a list of strings key_lis
vitfil [10]

Answer:

  1. def getData(a_dict, key_list):
  2.    result = []
  3.    for key in key_list:
  4.        result.append(a_dict[key])
  5.    
  6.    return result  
  7. result = getData( {"puffin": 5, "corgi": 2, "three": 3} , ["three", "corgi"])
  8. print(result)

Explanation:

Let's define a function <em>getData() </em>with two parameters,<em> a_dict </em>and <em>key_list</em> as required by the question (Line 1).

Since the function is to return a list of associated values of dictionaries, a new list,<em> result</em>,  is declared and initialized with empty values (Line 2).

Next, use for-loop to traverse through every string in the input <em>key_list </em>(Line 4) and use the traversed key to address the value in the<em> a_dict </em>and add it to the <em>result</em> list (Line 5)

At last, return the <em>result </em>list as output (Line 7)

We can test the function using the test case from the question and we shall see the output as follows:

[3, 2]

8 0
3 years ago
In the circuit shown in the figure above, what will happen when switches S1 and S3 are both closed? 
sp2606 [1]

Well, ya see, we need to have the picture of the circuit.

8 0
3 years ago
QUESTION 9
bixtya [17]

Alex if he wants to center the title and his name on his cover page, he has to press centered.

<h3>What are  cover page?</h3>

Cover pages is known to be the page that is made up of the title of sny article, books etc. It also include the name of your school, course name, etc.

Therefore, Alex if he wants to center the title and his name on his cover page, he has to press centered so as to be in the middle top of the document.

Learn more about cover page from

brainly.com/question/3602860

#SPJ1

6 0
2 years ago
One example of a Microsoft Store app is Select one: a. Photos. b. Paint. c. File Explorer. d. Notepad.
amid [387]

Answer:

b. Paint

Explanation:

Paint was one of Microsoft's application that allowed users to draw basic diagrams and visual representation of objects. Microsoft Paint was discontinued as an addition in the latest versions of Windows, however the app is available for download from Microsoft Store App. Photos is an application of Apple, whereas File Explorer and Notepad are default applications of Windows operating system.

3 0
3 years ago
Using Python code.
Alika [10]

Answer:

def nametag(first_name, last_name):

return("{} {[0]}.".format(first_name, last_name))

print(nametag("Jane", "Smith"))

# Should display "Jane S."

print(nametag("Francesco", "Rinaldi"))

# Should display "Francesco R."

print(nametag("Jean-Luc", "Grand-Pierre"))

# Should display "Jean-Luc G."

Explanation:

First you must think about that the question ask about the first letter for last_name, remember [0] is the first letter not [1], the other part is about format function and its order

8 0
3 years ago
Other questions:
  • Annie is a nutritionist. She is conducting seminars about following a healthy diet in various offices. Annie adds a picture of f
    14·2 answers
  • Write a function that iteratively appends random 1's and 0's to an array to form a binary number. The function returns the binar
    13·1 answer
  • ____ is the use of networking technology to provide medical information and services.
    14·1 answer
  • The most common types of utility programs fall into these categories. accessibility calculation communication data entry enterta
    6·2 answers
  • What is the output of the following program when the method is called with 4?
    11·1 answer
  • A user's computer will not boot. A technician notices four indicator lights on the backside of the
    8·1 answer
  • Allie is working on the development of a web browser and wants to make sure that the browser correctly implements the Hypertext
    7·1 answer
  • Professor Gig A. Byte needs to store text made up of the characters A with frequency 6, B with frequency 2, C with frequency 3,
    10·1 answer
  • Which of the following is a hand-drawn animation that takes a large amount of time to complete?
    5·1 answer
  • Write a program that prompts the user to enter a series of numbers between 0 and 10 asintegers. The user will enter all numbers
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!