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
what does something mean when it says, "What types of documents might you examine to try and answer these questions?"
DanielleElmas [232]

Answer:

I think it means like historical or modern documents that you can use to answer some questions that you have

Explanation:

I think-

4 0
3 years ago
Analyze the map below and answer the question that follows.
NNADVOKAT [17]

Answer:

D

Explanation:

it is in vietnam and it has labelled two mountain ranges

8 0
2 years ago
Read 2 more answers
There are five one-digit numbers in a set of data . The mean of the number is 3 A mode is 1 the median is 4 what are the numbers
malfutka [58]

Answer: the missing numbers are 6 and 3

Explanation:

Given that mean of five numbers is 3

Mode is 1, means that 1 appeared more than once in the data set

And median is 4, means the middle number is 4

Therefore, it can be represented as 1, 1, 4, p, q

Where p and q are the missing numbers

Mean (3) = 1 + 1+ 4+ p+ q/5

3 =6 + p + q/5

We cross multiply to give:

5 x 3 = 6 + p + q

15= 6 + p +q

Make p + q the subject :

p + q = 15 - 6

= 9

The sum of the two missing numbers equals 9, we can think of two numbers that equals 9.

However, we cannot use 5 and 4, because we already have the mode given as 1

We therefore use 6 and 3, 7 and 2 or 8 and 1

I hope this helps, please mark as brainliest answer.

5 0
3 years ago
Why does correlation not equal causation psychology?
alexandr402 [8]
I believe Correlation is not causation" means that just because two things correlate does not necessarily mean that one causes the other. As a seasonal example, just because people in the UK tend to spend more in the shops when it's cold and less when it's hot doesn't mean cold weather causes frenzied high-street spending.
3 0
3 years ago
The Kyoto protocol works by _______. a. mandatory involvement b. voluntary involvement c. imposing trade restrictions on nonpart
Alinara [238K]
The answer is b.voluntary involvement
7 0
3 years ago
Read 2 more answers
Other questions:
  • What is the principal determinant for the release of ADH from the posterior pituitary gland? Does ADH favor the formation of dil
    7·1 answer
  • Question: An accused person refuses to make statements against himself when he is arrested for a crime. What amendment protects
    7·1 answer
  • Which psychological disorder is characterized by major disturbances in thought
    9·1 answer
  • Larger economic interest groups are less successful in influencing foreign policy than narrower groups because larger groups sel
    14·1 answer
  • If a person's headache goes away when he takes aspirin, the person is then more likely to take aspirin in the future. this is an
    10·1 answer
  • Pierre has always been a chronic snorer, much to the dismay of his wife hazel. for the last three months, he has been waking up
    9·1 answer
  • Many American Indians died during colonization after European settlers
    12·1 answer
  • DUE RIGHT-NOW <br> PLEASe
    14·1 answer
  • Labels and placards are one of the basic clues for identifying Hazardous Materials (HazMat) incidents. __________ are defined as
    8·1 answer
  • Which list discussed in dave crenshaw’s training video helps sort gathering points?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!