ExamVeda
Login
Home
1
Which of the following is a valid data type in Python?
Discuss
Answer & Solution
Answer: Option A
Solution:
The data type for integers in Python is int.
2
What is the result of type(3.14) ?
Discuss
Answer & Solution
Answer: Option A
Solution:
The type() function returns the data type of the argument.
3
What data type is used to represent a sequence of characters in Python?
Discuss
Answer & Solution
Answer: Option D
Solution:
The data type for sequences of characters in Python is str.
4
What is the purpose of the str() function in Python?
Discuss
Answer & Solution
Answer: Option D
Solution:
The str() function converts a number or other data type to a string.
5
Which of these in not a core data type?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
6
Given a function that does not return any value, What value is thrown by default when executed in shell.
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
7
What is the result of type(True) ?
Discuss
Answer & Solution
Answer: Option B
Solution:
The data type for boolean values in Python is bool.
8
In order to store values in terms of key and value we use what core data type.
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
9
How do you create a floating-point number in Python?
Discuss
Answer & Solution
Answer: Option A
Solution:
Floating-point numbers can be created using the decimal point notation, like 5.0.
10
What is the result of int(3.9) ?
Discuss
Answer & Solution
Answer: Option A
Solution:
The int() function converts a floating-point number to an integer by truncating the decimal part.