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
Suppose you are buying a car. How would the trade-offs disscussed above affect your decision?
8_murik_8 [283]

Answer:

When purchasing a vehicle it is important to weigh out your decisions prior to your purchase. Safety is very important but it comes with a price. For example if you want airbags and anti-lock brakes you will need to buy a newer vehicle and that will cost you more money. If you want to drive a larger SUV that will protect you more because of its size you will be paying more for gas. It all comes down to a person's views on safety and personal freedoms...and of course cost of the vehicle. For me it will always boil down to cost and efficiency of the vehicle.

Explanation:

I did the homework in class and got it correct.

5 0
3 years ago
During the middle of a test, your instructor announces that there's a typographical error on one of the questions. As you listen
Amanda [17]

Answer:

The temporal lobe.

Explanation:

The temporal lobe is the part of the brain where the processing of auditory information, sound, takes place. Since the information you receive when the instructor is making the announcement is audio, in his speech, it is processed in the temporal lobe. It is also where the primary auditory cortex is located which is responsible for converting auditory information into words and sentences to make it understandable.

7 0
3 years ago
With a seemingly obvious ending, why should a reader continue reading the story? A to witness Farquhar’s death
Airida [17]

Answer: C.

Explanation: An Occurrence at Owl Creek Bridge is a short story from the time of the civil war written by Ambrose Bierce in 1886.

The first part of the story begins with the description of a man being suspended on Owl Creek Bridge by two soldiers. In the moments before man's death time seems distorted and slows down. The man thinks how he could loosen the knot.

4 0
3 years ago
Read 2 more answers
Enumerale below the specific responsibilities of a presiding officer​
lakkis [162]

Answer:

Mainly responsible for the conduct of ballot at the polling station

7 0
3 years ago
Which of the basic teachings of Confucianism do you think would have best helped the Chinese people restore order?
Arada [10]

Answer:

Trying to restore order, harmony, and moral conduct for the people. To maintain balance

Explanation:

Hope this helps

7 0
3 years ago
Other questions:
  • Which one of the following demonstrates good​ character?
    10·1 answer
  • Which term refers to whether a value is seen as positive or negative?
    9·1 answer
  • Jerry is suffering from schizophrenia. His friends and family find it difficult to derive meaning from his speech although he fo
    8·1 answer
  • You will write an encyclopedia entry describing a geographic feature of South America. Describe it's location, climate, what can
    14·1 answer
  • How did the achievements of the Gupta empire make higher-level mathematics possible? A. They invented writing materials that all
    9·2 answers
  • People's scores on an extraversion test do not neatly predict how sociable they will be on any given occasion. This finding ques
    15·1 answer
  • 'घुस खान्या र घुस दिन्या दुवै देशका महासत्र हर translate in english plz fast guys☹️​
    8·1 answer
  • Plz dont give me a file cuz it wont let me open it
    13·2 answers
  • Mention any two economic activities of people living in province no 1 of nepal​
    14·1 answer
  • Which action would a pro-law enforcement interest group most likely take to
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!