« Python : Opérateurs arithmetiques » : différence entre les versions
De www.yakakliker.org
Aucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 36 : | Ligne 36 : | ||
}); | }); | ||
</script> | </script> | ||
</html> | |||
<html> | |||
<a href="https://www.compteurdevisite.com" title="compteur web gratuit sans pub"><img src="https://counter6.optistats.ovh/private/compteurdevisite.php?c=b4epghealnwlf7wuq7gn3ygll9aywrfx" border="0" title="compteur web gratuit sans pub" alt="compteur web gratuit sans pub"></a> | |||
</html> | </html> |
Dernière version du 17 février 2025 à 18:21
print(2 + 3) # Addition => 5
print(12 - 3) # Soustraction => 9
print(5 * 3) # Multiplication => 15
print(12 / 3 ) # Division => 4.0
print(22 % 6 ) # Modulo => 4 (reste de la division)
print(22 // 6 ) # Division entière => 3
print(2 ** 3 ) # 8
a = 2
b = 3.1
print(a + b) # 5.1
print(a - b) # -1.1
print(a // b) # 0.0
print(a / b) # 0.6451612903225806
print(a * b) # 6.2
a = 2.0
b = 2
print(a == b) # True
c = 3
print(a > c) # False
print(a < c) # True