निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?
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)
B)
C)
D)
Explanation:
Here’s a quick breakdown:
int(a)
: Converts2.19
to2
.floor(b)
: Floors3.999999
to3
.ceil(c)
: Ceils-3.30
to-3
.fabs(c)
: Converts-3.30
to its absolute value3.30
.
So, the output will be:
2 3 -3 3.3
Answer: (C) 2 3 -3 3.