निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?
What will be the output of the following code snippet ?
from math import *
a = 2.19
b = 3.999999
c = -3.30
print(int(a), floor(b), ceil(c), fabs(c)) A
2 3 -3 3
B
3 4 -3 3
C
2 3 -3 3
D
2 3 -3 -3.3
Explanation
Here’s a quick breakdown:
int(a): Converts2.19to2.floor(b): Floors3.999999to3.ceil(c): Ceils-3.30to-3.fabs(c): Converts-3.30to its absolute value3.30.
So, the output will be:
2 3 -3 3.3
Answer: (C) 2 3 -3 3.
Correct Answer: C) 2 3 -3 3