Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a module named randStr.py that has 3 functions. Each function has an optional second parameter to set a particular seed. 1) randWord accepts a

Write a module named randStr.py that has 3 functions. Each function has an optional second parameter to set a particular seed.

1) randWord accepts a string and will return a random word from that string (return value is string). 2) strMixer will randomly change words inside the string and returns a string -- If the string is only one word, then it will mix the letters of the word and return the mixed word as a string 3) randIntForWord accepts a word and then returns a random integer between 0 and 100,000; the same word should return the same random integer.

Import the 3 functions in the main file and call each of them 5 times (with and without seed).

If the module is called directly, print the following message: "Sorry, but this module can only be imported!"

code needed in Python V3.x

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

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

Describe the four specific guidelines for using the direct plan.

Answered: 1 week ago