Q:

Decimal not getting while dividing

I am new to python.
I divided two numbers but, I no get decimal part.
amount = 1000
people = 3
average = total_amount/total_people
print average

I am getting o nly 333 not 333.33
How to solve this? I am ubuntu user.

A:

amount = 1000
people = 3
average = float(amount)/float(people)
print average

OR
from __future__ import division
amount = 1000
people = 3
average = amount/people
print average

