Several data types:
- number: integer, float, complex
- string
- print statement
- list
- dictionary
- boolean
- tuple
- set
NUMBER:
A number can be either an integer or a float.
An integer is a whole number.
Integer - 3, 6, 8, 445, 34567, 65434
A float is a decimal number.
Float - 1.0, 0.5, 2.33, 765.67, 1.33
Arithmetic operations can be executed on numbers, such as:
- Addition: Sum of 2 numbers
- Subtraction: Difference between 2 numbers
- Multiplication: Product of 2 numbers
- Division: Quotient of 2 numbers
- Floor Division: Quotient of 2 numbers, except the fractional part
- Exponentiation: A number raised to the power of another number Which is the same as:
- Modulus: Reminder after division division of 2 numbers
Python follows BODMAS rule.
B-Bracket
O-Of
D-Division
M-Multiplication
A-Addition
S-Subtraction
Top comments (0)