You may have forgotten the order of operations and added the 6 and 5 first to get . Multiplication comes before addition. Also, if you substituted 8 for x in , the result would be 11 times 8, not 118.