Python Multiple Choice Questions

  1. which of the following is immutable core data type of python?
    1. Numbers, Strings, and Lists
    2. Numbers, Dictionary, and Tuples
    3. List, Strings, and Tuples
    4. Numbers, Strings, and Tuples
Answer :
D
Explanation:
Added By : Shruti


  1. Which of the following core types in Python is considered mutable?
    1. Numbers
    2. Strings
    3. Tuples
    4. Lists
Answer :
D
Explanation:
Added By : Sandhya

  1. Which of the following core types in Python is considered immutable?
    1. Lists
    2. Dictionaries
    3. Strings
    4. Sets
Answer :
C
Explanation:
Added By : Sandhya


  1. Which of the following is a correct statement about Python programs?
    1. Python programs are composed of functions, loops, and objects.
    2. Python programs consist of variables, arrays, and objects.
    3. Python programs are divided into modules, statements, expressions, and objects.
    4. Python programs are made up of classes, methods, and expressions.
Answer :
C
Explanation:
Added By : Gaurav

  1. How to start an interactive interpreter session in python?
    1. python interactive
    2. python
    3. python script.py
    4. None of the above
Answer :
B
Explanation:
Added By : Gaurav

  1. What is the purpose of the "if" statement in Python?
    1. To create a loop
    2. To declare a variable
    3. To define a function
    4. To conditionally execute code
Answer :
D
Explanation:
Added By : Gaurav


  1. Which of the following is not a valid data type in Python?
    1. character
    2. list
    3. dictionary
    4. set
Answer :
A
Explanation:
Added By : Gaurav

  1. Which of the following is a loop in Python?
    1. for loop
    2. repeat loop
    3. until loop
    4. while loop
Answer :
D
Explanation:
Added By : Gaurav

Post Your Question
Social Sharing
Search