Do Now 4.02

  1. Copy and run the following code into the interpreter.

    range(0, 10)
    range(10, 100)
    

    Write down what the range function does.


  2. Copy and run the following code in the interpreter.

    a = ['apples', 'oranges', 'pears', 'grapes']
    len_a = len(a)
    range(0, len(a))
    

    Write down what range(0, len(a)) does.


    What is the return value of the range function?

  3. Use the range and len functions to make a for loop. (Remember that for loops iterate over lists)