Question: Scenario 1: Write a program to print out the elements of a list, one element per line, using a for-loop. Declare and initialize the list

Scenario 1: Write a program to print out the elements of a list, one element per line, using a for-loop. Declare and initialize the list in your program (see below for example). Your list should contain at least 6 names but you may choose the actual names to include in your list. When printing out the names in the list, prefx each name with a sequential number (starting at 1) followed by a period and a space. So for example, if you had a list of names such as myNames "Andre", "Susan", "Marie", "Rafael, "Bob", "Bill" You program would print: 1. Andre 2. Susan 3. Marie 4. Rafael 5. Bob Remember that you can access an individual element of a list. For example: myNames[2] is equal to Marie". Inside a loop you could use: myNamesi] to access the i-th element of a list. Recommendation: start by getting your program to just print the name before worrying about the prefix. Once you get that working, save a copy of your program before you start modifying it to add the number prefix
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
