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
Please help I will mark brainliest ⚡️⚡️⚡️⚡️
Trava [24]

Answer:

school hours!

Explanation:

8 0
3 years ago
A user is claiming a host can be reached via the IP address but not through the name. What should a technician do first to resol
bagirrra123 [75]

Answer:

Add an entry to the HOSTS file

Explanation:

A file that is used to add the host name along with their IP addresses is called Host file. In this file all the IP addresses are mapped with their respective host names. Whenever some user tries to access some website, he may use the name of website to access it. The website have both name and IP address of the server, both of these information stored in host file. On GUI the user only see the information of Host name.

If some user only access the IP address of the website instead of the host name. The technician should add the name and IP address of the host in Host file. He should follow the following steps to resolve the problem.

  1. Access the host file by following the given path of file in Windows operating system.
  2. open the host file
  3. edit the file with new host name and relevant IP address
  4. save the changes

3 0
3 years ago
The 3 parts of the CPU are
katrin2010 [14]

Central Processing Unit

Arithmitic Logic Unit

Control Unit


3 0
3 years ago
Read 2 more answers
There are many careers within the IT industry. _____ are responsible for organizing a company's data, making sure all the data i
devlian [24]
C. database administrators are responsible for organizing a company's data making sure all the data is accurate' available' and secure
5 0
3 years ago
Match the parts of the website address with its correct explanation. http://www.usa.gov/Agencies/federal.shtml
storchak [24]

HTTP means Hyper Text Transfer Protocol underlying protocol used by the World Wide Web(www).

usa is the server name which is used address in the DNS record

.gov is the Domain names which  are used to identify more then one IP addresses

Agencies/federal.shtml a directory is a collection of file resources also called the resource ID.

6 0
3 years ago
Read 2 more answers
Other questions:
  • What type of attack intercepts communication between parties to steal or manipulate the data?
    13·1 answer
  • What is the key benefit of using RAM in a computer?
    12·1 answer
  • If $hourlyWage contains the value 10.00 and $hoursWorked contains the value 20, what value will $bonus contain after the followi
    11·1 answer
  • 3. Which one of the following statements is correct? _____ variables are those whose storage bindings are created when their dec
    12·1 answer
  • When security issues are a special concern, companies want to take extra steps to make sure that transmissions can’t be intercep
    7·1 answer
  • IDE devices require the use of a controller mounted on the motherboard. True False
    14·2 answers
  • When working with arrays, most programming languages perform ________, which means they do not allow programs to use invalid sub
    5·1 answer
  • Identify some advantages of using Excel over lists, paper files, or simple word documents? Describe some disadvantages of using
    15·1 answer
  • If, after fetching a value from memory, we discover that the system has returned only half of the bits that we expected; it is l
    8·1 answer
  • Which of the following is a characteristic of vector graphics?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!