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

निम्नलिखित कोड खंड क्या प्रिंट करेगा?

What will following code segment print ?

a = True 
b = False
c = False
if not a or b:
    print(1)
elif not a or not b and c:
    print (2)
elif not a or b or not b and a:
    print (3)
else:
    print (4) 
A)
B)
C)
D)

Explanation:

Sure!

  • First condition not a or b: False or FalseFalse
  • Second condition not a or not b and c: False or (True and False)False
  • Third condition not a or b or not b and a: False or False or TrueTrue

So, it prints 3.

Answer: (B) 3.

Latest Updates