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. Which of the following operating systems does Python run on?
    Mac OS X only
    Mac OS X, Windows only
    Mac OS X, Windows, Linux only
    Mac OS X, Windows, Linux, and Unix only


  1. What is the extension of the Python byte code file?
    .py
    pyc
    .pyd
    None of the above

  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 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 core types in Python is considered immutable?
    Lists
    Dictionaries
    Strings
    Sets


  1. How to start an interactive interpreter session in python?
    python interactive
    python
    python script.py
    None of the above

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

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

  1. Python has deep support of Object Oriented Programming (OOP)
    True
    False

Post Your Question
Social Sharing
Search