answer.
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
Alex73 [517]
2 years ago
4

Min/Max Templates Write templates for the two functions min and max. min should accept two arguments and return the value of the

argument that is the lesser of the two. max should accept two arguments and return the value of the argument that is the greater of the two. Design a simple driver program that demonstrates the templates with various data types.
Computers and Technology
1 answer:
gavmur [86]2 years ago
7 0

Answer:

x = int(input('Enter First value'))

y = int(input('Enter Second value'))

def minimum(x,y):

 diff = min(x,y)

 print('The minimum value is ' + str(diff))

def maximum(x,y):

 diff = max(x,y)

 print('The maximum value is ' + str(diff))

func_dict = {'maximum':maximum, 'minimum': minimum}

if __name__ == "__main__":

   command = input("> ")

   func_dict[command](x,y)

Explanation:

Asked user to input two values.

and than ask the user to select either to find maximum value or minimum value.

When user will type maximum or minimum the same function will be called and print the answer

You might be interested in
FTP requires confirmation that a file was successfully transmitted to a client, but it has no built-in mechanism to track this i
Sholpan [36]

Answer:

Transmission Control Protocol (TCP)

Explanation:

FTP: FTP stand for File Transfer Protocol. It is an internet protocol for transferring files between computers on a computer network over TCP/IP connections. It is based on client server architecture in which a client asks for a file and the server (local or remote) sends it. FTP uses TCP to ensure all the data packets are transmitted correctly to the proper destination.

Transmission Control Protocol: It is a protocol used in the Transport Layer of the TCP/IP model. The basic role of this layer is to ensure end-to-end delivery of data from the source to the destination. TCP is a connection oriented protocol that works with the Internet Protocol and provides ordered, guaranteed and error free delivery of data from source to destination. This is how application programs communicate and exchange data through an IP network. It is connection oriented protocol means connection between client and server is setup before data transmission. At source host TCP divides streams of bytes in segments. Then it allocates sequence number to each segment. At destination end it reorders the delivered segments. Then it sends an acknowledgment  to sender as a signal that the correct segments have been received. TCP also employs error detection that ensure reliability. TCP also manages flow control and congestion control to avoid data packets loss or delay and to ensure that a sender does not send packets faster than the receiver can receive.

4 0
2 years ago
Allows you to manually add an entry to the arp cache that resolves the ip address inetaddr to the physical address etheraddr. wh
Norma-Jean [14]
The answer in this question is that once the Adaptor or router received the destination IP address (even if we entered in the incorrect MAC address) the router or adapter would remove the IP address from the Ethernet frame and using ARP, would get the correct MAC address of the destination.
6 0
2 years ago
Using Word, Maureen is writing an outline of a presentation she plans to give to her company. She will be showing a video during
Grace [21]
You don't need a tool to place images in Word. Simply paste them in your document.
5 0
2 years ago
Read 2 more answers
Information in​ folders, messages,​ memos, proposals,​ emails, graphics, electronic slide​ presentations, and even videos create
valkas [14]

Answer:

The answer is "Unstructured"

Explanation:

In comparison, unstructured information applies to information, which doesn't suit the conventional column and rows concerning databases properly. It is also known as sources, that include mails, audio and video files, web pages and posts in  communication networks.

  • This tracks and communicates on travel and object flow-through sensors and much more.
  • These types of data are used in both companies and organizations.
5 0
2 years ago
Prompt
Verizon [17]
Prompt is a game code technically a tiko machine that turns into machines that fraud into the new line that put in a friends house.
7 0
1 year ago
Read 2 more answers
Other questions:
  • PHP is based on C rather than ______.
    5·1 answer
  • Which use case can be accomplished using a custom link? Choose 3 ans A. Navigate to a process to update the current record. B. N
    10·1 answer
  • A company wants to publish Knowledge articles to its Customer Community. The articles should be organized for easy navigation by
    6·1 answer
  • Write a function that computes the average and standard deviation of four scores. The standard deviation is defined to be the sq
    15·1 answer
  • Longer speeches should be separated into the paragraphs of:
    9·1 answer
  • given the numerical value 1010101.11, which of the following number systems is most likely represented.
    11·1 answer
  • c Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use just one statement. Hint: Call FindMax() twice in a
    10·1 answer
  • Laura is the first person in her SDLC team to detect and predict security vulnerabilities in the software. In which phase is Lau
    11·1 answer
  • What is Accenture's role in Multi-party Systems?
    12·1 answer
  • Write a class named Employee that has private data members for an employee's name, ID_number, salary, and email_address. It shou
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!