Back to Learning Hub

Day 3: Python data types, type casting and variables

15 questions • Select the best answer for each question

Question 1

What will be the output of the following code? print(10 + 5 * 2)

Question 2

Which statement correctly prints the result of an expression?

Question 3

Which of the following is a float?

Question 4

What does the following code return? type("100")

Question 5

What will be the output? x = 5 y = float(x) print(y)

Question 6

Why is type casting important in Python?

Question 7

Which variable name is INVALID?

Question 8

What will be the output? Value = 10 value = 20 print(Value)

Question 9

Which naming convention is recommended for Python variables?

Question 10

What will be the output? a, b, c = 1, 2, 3 print(b)

Question 11

What happens here? x = y = z = 5 print(z)

Question 12

What will be the output? values = [10, 20] a, b = values print(a + b)

Question 13

What is the data type of this expression? 5 > 3

Question 14

Which line best demonstrates “real Python logic”?

Question 15

Why should beginners focus deeply on Python fundamentals?