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
Calculate the average high and low in python code for beginners pls
Nikolay [14]

Answer:

There are two ways to find the average of a list of numbers in Python. You can divide the sum() by the len() of a list of numbers to find the average. Or, you can find the average of a list using the Python mean() function

Explanation:

3 0
3 years ago
Which is usually the smallest computer?
WITCHER [35]
I would have to say it would be a PDA, because they generally arent much bigger than a cell phone. at least mine is pretty small anyway. there are certain brands that make larger ones almost the size of a tablet, but in general terms, PDAs are usually pretty small. hope this helps.
7 0
2 years ago
What should you do when an error message pops up on the screen?
Shtirlitz [24]
The best thing to do when an error message appears when it is not supposed to, as in if you are blocked by an administrator and it appears then its supposed to, it is best to contact someone who can investigate whether or not something is happening to your computer. That could be a parent, if they are good with computers, or just tech support at a store, provided they also know computers. Most of the time your computer just makes a mistake so nothing to worry about, but make sure to have it checked just to be sure. 
7 0
3 years ago
This rights protected document cannot be opened because the rights management feature has been disabled on your machine by Polic
erastovalidia [21]

This rights protected document cannot be opened because the rights management feature has been disabled on your machine by Policy is known to be an error message.

<h3>What is the error message about?</h3>

The Error message above is known to be one that shows that  your IT department has made a group policy in one's company's Active Directory. It is known to be one that tends to disables the use of ADRMS (Rights Management Feature) in all to all users.

Note that in the case above, one need to ask your IT department to be able to disable or make changes to the group policy so that it will not apply to the users who are said to require access secured Microsoft Office documents in any of Ansarada Rooms.

Another option is to look at documents off the network with the use of a personal computer or a mobile phone.

Hence, This rights protected document cannot be opened because the rights management feature has been disabled on your machine by Policy is known to be an error message.

Learn more about  error message from

brainly.com/question/25671653

#SPJ1

4 0
2 years ago
Briefly describe the software quality dilemma in your own words
Dahasolnce [82]

Answer:

 software quality dilemma is a situation where there is confusion regarding what should we prioritize : a good quality work or a fast paced work. In software development , many a times there will be deadlines to achieve, in such cases software quality dilemma is bound to occur. A developer would have to choose between writing and optimized and well commented code or just get the job done without proper optimized or reviews. In same lines, many companies have to decide between regular reviews and expert opinions of a product for good software quality or bypass them to meet budgets and deadlines.

6 0
3 years ago
Other questions:
  • When recording data on a multiple-disk storage system, should we fill a complete disk surface before starting on another surface
    6·1 answer
  • Ryan wants to ensure that all the words in this document are evenly spaced so that they look neat and readable . Which option in
    12·1 answer
  • In which type of land contract does the seller earn interest on the difference between what the seller owes on an existing loan
    14·1 answer
  • What is encyclopedia. Com considered to be?
    14·1 answer
  • Exceptions can be handled in all of these ways except:
    6·1 answer
  • A server, also called a(n) _______________, operating system is a multiuser operating system because it controls a central compu
    6·1 answer
  • The owner of a candle shop has asked for your help. The shop sells three types of candles as shown below:
    9·1 answer
  • Can someone help me with this pls
    5·2 answers
  • Edhesive 7.6 lesson practice python
    11·1 answer
  • Price of ETH coin right now?<br> Don't answer if u don't know.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!