Challenge: Mad Lib Generator
Explore how to build a Mad Lib generator by creating Python functions that take a noun, verb, and adjective as inputs to generate silly sentences. Understand function definition, parameter use, and function calls to make your code interactive and reusable.
We'll cover the following...
We'll cover the following...
Let’s build a simple Mad Lib generator using a function.
Your task is to:
Create a function named
madlibThe function should accept three words:
a noun
a verb
an adjective
Inside the function, print a sentence that uses all three words.
For example, your program should be able to produce a sentence like:
“The silly cat decided to dance all day.”