A programming language needs to have support for numbers to carry out calculations. To do this in Python, the numbers are categorized into different data-types.
In this tutorial, you will look at how numbers work in Python, how to assign them to variables, and how to do basic operations using those variables.
Integer:
Zero, positive and negative whole numbers without a fractional part and having unlimited precision, e.g. 1234, 0, -456
Float:
Positive and negative real numbers with a fractional part denoted by the decimal symbol or the scientific notation using E or e, e.g. 1234.56, 3.142, -1.55, 0.23.
#PythonTutorial
#Python
14 окт 2024