---------------------------- //!(a AND b) same as (!a OR !b) if (10 < x AND x < 20) then print “between” else print “outside” endif if (!(10 < x) OR !(x < 20)) then print “outside” else print “between” endif ---------------------------- //!(a OR b) same as (!a AND !b) if (x < 10 OR 20 < x) then print "outside" else print "between" endif if (!(x < 10) AND !(20 < x)) then print "between" else print "outside" endif ---------------------------- // items under 6 inches and no heavier than ten pounds double inches = prompt "What size?" double weight = prompt "What weight?" if (inches < 6 AND weight <= 10) then print "allowed" endif //opposite //(!(inches <6) OR !(weight <= 10)) if (inches >= 6 OR weight >10) then print "not allowed" endif ---------------------------- // dogs must be poodles or beagles String dogtype = prompt "What type of dog?" if (dogtype == "poodle" OR dogtype == "beagle") then print "allowed" endif // opposite //(!(dogtype == "poodle") AND !(dogtype == "beagle")) if (dogtype != "poodle" AND dogtype != "beagle") then print "not allowed" endif ---------------------------- // destinations in MD cost $100, destinations in PA cost $200, $250 for VA, $150 for DE, otherwise $300 String state = prompt "In what state is the destination?" double cost = 0; case state "MD": cost = 100 "PA": cost = 200 "VA": cost = 250 "DE": cost = 150 default: cost = 300 endcase print "Your cost is " + cost