Advanced Placement (AP)
Advanced Placement (AP), 30.12.2020 02:10, Clivensp5

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:
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 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 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.
HINT: len() is a helpful method that can be used on strings or lists to determine how
For lists that would mean how many elements are inside and for strings,

answer
Answers: 1

Other questions on the subject: Advanced Placement (AP)

image
Advanced Placement (AP), 23.06.2019 13:20, jaliyahmw
Iwill give anyone points if they me right now q: sustainable development is related to pollution in that a. sustainable development allows pollution to continue at current levels. b. sustainable development increases pollution of all types. c. addressing pollution is a factor in sustainable development. d. sustainable development incorporates pollution as a benefit. e. pollution levels will decrease with development.
Answers: 2
image
Advanced Placement (AP), 23.06.2019 18:30, mikey8510
Describe the social and economic challenges facing the newly formed country of slovakia.
Answers: 1
image
Advanced Placement (AP), 23.06.2019 19:00, tiffanyheist
Read the scenario below and answer the question that follows. bailey is plagued with sleep problems at least a couple of times a week. she often feels tired at work and doesn't do her best work because she is "just so tired." according to the lesson, it can be said that adults have some of the same problems with sleep that bailey does. a. few b. many c. no d. all
Answers: 1
image
Advanced Placement (AP), 24.06.2019 07:40, trevorhenyan51
Type the correct answer in each box. use = 3.14 and if necessary, round your answers to the nearest hundredth. the area of the largest cross section of a sphere and the circumference of the sphere are in the ratio 4: 1. cm. the area of the largest cross section is about the radius of the sphere is cm. the circumference of the sphere is about cm2. the volume of the sphere is about cm?
Answers: 1
Do you know the correct answer?
Create a new program in Repl. it called "Lists." Your goal for this program is to create sections o...

Questions in other subjects: