Online Test for Python

  1. What is the purpose of the "if" statement in Python?
    To create a loop
    To declare a variable
    To define a function
    To conditionally execute code

  1. In which year was the Python programming language released?
    1995
    1991
    2000
    2005


  1. Immutability can be used to guarantee that an object remains constant throughout your program.
    True
    False

  1. Which of the following is not a valid data type in Python?
    character
    list
    dictionary
    set

  1. What is a Python Virtual Machine (PVM)?
    runtime engine of Python that compiled your compiled byte code
    runtime engine of Python that interprets your compiled byte code
    runtime engine of Python that convert source code into byte code
    None of the above

  1. An “immutable” object is an object that can be changed after it is created.
    True
    False


  1. Which of the following is a correct way to declare a variable in Python?
    int x = 5
    x = "hello"
    x := 5
    5 = x

  1. Which of the following is a correct statement about Python programs?
    Python programs are composed of functions, loops, and objects.
    Python programs consist of variables, arrays, and objects.
    Python programs are divided into modules, statements, expressions, and objects.
    Python programs are made up of classes, methods, and expressions.

  1. which of the following is immutable core data type of python?
    Numbers, Strings, and Lists
    Numbers, Dictionary, and Tuples
    List, Strings, and Tuples
    Numbers, Strings, and Tuples

  1. Which individual created the Python programming language?
    Bill Gates
    Steve Jobs
    Van Rossum
    Dennis Ritchie

Post Your Question
Social Sharing
Search