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
Which network is the predecessor of the Internet? the World Wide Web ARPANET ENQUIRE CERN
allsm [11]

<em>The right answer is: </em><em>ARPANET </em>

ARPANET <em>(The Advanced Research Projects Agency Network)</em> was funded by the Advanced Research Projects Agency in 1969 and it was the first network to implement the protocol suite TCP/IP. ARPANET later became the technical foundation of the Internet. ARPANET was developed using designs of Donald Davies, Leonard Kleinrock, Lawrence Roberts, and Paul Baran.

3 0
3 years ago
.
Bumek [7]
B. He was always able to help out but was always sneaking around.

3 0
3 years ago
Read 2 more answers
When a company purchases new technology what is their intention for their productivity?
Ierofanga [76]
The main goals of new technology is to expand reach, ease of production, and make advancements in certain fields.
5 0
3 years ago
Read 2 more answers
Giorgio memorizes the german poem "the erlking" to recite in his eighth grade german class. he remembers it well for weeks after
krek1111 [17]

The correct answer we are looking for is the transience.


One of the seven sins of memory. The ability of Giorgio to recite a poem fades because of the so called transience.


This is known as the transitory nature. Transience means passing with time or is the state of being brief and short-lived.

6 0
3 years ago
Read 2 more answers
When scientist share knowledge they help each other with scientific research. Why do scientist share knowledge?
Solnce55 [7]
So they can match data together, or confirm different findings with more opinions.
7 0
3 years ago
Read 2 more answers
Other questions:
  • Why do some argue that direct democracy is simply a way for the wealthy and businesses to get their own policies passed?
    15·1 answer
  • By not following the precedent set by George Washington of only running for two terms, ___________'s fourth term in office promp
    14·1 answer
  • What best describes Patrick Henry?​
    15·1 answer
  • What is the old world and new world
    15·1 answer
  • What happened in 1931? in canada
    7·1 answer
  • Identify each statement about anthropologists studying sexuality as characteristic of anthropology before World War II, or since
    5·1 answer
  • Which of these choices is an English rule that allows the public to cross low
    12·1 answer
  • Skills and strategies to overcome stress causes by change​
    14·1 answer
  • 1. The stimulus package passed the House of Representatives. For it to become law it still has to be passed by the _____________
    10·2 answers
  • vincent and luca are brothers who are exceptional athletes, while their younger brother malcolm is frail. this comparison and th
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!