Python Language Simple Mathematical Operators

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

Python does common mathematical operators on its own, including integer and float division, multiplication, exponentiation, addition, and subtraction. The math module (included in all standard Python versions) offers expanded functionality like trigonometric functions, root operations, logarithms, and many more.

Remarks

Numerical types and their metaclasses

The numbers module contains the abstract metaclasses for the numerical types:

subclassesnumbers.Numbernumbers.Integralnumbers.Rationalnumbers.Realnumbers.Complex
bool
int
fractions.Fraction
float
complex
decimal.Decimal


Got any Python Language Question?