Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+8 votes

True || False
True && False

asked in CSC211_Winter2018 by (1 point)

4 Answers

+4 votes

true || false: true

true && false: false

answered by (1 point)
+4 votes

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

answered by (1 point)
+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 (1 point)
+3 votes

true||false will be true.

true&& false will be false.

answered by (1 point)
...