Question: Question: Create a new program in Rep|.it called Lists. Your goal for this program is to create sections of code that will perform different outputs

Question:

Question: Create a new program in Rep|.it called "Lists." Your goal for

Create a new program in Rep|.it called "Lists." Your goal for this program is to create sections of code that will perform different outputs with two lists. Your code will traverse the list called [names] , which contains the following values; Peter. Bruce, Steve, Tony, Natasha. Clint. Wanda. Hope, Danny, Carol; and the list called [numbers] , which contains the following values; 100. 50, 10, 1, 2. 7, 11. 17, 53. -8, -4, -9, .72! 764, 780. At the beginning of your program, add any comments, and create the two lists. Then create the following: 1. A loop that will output every other name in the names list. 2. A loop that will output only the positive numbers in the numbers list. 3. A loop that will output the sum or average of all the values in the numbers list. 4. A loop that will output only the numbers that are odd. 5. A loop that will output only the names that come before "Thor" in the alphabet from the names list. 6. A loop that will nd the maximum or minimum value in the numbers list. This algorithm requires an additional variable that is assigned to the rst element in the list. Then, in a loop compare each element to the variable. lfthe element is > lfor max) or

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 Programming Questions!