Course Name: Python for Trading: Basic, Section No: 2, Unit No: 6, Unit type: Notebook
In the example,
In (8) : id (y)
Out(8) : 140016166571624
Why it is showing name error? previously when i used to run using the same code it used to show me the output.
I need a help regarding this query.
Hi Amey,
The line you mentioned in your question executes correctly. It is showing the id of y.
In your execution did you run the code lines before this line where you are getting the error?
If you still face issues, do let me know!
Thanks.
The issue that I am facing is whenever I manually write the code the output is different from the output which is already in the jupyter notebook.And sometimes it gives me a name error stating that 'y' is not defined.
In type function, if I manually punch the code instead of giving me output as Int it gives me string
Hi Amey,
The value in NB and your local system will most definitely be different since id() gives the address in the computer memory, represented in the form of a unique number.
You can read more about it here.
Hope this helps!
Thanks for the help,My problem is solved.
Regards,
Amey Tupe