( > and > or ( > and > do you see how this expression worksit basically says the game is over when team has won (scored at least and leading by at least or when team has won here is another way to do it( > or > and abs( > this version is bit more succinct it states that the game is over when one of the teams has reached winning total and the difference in the scores is at least remember that abs returns the absolute value of an expression boolean algebra all decisions in computer programs boil down to appropriate boolean expressions the ability to formulatemanipulateand reason with these expressions is an important skill for programmers and computer scientists boolean expressions obey certain algebraic laws similar to those that apply to numeric operations these laws are called boolean logic or boolean algebra let' look at few examples the following table shows some rules of algebra with their correlates in boolean algebraalgebra * = * = + = boolean algebra and false =false and true = or false = from these examplesyou can see that and has similarities to multiplicationand or has similarities to additionwhile and correspond to false and true here are some other interesting properties of boolean operations anything ored with true is just true or true =true both and and or distribute over each other or ( and =( or band ( or ca and ( or =( and bor ( and ca double negative cancels out not(not = the next two identities are known as demorgan' laws not( or =(not aand (not bnot( and =(not aor (not