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
Which trait depicts honesty?
Aliun [14]

(B) reporting additional cash found in the cash register

5 0
3 years ago
The unthinkable happens and disaster strikes, crippling your network. You implement your disaster plan, but it doesn't go smooth
Degger [83]

Answer:

Post-mortem.

Explanation:

It refer to the discussion or analysis of event like here disaster why it doesn't work like plan based and through whole discussions what we learn so in future avoid such type of issue or mistakes.

7 0
3 years ago
I really need the answer now!!
guajiro [1.7K]

Answer:

3. B.

4. B.

5. B.

6. C.

7. D.

8. C.

9. C.

10. D.

Explanation:

I hope I helped you.

4 0
2 years ago
A(n) ____ is software that can be used to block access to certain Web sites that contain material deemed inappropriate or offens
serious [3.7K]

Answer: <em>Internet filter</em>

Explanation:

Internet filters are referred to as software which prevents individuals from accessing certain kind of websites. These filters are predominantly used in order to block content that might be considered inappropriate for some users. These filters are widely used in public library and computers used by schools and colleges.

4 0
3 years ago
Devices that use a unique personal characteristic, such as a fingerprint, in place of a password are called
BlackZzzverrR [31]
Biometric Authentication Device

A device that reads a unique personal characteristic such as a fingerprint or the iris pattern in your eye and converts its pattern to a digital code

6 0
3 years ago
Other questions:
  • SOMONE TELL ME THERE ROBLOX USER NAME AND DO U PLAY IT!!!!! MINE IS Borutouzimaki2133
    9·2 answers
  • What was the importance of the turing machine to today’s computers?
    6·1 answer
  • Packet switching was invented by: <br> Apple <br> DARPA <br> Google <br> Microsoft
    13·1 answer
  • Suppose you will invest $100 per month at the beginning of the month for 40 years with interest rate
    5·1 answer
  • The computer output for integer programs in the textbook does not include reduced costs, dual values, or sensitivity ranges beca
    14·1 answer
  • Differentiated instruction is designed to educate children through ________ techniques in order to ensure every student is being
    13·1 answer
  • What technology did one of the student's have to learn to use in order to help him with his homework in the film, "Disconnected:
    11·2 answers
  • What is the location used by users to configure delegate access on their own mailboxes? Backstage view &gt; Account Settings Bac
    12·1 answer
  • How do you save a document in a format so that any reader can view it?
    5·1 answer
  • Which of the following is a key feature of a relational database?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!