Variables and Data Types Interview Questions

    Question 1Python Variable Assignment

    Which of the following is a valid variable declaration in Python?

    Question 2Python Data Type Identification

    What will be the data type of x after execution?

    x = 3.14

    Question 3Python String Type in Python

    Which of the following is a valid string declaration in Python?

    Question 4Python Boolean Data Type

    What will be the output of the following code?

    x = True print(type(x))

    Question 5Python Type Casting

    What will be the output?

    x = int(3.9) print(x)

    Question 6Python Dynamic Typing

    What is the output of the code below?

    x = 10 x = "Python" print(x)

    Question 7Python Complex Numbers

    Which is the correct way to declare a complex number in Python?

    Question 8Python Type Checking

    Which function is used to check the type of a variable in Python?

    Question 9Python Multiple Assignment

    What will be the output of this code?

    a, b, c = 1, 2, 3 print(a + b + c)

    Question 10Python None Type

    What will be the output?

    x = None print(type(x))