Question: Python 10.3 We will create several functions to build and fill out a mad lib. Step 1. create a function named get_animal that returns the

Python 10.3

We will create several functions to build and fill out a mad lib.

Step 1. create a function named get_animal that returns the name of an animal. You can pick any animal to return. Do this first (before reading any more). Once that is done, the following should work:

 
 

print(get_animal())

Step 2. create a function named get_person that returns the name of a person (or a type of person (e.g. grandma). The following should work.

 
 

print(get_person())

Step 3. create a function named get_game that returns the name of a game that can be played.

 
 

print(get_game())

Be sure to finish the above functions before continuing -- otherwise you will have no fun with your madlib!

Step 4. Create a function named mad_lib that takes three parameters (named animal, person, game). Once that is done, you should be able to call it:

 
 

mad_lib('ox', 'bob', 'checkers')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!