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
Find the slope of the line. pleaseee
Akimi4 [234]

Answer:

  0

Step-by-step explanation:

The slope is the change in y divided by the corresponding change in x:

  ∆y/∆x = (54.99 -54.99)/(7 -6) = 0/1 = 0

The slope of the line is zero.

7 0
3 years ago
PLEASE ANSWERRRR!! (4 x 3) + (4 x 7) = 4 x (? + ?)
Vlada [557]

how is the volume of a solution used in calculating concentration?

3 0
3 years ago
Read 2 more answers
How does changing the scale change the distance represented?
gavmur [86]
<span>No changing the map scale does not change actual distances. </span>
8 0
3 years ago
What is the greatest common factor (GCF) of the numerator and denominator in the rational expression below? 6x-18/x^2-5x+6
brilliants [131]

Numerator 6x - 18 = 6(x - 3)

Denominator x^2 - 5x + 6 = (x - 3)( x - 2)

8 0
3 years ago
Read 2 more answers
A basketball player made 40% of the shots she attempted. If she made 32 baskets, how many shots did she attemp A.32 B.40 C.64 D.
dybincka [34]
D 80
32/40 *100
Precent proportions
32/x = 40/100
Cross multiply
6 0
3 years ago
Other questions:
  • Simplify the expression using<br> order of operations<br> 12 (10-5) - 40 + (4+1)
    15·2 answers
  • Hurricane Katrina in 2005 dumped 6.5 trillion gallons of water on land. If the 6.5 trillion gallons of water were a
    5·1 answer
  • Help simplify please
    8·2 answers
  • (-0.04)(-0.1) put the decimal in the correct location
    7·1 answer
  • The number of internet paid search ads is increasing as advertisers move away from traditional marketing methods. The equation y
    11·1 answer
  • F(x)=71(0.93)^2x growth or decay
    8·1 answer
  • ANSWER THIS ASAP DONT SEND A FILE AT ALL !! I NEED THE ANSWER QUICK HELPP ONLY ANSKER IF YOY REALLY KNOW!!
    11·2 answers
  • What is 2000000 x 40000000
    9·1 answer
  • Pls help, quick!
    12·1 answer
  • Similar Figures/Proportion
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!