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
Fantastic news! We've Found the answer you've been seeking!
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, 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
Related Book For
Posted Date: