Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago