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
Margaret [11]
3 years ago
9

The function below takes a single parameter number_list which is a list that can contain integers and floats. Complete the funct

ion to return the integer from the provided list that is the largest. There are two recommended approaches for this function. You could either filter out just the integers and use Python's built-in max function, or you could use the find best pattern and only consider list elements that are integers as potentially being the best.
Computers and Technology
1 answer:
Andreas93 [3]3 years ago
6 0

Answer:

  1. def getLargest(number_list):
  2.    new_list = []
  3.    for x in number_list:
  4.        if(isinstance(x, int)):
  5.            new_list.append(x)
  6.    largest = max(new_list)
  7.    return largest  

Explanation:

Firstly, create a function <em>getLargest()</em> that take one input parameter, <em>number_list</em>.

The function will filter out the float type number from the list by using <em>isinstance() </em>method (Line 5). This method will check if a current x value is an integer. If so, the x value will be added to <em>new_list</em>.

Next, use Python built-in <em>max</em> function to get the largest integer from the <em>new_list </em>and return it as output.

You might be interested in
Linda is training to become a certified network design expert and consultant. While researching about the process of cellular ra
mel-nik [20]

Answer:

a. The cell tower forwards the call to the wireless provider's Mobile Telephone Switching Office

Explanation:

When a cell phone user begins to make a call, it is picked up by the cell tower located in the cell in which the cell phone is located and that belongs to the user's wireless provider. The next step in this process is that the cell tower forwards the call to the wireless provider's Mobile Telephone Switching Office.

8 0
3 years ago
Paul is a baker who wants to improve his recipe for muffins because they turn out with a greasy flavor. What ingredient should h
Sergio039 [100]
Butter to Margarine

Cakes baked with butter usually always turns out to be greasy and heavy.

Hope this helps, good luck! (:
3 0
3 years ago
Read 2 more answers
Information that has been analyzed and refined so that it is useful to policymakers in making decisions; specifically, decisions
denis-greek [22]

Answer:

Intelligence

Explanation:

Intelligence is the product resulting from the collection, collation, evaluation, analysis, integration, and interpretation of collected information. It is a specialised information product that provides an adversary with information required to further its national interests. One of the most important functions of intelligence is the reduction of the ambiguity inherent in the observation of external activities.rations.  

In most cases, the development of an intelligence product involves collecting information from a number of different sources. In some cases, information may be disseminated immediately upon collection based upon operational necessity and potential impact on current operations.

Strategic intelligence provides policy makers with the information needed to make national policy or decisions of long-lasting importance. Strategic intelligence collection often requires integrating information concerning politics, military affairs, economics, societal interactions, and technological developments. It typically evolves over a long period of time and results in the development of intelligence studies and estimates.

Operational intelligence is concerned with current or near-term events. It is used to determine the current and projected capability of a program or operation on an ongoing basis and does not result in long-term projections. Most intelligence activities support the development of operational intelligence.

8 0
3 years ago
How do i add a header or footer to powerpoint presentation
BartSMP [9]
When you have you presentation open, go to Insert > Header & Footer.

7 0
3 years ago
Which of the following is NOT one of the responsibilities of the Federal Reserve?
Ilya [14]
To pay are taxes for every one

4 0
3 years ago
Read 2 more answers
Other questions:
  • What tool listed below will be the most useful for developing presentation content?
    10·2 answers
  • Think about the five steps to writing an algorithm. Why is each step necessary? Why is it important to be precise when writing c
    15·1 answer
  • This is the most flexible way to create a query. Used to create queries that displays only the records that match criteria enter
    12·1 answer
  • Describe how one can change row and height
    6·1 answer
  • Write a Python program to balance a checkbook. The main function needs to get the initial balance, the amounts of deposits, and
    5·1 answer
  • Do some Internet research on security vulnerabilities associated with SCADA and digital industrial control systems. Summarize th
    13·1 answer
  • In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in
    9·1 answer
  • Of the following field which would be the most appropriate for the primary key in a customer information table?
    5·1 answer
  • Knowledge Spark, a school with no current job openings, wants to change to a completely virtual environment and offer classes to
    10·1 answer
  • Which website citation is correctly formatted according to MLA standards?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!