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.
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.
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 i in range(1, step_num):
Hope this helps.