Question: Using Spyder. We will use loops and a special kind of list called an array ( created via NumPy ) . More on this next

Using Spyder. 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.(2 Points) Create a list variable and fill it with these numbers: 100,10,5,1,4
b.(1 Points) Create an integer variable named index and set the value to 2
c.(2 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.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!