Python Variables and Basic Concepts – 20 MCQ Chapter 4 Set 4
Question 1 of 20
What is a variable in Python?
Question 2 of 20
Which symbol is used to assign a value to a variable in Python?
Question 3 of 20
Which is a valid Python variable name?
Question 4 of 20
What will be the output of name = "Alice"; print(name)?
Question 5 of 20
Which variable name is NOT valid in Python?
Question 6 of 20
What happens when the value of a variable is assigned again?
Question 7 of 20
What is the output of x, y, z = 10, 20, 30 followed by print(y)?
Question 8 of 20
What happens in x = y = z = 100?
Question 9 of 20
What does casting mean in Python?
Question 10 of 20
Which function converts a value to an integer?
Question 11 of 20
What is the output of x = int(5.8); print(x)?
Question 12 of 20
What is the output of x = float(5); print(x)?
Question 13 of 20
Which function converts a value into a string?
Question 14 of 20
Which function is used to check the data type of a variable?
Question 15 of 20
What will type(25) return?
Question 16 of 20
Which statement correctly creates a string?
Question 17 of 20
Which statement about single and double quotes is correct?
Question 18 of 20
Why is this statement useful: text = "I'm learning Python."?
Question 19 of 20
What does case sensitivity mean in Python?
Question 20 of 20
Which pair represents two different Python variables?