Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started