PYTHON QUIZ
1 .
Which of the following operators has its associativity from right to left?

**
2 .
What will be the value of x in the following Python expression?

``x = int(43.55+2/2)``

44
3 .
What are the values of the following Python expressions?
`````` 2**(3**2)
(2**3)**2
2**3**2``````

512, 64, 512
4 .
What is the value of the following expression?

``8/4/2, 8/(4/2)``

(1.0, 4.0)
5 .
What will be the output of the following Python code snippet?

``````X=”hi”
print(“05d”%X)``````

error
6 .
Read the information given below carefully and write a list comprehension such that the output is: [‘e’, ‘o’]

``````w="hello"
v=('a', 'e', 'i', 'o', 'u')``````

[x for x in w if x in v]
7 .
What will be the output of the following Python code?

``````t=32.00
[round((x-32)*5/9) for x in t]``````

Error
8 .
Write a list comprehension for producing a list of numbers between 1 and 1000 that are divisible by 3.

[x for x in range(1000) if x%3==0]
9 .
Write a list comprehension equivalent for the Python code shown below.

``````for i in range(1, 101):
if int(i*0.5)==i*0.5:
print(i)``````