Q:

What are the values of the following Python expressions?

0

What are the values of the following Python expressions?

2**(3**2) (2**3)**2 2**3**3

Explanation: Expression 1 is evaluated as: 2**9, which is equal to 512. Expression 2 is evaluated as 8**2, which is equal to 64. The last expression is evaluated as 2**(3**2). This is because the associativity of ** operator is from right to left. Hence the result of the third expression is 512.

 


  1. 64, 512, 64
  2. 64, 64, 64
  3. 512, 512, 512
  4. 512, 64, 512

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Correct Answer:

 512, 64, 512

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Python Multiple Choice Questions And Answers

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What is the value of the following expression?8/4/... >>
<< What will be the output of the following Python co...