KnowledgeBoat Logo
|

Robotics & Artificial Intelligence

Which of the following data type would be used for a variable to store the value 3.14 in Python?

  1. int
  2. decimal
  3. double
  4. float

Python Funda

1 Like

Answer

float

Reason — The value 3.14 is a fractional number with a decimal point. All fractional numbers are said to be of float type in Python, also known as floating point numbers.

Answered By

3 Likes


Related Questions