Site icon DataFlair

Python MCQ Questions Quiz

python mcq questions quiz

Master Python with 70+ Hands-on Projects and Get Job-ready - Learn Python

Hello Pythoneers! Tired of learning and practicing, want to test your knowledge with some interesting questions? We are here with an advanced Python Quiz for you with 30 MCQ Questions! So get ready to tickle your brain. All the best!!

Time limit: 0

Quiz Summary

0 of 30 Questions completed

Questions:

Information

You have already completed the quiz before. Hence you can not start it again.

Quiz is loading…

You must sign in or sign up to start the quiz.

You must first complete the following:

Results

Quiz complete. Results are being recorded.

Results

0 of 30 Questions answered correctly

Your time:

Time has elapsed

You have reached 0 of 0 point(s), (0)

Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)

Categories

  1. Not categorized 0%
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  1. Current
  2. Review / Skip
  3. Answered
  4. Correct
  5. Incorrect
  1. Question 1 of 30
    1. Question

    What is the output of the below code?

    print(2**2**3)

    Correct
    Incorrect
  2. Question 2 of 30
    2. Question

    Find the output of the below code.

    List=[1,2,3,4]

    List.insert(-5,3)

    print(List)

     

    Correct
    Incorrect
  3. Question 3 of 30
    3. Question

    Which of the following is not a string format in Python?

    Correct
    Incorrect
  4. Question 4 of 30
    4. Question

    What is the output of the below code?

    from functools import reduce

    List=[1,4,-3,5,7,-2]

    print(reduce(lambda x,y: x if x<y else y,List))

    Correct
    Incorrect
  5. Question 5 of 30
    5. Question

    Which of the following is not true?

    Correct
    Incorrect
  6. Question 6 of 30
    6. Question

    Find the output of the code below.

    from collections import Counter

    List=[1,2,3,4,2,3,1,2,3,4,2,5,4]

    cntr=Counter(List)

    var=cntr.most_common(1)

    var[0]

    Correct
    Incorrect
  7. Question 7 of 30
    7. Question

    Which of the following is not a parameter of the print() statement?

    Correct
    Incorrect
  8. Question 8 of 30
    8. Question

    What is the output of the below code?

    List=[‘1′,’2′,’3’]

    List2=map(lambda x:x*2,List)

    print(list(List2))

    Correct
    Incorrect
  9. Question 9 of 30
    9. Question

    What is the use of  Thread join()?

    Correct
    Incorrect
  10. Question 10 of 30
    10. Question

    Which of the following is the specifier to create a file?

    Correct
    Incorrect
  11. Question 11 of 30
    11. Question

    Which of the following is the property that gives the ability to use something without any need for knowing how it works?

    Correct
    Incorrect
  12. Question 12 of 30
    12. Question

    What is the operation that happens when we do an operation on unaligned series?

    Correct
    Incorrect
  13. Question 13 of 30
    13. Question

    What is the output of the below code?

    len(range(-1,6,3))

    Correct
    Incorrect
  14. Question 14 of 30
    14. Question

    Which of the following methods is used to merge two dictionaries based on the keys?

    Correct
    Incorrect
  15. Question 15 of 30
    15. Question

    Which of the following is not true about recursion?

    Correct
    Incorrect
  16. Question 16 of 30
    16. Question

    Which of the following is the correct method that draws a rectangle on a Tkinter?

    Correct
    Incorrect
  17. Question 17 of 30
    17. Question

    What is the output of the below code?

    import re

    print(re.split(‘[abc]’,’dabfbcad?’,flags=re.IGNORECASE))

    Correct
    Incorrect
  18. Question 18 of 30
    18. Question

    What is the keyword used to give an error as output?

    Correct
    Incorrect
  19. Question 19 of 30
    19. Question

    What is the output of the below code?

    tup=(1,4,1.3,’1′,7.9)

    print(list(map(lambda i:i*2,tup)))

     

    Correct
    Incorrect
  20. Question 20 of 30
    20. Question

    Which of the following is the correct function to open an excel?

    Correct
    Incorrect
  21. Question 21 of 30
    21. Question

    What is the purpose of dblquad() function in scipy?

    Correct
    Incorrect
  22. Question 22 of 30
    22. Question

    Which of the following is the function that executes an SQL query?

    Correct
    Incorrect
  23. Question 23 of 30
    23. Question

    Find the output of the below code.

    import numpy as np

    arr1 = np.array([[1,2,3],[4,5,6]])

    print(arr1.ravel().shape)

    Correct
    Incorrect
  24. Question 24 of 30
    24. Question

    What is the output of the following code?

    try:

        div=’2’+1

        print(‘0’,end=”)

    except:

        print(“1″,end=”)

    finally:

        print(“2”)

     

    Correct
    Incorrect
  25. Question 25 of 30
    25. Question

    Which of these is the file format to append data to a file?

    Correct
    Incorrect
  26. Question 26 of 30
    26. Question

    Which of the following is not a method related to NaN values in pandas?

    Correct
    Incorrect
  27. Question 27 of 30
    27. Question

    Which of the following is the property of a graph in matplotlib adds symbols at points given to draw graph?

    Correct
    Incorrect
  28. Question 28 of 30
    28. Question

    What does the below code do?

    cv2.split(pic)

    Correct
    Incorrect
  29. Question 29 of 30
    29. Question

    What is the output of the below code?

    def func(n,c=0):

        if n==0:

            return c

        c+=n

        return func(n//2,c)

    print(func(10))

    Correct
    Incorrect
  30. Question 30 of 30
    30. Question

    Find the output of the below code.

    class MyClass:

        def __init__(self, a):

            self.a = a

    obj = MyClass(7)

    obj.b = 2

    obj.c = 5

    print(len(obj.__dict__))

    Correct
    Incorrect

Summary

Hey, we are here at the end of the quiz. Hope you had a fun learning experience taking this quiz. Happy coding!

Exit mobile version