How can I get my program to print floats?

Viewed 101

I've written a small program to help me with my math homework:

import math
def saCircle():
    while True: 
        radius = float(raw_input("Enter the radius: "))
        print "\nFinding area with %d as the radius" % radius  
        x = math.pi * radius**2
        print "\nThe area of your circle is %d\n" % x 
saCircle() 

The problem is that it will accept a decimal number but it will not print out the value of the decimal number.

How can I fix this?

2 Answers
Related