From f9482c3df955cb890fd8cd1511d5d175f8a43acd Mon Sep 17 00:00:00 2001 From: Michael G <44246042+mikejgurch@users.noreply.github.com> Date: Sun, 12 May 2019 18:26:53 -0500 Subject: [PATCH] Added examples for complex numbers to numeric-types article (#28443) * Added examples for complex numbers to numeric-types article Introduce 3 examples of what a complex number would look like in Python. * fix: moved links to bottom --- guide/english/python/numeric-types/index.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/guide/english/python/numeric-types/index.md b/guide/english/python/numeric-types/index.md index 8a090d46c5..8d8db16c5c 100644 --- a/guide/english/python/numeric-types/index.md +++ b/guide/english/python/numeric-types/index.md @@ -12,7 +12,7 @@ print(100) print(8435367) ``` * floating point numbers (`float`) - * constructor + #### Examples: ```py @@ -21,11 +21,21 @@ print(46.84) print(84357.435) ``` * complex numbers - * constructor + +#### Examples: +```python +print(3 + 4j) +print(5 + 6j) +print(2j + 1) +``` The standard library adds numeric types for * fractions * decimals Numeric objects are created from literals or as the result of functions and operators. The syntax for numeric literals is well documented. + +### Other Resources +* floating point +* complex