Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 1.51 KB

instructions.append.md

File metadata and controls

25 lines (16 loc) · 1.51 KB

Instructions append

Reading and Writing Long Numbers

Code is more often read than it is written, and reading a big/long number within other text can be a challenge. Here are two approaches to making numbers more readable:

  1. Using underscores in Numeric Literals. 1_000_000 is more readable than 1000000, and 10_100_201_330 is easier to scan than 10100201330. For more information, see PEP-0515.

  2. Using exponential notation or scientific notation. The e (or E) character followed by an integer represents the power of 10 by which the number preceding the e should be multiplied (ie: 1e6, 1 is multiplied by 10 raised to the power of 6, which equals 1000000). For more details, check out this reference on scientific notation.

Dates and Times in Python

This exercise explores objects from Python's datetime module: