Online Test for Python

  1. When execute Python program, Python first compiles source code(file statement) into a format known as pseudo code.
    True
    False

  1. Python automatically stores byte code in files with a .pyc extension.
    True
    False


  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. How to start an interactive interpreter session in python?
    python interactive
    python
    python script.py
    None of the above

  1. Python is
    Interpreter Programming language
    Compiled programming language
    Interpreter and Compiled programming language
    None of the above

  1. Which of the following core types in Python is considered immutable?
    Lists
    Dictionaries
    Strings
    Sets


  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. What is the extension of the Python byte code file?
    .py
    pyc
    .pyd
    None of the above

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

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

Post Your Question
Social Sharing
Search