How can I force division to be floating point in python?
Answer / Jigyasa Kumari
To force division to always return a float in Python, you can use the `from __future__ import division` directive at the beginning of your script. This ensures that integer division will also produce a float.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the parameter passing mechanism in Python?
What is the different between range () and xrange () functions in python?
Which is better python or r?
Explain lambda expressions. When would you use one?
What are python slots?
Is python free or paid?
What is r regex?
Is Python a good choice for web development
What is the purpose of a // operator?
How is numpy different from scipy?
What is python with statement?
Why we are using a python dictionary?