330,133 views
34 votes
34 votes
1. An example of a function is _________

2. What list of numbers is created by the following code: range(9)
3. What list of numbers is created by the following code: range(7,16)
4. Which range function creates the following list of numbers?
21 25 29 33 37 41

5. Which range function creates the following list of numbers?
91 86 81 76 71 66 61

User Bono
by
3.0k points

1 Answer

23 votes
23 votes

Answer:

  1. An example of a function is a piece of code that performs a specific task or calculation and can be called or invoked multiple times within a program.
  2. The code range(9) creates a list of numbers from 0 to 8, inclusive.
  3. The code range(7,16) creates a list of numbers from 7 to 15, inclusive.
  4. The range function range(21,42,4) creates the list of numbers 21 25 29 33 37 41.
  5. The range function range(91,60,-5) creates the list of numbers 91 86 81 76 71 66 61.
User Pablasso
by
2.8k points