Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Lab 7: Use for loop Write a python program that computes sum of odd numbers in the list given below list1- [4, 3, 6, 5,
Lab 7: Use for loop Write a python program that computes sum of odd numbers in the list given below list1- [4, 3, 6, 5, 1,99, 22, 66, 15 10 Marks RESTART: Ci/Users/sanjay/6010691/W2018sanjay/code/sun of odd number in 11st.Py 11st1_ [4, 3, 6, 5, 1, 99, 22, 66, 15 15 The final sum 1s: 123 One of the ways can be define and print listi initialize sum to O iterate over listl with for loop for items in list # check if even continue # continue to next iteration else: #c. print items not even #sum the items #d, print final sum
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started