Question: Question 3: Error Correction [10 points) The following python code is supposed to print the average of odd numbers stored in a list. Correct the
Question 3: Error Correction [10 points) The following python code is supposed to print the average of odd numbers stored in a list. Correct the code and convert the for loop to while the code has at least 5 errors count = 0 sum = 1 numList - (2,5,4,7, 11, 6, 9, 10) for k in range (1.len(numList)) num numList[k] if num%20 sum + num count + 1 print("Average of odd numbers " sum/count) Error Type (Logical / Syntax): 1) 2) 3) 4) 5) While Loop implementation Question 3: Loop Processing [2 points) Write a Python loop to display the following sequence of numbers: 10 400 9000 160000 2500000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
