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
Jason started with 12 1/2 pounds of concrete to set fence post. He used 4 1/6 pounds for the center post abd 3 1/3 pounds for th
Kruka [31]
He has 5 pounds left
7 0
3 years ago
question 10 is: a pen and a pencil cost RM2.40 and RM0.30 respectively. The price of an eraser is one third of the price of the
NeX [460]

\huge\colorbox{red}T\colorbox{orange}h\colorbox{yellow}a\colorbox{green}n\colorbox{blue}k\colorbox{purple}s

7 0
2 years ago
what the area of a triangle whose base is 23 inches and whose height is 28. write your answer in decimal
Aneli [31]

Answer:

322

Step-by-step explanation:

Triangle area = base*height)2Here, area = 23*28/2=322

5 0
2 years ago
Read 2 more answers
A ski slope drops 30 feet for every horizontal 70 feet
ASHA 777 [7]
The angle of depression is

tan^-1 3/7 = 23.2 deg
8 0
3 years ago
There are 18 female students and 16 male students in a class. Which of the following expresses the ratio of female students to m
fiasKO [112]

Hey!

-------------------------------------------------

Solution:

The ratio is FEMALES to MALES.

So its 18/16, 18:16, or 18 to 16.

~Now we need to simplify.

18:16 → 18/2:16/2 → 9:8

*Note* When you have a ratio you need to know which comes first. If you put males to females that incorrect. It has to be correct according to the question.

-------------------------------------------------

Answer:

\large\boxed{B)~9~to~8}

-------------------------------------------------

Hope This Helped! Good Luck!

4 0
3 years ago
Other questions:
  • A card is drawn at random from a well-shuffled deck of 52 cards. what is the probability of drawing a face card or a 6?
    5·1 answer
  • Is 1,4,9 and 16 a geometric sequence
    8·1 answer
  • Solve x/9 - 1/3 = -5/3. The solution of x is:
    15·2 answers
  • Two of the angles in a triangle measure 35 and 8. What is the measure of the third angle?
    14·1 answer
  • I need number 22 answered
    8·1 answer
  • The magnitude, M, of an earthquake is defined to be M=log l/s, where l is the intensity of the earthquake (measured by the ampli
    6·2 answers
  • A square has an area of 64 m². What is the length of each side?
    7·1 answer
  • Factor 54-12 with GCF
    5·1 answer
  • What is the lateral surface area of a rectangular prism in square inches.
    6·1 answer
  • Every quadrilateral is a rhombus true or false
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!