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) How do you remove an item from a dictionary?

2 / 30

2) What is the purpose of the @staticmethod decorator?

3 / 30

3) How do you implement a simple state machine in Python?

4 / 30

4) What is metaprogramming in Python?

5 / 30

5) How do you use metaclasses in Python?

6 / 30

6) How do you optimize recursive functions in Python to avoid maximum recursion depth errors?

7 / 30

7) How do you implement middleware in a Python web framework?

8 / 30

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

9 / 30

9) How do you implement a binary search algorithm?

10 / 30

10) How do you mock external dependencies during testing in Python?

11 / 30

11) How do you create a generator expression in Python?

12 / 30

12) How do you implement a backtracking algorithm in Python?

13 / 30

13) What is the output of print(10 // 3)?

14 / 30

14) What does the zip() function do in Python?

15 / 30

15) Which exception is raised when dividing by zero?

16 / 30

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

17 / 30

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

18 / 30

18) What will be the output of the following code: print([i ** 2 for i in range(5)])?

19 / 30

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

20 / 30

20) What will be the output of the following code: print(int(5.9))?

21 / 30

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

22 / 30

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

23 / 30

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

24 / 30

24) What will be the output of the following code: print(type([1, 2, 3]) == list)?

25 / 30

25) What will be the output of the following code: print([x ** 2 for x in range(4)])?

26 / 30

26) What will be the output of the following code: print("abc" == "abc")?

27 / 30

27) What will be the output of the following code: print("123".isdigit())?

28 / 30

28) What will be the output of the following code: print({"a", "b", "c"} - {"b"})?

29 / 30

29) What will be the output of the following code: print("hello".endswith("lo"))?

30 / 30

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

 

Leave a Reply

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