Skip to content
← Back to Community
4.5 computer science assignment
Profile icon
cpg12323

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.

Voters
Profile icon
DimitriyHutnyk
Profile icon
F1owerLily
Profile icon
ALVAROESCOBAR
Profile icon
AnshPatel24
Profile icon
cpg12323