Test Index

CBSE Class 12 Computer Science 2026 Paper Compartment Get it on Google PlayDownload on the App Store

© examsnet.com
Question : 2 of 37
Marks: +1, -0
What will be the output of the following statement ?
print(18/3 == 18//3)
Solution:  
Concept:
/ is true division (always gives a float); // is floor division (gives an int for int operands). == compares values, so 6.0 == 6 is True.
Explanation:
18/3 = 6.0
18//3 = 6
6.0 == 6 → True
A comparison gives a Boolean value, so the output is True, not 1.
Output:
True
Answer:
Option D (True)
© examsnet.com
Advertisements
Go to Question: