LiteralString LiteralBytes Literal Draft for Information Only
ContentPython Numeric Literal
Python Numeric LiteralPython supports numeric literals of integers, floating point numbers, and imaginary numbers. Complex literal is formed by adding a real number and an imaginary number. Besides, numeric sign is not included in numeric literal, but numeric sign '' or '+' is considered as an unary operatorInteger LiteralAn integer literal is a sequence of ASCII characters.Definition of Integer LiteralThe definition of integer literal is: integer::=decinteger  bininteger  octinteger  hexinteger decinteger::=nonzerodigit (["_"] digit)*  "0"+ (["_"] "0")* bininteger::="0" ("b"  "B") (["_"] bindigit)+ octinteger::="0" ("o"  "O") (["_"] octdigit)+ hexinteger::="0" ("x"  "X") (["_"] hexdigit)+ nonzerodigit::="1"..."9" digit::="0"..."9" bindigit::="0"  "1" octdigit::="0"..."7" hexdigit::=digit  "a"..."f"  "A"..."F"Features of IntegerLeading zeros in a nonzero decimal number are not allowed. The length of integer literal is unlimited and is only limited by available memory. Therefore, long integer type is no longer necessary. UnderscoresPython Integer CataloguePython integer can be divided intoFloating Point LiteralA floating point literal is a sequence of characters for representing an floating point number with an integer part, a fractional part, and an exponent part.Definition of Floating Point LiteralThe definition of floating point literal is: floatnumber::=pointfloat  exponentfloat pointfloat::=[digitpart] fraction  digitpart "." exponentfloat::=(digitpart  pointfloat) exponent digitpart::=digit (["_"] digit)* fraction::="." digitpart exponent::=("e"  "E") ["+"  ""] digitpartFeatures of Floating PointLeading zeros in a floating point literal are allowed because the integer and exponent parts are always interpreted using radix 10. The allowed range of floating point literals is implementationdependent. UnderscoresPython Floating Point CatalogueImaginary LiteralAn imaginary literal is a sequence of characters for representing an imaginary number of the imaginary part of a complex number.Definition of Imaginary LiteralThe definition of imaginary literal is: imagnumber::=(floatnumber  digitpart) ("j"  "J")Features of ImaginaryAnSource and Reference
©sideway ID: 210100004 Last Updated: 1/4/2021 Revision: 0 Latest Updated Links

Home_{ 5} Business Management HBR_{ 3} Information Recreation Hobbies_{ 8} Culture Chinese_{ 1097} English_{ 337} Reference_{ 68} Computer Hardware_{ 151} Software Application_{ 203} Digitization_{ 25} Latex_{ 29} Manim_{ 160} Numeric_{ 19} Programming Web_{ 285} Unicode_{ 504} HTML_{ 65} CSS_{ 59} ASP.NET_{ 194} OS_{ 391} DeskTop_{ 7} Python_{ 56} Knowledge Mathematics Formulas_{ 8} Algebra_{ 30} Number Theory_{ 206} Trigonometry_{ 18} Geometry_{ 18} Calculus_{ 67} Complex Analysis_{ 21} Engineering Tables_{ 8} Mechanical Mechanics_{ 1} Rigid Bodies Statics_{ 92} Dynamics_{ 37} Fluid_{ 5} Fluid Kinematics_{ 5} Control Process Control_{ 1} Acoustics_{ 19} FiniteElement_{ 2} Natural Sciences Electric_{ 27} Biology_{ 1} Geography_{ 1} 
Copyright © 20002021 Sideway . All rights reserved Disclaimers last modified on 06 September 2019