Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions