Answer:
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 num in numbers:
if num >= 0:
print(num, end = " ")
count = 0
for i in numbers:
count += i
avg = count/len(numbers)
print("sum = ", count)
print("average = ", avg)
for num in numbers:
if num % 2 != 0:
print(num, end = " ")
Explanation:
I'm stuck on the last two.. I have to do those too for an assignment.