Start learning →
Home › Olympiad (Class 10) › Computer Science › Booleans and Decisions › In Python the expression (1 + 2) * 3 evaluates to:

In Python the expression (1 + 2) * 3 evaluates to:

A7
B5
C8
D9
Answer & Solution
Correct answer: D. 9
1. Parentheses are evaluated before everything else. 2. One plus two is three, times three is nine. 3. So the answer is 9. _Source: OpenStax Introduction to Python Programming, Chapter 4._
Practise this question with Quill — Olympiad (Class 10) →
Related questions