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
URGENT WILL GIVE BRAINLIEST
Vinil7 [7]

Answer:

626.7 cm^{2}

Step-by-step explanation:

Consider the figure as a circle with radius 7.5 and a rectangle with width 30 and length 15.

CIRCLE

A = pi*r*r = pi*7.5*7.5 = 56.25pi =176.7

RECTANGLE

A = l*w = 15*30 = 450

176.7 + 450 = 626.7 cm^{2}

5 0
2 years ago
Read 2 more answers
36°<br> Diagram NOT<br> accurately drawn<br> Work out the size of angle y.
vovikov84 [41]
The angles in a isosceles triangle add up to 180 degrees.
so 180 degrees take away 36 degrees = 144 degrees.
base angles in a isoceles triangle are equal so 144 divided by 2 = 72 degrees.
so to find out y you do 360 - 72 = 288 degrees
therefore y = 288degrees
3 0
3 years ago
Read 2 more answers
Hi, teacher I was absent these days and I didn’t understand anything about this lesson and I need help this is not count as a te
motikmotik

Given:

There are given that the cos function:

cos210^{\circ}=-\frac{\sqrt{3}}{2}

Explanation:

To find the value, first, we need to use the half-angle formula:

So,

From the half-angle formula:

cos(\frac{\theta}{2})=\pm\sqrt{\frac{1+cos\theta}{2}}

Then,

Since 105 degrees is the 2nd quadrant so cosine is negative

Then,

By the formula:

\begin{gathered} cos(105^{\circ})=cos(\frac{210^{\circ}}{2}) \\ =-\sqrt{\frac{1+cos(210)}{2}} \end{gathered}

Then,

Put the value of cos210 degrees into the above function:

So,

\begin{gathered} cos(105^{\circ})=-\sqrt{\frac{1+cos(210)}{2}} \\ cos(105^{\operatorname{\circ}})=-\sqrt{\frac{1-\frac{\sqrt{3}}{2}}{2}} \\ cos(105^{\circ})=-\sqrt{\frac{2-\sqrt{3}}{4}} \\ cos(105^{\circ})=-\frac{\sqrt{2-\sqrt{3}}}{2} \end{gathered}

Final answer:

Hence, the value of the cos(105) is shown below:

cos(105^{\operatorname{\circ}})=-\frac{\sqrt{2-\sqrt{3}}}{2}

4 0
1 year ago
PLEASE HELP 11 POINTS
Free_Kalibri [48]

Answer:

It should be 87.92

Step-by-step explanation:

4 0
3 years ago
Hru im in an amazing mood help meeeeeeeeeeeee plzzzzzzzzzzzz
strojnjashka [21]

Answer:

I think its A

Step-by-step explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • When this exponent is applied to a nonzero base, the result is always 1
    13·2 answers
  • ALOT OF POINTS, Please help it’s due it 2 minutes
    12·1 answer
  • What is the awser for 231 divided by 34
    11·1 answer
  • The comfy couch furniture store purchased 3 1/3 pages to advertise upcoming sales for the summer. when the store did not receive
    9·1 answer
  • Consider f(x) = 1.8x – 10 and g(x) = −4.
    7·1 answer
  • Seven less than a number divided by 5 is -2
    13·2 answers
  • Help asap please, i need answers for a) b) and c)​
    11·2 answers
  • What is the circumference of the circle? d=44in​
    10·2 answers
  • Verify that fand g are inverse functions (both questions please)
    6·1 answer
  • Graph all possible solutions to the inequality x&lt;2
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!