Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question1 The for loop, at its simplest, simply obtains values from a collection. Let's start with this simple list: data-[ 4, 3, 9, 6, 4,

image text in transcribed

Question1 The for loop, at its simplest, simply obtains values from a collection. Let's start with this simple list: data-[ 4, 3, 9, 6, 4, 8, 5, 1,7 Complete this for loop to display all the values on the screen, with one number on each line: for print (value) NOTE: Your answer box should not contain any numbers itself, but instead refer to the variable. Question 2 Now describe what you would have to do to this simple loop to have it only print the values greater than 5 Did you have to modify the existing two lines in any way

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

Students also viewed these Databases questions