Hello
I am struggling with the instructions to the model() function in the Dinosaur assignment, specifically this:
The prompt in the code is this:
** # Set the index
idx
(see instructions above)**
** idx = None**
The instructions:
Set the index
idx
into the list of examples
- Using the for-loop, walk through the shuffled list of dinosaur names in the list “examples.”
- For example, if there are n_e examples, and the for-loop increments the index to n_e onwards, think of how you would make the index cycle back to 0, so that you can continue feeding the examples into the model when j is n_e, n_e + 1, etc.
- Hint: (n_e + 1) % n_e equals 1, which is otherwise the ‘remainder’ you get when you divide (n_e + 1) by n_e.
%
is the modulo operator in python.
I am very confused: the code prompt implies “idx = …” is just one line of code (like it’s in every exercise so far), but the instructions suggest there needs to be a loop over every example in the examples list? The rest of the instructions are also confusing - not sure what to make of it.
thank you