Learning Python #2
Numbers in Python

We learnt in the previous lesson the print statement and how to deal with strings.
What will we learn in this lesson?
- Dealing with Numbers in PythonKeywords: Python, programing, numbers, integers, float.
Let's go:
Python has three numeric data-types which are: Integers (int), Floating-point (float) and and Complex numbers.
1) An integer: is a number with no decimal or fractional part, from the set of negative and positive numbers, including zero. Examples of integers are: -5, 0, 1, 5, 8, 97, and 3,043.
2) The floating-point is the number that contains floating decimal points. For example, the numbers 5.5, 0.001, and -2,345.6789.
3) The complex number is the number that can be expressed in the form a + bi, where a and b are real numbers, and i is a symbol called the imaginary unit, and satisfying the equation i2 = −1. For example, −1 + 3i .
Thanks
ReplyDelete