ExamVeda
Login
Home
21
What is the result of 5 / 2 ?
Discuss
Answer & Solution
Answer: Option A
Solution:
Division of two integers results in a floating-point number.
22
Which of the following results in a SyntaxError?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
23
What is the imaginary part of the complex number 3 + 4j ?
Discuss
Answer & Solution
Answer: Option B
Solution:
The imaginary part of a complex number is the coefficient of the imaginary unit j.
24
What is the average value of the following Python code snippet?
>>>grade1 = 80
>>>grade2 = 90
>>>average = (grade1 + grade2) / 2
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
25
What is the result of int(3.999) ?
Discuss
Answer & Solution
Answer: Option A
Solution:
The int() function converts a floating-point number to an integer by truncating the decimal part.
26
What does ~4 evaluate to?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
27
What is the output of print 0.1 + 0.2 == 0.3?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
28
The following is displayed by a print function call. Select all of the function calls that result in this output.
tom
dick
harry
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
29
What is the data type of the result of "True" ?
Discuss
Answer & Solution
Answer: Option B
Solution:
The result of "True" is a string, not a boolean.
30
What is the result of cmp(3, 1)?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board