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
Find the value of ....
kaheart [24]
I don't think this is middle school...

(2^8 x 3^-5 x 6^0)^-2 x ((3^-2)/(2^3))^4 x (2^28)

(256 x (1/243))^-2 x ((1/9)/(8))^4 x 268435456

1.05349794239^-2 x (<span>0.01388888888)^4 x 268435456
</span><span>
0.90101623534 x </span><span>3.72108862e-8 x 268435456

</span>8.99999997623

9



9 is your answer.
8 0
3 years ago
when the wimen sells 90 oranges Rs160 with dicount of 20%,how many oranges she sell by Rs112 with profit of 20%​
Fynjy0 [20]

She sold 42 oranges with profit 20%

Step-by-step explanation:

The woman sells 90 oranges by RS.160

This price with discount of 20%

We need to find how many oranges she sell by Rs.112 with profit of 20%​

  • Selling price = cost price - discount ⇒ discount case
  • Selling price = cost price + profit ⇒ profit case

Assume that cost price of an orange is x

∵ She sells 90 oranges with Rs.160

- Find the selling price of 1 orange by dividing 160 by 90

∴ The selling price of an orange = \frac{160}{90}=\frac{16}{9}

∵ She sold them with discount 20%

∵ The cost price of an orange is x

- Find the 20% of x

∵ Discount = 20% × x = \frac{20}{100} × x = 0.2x

- To find the selling price subtract 0.2x from x

∴ The selling price = x - 0.2x

∴ The selling price of an orange = 0.8x

- Equate 0.8x by \frac{16}{9} to find x

∵ 0.8x = \frac{16}{9}

- Divide both sides by 0.8

∴ x = \frac{20}{9}

Assume that the number of oranges is y

∵ She sell y oranges for Rs.112 with profit 20%

∵ The cost price of an orange is \frac{20}{9}

- Find 20% of \frac{20}{9}

∵ Profit = 20% × \frac{20}{9} = \frac{20}{100}.\frac{20}{9}=\frac{4}{9}

- Add \frac{4}{9} to cost price to find the selling price

∴ The selling price of an orange = \frac{20}{9} + \frac{4}{9}

∴ The selling price of an orange = \frac{24}{9}

- To find y divide 112 by selling price of an orange

∵ y = 112 ÷ \frac{24}{9}

∴ y = 42

She sold 42 oranges with profit 20%

Learn more:

You can learn more about percentage in brainly.com/question/12284722

#LearnwithBrainly

4 0
3 years ago
You charge people $10 per hour to pick fruits and $8 per hour
Aleks04 [339]
Fruits :
Y=10(h)

Flowers;
Y=8(h)

Given: h=6

Fruits:
10(6) = $60

Flowers:
8(6)= $48

Back to the question, how much more from picking fruits?

$60 - $48 = $12 more picking fruits.

Hope this helps!

8 0
3 years ago
While shopping in England, Sally notices the cost of bananas is £2.10/kg. Sally isn't familiar with Great Britain Pounds (GBP) o
Inessa05 [86]

Step-by-step explanation:

2.10/0.77=2.72$

dollar per kg

2.2/1=2.2lbs

$2.72/2.2lbs

1.239$/1lbs

5 0
3 years ago
Read 2 more answers
2. Explica que es un cero, o raíz, de una función.​
vovikov84 [41]

Answer:

los ceros de una función también se pueden llamar las raíces, básicamente significan donde una función o parábola cruzará la coordenada x. encontrar las raíces de una ecuación significa encontrar donde la parábola intercepta el eje x

Step-by-step explanation:

3 0
3 years ago
Other questions:
  • What is 2x4+3x4x3x3x2
    5·2 answers
  • Jackson's mom limits the amount of time he is allowed to play video games after Jackson plays for 9 minutes his mom tells him th
    8·1 answer
  • Olivia earned $250 from babysitting over the summer. She wants to give 1/3 of her earnings to the animal shelter. How much will
    9·1 answer
  • 44-4y=20x solve for y
    15·2 answers
  • Which number is an irrational number? StartFraction negative 22 Over 9 EndFraction Negative StartRoot 3 EndRoot 2.56 StartRoot 1
    10·2 answers
  • Where does the 1 come from in this problem? The one that is under 1-r. We needed to solve for a? I'm just not sure why they put
    12·1 answer
  • 140 degrees decreased by 65%
    14·1 answer
  • HEB has dish soap that costs $2.80 for a 12oz bottle. Fiesta has the same dish soap that costs $2.00 for a 8 oz tube.
    8·1 answer
  • Andre is making paper cranes to decorate for a party. He plans to make one large paper crane for a centerpiece and several small
    13·1 answer
  • Can you please help me??
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!