Variables and Data Types Interview Questions

    Question 1: Python Variable Assignment

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

    Question 2: Python Data Type Identification

    What will be the data type of x after execution?

    x = 3.14

    Question 3: Python String Type in Python

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

    Question 4: Python Boolean Data Type

    What will be the output of the following code?

    x = True print(type(x))

    Question 5: Python Type Casting

    What will be the output?

    x = int(3.9) print(x)

    Question 6: Python Dynamic Typing

    What is the output of the code below?

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

    Question 7: Python Complex Numbers

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

    Question 8: Python Type Checking

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

    Question 9: Python Multiple Assignment

    What will be the output of this code?

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

    Question 10: Python None Type

    What will be the output?

    x = None print(type(x))