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
Alex73 [517]
3 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]3 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
6. By default,how the table headings are placed. (2 Points)
Dmitrij [34]
They are all bold and what ever else
6 0
3 years ago
Who knows songs that are sad,happy,excited, and calm
anzhelika [568]

sad-

you broke me first

can we kiss forever

love the way you lie

happy-

Say Yes

Valerie

Walking on Sunshine

excited-

who let the dogs out

September

calm-

heather

put your records on

lonely

5 0
3 years ago
________ is the application of statistical techniques to find patterns and relationships among data for classification and predi
Finger [1]

Answer:          

Data Mining

Explanation:

  • Data Mining is also called knowledge discovery.
  • It is a computer aided technique of searching and evaluating a bulk of data in order to obtain useful information.
  • This technique searches through the data to find hidden patterns and uses statistical methods to find relationship among data for finding predictive information and for classification of data.
  • This is a mixture of different disciplines which include machine learning, statistics and artificial intelligence and also some mathematical methods.
  • Often the useful information is extracted from enormous database using modeling technique which is used to build a model from instances of the data where the solution is known and later apply this model on the instances where the solution is unknown.
  • In unsupervised data mining, the data analysis is not done by using modeling technique. In other words the labels are provided in order not draw inferences and prediction from data sets. Example is clustering.
  • In supervised data mining the model is developed to make inferences and classification. Example is neural networks.
  • For example data mining is used in Medicine industry to provide more accurate diagnostics and treatments on the basis of patient's medical history , physical examination or different patient tests data.
  • Data mining also makes it possible to manage health resources more efficiently and cost-effectively by detecting risks, predicting diseases in certain sections of the population or predicting hospitalization duration.
4 0
4 years ago
Several disaster relief nonprofits want to create a centralized application and repository of information so that they can effic
vichka [17]

Answer: Community cloud

Explanation:

A community cloud is a collaborative effort whereby infrastructure is shared among different organizations from a particular community that has common concerns such as compliance, security etc.

Since several disaster relief nonprofits want to create a centralized application

in order to efficiently share and distribute resources related to various disasters that they may respond to together, then the community cloud will be useful in this regard.

6 0
4 years ago
How do computers perform complicated tasks built from simple instructions?
wlad13 [49]
They use and perform a set of actions and programs that build on each other.
8 0
4 years ago
Other questions:
  • After saving her presentation initially, Leah realizes she needs to add another content slide. She adds the slide and is ready t
    7·1 answer
  • What does an operating system do?
    11·2 answers
  • Which of the following is similar to defense in depth and supports multiple layers of security?a. Defense in depthb. Diversity o
    7·1 answer
  • Which statement describes how to insert the IF, COUNTIF, or SUM function into a cell?
    10·1 answer
  • Your company has purchased another company that also uses Windows Server 2016 and Active Directory. Both companies need to be ab
    11·1 answer
  • _____ parser is an LL parser that is implemented by writing code directly from the grammar of the source language. EBNF is ideal
    7·1 answer
  • What are the pros and cons of stone, wood, brick, concrete, steel, and glass for architecture building materials?
    7·2 answers
  • What is an infodemic?
    10·1 answer
  • The Danger zone around a robot is?
    13·2 answers
  • All of the salespeople in hyperactive media sales use laptops, so that they can take their applications and data on the road to
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!