Evaluating expressions with variables: exponents