Python Beginners Quiz

14 Questions | Total Attempts: 113

SettingsSettingsSettings
Please wait...
Python Beginners Quiz

Are you interested in learning the Python language? Python is a natural computer programming language with a simplified syntax and easy-to-write codes. There are many online courses here that suit your level and needs. Also, you can take our Python Beginners Quiz which is as simple as the language itself, to see how much you know already, and learn more with every question you attempt.


Questions and Answers
  • 1. 
    Which keyword allows us to load a module in Python?
    • A. 

      Import

    • B. 

      Load

    • C. 

      Include

    • D. 

      library

  • 2. 
    Which one from the following objects in Python is immutable?
    • A. 

      Lists

    • B. 

      Dictionary

    • C. 

      Tuple

    • D. 

      Set

  • 3. 
    Give the output of the following code. <pre code = “Python> a = "Python Quiz" print(a[2:5]) </pre>
    • A. 

      Ytho

    • B. 

      Tho

    • C. 

      Yth

    • D. 

      thon

  • 4. 
    The ________ module is used for creating and manipulating DataFrames in Python.
    • A. 

      Numpy

    • B. 

      Scipy

    • C. 

      Pandas

    • D. 

      Collection

  • 5. 
    Which one of the following operators can perform floor division in Python?
    • A. 

      /

    • B. 

      **

    • C. 

      /=

    • D. 

      // -

  • 6. 
    Which function can add elements to the end of a list?
    • A. 

      add()

    • B. 

      insert()

    • C. 

      Append()

    • D. 

      Update()

  • 7. 
    Give the output of the following code. <pre code = “Python”> for i in range(0,10,3):     print(i)   </pre>
    • A. 

      1 4 7 10

    • B. 

      0 3 6 9

    • C. 

      1 3 5 7 9

    • D. 

      Can’t Say

  • 8. 
    Using the ________ statement, we can come out of a for loop in Python.
    • A. 

      Break

    • B. 

      continue

    • C. 

      End

    • D. 

      Stop

  • 9. 
    What is the syntax of accessing a value using its key in Python?
    • A. 

      dictionary_name(key)

    • B. 

      Key-dictionary_name

    • C. 

      Dictionary_name[key]

    • D. 

      None of the above

  • 10. 
    Give the output of the following code. <pre code = “python”> lst = ['Mark','Jay','Jack','Steve','Arnold'] print(lst[-2]) </pre>
    • A. 

      Jay

    • B. 

      Steve

    • C. 

      Arnold

    • D. 

      Mark

  • 11. 
    How to declare comments in Python?
    • A. 

      //This is a comment

    • B. 

      /*This is a comment

    • C. 

      %This is a comment

    • D. 

      #This is a comment

  • 12. 
    Which operator has the highest precedence in the following?
    • A. 

      * multiplication operator

    • B. 

      + addition operator

    • C. 

      & Bitwise AND

    • D. 

      == Comparison Operator

  • 13. 
    Give the output of the following code. <pre code = “python”> c = 2 ** 3 + 4 * 2 print(c) </pre>
    • A. 

      26

    • B. 

      16

    • C. 

      14

    • D. 

      12

  • 14. 
    Which one of the following functions can sort a list in Python?
    • A. 

      arrange()

    • B. 

      Sorted()

    • C. 

      Order()

    • D. 

      None of the above

Related Topics
Back to Top Back to top