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
kobusy [5.1K]
3 years ago
12

Write a function min that has two str parameters and returns the smallest. (Smallest in the sense of coming first alphabetically

, not in the sense of "shortest".)
Mathematics
1 answer:
matrenka [14]3 years ago
7 0

Answer:

The function written in python is as follows

def min(str1,str2):

     if str1 < str2:

           return str1

     else:

           return str2

Step-by-step explanation:

This line defines the function min, along with two parameters str1 and str2

def min(str1,str2):

This line checks if str1 is less than str2

if str1 < str2:

If yes, the function returns str1

 return str1

If otherwise,

else:

The function returns str2

 return str2

Take for instance

str1 = "abc"

str2 = "cba"

The function will return str1 because str1 is less than str2 in the sense that the first letter of str1 (a) is less than the first letter of str2 (c)

You might be interested in
khalil has a circular cake that he plans to share equally betweeb himself and 5 friends. if tge cake is 8 inched in a diameter,
Fudgin [204]

Answer:

4.2

Step-by-step explanation:

5 0
3 years ago
Solve this multistep equation <br>12-5-16+3x=-23-9x
allsm [11]
The answer is x= -6/7<span><span>​​</span></span>
3 0
3 years ago
What is the slope of the line that passes through (2,5) and (3,6).
earnstyle [38]

Answer:

1

Step-by-step explanation:

hope this help:) I use slop formula

5 0
3 years ago
Read 2 more answers
7. Certain car manufacturers install a gauge that tells the driver how many miles they can drive
nalin [4]

Answer:

A) Slope - 1.1889. The Predicted distance the drivers were able to drive increases by 1.1889

Step-by-step explanation:

5 0
3 years ago
Find the difference 10 - ( – 25 )​
sergey [27]
There is no difference they are both negative numbers or we could say 25 is higher number then 10 but it negative
5 0
3 years ago
Read 2 more answers
Other questions:
  • Which is not a valid range? a1:a3, b1:b3 a1:a9 a1:f9 a1:f1?
    6·1 answer
  • One hundred people were asked, "do you favor stronger laws on gun control?" of the 33 that answered "yes" to the question, 14 we
    8·1 answer
  • BRAINLIEST AND 20 POINTS ANSWER ASAP PLZ
    15·1 answer
  • What is the solution to the equation 3(x - 1) – 2(2x + 1) = 8(x - 1)?
    15·1 answer
  • How many cups = to 56 ounces
    8·1 answer
  • Find the volume of a rectangular pyramid with a base length of
    11·2 answers
  • Adriana is excited to go to the used video game store to buy a gaming system later today. The gaming system usually costs x doll
    7·1 answer
  • Please help me big finals test!!!!
    10·1 answer
  • PLS HELPPP I WILL GIVE BRAINLYISTT!!!!!
    8·1 answer
  • What is the perimeter of the rectangle?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!