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
Class C Airspace inner ring begins at the __________ and extends vertically (by definition) to MSL charted values that generally
ivolga24 [154]

Answer:

5 nautical mile

4000 feet

1200 feet

Explanation:

Class C Airspace has inner ring which is also an inner core has usually 5 nautical mile radius. This extends from surface area upto 4000 feet above airport elevation and outer ring starts at an altitude of 1200 feet above ground and is extended upto 4000 feet above airport elevation.

5 0
3 years ago
Describe 6 difference of the types of computer<br>​
Trava [24]

Answer:

<h3>1. Supercomputer</h3>

One of types of computers is supercomputer. It is a computer that is at the front-line of current processing capacity, particularly speed of calculation. It is usually used to do tasks involving intense numerical calculations such as weather forecasting, fluid dynamics, nuclear simulations, theoretical astrophysics, and complex scientific computations

<h3>2. Mainframe Computer</h3>

Another computer type is mainframe computer. It is a computer that is capable of handling and processing very large amounts of data quickly. Its calculation speed can reach millions to tens of millions instructions per second (MIPS) and it can respond to hundreds of millions of users at a time.

This computer type is mainly used in large institutions such as government, banks and large corporations.

<h3>3. Minicomputer (Mid-Range Computer)</h3>

Minicomputers are a class of multi-user computers that lie in the middle range of the computing spectrum, in between the smallest mainframe computers and the largest single-user systems (microcomputers or personal computers).

Minicomputers are usually small in scale, simple in structure, easy to maintain, and low in cost. Therefore, they are often used in universities, scientific research institutions and industrial control fields.

<h3>4. Microcomputer (Personal Computer)</h3>

The term “microcomputer” was introduced with the advent of systems based on single chip microprocessors. In the early days, the microcomputers would still have been too expensive to be owned by a single individual. But in the late 20th century, microcomputers became the most common type of computer.

Therefore, the term "microcomputer" has practically become an anachronism and has been replaced the term "personal computer (PC)".

Personal computer has developed rapidly because of its small size, convenient use, low production cost, and low price. PC computing speed can reach hundreds of thousands to millions instructions per second, which can meet the requirements of data processing and scientific computing in production, scientific research, and life.

<h3>5. Workstation Computer</h3>

A workstation computer is a high-end personal computer between microcomputers and minicomputers. It is usually equipped with large-capacity memory, external storage, and large-screen displays. Therefore, it has strong data processing capabilities and graphics processing capabilities.

Workstation computers are designed and developed mainly for professional application fields like engineering design, animation production, scientific research, software development, financial management, information services, analog simulation, etc.

<h3>6. Server Computer</h3>

A server refers to a high-performance computer that provides shared information resources and various services for many users on the network at the same time in a network environment.

A server is expected to be capable of high-speed computing, long-term reliable operation (it features error-correction of RAM; redundant cooling; self-monitoring, RAID), and powerful external data throughput.

The structure of the server is similar to that of an ordinary computer. Many smaller servers are actually personal computers that have been dedicated to provide services for other computers. But they are very different in terms of processing power, stability, reliability, security, scalability, and manageability.

According to the services provided, server computers can be subdivided into database server, file server, Web server, FTP server, etc.

<h2>hope helpful <3</h2>
4 0
3 years ago
Give two differences between EIRGP and RIP.
qaws [65]

Answer and Explanation:

Difference between EIRGP and RIP :

  • RIP stands for routing information protocol whereas EIRGP stands for enhanced IGRP, IGRP is interior gateway routing protocol
  • EGRIP is more based on the link where as RIP is more based on routing
  • There is also references in their working operation.
  • Differences in updates and refreshing.  

7 0
3 years ago
⦁ ¿Cuáles son los recursos naturales que se utilizan en tu comunidad para generar energía eléctrica?
xxTIMURxx [149]
Turbinas de viento y turbinas de agua son utilizadas, entonces la respuesta podria ser viento y agua
7 0
3 years ago
What is the difference between 1080p and 2k?
professor190 [17]
They have the same  vertical resolution. I can suggest you to watch the video in youtube .<span>https://www.youtube.com/watch?v=uluEEGBHyUE</span>
7 0
3 years ago
Other questions:
  • Which is the most likely problem with a static layout?
    5·2 answers
  • A(n) __________ is the unit of file I/O accessed by an application program as a single unit. A(n) __________ is the unit of stor
    5·1 answer
  • The ___________________ command is used to establish connectivity.
    14·1 answer
  • A bakery collects data on sales. Each sales record includes the date of the sale and some metadata about the items that were par
    11·1 answer
  • What is thhe name of service included with windows server operating systemthat manages a centralized database containing user ac
    5·1 answer
  • PLS HELP IMEDIATELY!!!!!
    15·2 answers
  • A large electronic game manufacturer decides to establish a customer service center in Lahore, Pakistan. This is an example of _
    10·1 answer
  • The following is a mock-up of a Battleship game board. The square with a X marks the position of a battleship.
    13·1 answer
  • The physical parts of a computer are called application software.
    9·2 answers
  • What are the two different types of dns requests?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!