[Tutor] A better way to estimate the value of Pi?
Steven D'Aprano
steve at pearwood.info
Mon Oct 17 18:00:27 CEST 2011
Sagar Shankar wrote:
> Hi Bob,
>
> I did use floating point numbers by using 4.0/1.0 - 4.0/3.0 etc., though I
> did not declare it explicitly. Do you think it's better form/practice to
> explicitly declare it?
Python doesn't use type declarations. 4.0 is already explicitly a float,
there's no need to do anything else to make it a float.
--
Steven
More information about the Tutor
mailing list