Question: Write a function madlibs() that takes in 4 parameters. A list of nouns, a list of verbs a list of adjectives and some text. The

Write a function madlibs() that takes in 4 parameters. A list of nouns, a list of verbs a list of adjectives and some text. The text will have NNN for a place to inject a random noun from the list, VVV to inject a random verb from the list and AAA to inject a random adjective from the list. The function will print the text with the values replaced. Here is some sample output. ===== RESTART: C:/Users/azoko/Desktop/C5C 241/Week 9/hw8-solutions.py ====== The hungry girl ran at the rather A guard looked at the dog and then shouted at the hungry guard > > > ----- RESTART: C:/Users/azoko/Desktop/CSC 241/Week 9/hw8-solutions.py ----- The hungry donkey song at the teacher A teacher looked at the dog and then at the stunned father > > > ===== RESTART: C:/Users/azoko/Desktop/csc 241/Week 9/hw8-solutions.py ===== The stunned dog new at the boy A policeman looked ac the donkey and then shouted at the silly dog
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
