EX12 combining boolean operations


#1

https://www.codecademy.com/courses/learn-ruby/lessons/control-flow-in-ruby/exercises/combining-boolean-operators?action=lesson_resume


why are the answers as such?
in boolean_1, is it (true or false) and (false or true)? Why is the answer true then?
in boolean_2, is it false & (false or true)? since false appears in the first and second bracket, the answer is false?
in boolean_3, is it true and (not true not or not false)? why is the answer true?

Please help! thanks! :slight_smile:






#2

sorry, i get it. || is an inclusive or. as long as true appears, it will return true. eg in the case of true||false, it will return true


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.