Python Basics chapter 2 quiz

Test Your Knowledge on Variables, Printing, Data Types, and Arithmetic Operations!

Question 1

What is the correct way to declare a constant variable in Python?

Question 2

Which of these arithmetic operators performs exponentiation?

Question 3

What is the data type of `3.14` in Python?

Question 4

What will be the result of `int("3.14")`?

Question 5

What will `print(10 / 3)` output?

Question 6

What will be the output of the following code?
x = 10
x += 5
print(x)

Question 7

Which function is used to convert a number to a string?

Question 8

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

Question 9

What will be printed by the following code?
print(type("10"))

Question 10

What will be the output of the following code?
x = 5
y = "5"
print(x + int(y))