print( False or True) | SoloLearn: Learn to code for FREE!

+1

# print( False or True)

Why the output of above expression comes True?

7/9/2020 7:18:18 AM

Sarfira

12 Answers

New Answer

+6

Learner OR operator returns True if one of the statements is true So in print(True or False) One statement is True , so the output is True I hope you understood 🙂

+1

Learner it's Ok 🤗

+1

Learner yup

+1

Learner Yeah sure

+1

Learner i=3 while i >=0: print(i) i= i - 1 this loop will be executed 4 times 3>=0 True 2>=0 True 1>=0 True 0>=0 True -1>=0 False , loop breaks

0

Sorry ! I forgot about that.. Thank you for reminding me.

0

It means in absence of any condition here True & False are two argument in which if either one (or both) arguments is/are true then output comes true?

0

If you don't mind Can i ask you one more question i just want to confirm my answer.

0

i=3 while i >=0: print(i) i= i - 1 How many times this code will execute. I know the output with my own explaination but i want to confirm if i am wrong or right? Can you explain?

0

Thanks man ! I was right. God bless you.

0

Ans False or true

-2

Awanish Maurya It appears you are copy pasting other people's answer. Please be warned such action is consired plagiarism and spam. Asking you to refrain from this. Regards, ~LordK