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
How do I solve this?
boyakko [2]
See below for solution. Hope this is helpful

3 0
3 years ago
What is typically used to quantitatively compare the effectiveness of layouts? A. trial and error B. load-distance model C. expo
Andre45 [30]

Answer:

B. load-distance model

Step-by-step explanation:

A. trial and error

Trial and error is "a fundamental method of problem solving. It is characterised by repeated, varied attempts which are continued until success". But this method is not the best in order to compare effectiveness of layouts

B. load-distance model

The load-distance method is a "mathematical model used to evaluate locations based on proximity factors. The objective is to select a location that minimizes the total weighted loads moving into and out of the facility. The distance between two points is expressed by assigning the points to grid coordinates on a map". And that's the correct option since we are trying to measure the effectiveness of layouts quantitatively.

C. exponential smoothing

This is "a rule of thumb technique for smoothing time series data using the exponential window function". Wheighting observations using the exponential function. But this is a techinique used to smooth s time series not to compare effectiveness of layouts.

D.process control charts

The Control Chart is a "graph used to study how a process changes over time with data plotted in time order". But we don't want to see how the process changes the objective is quantitatively compare the effectiveness of layouts, and this one is not the best option for this.

E. mean absolute deviation (MAD)

The median absolute deviation(MAD) is "a robust measure of how spread out a set of data is. The variance and standard deviation are also measures of spread, but they are more affected by extremely high or extremely low values and non normality". But again is just a measure of spread and not allow to compare effectiveness of layouts.

8 0
3 years ago
Point b is the midpoint of ac-. if ab= 4x+2 and ac=10x-6, find the length of ac
Natasha2012 [34]

let's bear in mind that B is the midpoint and thus it cuts a segment into two equal halves.

\bf \underset{\leftarrow \qquad \textit{\large 10x-6}\qquad \to }{\boxed{A}\stackrel{4x+2}{\rule[0.35em]{10em}{0.25pt}} B\stackrel{\underline{4x+2}}{\rule[0.35em]{10em}{0.25pt}\boxed{C}}} \\\\\\ AC=AB+BC\implies 10x-6=(4x+2)+(4x+2)\implies 10x-6=8x+4 \\\\\\ 2x-6=4\implies 2x=10\implies x=\cfrac{10}{2}\implies x= 5 \\\\[-0.35em] ~\dotfill\\\\ AC=(4x+2)+(4x+2)\implies AC=[4(5)+2]+[4(5)+2] \\\\\\ AC=22+22\implies AC=44

3 0
4 years ago
Please help me with this question :)​
klio [65]

Answer:

y>5/6

Step-by-step explanation:

5y+3>-7y+13

5y+7y>13-3

12y/12>10/12

y>5/6

This is an inequality, which shows where the variable y does or does not exist

from this we can say

y: (-infinity,5/6) (5/6, infinity]

or, y does not exist from (-infinity,5/6)

and does exist from (5/6, infinity]

3 0
3 years ago
In the game of Keno, a player starts by selecting 20 numbers from the numbers 1 to 80. After the player makes his selections, 20
DiKsa [7]

The percentage of winning if 20 winning numbers are randomly selected from numbers 1 to 80 is 12.48%.

Given There are 80 numbers from which 20 numbers are selected randomly in a game of Keno by player and after selection of 20 winning numbers again 20 numbers are selected and player wins if the player has correctly selected 3,4,or 5 of the 20 winning numbers.

Probability is the chance of happening an event among all the events possible.

Probability of winning is calculated as under:

Probability=C(20,3)C(60,17)/C(80,20)

We have taken C(20,3) because player will win if 5 numbers are selected from 20 winning numbers.

We have taken C(60,17) because after selection of 20 numbers 60 numbers will left from 80 and after winning from 3 numbers 17  numbers left and from total 80, 20 numbers are taken.

=C(20,3)C(60,17)/C(80,20)

=(20!/3!17!  * 60!/17!43!)/80!/20!60!

=1140*387221678682300/35353161422121743200

=12.48%

Hence the probability of winning is 12.48%.

Learn more about probability at brainly.com/question/24756209

#SPJ4

5 0
2 years ago
Other questions:
  • Angle A is circumscribed about circle O. What is the measure of angle O?
    9·1 answer
  • Write a program that prompts the user to read two integers and displays their sum . if anything but an integer is passed as inpu
    9·1 answer
  • What number represents the same amount as 2 hundreds 14 tens 3 ones
    15·2 answers
  • ava wants to buy three pairs of a certain style of jeans at two different stores jeans jam sells the jeans 25% off the $24.99 re
    9·1 answer
  • 4 is what % of 80. Show all of your work
    12·1 answer
  • Simplify 7(A-6)<br> A-6<br> 7A-42<br> 7A-6
    6·1 answer
  • How do you convert a terminating decimal into a fraction?​
    12·1 answer
  • Choose the correct explicit formula for the sequence below.
    5·1 answer
  • Smb help w this pls asap
    6·1 answer
  • 7.5x = 30 in the since of algebra
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!