Module 5 Lesson 2 - Range( ) Function Practice

  • Due No due date
  • Points 10
  • Questions 10
  • Time Limit None
  • Allowed Attempts 4

Instructions

For loops are useful when you need to repeat code a particular number of times. The most useful function to use with for loops is the range( ) function. There are three ways to call the range( ) function:

  1. range(stop) - give it only a stopping value.  This returns the numbers from 0 to stop minus 1
  2. range(start, stop) - give it a starting and a stopping value. This returns the numbers from start to stop minus 1
  3. range(start, stop, step) - give it a starting value, a stopping value, and the step to use. This returns the numbers from start to stop minus 1, counting by step.

Answer the following questions using what you know about the range( ) function. You will have up to 4 attempts and your highest score will be kept.

Only registered, enrolled users can take graded quizzes