Question: 1 . We will use loops and a special kind of list called an array ( created via NumPy ) . More on this next
We will use loops and a special kind of list called an array created via NumPy More on this next class. However, what's critical to know is the difference between an index and a value. We will use both for loops and while loops and the print function to explore this concept.
a Points Create a list variable and fill it with these numbers:
b Points Create an integer variable named index and set the value to
c Points Using the print function print out the following statement: "The value of the list when the index is equal to two is: XX Use the list variables and index variables you created in the previous two steps to fill in the XX
d Use a the print function to say, "Entering for loop..." and then use a for loop to print out both the index and value of the function. Do not just print out the numbers. You need to print out he following statement inside the loop. "Index XX; Value XX Make sure the spaces are in there and that these are on the same line. At the end of the for loop use the print function to print "Finished with for loop... hint use "for i in rangelen:
I JUST NEED HELP WITH d I listed the whole question for context!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
