Question: Write and test a Python program that begins like this: word_list = 10 * [''] print(word_list) Actually, test this much of the program and notice

Write and test a Python program that begins like this:

word_list = 10 * ['']

print(word_list)

Actually, test this much of the program and notice that you have created a list consisting of ten empty strings.

Then, continue the program by setting up a while loop, using a loop counter count like before, and have it loop exactly ten times. Each time through the loop, prompt the user to enter a word (string data), and change the entry in position count of word_list to be the user's word. After the loop, display word_list using a simple print statement (no looping here). Test all this before continuing. Finally, after all that, set up a second while loop at the end of your program for the purpose of printing the words in the list, one at a time, using a separate line for each word. Each time through this second loop, one word should be displayed.

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!