python2

PYTHON EXAMS

Exam Instructions:

Total Number of Questions: 30
You will be required to answer a total of 30 multiple-choice questions.

Time Limit: 15 minutes for the entire exam
Once the time is up, the exam will automatically submit.

Passing Criteria:

A minimum score of 50% is required to pass the exam

Multiple Attempts:
You are allowed to take the exam multiple times. Only your highest score will be considered for certification.

Additional Instructions:

The exam timer cannot be paused once it begins.

Good luck, and feel free to retake the exam to improve your score!


python1

Python Exam

Test your Python skills with a challenging exam designed to evaluate your knowledge in programming, data structures, and algorithms

The certificate will be generated based on the information you provide in the form, so please ensure that all details are entered correctly.

1 / 30

1) What is the difference between __getattr__() and __getattribute__() in Python?

2 / 30

2) How does the yield keyword work in Python?

3 / 30

3) How do you perform unit testing in Python?

4 / 30

4) What is the __slots__ mechanism in Python?

5 / 30

5) What does the abc module provide in Python?

6 / 30

6) How do you implement a binary search algorithm recursively?

7 / 30

7) What is duck typing in Python?

8 / 30

8) How do you merge two dictionaries in Python (version 3.9 or later)?

9 / 30

9) How do you handle exceptions in coroutines in Python?

10 / 30

10) What is the correct way to install a package using pip?

11 / 30

11) What is the difference between deepcopy and copy in Python?

12 / 30

12) What are Python type hints, and how do they help in development?

13 / 30

13) How do you handle infinite recursion in Python?

14 / 30

14) What is the difference between isinstance() and type()?

15 / 30

15) What is the purpose of the weakref module in Python?

16 / 30

16) What will be the output of the following code: print("123".replace("2", "5"))?

17 / 30

17) What will be the output of the following code: print("abc".title())?

18 / 30

18) What will be the output of the following code: print("hello".replace("l", "p"))?

19 / 30

19) What will be the output of the following code: print("123"[0])?

20 / 30

20) What will be the output of the following code: print("hello".replace("l", "r"))?

21 / 30

21) What will be the output of the following code: print(1 + 2 * 3)?

22 / 30

22) What will be the output of the following code: print((3, 1) < (3, 2))?

23 / 30

23) What will be the output of the following code: print(3 + 5 * 2)?

24 / 30

24) What will be the output of the following code: print("abc".count("b"))?

25 / 30

25) What will be the output of the following code: print("hello".swapcase())?

26 / 30

26) What will be the output of the following code: print(3 != 2)?

27 / 30

27) What will be the output of the following code: print("abc".count("a"))?

28 / 30

28) What will be the output of the following code: print("a" * 0)?

29 / 30

29) What will be the output of the following code: print("test".startswith("te"))?

30 / 30

30) What will be the output of the following code: print((1, 2) + (3,))?

 

Leave a Reply

Your email address will not be published. Required fields are marked *