📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    âš¡ Month End Offer - Flat 52% Off On All Courses! Enroll Now âš¡
    00:00:00 AM Left

    Question

    Predict the output for below code in python

    X=true Y=false Z=false if not X or Y : print(“first case”) elif not X or Y or not Y and X print(“second case”) else : print(“no case”)
    A first case Correct Answer Incorrect Answer
    B second case Correct Answer Incorrect Answer
    C no case Correct Answer Incorrect Answer
    D second case no case Correct Answer Incorrect Answer
    E error Correct Answer Incorrect Answer

    Solution

    first priority goes to not, then and then or operations in python,

    Practice Next
    ask-question