d = 8.6
print '%1.0f' %(d)
shows error 'd' is not defined
I am using jupyter notebook.
Using the code
print '%1.0f' %(8.6)
gives the correct value. But, it does not recognize 'd' object
d = 8.6
print '%1.0f' %(d)
shows error 'd' is not defined
I am using jupyter notebook.
Using the code
print '%1.0f' %(8.6)
gives the correct value. But, it does not recognize 'd' object
Copyright © 2021 Jogjafile Inc.
There is only one possible reason, putting the assignment and the use of variable d on the same line gives an error.
and
are normally working for me on jupyter notebook!