Question: Functions in Python Create a function called MadLib() which has the following parameters: - noun n1 (str) - noun n2 (str) - adjective a1 (str)
Functions in Python
Create a function called MadLib() which has the following parameters:
- noun n1 (str) - noun n2 (str) - adjective a1 (str) - adjective a2 (str) - verb v (str)
Your function MadLib should receive inputs n1, n2, a1, a2, v and print a grammatically correct sentence using those words.
For example, if the user inputs ('bananas', 'beans', 'red', 'large', 'eating') you might write your function so that it prints: I am eating red bananas and large beans!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
