Type Conversion - A quick interactive intro - SOLVED#

The name of the type is also a function that converts an object to that type (if possible). For instance, you can turn an integer to a float by doing float(5).

  1. Convert a float to an integer. What does it do with the decimal part? (Try a few to be sure)

  2. What kind of strings can be converted to int or float?

x = 17.923
y = int(x)
y
17
float("17")
17.0