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
statuscvo [17]
3 years ago
6

Design a function named "max" that accepts two integer values as arguments and returns the value that is the greater of the two.

For example, if 7 and 12 are passed as arguments to the function, the function should return 12. Use the function in a program that prompts the user to enter two integer values. The program should display the value that is the greater of the two.

Computers and Technology
2 answers:
lesya692 [45]3 years ago
4 0

Answer:

#section 1

def max(int1, int2):

   if a > b:

       return a

   else:

       return b

#section 2

print("------Enter Two Integers----------\n\n")

a = int(input('Enter First Integer:'))

b = int(input('Enter Second Integer'))

print(max(a, b))

Explanation:

The programming language used is python 3.

#section 1

The function is defined and it has two parameters (int1 and int2) that allows it to take two arguments.

The IF and ELSE statements compares both parameters and return the highest.

#section 2

A program is written to prompt the user for two inputs, and converts them to an integer, passes it to the max function and prints the result to the screen

Artyom0805 [142]3 years ago
3 0

// writing c++ function

int maximum ( int a , int b){

if(a>b)

return a;

else

return b;

}

//when this function will be called it will return the max of the integers sent.

//for example

int max = maximum ( 3,4)

//max variable will have 4 returned by the function

You might be interested in
What do you understand by Multiprotocol Label Switching, how it works and is helpful in today's network scenario.
Minchanka [31]

Answer:

Multiprotocol Label Switching (MPLS): It is a routing technique in telecommunications networks that transfers data from 1 node to next node based upon shortest paths instead of long network addresses, hence it avoids rigorous findings in a routing table and speeds the flow of traffic

MPLS provides better performance,scalability,better bandwidth utilization,a better end-user experience and reduced network congestion.Hence it is useful in today's network scenario.

7 0
3 years ago
How do you join The Meeting on zoom because I have class Tomorrow with My Teacher
Svetllana [295]

Answer:

Go to join.zoom.us. Enter your meeting ID provided by the host/organizer. Click Join. When asked if you want to open zoom.us, click Allow.

Explanation:

3 0
3 years ago
Read 2 more answers
In many cases, a ribbon organizes buttons and options in Select one: a. menus. b. sections. c. toolbars. d. groups.
katrin2010 [14]

Answer:

The answer is Groups

Explanation:

A ribbon organizes buttons and a program’s options into a series of groups or tabs at the top of the window. Typical ribbon tabs are composed of groups that are labeled as closely related commands. Dividing commands into groups in most Microsoft Office application helps users structure users structure the commands into related sets.

5 0
4 years ago
Read 2 more answers
i emailed someone and im sure that they emailed back however it says nothing has arrived in my inbox what do I do
Lynna [10]

Answer:

report it or check ur spam mail or refresh the page

Explanation:

good luck figuring it out :)

8 0
3 years ago
Which type of virtualization do storage area networks typically use?
cupoosta [38]

They use the SCSI protocol for communication between servers.

haha im a computer geek.Good luck!

4 0
3 years ago
Read 2 more answers
Other questions:
  • What term refers to a piece of software that interfaces with the hardware on your computer?
    10·2 answers
  • Suppose sum and num are int variables, and the input is 18 25 61 6 -1
    11·2 answers
  • What can Strings store
    15·2 answers
  • Related to Image Classification
    13·1 answer
  • the following names are considered valid names for variable except for a. ST_Name b. ST name c. STName​
    9·1 answer
  • What are the possible consequences of plagiarism?
    15·1 answer
  • What might be some challenges if you’re trying to design a product for someone
    14·2 answers
  • Please please help I don’t understand this
    7·2 answers
  • In a complex formula, how does excel determine which calculation to perform first?.
    10·1 answer
  • Can somebody please help me with these few questions?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!