Got a section right, but I have no idea how


#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/learn-python/lessons/battleship/exercises/make-a-list?action=lesson_resume&link_content_target=interstitial_lesson

<In what way does your code behave incorrectly? Include ALL error messages.>
This part is not applicable, strictly speaking, since it does work.

<What do you expect to happen instead?>
I don’t understand why the range has to be (0, 5) in this exercise, and why it couldn’t just be range(0, len(board))? I mean, you’re telling it how many tiles it’s supposed to append right there in the for loop, so…isn’t that how len() works? Can’t you use len() in place of a determined end point at any time?

Thanks!

```python

Replace this line with your code.
I won’t include any of my code other than the snippet I’ve commented on above in my query, since this isn’t a true question post and therefore a spoiler to others.

<do not remove the three backticks above>

#2

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