Python Python Sequences Sequence Iteration Iterating over Ranges

write a loop that iterates over a range with a stop value of 10,start value is 0,stop is 10,step is 1

the body of the loop should append the current value to the provided list called,to append a value to a list,use the syntax my_list.append(val).
my_list = []

1 Answer

Steven Parker
Steven Parker
205,354 Points

It doesn't look like you've started yet, you should at least give it your best "good faith" try and post your code with the question.

But some general hints:

  • the instructions ask for a loop
  • the loop will use a range
  • the endpoints for the range are given in the instructions (0 and 10)
  • the loop will append values to the list
  • the instructions tell you to append using "my_list.append( val )" syntax