CHAPTER 08 •
PYTHON
Python Numbers
Learn integers, floating-point numbers and complex numbers.
01 What is this?
Learn integers, floating-point numbers and complex numbers.
02 Syntax
Python Syntax
number = 10
03 Example
Python Example
a = 10 b = 5.5 c = 2 + 3j print(a) print(b) print(c)
04 Important Points
Python supports int, float and complex numbers.
05 Common Mistakes
Be careful when performing calculations with different numeric types.
06 Real World Use
Numbers are used for prices, marks, calculations and measurements.
07 Practice This Topic
Now try the example yourself in the AIFA Python Editor.
- Read the example carefully.
- Change the values.
- Run the code.
- Observe the output.
- Try creating your own example.