''' Purpose: quick refresher on Boolean calculations ''' # The if statement is used for decision making. # If (boolean expression/condition): # do this # Elif (condition) # do this # Else - doesn't need condition - anything else # do this # determine whether its input pH level is acidic; i.e., less than 7.0 # acidity limit ACIDIC_THRESHOLD = 7.0 # samples less than threshold are acidic # get pH level of interst reply = input( 'Enter pH level: ' ) # Get a pH number from the user pH = float( reply ) # Convert the string of the user response into a float print( ) # determine whether sample is acidic is_acidic = ( pH < ACIDIC_THRESHOLD ) # The boolean value is_acidic is # going to be either True or False depending on whether or not the # pH balance is less than the acidic threshold, meaning it will be True # if it's less and False if it's not # print result print( is_acidic ) # Will print True or False based on whether the number we put in is acidic or not # all done