Question: Please use Python. Please Explain. Thanks 4. (Monkeys and Shakespeare, 15pt) The story goes that if a bunch of monkeys start typing away at some

Please use Python. Please Explain. Thanks  Please use Python. Please Explain. Thanks 4. (Monkeys and Shakespeare, 15pt)The story goes that if a bunch of monkeys start typing awayat some typewriters (what we call keyboards now), they'll eventually produce allof Shakespeare works (since the odds are positive, so if you wait

4. (Monkeys and Shakespeare, 15pt) The story goes that if a bunch of monkeys start typing away at some typewriters (what we call keyboards now), they'll eventually produce all of Shakespeare works (since the odds are positive, so if you wait long enough itll happen). We don't have enough time and resources to test this theory, so we'll work with a simplified version. a) [5pt] Write a function randline(I) that creates a random line made up of letters t, 'o', b', e', r, 'n, and and ends in a n. Here are some sample runs: Python 3.5.2 Shell File Edit Shell Debug Options Window Help >>>randline (10) 'ttn b rtrr ' >>> randline (20) 'brnbnbbrrrr no bo rn ' >>>randline (30) obb rtoortnronror rbbr bbtbbb ' 1 Ln: 106 Col:4 Hint: research the choice method in random to help you make the random selection

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!