A popular utility for applications.
Roly Poly is a classic nursery rhyme for teaching young children opposites such as up and down, big and small, fast and slow. In the rhyme, the word, "up" can be replaced with "big", and the word, "down" replaced with "small" in the second verse.
Write a program that asks the user which word they want to replace in the rhyme: roly poly roly poly up up up roly poly roly poly down down down. The individual words can be stored in a list. All occurances of that word are replaced with a word chosen by the user.
Note: do not use the .replace() method if you are aware of it. You are writing the code that might have been used to make that method.
Use this boilerplate code as a starting point:
Remember to add a comment before a subprogram, selection or iteration statement to explain its purpose.
roly
poly
roly
poly
up
up
up
roly
poly
roly
poly
down
down
down
Which word to replace? :up
Replace with what? :big
roly
poly
roly
poly
big
big
big
roly
poly
roly
poly
down
down
down
Use these resources as a reference to help you meet the success criteria.
Run the unit tests below to check that your program has met the success criteria.
Which word to replace? :down
Replace with what? :slow
roly
poly
roly
poly
up
up
up
roly
poly
roly
poly
slow
slow
slow
Which word to replace? :down
Replace with what? :small
roly
poly
roly
poly
up
up
up
roly
poly
roly
poly
small
small
small
Which word to replace? :up
Replace with what? :big
roly
poly
roly
poly
big
big
big
roly
poly
roly
poly
down
down
down
Which word to replace? :up
Replace with what? :fast
roly
poly
roly
poly
fast
fast
fast
roly
poly
roly
poly
down
down
down
Check that you have: