Site icon DataFlair

Python Quiz Questions – Upskill yourself with Fun

python quiz

Python course with 57 real-time projects - Learn Python

This Python quiz includes the basic and some intermediate level questions which will help you to memorize your concepts.

So, are you ready to attempt this quiz?

Also, do not forget to check other parts of the Python quiz as well.

All the Best!!!

Time limit: 0

Quiz Summary

0 of 15 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 15 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
  1. Current
  2. Review / Skip
  3. Answered
  4. Correct
  5. Incorrect
  1. Question 1 of 15
    1. Question

    How many CPUs will the threading library use?

    Correct
    Incorrect
  2. Question 2 of 15
    2. Question

    Which of the following codes raises an exception?

    Correct
    Incorrect
  3. Question 3 of 15
    3. Question

    Which of the following follow PEP8?
    Please select 2 correct answers

    Correct
    Incorrect
  4. Question 4 of 15
    4. Question

    What will this code print?
    >>> a=7
    >>>     print(a+1)

    Correct
    Incorrect
  5. Question 5 of 15
    5. Question

    What is the maximum value for an integer in Python 3?

    Correct
    Incorrect
  6. Question 6 of 15
    6. Question

    How do you denote the end of a block in Python 3?

    Correct
    Incorrect
  7. Question 7 of 15
    7. Question

    Which of these if-statements work?
    Please select 2 correct answers

    Correct
    Incorrect
  8. Question 8 of 15
    8. Question

    In this list, how will you access the letter ‘t’ in ‘bat’?
    list = [1, [‘a’, ‘b’, [‘kill’, ‘bat’, ‘cup’], ‘c’], 3]

    Correct
    Incorrect
  9. Question 9 of 15
    9. Question

    How will you turn the list a = [1, 2, 7, 8] into [1, 2, 3, 4, 5, 6, 7, 8]?
    Please select 2 correct answers

    Correct
    Incorrect
  10. Question 10 of 15
    10. Question

    What is the value of y?
    >>> x, y, z = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)[2::3]

    Correct
    Incorrect
  11. Question 11 of 15
    11. Question

    What is the result of {1, 2, 3} & {4, 5, 6}?

    Correct
    Incorrect
  12. Question 12 of 15
    12. Question

    Which statements delete the value ‘milk’ from the set s = {‘milk’, ‘cheese’, ‘butter’, ‘buttermilk’}?
    Please select 4 correct answers

    Correct
    Incorrect
  13. Question 13 of 15
    13. Question

    In the following code, how many objects and references does Python create?
    name = ‘Ayushi’
    fname = name

    Correct
    Incorrect
  14. Question 14 of 15
    14. Question

    According to PEP 8, what case should you use for variable names with more than one word?

    Correct
    Incorrect
  15. Question 15 of 15
    15. Question

    What is the output of the following code?
    >>> nums = [[val for val in range(num)] for num in range(3)]
    >>> for num in nums:
                for val in num:
                    if val < 2:
                        print(‘*’, end=”)

    Correct
    Incorrect

This was all in the Python quiz. Hope you enjoyed answering it.

Do share your experience and score of the Python quiz in the comment section.

Exit mobile version