Section 1 - Instruction

Let's begin exploring how Python handles information that's not a string or an integer.

Numbers can also have decimal points, like 3.14 or 9.99. In programming, these are treated differently from integers.

Engagement Message

Have you worked with decimals before?

Section 2 - Instruction

Numbers with a decimal point are called floating-point numbers, or simply floats. In Python code, this type is abbreviated as float.

Examples include 1.0, 3.14159, or -2.5.

Engagement Message

Do you think the value 100 stored without quotes would be a float? Why or why not?

Section 3 - Instruction

You can store floating-point numbers in variables just like other types:

You can also perform standard math operations (+, -, *, /) with floats.

Engagement Message

What do you think 1.5 + 2.0 would result in?

Section 4 - Instruction
Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal