Assignment 5 – Shakespearean Insult Generator Due: Sunday, May 1,…

Question Answered step-by-step Assignment 5 – Shakespearean Insult Generator Due: Sunday, May 1,… Assignment 5 – Shakespearean Insult GeneratorDue: Sunday, May 1, 2022Maximum Points = 40 The purpose of this lab is to introduce you to files and lists and continue the use of loops, functions, and conditional (decision) statements in the python programming language. Your program will generate insults in the Elizabethan vernacular of Shakespeare. [see http://www.pangloss.com/seidel/Shaker/ and http://www.william-shakespeare.org.uk/a2-shakespeare-insult-generator.htm for examples] As a new student intern at the CHattahoochee valley Arts and Origami Society (CHAOS), you have been asked to write S.I.G. (Shakespearean Insult Generator), a program that generates insults using words and phrases that might have been used by Shakespeare (e.g. Eat my knickers, Thou saucy swag-bellied dewberry!.) Each insult will have four parts: a phrase followed by the word Thou, followed by two adjectives and a noun. Your program will read data from four text files containing the phrase and word lists.  Your program will allow the user to continue to use S.I.G. to generate insults until the user tells the program to stop.  [NOTE: the four text files must be in the SAME folder as your program] Your program must include the following functions: A  function main that “controls” the program generating insults until the user tells the program to stop.A function that receives a filename and returns a list of phrases from the file (ad1.txt, adj2.txt, nouns.txt, phrases.txt) storing them in one list for each file.ONE function that receives a list of phrases and randomly selects a phrase from the list to be returnedA function that receives the four phrases and combines the selected phrases for each part of the insult to be printed. Make sure that your program uses complete documentation.############################################ PROGRAM SPECIFICATIONS# NARRATIVE DESCRIPTION:## (your name) # (date)########################################### Computer Science Engineering & Technology Python Programming CPSC 1301 Share QuestionEmailCopy link Comments (0)