Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

num_list = [33,42,5,66,77,22,16,79,36,62,78,43,88,39,53,67,89,11] Instructions 1. Under the num_list create a new for loop and print out each value on the list in sequential order. 2.

num_list = [33,42,5,66,77,22,16,79,36,62,78,43,88,39,53,67,89,11]

Instructions

1. Under the num_list create a new for loop and print out each value on the list in sequential order.

2. Inside the for loop, create a condition that will look for all numbers that are greater than 45 and print out only numbers that meet that condition

3. Change the print statement to Over 45 and add an else condition with a print statement of Under 45.

4. Update the for loop to use the enumerate function so you can get and use the index. Alter the condition to look for number 36 and print out the following: Number found at position: , index number

5. Next, create a new variable called count and assign it a value of 0 and place it outside the for loop.

6. Inside the for loop increment the counter by 1.

7. Add a print statement outside the for loop to print the value of the count variable.

8. Finally, add a break statement directly after the print statement inside the if condition for finding the number.

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

Current Trends In Database Technology Edbt 2004 Workshops Edbt 2004 Workshops Phd Datax Pim P2panddb And Clustweb Heraklion Crete Greece March 2004 Revised Selected Papers Lncs 3268

Authors: Wolfgang Lindner ,Marco Mesiti ,Can Turker ,Yannis Tzitzikas ,Athena Vakali

2005th Edition

3540233059, 978-3540233053

More Books

Students also viewed these Databases questions

Question

2. Describe why we form relationships

Answered: 1 week ago

Question

5. Outline the predictable stages of most relationships

Answered: 1 week ago