Back
+10 XP
Concept

Division Always Makes Floats

`+`, `-`, and `*` work normally. Here is the secret: normal division `/` **always** spits out a float, even if it divides cleanly:

python
print(10 / 2)  # Prints: 5.0 (not 5!)

# 15. Division Always Makes Floats `+`, `-`, and `*` work normally. Here is the secret: normal division `/` **always** spits out a float, even if it divides cleanly: ```python print(10 / 2) # Prints: 5.0 (not 5!) ``` Python promotes it to a float with `.0` just in case there were fractions left over.

Checkpoint

What does `8 / 2` return in Python?

Practice

Divide `20` by `4` and print the result. Notice the `.0` on the end!

Terminal
01
Tap code blocks below to assemble
Available Blocks