part2 (1143B)
1--- Part Two --- 2 3You manage to answer the child's questions and they finish part 1 of their homework, but get stuck 4when they reach the next section: [1m[37madvanced[0m math. 5 6Now, addition and multiplication have [1m[37mdifferent[0m precedence levels, but they're not the 7ones you're familiar with. Instead, addition is evaluated [1m[37mbefore[0m multiplication. 8 9For example, the steps to evaluate the expression 1 + 2 * 3 + 4 * 5 + 6 are now as follows: 10 11[1m[37m1 + 2[0m * 3 + 4 * 5 + 6 12 3 * [1m[37m3 + 4[0m * 5 + 6 13 3 * 7 * [1m[37m5 + 6[0m 14 [1m[37m3 * 7[0m * 11 15 [1m[37m21 * 11[0m 16 [1m[37m231[0m 17 18Here are the other examples from above: 19 20 21 - 1 + (2 * 3) + (4 * (5 + 6)) still becomes [1m[37m51[0m. 22 - 2 * 3 + (4 * 5) becomes [1m[37m46[0m. 23 - 5 + (8 * 3 + 9 + 3 * 4 * 3) becomes [1m[37m1445[0m. 24 - 5 * 9 * (7 * 3 * 3 + 9 * 3 + (8 + 6 * 4)) becomes [1m[37m669060[0m. 25 - ((2 + 4 * 9) * (6 + 9 * 8 + 6) + 6) + 2 + 4 * 2 becomes [1m[37m23340[0m. 26 27 28[1m[37mWhat do you get if you add up the results of evaluating the homework problems using these 29new rules?[0m 30 31