Stride lenght


#1

to_one_hundred = range(101)

Add your code below!

backwards_by_tens=to_one_hundred[::-1]
print backwards_by_tens

Oops, try again. to_one_hundred contains 99, but should not.


#2

You are on the right track but remember you want to to reverse the list jumping by 10 each time but the stride you have provide says jump by 1 each time

backwards_by_tens=to_one_hundred[::-10]

#3

to_one_hundred = range(101)

Add your code below!

backwards_by_ten = []

backwards_by_ten = to_one_hundred[::-10]
print backwards_by_ten

Oops, try again. to_one_hundred should include 100, but does not.

[100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0]

Am I missing something? The 100 it says it should include is printed out as part of the backward_by_ten


#4

Never mind - operator error - ten should be tens :smile: