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
What is the value of f(x) = 9x when x = -2?
zepelin [54]
F(x)=9x
f(X)=9(-2)
f(x)= -18
8 0
3 years ago
A=-2.3t-7<br> How fast did mr.mole descend?
zaharov [31]

Answer:

i am sorry i need points i don't have an answer

Step-by-step explanation:

7 0
3 years ago
Read 2 more answers
Help me please I will give you brainliest btw I need this asap
Yuki888 [10]
It’s 3.4 because 3.4 times itself equals 11.56 which is the closest to 11.
3 0
4 years ago
If you begin with a 0.15 m glucose solution in
Lady bird [3.3K]

Answer:

the first one

Step-by-step explanation:

3 0
3 years ago
What is the equation of a line with a slope of 7 and a point (1, 8) on the line?
Arturiano [62]
Y = mx + b
slope(m) = 7
(1,8)...x = 1 and y = 8
now we sub into the formula and find b, the y int
8 = 7(1) + b
8 = 7 + b
8 - 7 = b
1 = b
so ur equation is : y = 7x + 1 <===
8 0
3 years ago
Other questions:
  • WILL GIVE BRAINLEST
    9·1 answer
  • Please help me, I will give thanks.
    5·1 answer
  • 2. Draw a right triangle with side lengths of 3, 4, and 5 units.
    6·1 answer
  • Write an equation of the line that passes through the points (2,-8) and (1,7). Put your answer in fully reduced point slope form
    7·1 answer
  • What is the standard deviation of the data set given below?<br> 5,7,9,11,13
    7·2 answers
  • What is the area of this circle? Show work please. The number in the circle is 3.
    7·1 answer
  • These box plots show daily low temperatures for a sample of days in two
    7·1 answer
  • What is a graph theory?
    13·2 answers
  • To simplify expressions, we often ___ like terms.
    8·1 answer
  • The ratio of red cars to blue cars in a parking lot was 5 : 3. If there were 40 red cars, how many blue cars were there?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!