summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLevi Bostian <levi.bostian@gmail.com>2015-10-18 12:07:37 -0500
committerLevi Bostian <levi.bostian@gmail.com>2015-10-18 12:07:37 -0500
commit5003e2c37cf36794ebe264f07df6d1b0aec7d7c6 (patch)
tree364bd95465705b37676b93068260f466990b8a13
parent4fffeac272461ad697dafd42d9405eb9bf434069 (diff)
parenta9bcaffd36dc3d3bfa6ec50f1861c9d006631d0b (diff)
Merge pull request #1553 from viv1/patch-1
[python/en]...Added some info on division
-rw-r--r--python.html.markdown6
1 files changed, 6 insertions, 0 deletions
diff --git a/python.html.markdown b/python.html.markdown
index b939ebbe..3d8f0085 100644
--- a/python.html.markdown
+++ b/python.html.markdown
@@ -58,6 +58,12 @@ allow you to write Python 3 code that will run on Python 2, so check out the Pyt
-5 // 3 # => -2
-5.0 // 3.0 # => -2.0
+# Note that we can also import division module(Section 6 Modules)
+# to carry out normal division with just one '/'.
+from __future__ import division
+11/4 # => 2.75 ...normal division
+11//4 # => 2 ...floored division
+
# Modulo operation
7 % 3 # => 1