186k views
2 votes
Consider the following code: x = 9 y = -2 z = 2 print (x + y * z) What is output? 9 13 14 5

1 Answer

3 votes

Answer:

5

Step-by-step explanation:

x = 9

y -2

x = 2

expression = (x + y * z)

Apply BODMAS rule.

= 9 + (-2 * 2)

= 9 + (-4)

= 9 - 4

= 5

User JRomero
by
4.7k points