Online Test for Python

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

  1. Which of the following is NOT an area where Python is commonly used?
    Web development (server-side)
    Software development
    Mathematics
    Graphic design


  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

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

  1. Which of the following core types in Python is considered mutable?
    Numbers
    Strings
    Tuples
    Lists


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

  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. Immutability can be used to guarantee that an object remains constant throughout your program.
    True
    False

Post Your Question
Social Sharing
Search