To evaluate the expression 10 - 2 * 5
, we must follow the order of operations, which states that multiplication should be performed before subtraction.
So, we first calculate 2 * 5
, which equals 10
. Then, we perform the subtraction:
10 - 10 = 0
.
The output of the code print(10 - 2 * 5)
is therefore:
0