I was troubled by the True/False statements when the professor introduced the concept of "P(false) => Q(anything)" yielding a true statement. I always thought that if the antecedent was false, the statement would yield false. However, my question was quickly answered by my MAT137 lecture in which the professor gave an interesting example:
"1=0 I am in love"
In the statement above, even if the antecedent is false, the statement will still yield true. The truth table furthered my understanding of "If....then..." statements by simply organizing the 4 cases into a table.
| P | Q |
| T | T |
| T | F |
| F | T |
| F | F |
In addition, I was confused by the python codes that were listed on the lecture notes. The problem stated that we had to comment on the functions given: q0, q1, q2, q3. However, I did not understand the meaning that was enclosed by the triple quotations. Later on in CSC108, the professor promptly went over the docstrings, which solved my dilemma about the "... ->bool" statement. This statement is used to evaluate True/False statements.
No comments:
Post a Comment