ExamVeda
Login
Home
11
What is the data type of the result of 10 / 2 ?
Discuss
Answer & Solution
Answer: Option B
Solution:
Division of two integers results in a floating-point number.
12
How do you convert a string containing an integer to an integer data type?
Discuss
Answer & Solution
Answer: Option A
Solution:
The int() function converts a string containing an integer to an integer.
13
Which of the following is not a numeric data type in Python?
Discuss
Answer & Solution
Answer: Option C
Solution:
str is a string data type, not a numeric data type.
14
What is the result of complex(3, 4) ?
Discuss
Answer & Solution
Answer: Option C
Solution:
The complex() function creates a complex number in the form real + imaginary.
15
What is the purpose of the round() function in Python?
Discuss
Answer & Solution
Answer: Option D
Solution:
The round() function rounds a number to a specified number of decimal places.
16
What is the type of inf?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
17
What is the result of 5 + 3.0 ?
Discuss
Answer & Solution
Answer: Option B
Solution:
When an integer and a floating-point number are added, the result is a floating-point number.
18
What is the result of "5" + "3" ?
Discuss
Answer & Solution
Answer: Option D
Solution:
The + operator concatenates strings, so "5" + "3" results in "53".
19
What is the result of "5" * 3 ?
Discuss
Answer & Solution
Answer: Option C
Solution:
The * operator repeats a string a specified number of times.
20
What is the result of 5 // 2 ?
Discuss
Answer & Solution
Answer: Option B
Solution:
The // operator performs floor division, resulting in the quotient without the fractional part.