Question: Write in Python Write a function called scramble_words, which takes a string parameter and returns a string containing the same words but randomly reordered. Randomness

Write in Python

Write a function called scramble_words, which takes a string parameter and returns a string containing the same words but randomly reordered. Randomness means each time you re-run it even with the same input, you're likely to get a different result. Remember weve used the random.randint() function before, and itll be very handy here. The function should discard punctuation before it scrambles.

For example, scramble_words(I do not like green eggs and ham.) might return ham like I not do green and eggs

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!