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 of the following is NOT a role of industrial hygienists? a) Determining the extent of employee exposure to hazards b) Trai
lana [24]

Answer:

b) Training employees on the recognition of hazards

Explanation:

Including the ones in the previous list (except for b), the roles of industrial hygienists are:

  • To investigate and examine the workplace in search of hazards and possible dangers and develop techniques for their control and prevention.
  • To recommend basics for the improvement of workers' safety and the people around them and control that they are respecting the principles of safety and health.
  • To carry out research to give workers information about potentially dangerous conditions in the place where they work.
  • To advise members of the government and take part in the elaboration of regulations to guarantee safety and health for workers and their families.
8 0
3 years ago
The National Bureau of Economic Research announced that the U.S. economic recession that began in December of 2007 hit a trough
NeX [460]
The answer is cyclical unemployment.

I hope this helps!
8 0
3 years ago
Which form of government do both the federal and all state governments share?
kondor19780726 [428]
The answer is socialism
6 0
3 years ago
What were negative events in America during the 1920s?
SVETLANKA909090 [29]
On October 29 1929 the stock market crashed causing the great depression. Families lost homes insurance jobs etc.
6 0
3 years ago
Which concept did Thorsten Veblen come up with which refers to the outward display of consumption that demonstrates wealth and p
Marat540 [252]

Answer:

The correct answer to the following question will be "Conspicuous consumption".

Explanation:

  • Conspicuous or Apparent consumption is buying services again for a particular purpose of showing an individual's wealth as well as denotes exposure to a broad variety of luxury goods or essentials.
  • This appears to be a matter of displaying oneself social standing, particularly whenever the prominently visible goods are also too costly to several other representatives of such a category of an individual.

So that the above is the right answer.

5 0
3 years ago
Other questions:
  • Research on children reaised in orphanages has found that
    6·2 answers
  • Why did America get involved in the Korean War?
    7·2 answers
  • Which of the following is an example of observational learning?
    6·1 answer
  • Why was the Republican<br> plan for Reconstruction called "Radical<br> Reconstruction"?
    8·1 answer
  • Harry believes that men are more likely than women to pass religious values to their children. However, Steven disagrees and arg
    15·1 answer
  • HELP!!! I am writing an essay on the French Revolution and would like some help. The prompt is: Was the French Revolution a succ
    7·1 answer
  • To get a haircut good or service
    9·2 answers
  • What historical circumstances led to the rise of classical civilizations in india?
    13·1 answer
  • What was the purpose of the community reinvestment act of 1977?.
    11·1 answer
  • A client recovering from a stroke complains of pain. the nurse suspects this client is most likely experiencing which type of pa
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!