Hi Steven,
> Can I ask you to please post code using plain text rather than HTML
> email (also known as "rich text"), as HTML email messes up the
> formatting? In this case, I can reverse-engineer the correct formatting,
> so no harm done other than a waste of time, but that won't always be so
> e
bob gailer wrote:
It is not crucial here - but you must recognize that your program uses floating
point numbers, which almost always are an approximation to the
"real" value.
For example (assuming decimal numbers):
>>> 4/3.0
1. (followed by an unending number of 0's).
Actu
On 10/17/2011 11:55 AM, Sagar Shankar wrote:
The "real" value of 4/3.0 is 1 followed by an unending number of 3's.
Each successive fraction's floating point value will be "off" by some
relatively small value. Those errors will probably add up.
Another limitation of floating point numbers is
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 d
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?
Regards,
Sagar
On Mon, Oct 17, 2011 at 9:10 PM, bob gailer wrote:
> On 10/17/2011 6:31 AM, Sagar Shankar wrote:
>
On 10/17/2011 6:31 AM, Sagar Shankar wrote:
Hi, this is my first question to this group. I'm a
beginner to computer science and programming in Python. Am
currently using John Zelle's book - Python Programming: An
introduction to computer science to teach myself.
Sagar Shankar wrote:
Hi, this is my first question to this group. I'm a beginner to computer
science and programming in Python. Am currently using John Zelle's book -
Python Programming: An introduction to computer science to teach myself.
Hi Sagar, and welcome.
Can I ask you to please post co
Hi, this is my first question to this group. I'm a beginner to computer
science and programming in Python. Am currently using John Zelle's book -
Python Programming: An introduction to computer science to teach myself.
In the book, there is an exercise to create a program that approximates the
val