If Else in Python MCQs Exercise II


Ques 1 If Else


What is the output of the following Python Code?

p=1
q=2
if(p!=q) and (print("Hello")):
    print("scoder")
else:
    print("hello")

  a) Hello scoder
  b) hello
  c) scoder
  d) Hello hello


d is the correct option