Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.


+8 votes

True || False
True && False

asked in CSC211_Winter2018 by (8 points)

4 Answers

+4 votes

true || false: true

true && false: false

answered by (8 points)
+4 votes

True || False will return true, and
True && False will return false.

answered by (8 points)
+4 votes

Your question is a little confusing. Are these two separate questions?

In general, the || sign represents OR. To explain more clearly, it’s saying that the value is True IF either side of the || is true. So, when True || False, the total value would be true.

The && sign represents AND. In this scenario both sides MUST be true in order for the entire value to be true. Therefore True && False is FALSE because one side is false.

Section 5.3 of the textbook might be of help as well!

answered by (8 points)
+3 votes

true||false will be true.

true&& false will be false.

answered by (8 points)