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 integer?
wel

Answer:

-40

Step-by-step explanation:

This is because she LOST 40 dimes making it a negative number, so the integer to represent this would be -40.

3 0
3 years ago
Find the scale factor of the line segment dilation.
serg [7]
The lengths of the segments can be calculated using:
d = √[(y₂-y₁)² + (x₂-x₁)]²
First, we calculate the length of AB using this formula:
L(AB) = 10

Then, we calculate the length of A'B':
L(A'B') = 3

Therefore, the scale factor is: L(A'B') / L(AB) = 3/10
4 0
3 years ago
Read 2 more answers
The fish population of Lake Collins is decreasing at a rate of 5% per year. In 2000 there were about
olchik [2.2K]

Answer:

Number of fish in 2006 = 845 fishes (Approx.)

Step-by-step explanation:

Given;

Number of fish in 2000 = 1,150 fishes

Decreasing rate = 5% per year

Find:

Number of fish in 2006

Computation:

Exponential decay function:

F = P[1-r]ⁿ

Number of year = 2006 - 2000

Number of year =  6 year

Number of fish in 2006 = 1,150[1-5%]⁶

Number of fish in 2006 = 1,150[1-0.05]⁶

Number of fish in 2006 = 1,150[0.95]⁶

Number of fish in 2006 = 1,150[0.735]

Number of fish in 2006 = 845.25

Number of fish in 2006 = 845 fishes (Approx.)

4 0
3 years ago
I NEED HELP ASAP!!!!<br><br> This is the equation: <br><br> 7(h−3)+4h<br><br> Please help!
timofeeve [1]

Answer:

11h-21

Step-by-step explanation:

Hope this helps :-)

5 0
3 years ago
Read 2 more answers
PLease help, i'm struggling and can't find the answer anywhere
anastassius [24]

Answer:

1/1024

Step-by-step explanation:

It can also be written as 1/4^5 and you just have to simplify it.

3 0
3 years ago
Other questions:
  • What is the simplest form of this expression y^2(-y+4)-7y^3
    6·1 answer
  • What is the third quartile, Q3, of the data represented by the box plot? 0 12.5 20 65 143.75
    12·1 answer
  • If m6 = 123.5°, then m1 is 56.5°. 67.5°. 123.5°. 136.5°.
    6·2 answers
  • Need help asap
    15·2 answers
  • At 2 PM McDonald’s sold 12 big bags and two sodas for a total of 32 McDonald’s took and 16 at 3 PM I selling four big Macs and t
    5·1 answer
  • A candy company provides samples of fudge and truffles to their store visitors. The manager authorized the store to distribute u
    12·1 answer
  • Solve the inequality.<br> r −6<br> r &gt; 6
    11·1 answer
  • Need helpp asap its due by 11:59pm i will give brainliest
    12·2 answers
  • If you know please help I’ll give Brainliest
    15·1 answer
  • What is the answer<br> ????
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!