There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
You can also find further discussion and get answers to your questions over in Language Help.
Agree with a comment or answer? Like () to up-vote the contribution!
Hi. There seems to be an issue with this problem. In the second part of the p, it asks to print the range in list form. However, I could also pass the exercise by solely printing range form. This didn’t really make sense, and I had to research and practice a bit with the compiler. I wish you can fix this issue. Thanks in advance!
For whatever reason, it wants you to do the single range input (i.e., zero_to_seven=range(8)) even though the lesson was meant to demonstrate how to range based on a two input statement.
it say: The list() function takes in a single input for the object you want to convert.
However you use range() against it which outputs for instance 0, 9 - this are two arguments. You may want to correct this.
In the description, first an object of the range class is created via the statement my_range = range(10).
The object returned by range is a single object of the range class.
Then, this object is passed as an argument to the list function in the statement my_list = list(my_range).
The list function accepts one argument only (in this example, the my_range object).
When calling range, we can pass it a single argument (stop) [start defaults to 0, step to 1] or we can pass it two arguments (start, stop) [step defaults to 1] or we can pass it three arguments (start, stop, step). All of these calls will result in a single object of the range class.
The list function can accept at most one argument. If we omit the argument, then an empty list is created. If we provide an argument, then only one argument is allowed.
Hence, the statement
The list() function takes in a single input for the object you want to convert.
ok got it… thanks for clarification I did some testing w/ the python interpretador and can confirm it returns an object. I wish the lesson here would have given more details on what the function range actually is returning.