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
andre [41]
3 years ago
6

Write a function mymin that has two str parameters and returns the smallest. (Smallest in the sense of coming first alphabetical

ly, not in the sense of "shortest".)

Social Studies
1 answer:
DerKrebs [107]3 years ago
6 0

Answer:

Complete Python code with explanation and output results is given below

Explanation:

A function named mymin is created which takes two arguments as input str_1 and str_2. Then using if else conditions compare them and return the smallest of them alphabetically.

To test the code, we called the function mymin three times with different inputs and each time the function mymin returned the correct values.

Python Code:

Function mymin:

def mymin(str_1,str_2):

   if str_1<str_2:

       return print("Smallest is:",str_1)

   else:

       return print("Smallest is:",str_2)

Test code:

mymin("Alpha","Beta")

mymin("Z","S")

mymin("Monday","Wednesday")

Output:

Smallest is: Alpha  

Smallest is: S  

Smallest is: Monday

(Alphabetically Alpha comes first than Beta)

(Alphabetically S comes first than Z)

(Alphabetically Monday comes first than Wednesday)

You might be interested in
Read the lines from Hammurabi's Code below:
Nutka1998 [239]

Answer:

ito increase the power of mesopotamian leaders

Explanation:welcome :))

8 0
3 years ago
Label the images with the type of physical weathering shown
klio [65]

Answer:

the end of it try to it to persona for cappe d

Explanation:

8 0
3 years ago
Which option best completes the diagram?
mr Goodwill [35]

yea it's d i just did it rn

3 0
3 years ago
Read 2 more answers
All of the following statements describe the author of the Bill of Rights, EXCEPT:
asambeis [7]
Pretty sure B but it could be C
6 0
2 years ago
How many games do you have to win to win the world series?
EleoNora [17]

Answer:

4/7 games

Explanation:

8 0
3 years ago
Other questions:
  • Compare robert fulghum's list of things learned in kindergarten to franklin list of virtues
    5·1 answer
  • Where is the Ob River in Asia?<br>north<br>east<br>west<br>south​
    9·1 answer
  • What was the deal between chief john ross and general winfield scott
    15·1 answer
  • 2. Provide a range of examples of physical diversity (the physical representation or sign of
    10·1 answer
  • 3. Which leader is most closely associated with the use of civil disobedience in a struggle to end colonial rule?
    14·1 answer
  • Which concept assumes that elections determine who governs and what policies will be enacted into law
    10·1 answer
  • Witch us city has a longitude closest to 80° W?
    5·1 answer
  • 1) Explain two contrasting beliefs in contemporary British society about sex before marriage.
    8·1 answer
  • What are the ten most significant events of World War I?
    7·1 answer
  • Bestfriend??????? ??????
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!