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

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!