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
Most of the Desktop games contain a backdoor used to test and update the game.
sveta [45]

A backdoor is a typically covert method of bypassing normal authentication or encryption in a computer, product, embedded device (e.g. a home router), or its embodiment (e.g. part of a cryptosystem, algorithm, chipset, or even a "homunculus computer" —a tiny computer-within-a-computer such as that found in Intel's AMT technology).Backdoors are most often used for securing remote access to a computer, or obtaining access to plaintext in cryptographic systems. From there it may be used to gain access to privileged information like passwords, corrupt or delete data on hard drives, or transfer information within autoschediastic networks.

the answer is True

i hope it will help you

8 0
3 years ago
¿que lenguaje de programacion usan los operadores matematicos?​
kolbaska11 [484]

Answer:

Matlab / GNU Octave. MATLAB (laboratorio de matrices) es un entorno informático numérico multiparadigma y un lenguaje de programación de cuarta generación.

Explanation:

8 0
3 years ago
Read 2 more answers
In c++
Elodia [21]

Answer:

class studentType: public personType

{

public:

virtual void print() = 0;

virtual void calculateGPA() = 0;

void setID(long id) {

studentId = id;

}

void setCourses(const string c[], int noOfC) {

noOfCourses = noOfC;

for (int i=0; i<noOfCourses; i++) {

courses[i] = c[i];

}

}

void setGrades(const char cG[], int noOfC) {

noOfCourses = noOfC;

for (int i=0; i<noOfCourses; i++) {

coursesGrade[i] = cG[i];

}

}

long getID() {

return studentId;

}

string* getCourses() {

return courses;

}

char* getGrades() {

return coursesGrade;

}

studentType(string fName = "", string lastName = "",

long id = 0, string c[] = NULL, char cG[] = NULL, int noOfC = 0);

private:

long studentId;

string courses[6];

char coursesGrade[6];

int noOfCourses;

};

Explanation:

Code rewritten

5 0
3 years ago
Help me if you do then you get 10 points and brainliest
stellarik [79]

The answer is A. The earth was formed 4.54 years ago, and during those first serveral hundred million years, oceans, continents started to form.

A) Precambrian time.

3 0
3 years ago
Select the correct answer.
tia_tia [17]

Answer:

A

Explanation:

HTML is a coding language.

8 0
3 years ago
Other questions:
  • What is the name of the program that takes high-level code and transforms it into machine-level code?
    8·1 answer
  • PLEASE  HELPPPP!!!!!
    14·1 answer
  • How might the website owner use theses details other than to verify login details?
    6·2 answers
  • True or False: Changing a bid package's status to "Closed" removed it from the bidder's Planroom and the bidder will no longer b
    15·1 answer
  • How do you change the name on your brainly account?
    12·1 answer
  • All websites with medical information should be considered credible.
    15·2 answers
  • I am doing keyboarding keyboarding is very boring and yeah
    12·2 answers
  • Pls help quick... will mark brainliest...
    15·1 answer
  • How does microsoft label mac addresses in the windows utilities that show you the mac address?
    13·1 answer
  • ____ the most popular word processing applications software<br><br>​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!