Python Operators: Unterschied zwischen den Versionen
Aus Matts Wiki
Matt (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Matt (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung Markierungen: Zurückgesetzt Visuelle Bearbeitung: Gewechselt |
||
| Zeile 3: | Zeile 3: | ||
== Arithmetic Operators == | == Arithmetic Operators == | ||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |||
!Operator | !Operator | ||
!Operation | !Operation | ||
| Zeile 23: | Zeile 24: | ||
|} | |} | ||
Examples | |||
Version vom 17. Februar 2025, 08:05 Uhr
For more Python Basics see Python Basics
Arithmetic Operators
| Operator | Operation | Example | Description |
|---|---|---|---|
| + | Addition | x + y | x plus y |
| - | Subtraction | x - y | x minus y |
| * | Multiplication | x * y | x multiplied by y |
| ** | Exponentiation | x ** y | x raised to the power of y |
| / | Division | x / y | x divided by y |
| // | Floor Division | x // y | x divided by y, returning integer |
| % | Modulo | x % y | The remainder of x divided by y |
Examples
Further Reading
https://www.codecademy.com/resources/docs/python/operators
https://www.w3schools.com/python/python_operators.asp
https://docs.python.org/3/reference/lexical_analysis.html#operators
