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
PLEASE HELP, I NEED THIS OR I WILL FAIL MY CLASS PLZZZZ. <br> 30 POINTS AND BRANILEST
WINSTONCH [101]
It’s Linear

Explanation:
6 0
3 years ago
Read 2 more answers
Write the equation in vertext form<br><br> Vertex: (3,6) ; y-intercept: 2
olganol [36]
Y= a(x-3)^2+6
2= a(0-3)^2+6
2=a(-3)^2+6
2=a(9)+6
2-6=9a
-4=9a
-4/9=a

Therefore the equation in vertex form is
y = -4/9 (x-3)^2+6
8 0
3 years ago
Nico Joven presently earns $348.40 per week. He claims
mariarad [96]

Answer:

sou do Brasil dcp ;-;kssskskksk

3 0
2 years ago
Find the slope of the line through the pair of points. A(2, 3), P(2, 9)
AVprozaik [17]
A(x_1;\ y_1);\ B(x_2;\ y_2)\\\\m=\dfrac{y_2-y_1}{x_2-x_1}\\\\-------------------\\\\A(2;\ 3)\to x_1=2\ and\ y_1=3\\B(2;9)\to x_2=2\ and\ y_2=9\\\\m=\dfrac{9-3}{2-2}=\dfrac{7}{0}-divided\ by\ 0\\\\Answer:\ The\ slope\ unde fined. It's\ a\ vertical\ line\ x=2.
8 0
2 years ago
Algebraically find the vertex of the function f(x) = x2 – 6x + 16.
Olegator [25]
The answer is i thinks x=3
6 0
2 years ago
Other questions:
  • Which choice correctly expresses the number below in scientific notation?<br> 0.000000446
    11·1 answer
  • In the number 76,129 which digit has the least value
    10·2 answers
  • What is the quotient of a number and 4 is at most 5
    15·2 answers
  • Write 3 × 3 × 3 × 3 × 3 × 3 using exponents. a. 123 b. 36 c. 63 d. 94
    5·2 answers
  • Blue cassettes hold 45 minutes of music. Green cassettes hold 55 minutes
    8·1 answer
  • The combined weight of Maia and Vashti is 102.45kg. If Maia weighs 2.15kg more than Vashti, calculate Vashti's weight.
    11·2 answers
  • A box with dimensions 1 1⁄4 ft x 2 3⁄4 ft x 3⁄4 ft was being filled with smaller boxes. Each of the smaller boxes are shaped lik
    5·1 answer
  • Lena's Coffee Shop makes a blend that is a mixture of two types of coffee. Type A coffee costs Lena $4.30 per pound, and type B
    12·1 answer
  • Planes A and B are shown.
    14·1 answer
  • PLS HELP ILL GIVE BRAINLIEST
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!