Multiple choice

Which of these variables is a float?

  1. num = 4.2

  2. num = 42

  3. num = 12

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A float (floating-point number) represents a number with a decimal point. 'num = 4.2' is a float, while the others are integers.