PYTHON QUIZ 3

2
Created on By Sirjana GhimireAcharya

PYTHON QUIZ 3

1 / 10

  1. What is the output of the following segment

chr(ord('A'))

2 / 10

2. What is called when a function is defined inside a class?

3 / 10

3. Which of the following is the use of id() function in python?

4 / 10

4. Which module in Python supports regular expressions?

5 / 10

5. What is the value of colors[2]?

colors = ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet']

6 / 10

6. Is the following statement correct?

There are two types of numbers in Python: integers and assigned values.

7 / 10

7. What is the output of the below python code ?

a = [1,2,3,None,(),[],]
print len(a)

8 / 10

8. What should the below code print?

print type(1J)

9 / 10

9. Which operator has higher precedence in the following list

10 / 10

10. The ‘in’ operator is used to check if a value exists within an iterable object container such as a list. Evaluates to true if it finds a variable in the specified sequence and false otherwise.

Your score is

The average score is 55%

0%