Question: 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

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!