The Python Binary Arithmetic Operators

Pubblicato il: 27 agosto 2021
sul canale di: choobtorials
2,399
25

In this video, we are going to take a look at what are called Binary Arithmetic Operators. In this context, we are using the word binary to refer to operations that involve two operands or values. For example, 10 + 5 is a binary operation, because it involves two values - 10 and 5.

Here are Python's binary arithmetic operators:
We have the addition operator, which uses the plus sign. (+)
We have the subtraction operator, which uses the minus sign. (-)
We have the multiplication operator, which uses the asterisk. (*)
We have the division operator, which uses the forward slash. (/)
There is also the floor division operator, which uses 2 forward slashes. (//)
And then finally we have the modulo operator, which uses the percent sign. (%)

We will also be talking about operator precedence. The order of precedence determines the sequence in which the operations in an expression are performed.

Here is a list that shows the order of precedence from highest to lowest.

(expression...) Parenthesized expression
** Exponentiation
-x Negation
*, /, //, % Multiplication, Division, Floor Division, Modulo
+, - Addition, Subtraction

#python #learntocode


In questa pagina del sito puoi guardare il video online The Python Binary Arithmetic Operators della durata di ore minuti seconda in buona qualità , che l'utente ha caricato choobtorials 27 agosto 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 2,399 volte e gli è piaciuto 25 spettatori. Buona visione!