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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started