Question: Create a Python script file called Exercise _ Ch 0 5 - 3 _ yourLastName.py . ( Replace yourLastName with your last name. ) Write

Create a Python script file called Exercise_Ch05-3_yourLastName.py.(Replace yourLastName with your last name.)
Write a 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.
Submit your program file.
Use "for" loop to calculate. Do not use "while" loop.Use only one loop to do all calculation, multiple loops are not allowed.
Use of "Min" or "Max" is not allowed.
OUTPUT:
*************************************************************************************
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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!