Robotics & Artificial Intelligence
Which of the following data type would be used for a variable to store the value 3.14 in Python?
- int
- decimal
- double
- 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
Which data type in Python is used to store a sequence of characters?
- Char
- String
- Text
- Word
Which of the following is the correct representation to define a list in Python?
- Elements are written using curly braces { }
- Elements are written using parentheses ( )
- Elements are written using square brackets [ ]
- Elements are written using angle brackets < >
Which of the following data types would be used in Python to store values in terms of key and value?
- list
- tuple
- dictionary
- String
Given
My_Data = [12, 25, 'Hello', "World"]What data type is the representation of the above object?
- list
- dictionary
- array
- tuple