Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the random module, write a function (random_words) which receives a string containing text to analyze, and generates a random sample of 'n' words from

Using the "random" module, write a function ("random_words") which receives a string containing text to analyze, and generates a random sample of 'n' words from Frankenstein (assume that a space (' ') is used to separate words). Your word list should be of 100 distinct (non-repeating), lower case words, and you may want to use the functionality provided by the "set" data type to help with this.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Auditing Theory

Authors: Ian Dennis

1st Edition

1138599700, 978-1138599703

More Books

Students also viewed these Accounting questions