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
To rearrange the data on your hard disk so your computer can run more efficiently, you use ____.
Ratling [72]
A disk optimization program, but they're probably looking for defragmenting program.
5 0
3 years ago
In Super Mario 64, a character called Lakitu follows Mario around on a cloud, filming him with a camera as though he were shooti
ella [17]

Answer:

A second person prespective

Explanation:

6 0
3 years ago
Read 2 more answers
The device that concerts one type of signal to another is what​
chubhunter [2.5K]

Answer:

Transducer is a type of device that converts one type of signal into another.

6 0
3 years ago
Write the name of the tab, command group, and icon you need to use to create a bulleted list.
Elden [556K]

Answer:

place your cursor or highlight the text where you wish to insert a bulleted list. Under the [Home] tab in the “Paragraph” section, click the [Bullets] drop-down menu. Choose a bullet style or select "Bullets and Numbering” to create a customized bullet style.

4 0
3 years ago
gven an IP address and mask of 192.168.12.0/24, design an IP addressing scheme that satisfies the following requirements. Subnet
Reika [66]
Uh 69 +23= 92
Hope this helps :)
8 0
3 years ago
Other questions:
  • Which of the following applications can be used as a data source for a Microsoft® Word® mail merge? A.Outlook Contacts B.Microso
    9·2 answers
  • Create a program that reads words.txt (link near top of our home page) in order to: determine the length of the longest word(s)
    14·1 answer
  • In a "block" containment strategy, in which the attacker's path into the environment is disrupted, you should use the most preci
    15·1 answer
  • In ssl/tls, a specific set of protocols that a particular cryptographic system will use to provide protection is called a ______
    5·1 answer
  • To increase the view of a document on the screen, use the _____. View icon Zoom slider full-screen reading boldface font
    9·1 answer
  • Malcolm is part of a team developing a new smartphone app to track traffic patterns. Because team members are located throughout
    12·1 answer
  • Select the correct answer. What has enabled engineers to design slim and sleek television sets? A. using Nipkow disks B. increas
    7·1 answer
  • If you want a user to actively participate in an online activity, create a web ______________.
    12·2 answers
  • True or false? Compared to verbal language a shot is like a word
    12·1 answer
  • 17.8.1: Writing a recursive math function. Write code to complete raise_to_power(). Note: This example is for practicing recursi
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!