82.4k views
2 votes
I need help with my solution

I need help with my solution-example-1
User Cas Bloem
by
6.1k points

1 Answer

4 votes

Answer: B. a = 14 and b = 3

Step-by-step explanation:

Let's work through the expressions one-by-one:

The first 2 lines create 2 varaibles, a and b, with values of 2 and 7, respectively.

The next line assigns a to the product of a and b.

a * b = 2 * 7 = 14, so the new value of a is 14.

The last line assigns the remainder of b divided by the difference of a and 10.

a - 10 is 14 - 10 which is 4.

The value of b is 7 due to the second expression. 7 % 4 is 3 as 4 goes into 7 once with 3 left over. This value of three is assigned to b.

After all the expressions, the values of the variables are as follows: a = 14 and b = 3.

User Roly
by
6.6k points