1. Which of the following is invalid?
• _a = 1
• __a = 1
• __str__ = 1

2. 1st_string is an invalid variable true or false?

Answer. true

3. What is the order of precedence in python ?
i) Parentheses
ii) Exponential
iii) Multiplication
iv) Division
v) Addition
vi) Subtraction
• i,ii,iii,iv,v,vi
• ii,i,iii,iv,v,vi
• ii,i,iv,iii,v,vi
• i,ii,iii,iv,vi,v

4. What is the answer to this expression, 22 % 3 is?

Answer. 1

5. What will be the output of the following Python code?
>>>str="hello"
>>>str[:2]

Answer. he

6. Which of the following will run without errors?
• round(45.8)
• round(6352.898,2,5)
• round()
• round(7463.123,2,1)

Answer. round(45.8)

7. The following is displayed by a print function call. Select all of the function calls that result in this output.
tom
dick
harry
•print('''tom\ndick\nharry''')
• print("'tomdickharry"')
• print('tom\ndick\nharry')
• print('tom dick harry')

8. What does ~4 evaluate to?

Answer. -5

9. What is the type of int?

Answer. Integer