filmov
tv
The division in Python #shorts

Показать описание
When you divide numbers in Python, int and int or int and float, will always result in a floating-point number.
Example:
x = 4/2
Output:
2.0
You have to specify that you need the result as an integer.
Example:
x = 4/2
print(int(x))
Output:
2
--------------------------Subscribe-----------------------------
• If you like to see a variety of fun and interactive projects written in Python
• If you love ☕ and 🐶 WAIT! - Yeah! Definitely, coffee and dogs!
-----------------------------------------------------------------------
--------------------------Socials-----------------------------
------------------------------------------------------------------
--------------------------Support-----------------------------
--------------------------------------------------------------------
#division #python
The division in Python #shorts
Example:
x = 4/2
Output:
2.0
You have to specify that you need the result as an integer.
Example:
x = 4/2
print(int(x))
Output:
2
--------------------------Subscribe-----------------------------
• If you like to see a variety of fun and interactive projects written in Python
• If you love ☕ and 🐶 WAIT! - Yeah! Definitely, coffee and dogs!
-----------------------------------------------------------------------
--------------------------Socials-----------------------------
------------------------------------------------------------------
--------------------------Support-----------------------------
--------------------------------------------------------------------
#division #python
The division in Python #shorts