Test Index
CBSE Class 12 Computer Science 2026 Paper Compartment
© examsnet.com
Question : 5 of 37
Marks:
+1,
-0
What will be the output of the following statement ?
print("X"* 2,"Y",end = 2 * "X", sep = "#")
Solution:
Concept:In
print(), sep is placed between the values and end is printed after the last value (instead of the newline).Explanation:Values: "X"*2 = XX and "Y"sep = "#" → XX#Yend = 2*"X" = XX, added at the end → XX#YXXOutput:XX#YXXAnswer:Option D (
XX#YXX)© examsnet.com
Go to Question: