Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Int (Unlimited precision signed integer)
- decimal = 10
- binary = 0b10
- octo = 0o10
- hexadecimal =0x10
- # call to the int constructor can covert floating point to integers, string to integers
- int_constructor = int(3.5)
- string_conversion = int("496")
- base_three = int("10000", 3)
- # Float IEEE-754 double precision(64-bit), 53 bits of binary precision, 15 to 16 bits of decimal precision
- float_number = 3.125
- large_sci_number = 3e8
- small_sci_number = 1.616e-35
- # Conversion
- from_int = float(7)
- from_string = float("1.618")
- # Special floating point numbers
- not_a_number = float(nan)
- positive_infinty = float("inf")
- negatve_infinity = float("-inf")
- float_promotion = 3.12 + 2
- # None (often used to represent the absence of a value.)
- none_value = None
- testing_none = none_value is None
- # Bool (Boolean logical value Either True or False)
- true = True
- false = False
- # Bool constructor (converting other types to bool)
- falsey_value = bool(0)
- truthy_value = bool(42)
Add Comment
Please, Sign In to add comment