Question: This is using python 1. Write a Python program that declares two lists. a. Set the values in the first list to [-3, o, 3,

 This is using python 1. Write a Python program that declares

This is using python

1. Write a Python program that declares two lists. a. Set the values in the first list to [-3, o, 3, 6] by initializing on the line where the list is declared. Print the elements of the list using fields 3 characters wide for each element. b. Build the first list up to [-3, 0, 3, 6] by starting with an empty list [Il and using a counting loop whose loop index variable goes from 1 to 4 and finding a formula that converts the loop variable into the needed values. Use the append member function of the list to add to the list. (Spend some time thinking about this, as it may be useful later.) Print the list using fields 5 characters wide for each element. Declare an empty list. Use a loop and, within it, prompt the user for integer values (they needn't be the ones from parts a and b) and add each value the user enters into the first array directly. After each number is entered, ask the user whether or not to continue. After the user chooses not to enter more numbers, print the list. Use a loop to fill a second array with the values from the first array from part c) in reverse order. Print the second array. c. d. Hint: Get the code to work without worrying about the print formatting first

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!