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
how do women provide food for their families in nicaragua? they work at the electricity company they sell their produce at the m
nasty-shy [4]

Answer:the dont

Explanation:

jds;av

3 0
3 years ago
A reporter meets a fire truck at a huge blaze engulfing a large house. The reporter asks the firefighters if she can follow them
Agata [3.3K]

Answer:

B). Able to successfully sue the reporter for intrusion if the homeowner did not give the reporter permission to be in the house.

Explanation:

As per the given description, the homeowner would probably be 'able to sue the reporter successfully for intruding if the homeowner himself didn't allow the reporter to be present in the house' as the reporter entered the house without the permission of the home's owner but rather entered with the permission of the firefighters. Since the house belongs to the owner he/she possess the legal rights to sue any person for intrusion who has engulfed his/her house without prior permission. Therefore, <u>option B</u> is the correct answer.

3 0
3 years ago
In what way did exploration and intercultural contact during the Renaissance, throughout trade, effect the citizenship and ident
Schach [20]
They were at war and enemies
4 0
3 years ago
Georgia has 159 small counties. How does this benefit the citizens of Georgia?
pshichka [43]

Answer:

is d

Explanatiion : usa test prep its the answer

3 0
3 years ago
Most adults are more likely to choose a birth-control method that is said to have a 95% success rate than one that is said to ha
Marina86 [1]

Answer:

the impact of contraception and deceitful times on the parents

5 0
3 years ago
Other questions:
  • "which fields will probably raise more urgent and entangled ethical issues in robotics?"
    15·1 answer
  • Lily covers her husband's alcohol-related absences by lying to his boss. a behavior therapist is most likely to say that lily's
    12·2 answers
  • ______ intelligence has been suggested by goleman to be a more powerful influence in life than more traditional views, even thou
    5·1 answer
  • Ike has been diagnosed with depression. dr. kluivert supports the biological model of abnormality, and so recommends that ike be
    13·1 answer
  • Which of the following is an example of a reserved power?
    10·2 answers
  • Explain three ways that Europeans have changed their land
    8·2 answers
  • Which of the following is NOT a type of electronic surveillance?a. CCTVb. Night Visionc. Stakeoutd. Eavesdropping
    10·1 answer
  • Based on the passage which of the following statements about civilization X is true
    15·1 answer
  • Write a letter to your friend describing the importance of religious tolerance ​
    5·1 answer
  • How can right to information be more effective​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!