subject
Computers and Technology, 20.01.2021 05:20 giovney

Create a new program in Repl. it called "Lists." Your goal for this program is to create sections of code that will perform different outputs with 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, -64, -80. At the beginning of your program, add in any comments and create the two lists. Then create the following: A loop that will output every other name in the names list.
A loop that will output only the positive numbers in the numbers list.
A loop that will output the sum of all the values in the numbers list.
A loop that will output only the numbers that are odd.
A loop that will output only the names that come before "Thor" in the alphabet from the names list.
A loop that will find the maximum or minimum value in the numbers list. This algorithm requires an additional variable that is assigned to the first element in the list. Then, in a loop compare each element to the variable. If the element is > (for max) or < (for min), assign the variable to the element. After the loop, print the variable.
Include an explanation to describe how the use of this data abstraction (using a list to store the names and a list to store the numbers) manages complexity in the program code. Explain how your code would be different if every name and number were a different variable instead of being stored as one unit in the two lists. You may submit your response on a separate piece of paper or in the top comment section of your program code.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:10
Assume that to_the_power_of is a function that expects two int parameters and returns the value of the first parameter raised to the power of the second parameter. write a statement that calls to_the_power_of to compute the value of cube_side raised to the power of 3 and that associates this value with cube_volume.
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
3. when you right-click a linked spreadsheet object, what commands do you choose to activate the excel features? a. linked worksheet object > edit b. edit data > edit data c. linked spreadsheet > edit d. object > edit data
Answers: 2
question
Computers and Technology, 23.06.2019 22:30
What would be the address of the cell, which is at the intersection of the second row and the third column in a worksheet?
Answers: 1
question
Computers and Technology, 24.06.2019 05:00
Who is most likely be your target audience if you create a slide presentation that had yellow background and purple text
Answers: 2
You know the right answer?
Create a new program in Repl. it called "Lists." Your goal for this program is to create sections of...
Questions
question
Mathematics, 12.03.2020 07:35
question
Mathematics, 12.03.2020 07:36
question
Mathematics, 12.03.2020 07:36
question
Mathematics, 12.03.2020 07:36
question
Mathematics, 12.03.2020 07:36
Questions on the website: 13722359