Vidyalelo
Python · Q9

MCQs for Python Data Types and Numeric Types Chapter

Programming · Python · question 9

Q9

How do you create a floating-point number in Python?

A.
5.0
Answer
B.
5
C.
"5.0"
D.
float(5)

Answer: Option A

Solution

Answer: Option A
Solution:
Floating-point numbers can be created using the decimal point notation, like 5.0.