199k views
2 votes
What is the value of the variable result after these lines of code are executed?

>>> a = 2
>>> b = -3
>>> c = 4
>>> result = (a - b) * c
The value of result is
.

User Mihey Mik
by
6.3k points

1 Answer

1 vote

Answer:

20

Step-by-step explanation:

We can substitute to find the value of result :

(a - b) * c = (2 + 3 ) * 4 (the '*' operator means to multiply)

= 20

Hope this helps :)

User JuJoDi
by
6.1k points