Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

need some help with my home work 2

This assignment asks you to practice with “regular expressions” (import re) to create a Mad Libs program. A madlib is a story that has blank words. The player is asked to give a list of words that will be inserted into the story. But the player doesn’t know how the words will be used; he/she is only asked to give a noun, an adjective, etc. without knowing what the story is first. Then, the player is shown the complete story, and it can be funny at times.

Your program should ask the user for a filename that contains a story with missing words (“tags”). These missing words will have this format: {noun1} or similar (adjective, plural_noun, whatever), always in braches ({}). The program uses a regular expression to find each {} tag and asks the user for the value for that tag. Then the program replaces every occurrence of that tag (there could be more than one occurrence of the same tag) with the word the user typed. Then the program asks for the word for the next tag, until there are none left. Finally, the program prints the story that the user created.

 
"Looking for a Similar Assignment? Order now and Get 10% Discount! Use Code "Newclient"