Tag Archives: floating point

What is a Floating Point Number?

In short, a floating point number is number that represents decimal values like 3.1415 Contrast that with an integer like 11 . Demo Python Code The code below declares and then prints the data type, in Python, of a floating point number and an integer. The Parts of a Floating Point Number significand – the number’s actual digits exponent … Continue reading What is a Floating Point Number? →

Variable Types in Python

Table of Contents for this Page Common Variable types Python’s built in [crayon-5f0a22458b207870067165-i/] function Naming Conventions for Variables (snake vs camel case) Python supports the basic types of variables that  you would expect from a general purpose language. These are listed below. Number floating point  integer String (more here) Boolean List (more on lists here) Dictionary Tuple Example … Continue reading Variable Types in Python →

Binary numbers – floating point conversion

A binary number with 8 bits (1 byte) can represent a decimal value in the range from 0 – 255. However, this only includes whole numbers and no real numbers (e.g. fractions) like 0.5 or 20.456 etc. To represent all real numbers in binary form, many more bits and a well defined format is needed. … Continue reading Binary numbers – floating point conversion →