3.9) Exercise 2 - float to integer
Design and perform a few tests in IDLE to answer the following question:
What happens when you turn a float into an integer?
- It rounds the number to the closest integer
- It always rounds up to the higher integer
- It truncates the number. In other words, it always rounds down to the lower integer
[tippy title="Hint"]
Hint: try turning a few different floats into integers to be sure of the result.
[/tippy]
[tippy title="Answer"]
Answer: 3
[/tippy]