Respuesta :
Answer:
Everything but Thor should be right
Explanation:
numberrs = 0
names = ["Peter","Bruce","Steve","Tony","Natasha","Clint","Wanda","Hope","Danny","Carol"]
numbers = [100,50,10,1,2,7,11,17,53,-8,-4,-9,-72,-64,-80]
for index, element in enumerate(names):
if index %2 == 0:
print(element)
for numberrs in numbers:
if numberrs >= 0:
print (numberrs, end = ' ')
average = sum(numbers) / len(numbers)
print(average)
for numberrs in list(numbers):
if numberrs % 2 != 0:
print (numberrs, end = ' ')
for TN in names:
if TN == "Thor":
break
else:
print({TN})
maxmin = numbers[0]
for numberrs in numbers:
if numberrs < maxmin:
maxmin = numberrs
print (maxmin)
maxmin=numbers[0]
for numberrs in numbers:
if numberrs > maxmin:
maxmin = numberrs
print(maxmin)
The program is an illustration of loops and conditional statements.
Loops are used to perform iterations, while the execution of a conditional statement is dependent on its truth value
The program in Repl.it where comments are used to explain each line is as follows:
#This initializes numberrs to 0
numberrs = 0
#This initializes the name lists
names = ["Peter","Bruce","Steve","Tony","Natasha","Clint","Wanda","Hope","Danny","Carol"]
#This initializes the number lists
numbers = [100,50,10,1,2,7,11,17,53,-8,-4,-9,-72,-64,-80]
#This iterates through the names
for index, element in enumerate(names):
#This prints every other names
if index %2 == 0:
print(element)
#This iterates through the numbers
for numberrs in numbers:
#This prints all positive numbers
if numberrs >= 0:
print (numberrs, end = ' ')
#This calculates the average
average = sum(numbers) / len(numbers)
#This prints the average
print(average)
#This iterates through the numbers
for numberrs in list(numbers):
#This prints odd numbers
if numberrs % 2 != 0:
print (numberrs, end = ' ')
#This iterates through the names
for TN in names:
#This prints names that come before "Thor"
if TN == "Thor":
break
else:
print({TN})
#This initializes the minimum to 0
maxmin = numbers[0]
#This iterates through the numbers
for numberrs in numbers:
#This determines the minimum of the list
if numberrs < maxmin:
maxmin = numberrs
#This prints the minimum of the list
print(maxmin)
#This initializes the maximum to 0
maxmin=numbers[0]
#This iterates through the numbers
for numberrs in numbers:
#This determines the maximum of the list
if numberrs > maxmin:
maxmin = numberrs
#This prints the minimum of the list
print(maxmin)
Read more about similar programs at:
https://brainly.com/question/17140981