calculates_same_value function

Test that the user's expression evaluates to a certain value.