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
photoshop1234 [79]
3 years ago
11

Define the function max2 that takes two integers as arguments and returns the largest of them. Then define the function max_list t

hat returns the largest of the elements in a nonempty list of integers by calling max2
Computers and Technology
1 answer:
Serga [27]3 years ago
6 0

Answer:

def max_list(a):

   return max(a)

def max2(a,b):

   return max(a,b)

s=max2(2,3)

print('max of two number is:')

print(s)

a=[1,2,3,4,5,6,7,8,9,10]

max_in_list = max_list(a)

print('\n max element in whole list is:')

print(max_in_list)

Explanation:

Above program is written in python:

Function max2 accept two parameters and return one which is greatest of both and funtion max_list accept a parameter list and returns the greatest number in list.

Note: take care of indentation of function while pasting this code on your compiler or ide

You might be interested in
The spreadsheet below shows a list of fruits with their calorie count, grams of sugar, dietary fiber, and protein. Which set of
dangina [55]

Answer:

Filter Calories by over 100 calories, and sort Sugar in descending order.

Explanation:

4 0
2 years ago
You can invoke or call a method from another program or method. When methods must share data, you can pass the data into and ret
san4es73 [151]

Answer:

1. You can invoke or call a method from another program or method: TRUE

2. When methods must share data, you can pass the data into and return the data out of methods: TRUE

3. A method could be called using any numeric value as an argument, whether it is a variable, a named constant, or a literal constant: TRUE

Explanation:

4 0
3 years ago
What are invoices? A. Documents that convey a company's liabilities B. Documents that convey how much a company was earning and
grandymaker [24]
<span>C. Documents that convey buyers, sellers, and purchases made</span>
5 0
3 years ago
Read 2 more answers
Explain how data structures and algorithms are useful to the use of computer in data management<br>​
laiz [17]

Answer:

programmers who are competent  in data  structures and algorithms  can easily perform the tasks related  to data processing ,automated reasoning ,or calculations . data structure and algorithms  is significant  for developers  as it shows their problems solving abilities amongst the prospective employers .

5 0
2 years ago
To remove white space, double-click this icon.
sweet [91]
Follow these steps:<span>Click the Microsoft Office Button, and then click Word Options.
In the left pane, click Customize.In the Choose commands from list, click All Commands.<span>
Click White Space Between Pages, click Add, and then click OK.
The White Space Between Pages option will appear on the Quick Access Toolbar.</span></span>(google)
I hope I answered your question!
4 0
3 years ago
Other questions:
  • Assume you have a sorting algorithm that you can use as a black box. Use the sorting algorithm to sort the input list. Now write
    10·1 answer
  • SELECT vendor_name, COUNT(*) AS number_of_invoices, MAX(invoice_total - payment_total - credit_total) AS balance_due FROM vendor
    15·1 answer
  • Which is the correct process for attaching a file?
    12·1 answer
  • Write an SQL statement to list the Name of employees who have worked on a property in New York .
    7·1 answer
  • Discuss a situation in which you might want to use a floating-point number with a fractional part for a loop control variable. W
    5·1 answer
  • PLEASE HELP!<br> How do you "brainliest" an answer?
    13·2 answers
  • 1. Write a recursive method to determine if a character is in a list of characters in O(logN) time. Mathematically prove (as we
    13·1 answer
  • Which question about whale sharks is nonscientific?
    11·2 answers
  • Write a program that will read two floating point numbers (the first read into a variable called first and the second read into
    13·1 answer
  • When hacking a website to test a secure connection and ensure internet safety, what is a good way to check the coding of the web
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!