🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

What will be the output of the following Python code ?

def C2F(c) :
        return c*9/5+32
print (C2F(100))
print (C2F(0))
A)
B)
C)
D)

Explanation:

Let's analyze the given Python code:

def C2F(c):
    return c * 9 / 5 + 32

print(C2F(100))
print(C2F(0))

Explanation:

  • The function C2F(c) converts Celsius to Fahrenheit using the formula:

    F=(95×C)+32F = \left( \frac{9}{5} \times C \right) + 32
  • For C2F(100):

    • Substituting c = 100 into the formula: F=(95×100)+32=180+32=212.0F = \left( \frac{9}{5} \times 100 \right) + 32 = 180 + 32 = 212.0
    • So, C2F(100) returns 212.0.
  • For C2F(0):

    • Substituting c = 0 into the formula: F=(95×0)+32=0+32=32.0F = \left( \frac{9}{5} \times 0 \right) + 32 = 0 + 32 = 32.0
    • So, C2F(0) returns 32.0.

Output:

(A) 212.0 32.0

Latest Updates