Resolved: This not working what is the reason?
Why is this returning an error please? I have checked the code as much as I could.
3 answers ( 2 marked as helpful)
Hey Ferdinand,
Thank you for reaching out.
When working in Jupyter notebook, you should execute the cells in order. You should therefore execute first the cell where the rand_walk
function is defined (the first cell in your screenshot). Then, execute the second cell where you use the function.
Kind regards,
365 Hristina
Hi Ferdinand and Hristina!
I hope you don't mind if I join the conversation.
Furthermore, I believe your code is missing a colon (:
) at the end of the line containing the for
statement.
for i in range(1, step_num):
Hope this helps.
Best,
Ivan
Thank you all. The real problem was the ":" that was missing.