Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

what is the value of the variable result after these lines of code are …

Question

what is the value of the variable result after these lines of code are executed?

>> a = 12
>> b = 0
>> c = 2
>> result = a * b - b / c

20
0
it has no value since an error occurred.
6

Explanation:

Step1: Substitute values

Substitute $a = 12$, $b = 0$, $c = 2$ into $result=a*b - b/c$. So we get $result=12\times0-0/2$.

Step2: Calculate multi - plication and division

First, calculate $12\times0 = 0$ and $0/2 = 0$. Then $result=0 - 0$.

Step3: Calculate subtraction

$0-0 = 0$.

Answer:

0