Question: USE PYTHON (JUPYTER) Dead Parrot Sketch https://www.ibras.dk/montypython/episode08.htm#6 Praline Hello, I wish to register a complaint...Hello? Miss? Shopkeeper What do you mean, miss? Praline Oh I'm
USE PYTHON (JUPYTER)
Dead Parrot Sketch https://www.ibras.dk/montypython/episode08.htm#6 Praline Hello, I wish to register a complaint...Hello? Miss? Shopkeeper What do you mean, miss? Praline Oh I'm sorry, I have a cold. I wish to make a complaint! Shopkeeper Sorry, we're closing for lunch. Praline Never mind that, my lad. I wish to complain about this parrot what I purchased not half an hour ago from this very boutique. Shopkeeper Oh yes, the, the Norwegian Blue. What's wrong with it? Praline I'll tell you what's wrong with it, my lad. It's dead, that's what's wrong with it! Shopkeeper No, no, it's resting, look! Praline Look my lad, I know a dead parrot when I see one, and I'm looking at one right now. Shopkeeper No no sir. it's not dead. It's resting! Praline Resting? Shopkeeper Yeah, remarkable bird, the Norwegian Blue, beautiful plumage, innit? Praline The plumage don't enter into it - it's stone dead. Shopkeeper No, no - it's just resting! Praline All right then, if it's restin', I'll wake him up! (shouts into cage) Hello Polly! I've got a nice cuttlefish for you when you wake up, Polly Parrot! Shopkeeper (jogging the cage) There, it moved! Praline No, he didn't. That was you pushing the cage! Shopkeeper I did not. Praline Yes, you did! (takes parrot out of cage, shouts) Hello Polly, Polly (bangs it against the counter) Polly Parrot, wake up. Polly. (throws it in the air and lets it fall to the floor) Now that's what I call a dead parrot. Shopkeeper No, no. It's stunned. Praline Look my lad, I've had just about enough of this. That parrot is definitely deceased. And when I bought it not half an hour ago, you assured me that its lack of movement was due to it being tired and shagged out after a long squawk. Shopkeeper It's probably pining for the fjords. Praline Pining for the fjords, what kind of talk is that? Look, why did it fall flat on its back the moment I got it home? Shopkeeper The Norwegian Blue prefers kipping on it's back! Beautiful bird, lovely plumage! Praline Look, I took the liberty of examining that parrot, and I discovered the only reason that it had been sitting on its perch in the first place was that it had been nailed there. Shopkeeper Well of course it was nailed there. Otherwise it would muscle up to those bars and voom. Praline Look matey (picks up the parrot) this parrot wouldn't voom if you put four thousand volts through it! It's bleedin' demised! Shopkeeper It's not, it's pining! Praline It's not pining, it's passed on. This parrot is no more! It has ceased to be. It's expired and gone to meet its maker.This is a late parrot. It's a stiff. Bereft of life, it rests in peace. If you hadn't nailed it to the perch it would be pushing up the daisies. It's rung down the curtain and joined the choir invisible. This is an ex-parrot. Shopkeeper Well, I'd better replace it, then. Praline (to camera) If you want to get anything done in this country you've got to complain till you're blue in the mouth. Shopkeeper Sorry guv, we're right out of parrots. Praline I see. I see. I get the picture. Shopkeeper (pause) I got a slug. Praline Does it talk? Shopkeeper Not really, no. Praline Well, it's scarcely a replacement, then is it? Shopkeeper Listen, I'll tell you what, (handing over a card) tell you what, if you go to my brother's pet shop in Bolton he'll replace your parrot for you. Praline Bolton eh? Shopkeeper Yeah. Praline All right.

Question 1b (6 marks) Using the Dead Parrot Sketch script (copyright Monty Python) process the text to: 1. Count the words in the text, ignoring the first line and the character's names (Praline and Shopkeeper) 2. Output the number of times the word "parrot" is used (ignoring case) 3. Output the ten most frequent words In [2]: filename = 'deadparrot.txt' book = open(filename).read() print(" TEXT ANALYSIS ") print("Number of parrots: ") print("Ten most frequent words: ") TEXT ANALYSIS Number of parrots: Ten most frequent words
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
