[Tutor] ask

Andre Engels andreengels at gmail.com
Sat Feb 20 08:48:06 CET 2010


On Sat, Feb 20, 2010 at 8:07 AM, Shurui Liu (Aaron Liu)
<shurui91 at gmail.com> wrote:
> How to describe a math formula: sphere=(4/3)*PI*R**3?

A function seems like the logical thing to do:

import math

def spherical_volume(radius):
    return (4.0/3)*math.pi*radius**3

-- 
André Engels, andreengels at gmail.com


More information about the Tutor mailing list