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
Alenkinab [10]
3 years ago
13

Write a function called min that returns the minimum of the two numbers passed in as parameters.

Computers and Technology
1 answer:
Kitty [74]3 years ago
4 0

def min(x,y):

   smallest = x

   if y < smallest:

       smallest = y

   return smallest

x = min(2,1)

print("The min is "+str(x))

Although I wouldn't recommend using the name min for a function because min is the name of an existing function. Best of luck.

You might be interested in
Select the correct answer.
alex41 [277]

Answer: It is clustering.

7 0
4 years ago
Desktop Management software requires managers to install software such as antivirus updates or application updates on client com
Natali [406]

Answer: False

Explanation: Desktop management is the managing of the computer system and its elements .They also supervises the data organization , network management, etc.

The desktop management software requires automatic installation rather than being installed by the managers.The updates for the antivirus or application occurs after a certain period of time intervals automatically because of the inbuilt feature of the software . So, the given statement is false.

5 0
4 years ago
Write a program that plays the popular scissor-rock-paper game. (A scissor can cut a paper, a rock can break a scissor, and a pa
Andrei [34K]

Answer:

Explanation:

The following program is written in Python and follows all the instructions accordingly to create the rock paper scissor game as requested.

from random import randint

answers = ["Scissors", "Rock", "Paper"]

computer = answers[randint(0, 2)]

continue_loop = False

while continue_loop == False:

   

   player_choice = input("Choose a number, 0 = Scissors, 1 = Rock , 2 = Paper?")

   player_choice = answers[int(player_choice)]

   if player_choice == computer:

       print("Tie!")

   elif player_choice == "Rock":

       if computer == "Paper":

           print("You lose!", computer, "covers", player_choice)

       else:

           print("You win!", player_choice, "smashes", computer)

   elif player_choice == "Paper":

       if computer == "Scissors":

           print("You lose!", computer, "cut", player_choice)

       else:

           print("You win!", player_choice, "covers", computer)

   elif player_choice == "Scissors":

       if computer == "Rock":

           print("You lose...", computer, "smashes", player_choice)

       else:

           print("You win!", player_choice, "cut", computer)

   else:

       print("That's not a valid play. Check your spelling!")

   continue_or_not = input("Would you like to play again? Y/N")

   continue_or_not = continue_or_not.lower()

   if continue_or_not != "y":

       break

   computer = answers[randint(0, 2)]

8 0
3 years ago
Why does the PC send out a broadcast ARP prior to sending the first ping request
Norma-Jean [14]

Since the ARP broadcast is utilized to request the MAC address of the Host with the IP address contained in the ARP, the PC needs to know the destination of MAC address before it can produce the frame header for the particular PING requested, before it can send a PING to a host.

5 0
3 years ago
Python please!
riadik2000 [5.3K]

We have that the output that frequency with the next 4 higher key <u>frequencies  </u>is <em>mathematically </em>given as

Output

  • 120,127,13,134.8,142,1,151.19

From the question we are told

  • On a piano, a key has a frequency, say f0.
  • Each higher key (black or white) has a frequency of f0 * rn, where n is the distance (number of keys) from that key, and r is 2(1/12).
  • Given an initial key <em>frequency</em>, output that <em>frequency</em> and the next 4 higher key <em>frequencies</em>.

Output each floating-point value with two digits after the decimal point, which can be achieved as follows:

<h3> Output and frequency</h3>

Generally the code will go as follows

# The key frequency

f0 = float(input())

r = math.pow(2, (1 / 12))

# The frequency, the next 4 higher key f's.

frequency1 = f0 * math.pow(r, 0)

frequency2 = f0 * math.pow(r, 1)

frequency3 = f0 * math.pow(r, 2)

frequency4 = f0 * math.pow(r, 3)

frequency5 = f0 * math.pow(r, 4)

# printing output

print('{:.2f} {:.2f} {:.2f} {:.2f} {:.2f}'.format(frequency1, frequency2, frequency3, frequency4, frequency5))

Therefore

Output

120,127,13,134.8,142,1,151.19

For more information on frequency visit

brainly.com/question/22568180

3 0
3 years ago
Other questions:
  • In order to protect your computer from the newest virus, which of the following should you do after you've installed a virscan s
    9·1 answer
  • An email address is made up of all of the following parts except
    13·2 answers
  • Calculate the cash used to retire debt for each of the six months. Since the company can't pay down more debt than there is cash
    12·1 answer
  • Which part of the Office interface is located across the top of the application window and organizes common features and command
    13·1 answer
  • Write a program that asks the user for the names of two files. The first file should be opened for reading and the second file s
    13·1 answer
  • What is communication ​
    5·2 answers
  • python An instance variable named counter of type int An instance variable named limit of type int. A constructor that takes two
    15·1 answer
  • The mouse pointer becomes different shapes depending on the pointer s location and locations you click on the screen. true false
    6·1 answer
  • Draw a flowchart diagram for a program that display a person's name x times​
    5·1 answer
  • Monster Collector
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!