What will the expression give us if FLOUR
is 2
and SUGAR
is 0?
The whole expression will be FALSE, because with AND
combines two FALSE values into one FALSE.
FLOUR >= 4 AND SUGAR >= 2 --------- -------- false AND false --------------- false
A car rental agency has a program that says who can rent a car. The rules are:
The program will look something like the cookie program:
' ' Car rental rules ' PRINT "How old is the customer" INPUT AGE PRINT "What is the credit limit" INPUT CREDIT ' IF __________ AND __________ THEN PRINT "Rental Approved" ELSE PRINT "Rental Denied" END IF ' END
Complete the program by filling in the two blanks.