No hint for range exercise


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/python-beginner-nzzVa/3/3?curriculum_id=4f89dab3d788890003000096

<In what way does your code behave incorrectly? Include ALL error messages.>

Traceback (most recent call last):
File “python”, line 6, in
AttributeError: ‘function’ object has no attribute ‘range’

<What do you expect to happen instead?>
returns a list containing [0, 1, 2].

```python

def my_function(x):
for i in range(0, len(x)):
x[i] = x[i] * 2
return x

print my_function.range(3) # Add your range between the parentheses!

<do not remove the three backticks above>

#2

Remember to pass the range to your function…

print my_function(range(3))

# range(3)  =>  [0, 1, 2]

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.