Unverified Commit 1e2b92c8 authored by joshkyh's avatar joshkyh Committed by Maxim Belkin
Browse files

01-numpy.md: change weight to avoid numerical errors



Change weight from 55 to 60 kg to avoid numerical errors

In Python 3: (55 * 2.2) = 121.00000000000001
To circumvent related discussions, we change weight to 60.

Closes swcarpentry/python-novice-inflammation#328
Closes swcarpentry/python-novice-inflammation#339
Closes swcarpentry/python-novice-inflammation#429
Signed-off-by: default avatarMaxim Belkin <maxim.belkin@gmail.com>
parent 592410f7
......@@ -37,10 +37,10 @@ You can get output from python by typing math into the console:
12/7
~~~
However to do anything useful and/or interesting we need to assign values to _variables_ (or link _objects_ to names/variables).
The line below [assigns]({{ page.root }}/reference/#assign) the value `55` to a [variable]({{ page.root }}/reference/#variable) `weight_kg`:
The line below [assigns]({{ page.root }}/reference/#assign) the value `60` to a [variable]({{ page.root }}/reference/#variable) `weight_kg`:
~~~
weight_kg = 55
weight_kg = 60
~~~
{: .language-python}
......@@ -59,7 +59,7 @@ print(weight_kg)
{: .language-python}
~~~
55
60
~~~
{: .output}
......@@ -71,7 +71,7 @@ print('weight in pounds:', 2.2 * weight_kg)
{: .language-python}
~~~
weight in pounds: 121.0
weight in pounds: 132.0
~~~
{: .output}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment