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
Ashirt button has a diameter of 0.61 cm. Which of these is an approximate measurement of the circumference of the button?
Aleonysh [2.5K]

Answer:

1.92cm

Step-by-step explanation:

Circumference of a circle is computed using the formula:

C=2\pi r

Where:

r = radius

π = 3.14

Since the radius is the distance of the center of the circle from any point of the circle and the diameter is the measure of a straight line that goes across the center of the circle from one side to the other, radius is half of a diameter. So the diameter = 2r.

We can then use the diameter to solve for the circumference by using the formula"

C = \pi d

So we just plug in what we know in the formula:

C = \pi d\\\\C = (3.14)(0.61cm)\\\\C = 1.9154cm\cong1.92cm

3 0
3 years ago
What are the coordinates of point Q?
Lady bird [3.3K]

Answer:

Q (-4, -2); 2 units; Q' will be above the x-axis; 2 unites; no; yes, the y coordinates are multiplied by -1; Q' (-4, 2); R' (-2, 2), S' (1, 5), T' (-2, 5);

Step-by-step explanation:

even after a reflection over the x-axis, each points distance from the x-axis will stay the same

the x-coordinates don't change because the distance from the y-axis stays the same

the picture below shows points of Q'R'S'T', just connect the vertices

5 0
2 years ago
L= 3x+5 and width is x-3 what is the area of it? in polynomial in standard form
Studentka2010 [4]
Area of rectangle =wxl
A=(3x+5)(x-3)
A=3x^2+5x-15-9x
A=3x^2-4x-15


7 0
3 years ago
I will mark brainliest to whoever helps! :D
Arte-miy333 [17]

Answer:

-7/2y

Step-by-step explanation:

cancel out the Z's than youre left with -7/2y :}

8 0
3 years ago
A triangle with equal sides and a square have the same perimeters. The length of a side of the triangle is 2x + 2. The length of
andreev551 [17]

Answer:

x=13

Step-by-step explanation:

3(2x+2)=4(x+8)\\6x+6=4x+32\\2x+6=32\\2x=26\\x=13

3 0
4 years ago
Other questions:
  • What is 20 feet to 8 yards in simplest form
    11·1 answer
  • The answer is <br> x + 2 / x + 3 <br><br> But I don’t see that answer so what would it be
    15·1 answer
  • PLEASE HELP ILL GIVE BRAINLIEST
    6·1 answer
  • The measure of one angle is eleven more than four times a number. Another angle is twice the first angle’s measure. The sum of t
    5·1 answer
  • Number 2
    12·2 answers
  • ASAP! I NEED THIS DONE AS QUICKLY AS POSSIBLE WITH WORKING OUT
    10·1 answer
  • I need the answer. Please help
    8·1 answer
  • Can you guys please help me! 30 points
    14·2 answers
  • Point P please help i appreciate whoever does (:
    7·1 answer
  • Please help!!!!
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!