Computer Applications
What will be the output of
print (3*2)**2
- 81
- 18
- 36
- 12
Python Funda
2 Likes
Answer
36
Reason — The given expression (3*2)**2 is evaluated as follows:
= (3 * 2) ** 2
= 6 ** 2 (Since parentheses has higher precedence than exponentiation (**))
= 36
Thus, 36 is printed as output.
Answered By
3 Likes
Related Questions
What will be the output of following code ?
print(8 >= 8)- 8 >= 8
- False
- True
- Error
What will be the output of
print 3*2**2- 81
- 18
- 36
- 12
Which of the following has the highest precedence in an expression ?
- Exponentiation (**)
- Multiplication (*)
- Division (/)
- Parenthesis (())
What are tokens in Python ? How many types of tokens are allowed in Python ? Exemplify your answer.