Question: I have to write Python program that takes a list of integers as input, [3,8,5,1,4,9,2,10,7] and using for loop find out sum of odd numbers,
- I have to write Python program that takes a list of integers as input, [3,8,5,1,4,9,2,10,7] and using "for" loop find out sum of odd numbers, sum of even numbers, largest number and smallest number in the list. You need to provide this list to your program, your program doesn't need to take the list from user.
- Make sure your program will produce correct output.
Use "for" loop to calculate. have not to use"while" loop
Use only one loop for do all calculation, multiple loops are not allowed.
Use of "Min" or "Max" is not allowed.
output must be exactly same as:
Sum of even numbers is: 24
Sum of odd numbers is: 25
Largest number in the list is: 10
Smallest number in the list is: 1
Step by Step Solution
There are 3 Steps involved in it
Input List numbers 3 8 5 1 4 9 2 10 7 Initialize variables to keep track of ... View full answer
Get step-by-step solutions from verified subject matter experts
