quiz()
directly, since we need to make knows_logic
, knows_algebra
, and knows_functions
True. Each of these variables are only set within their corresponding functions: logic()
, algebra()
and functions()
.strcmp()
check:python -c "print 'i will get an A' + '\x00' + 'Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8Ac9Ad0Ad1Ad2A'" > ipt.txt
logic()
, then algebra()
, then functions()
.(q != s) && s
, we know s
must be 1, q
must be 0.(p || q || !r) && (!p || r || !s)
, we have (p || 0 || !r) && (!p || r || 0)
, which is (p || !r) && (!p || r)
. Either p = r = 0
or p = r = 1
works.