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
What is the best way to pay for college?
Virty [35]

Answer:

I think it would be Federal student loans if I am sure sorry if you get it wrong.

Explanation:

3 0
3 years ago
Read 2 more answers
HELP!!!!!!!
Savatey [412]

Answer:

mouse - input

printer - output

keyboard - input

speakers - output

headset - both

6 0
3 years ago
Today you will be researching three forms of technology.
Mamont248 [21]

Answer:

why

Explanation:

4 0
3 years ago
What happens when you press Ctrl Alt Delete twice?
Iteru [2.4K]
The same thing as if you do it once
6 0
3 years ago
Low-level programming languages are considered closer to human languages, making them easier for programmers to learn and use.
zubka84 [21]
I think the answer is True I hope it helps
4 0
3 years ago
Other questions:
  • How can i do a back up on one computer and save it to the hard drive in another computer without it being seen by others on the
    9·1 answer
  • What are the Positive and negative sites of the internet
    14·1 answer
  • Mr. Olgesandravich is proctoring students working at their own pace in an online class. He is generating a spreadsheet that show
    15·1 answer
  • Options to rotate cells in excel are available using the _____ button in the alignment group on the home tab.
    10·1 answer
  • Indenting the start and finish of segments
    8·2 answers
  • In file hashing, a file is read by a special algorithm that uses the value of the bits in the file to compute a single number ca
    13·1 answer
  • A difference between crt monitors and flat-panel displays is that most flat-panel displays use digital signals to display images
    8·1 answer
  • In which of the security mechanism does the file containing data of the users/user groups have inbuilt security?
    6·1 answer
  • Define a new class Fighter that inherits from Spaceship. Add a variable property weapon that defaults to an empty string and a v
    14·1 answer
  • Describe two different examples of potential conflicts, and explain why these conflicts can have a negative impact on
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!