Python 3 Basic Programming Test

10 Questions | Total Attempts: 581

SettingsSettingsSettings
Please wait...
Python 3 Basic Programming Test

Python is one of the most popular programming languages in the world today. Python 3. 0 was released in the late 2000s as a backwards-incompatible release. If you're just learning Python 3 or want to know how it works, take this basic programming test to assess your knowledge.


Questions and Answers
  • 1. 
    Python has how many standard data types?
    • A. 

      3

    • B. 

      4

    • C. 

      5

    • D. 

      6

  • 2. 
    What is the output of print str[0] if str = ‘Hello World!’?
    • A. 

      Hello

    • B. 

      Hello World

    • C. 

      H

    • D. 

      W

  • 3. 
    What is the difference between tuples and lists?
    • A. 

      Tuples are enclosed within parentheses while list are not.

    • B. 

      Tuples are enclosed with brackets while lists are not

    • C. 

      Tuples are bullet points while lists are numbers

    • D. 

      Tuples are in Roman figures while lists are alphabetical

  • 4. 
    What is the process of retrieving original Python objects from the stored string representation?
    • A. 

      Picking

    • B. 

      Selecting

    • C. 

      Retrieving

    • D. 

      Unpicking

  • 5. 
    What manages memory in Python?
    • A. 

      Memory cache

    • B. 

      Development space

    • C. 

      Private heap space

    • D. 

      Collector

  • 6. 
    Which of these statements is true for lists and tuples? 
    • A. 

      Lists are mutable, tuples are not

    • B. 

      Tuples are mutable, lists are not

    • C. 

      Tuples are numerical figures, lists are not

    • D. 

      Lists are numerical figures, tuples are not

  • 7. 
    Which of these is not a mutable built-in type Python? 
    • A. 

      Lists

    • B. 

      Sets

    • C. 

      Strings

    • D. 

      Dictionaries

  • 8. 
    What command can you use to delete a file in Python? 
    • A. 

      Os.remove (filename)

    • B. 

      Os.delete (filename)

    • C. 

      Os.clean (filename)

    • D. 

      Os.terminate (filename)

  • 9. 
    What is the use of // operator in Python?
    • A. 

      Or

    • B. 

      Division

    • C. 

      Separation

    • D. 

      List

  • 10. 
    What is the output of print tuple[0] if tuple = ( ‘abcd’, 786 , 2.23, ‘john’, 70.2 )?
    • A. 

      John

    • B. 

      Abcd

    • C. 

      786

    • D. 

      70.2