6. Python Data Types - Numbers Quiz

1. What is the data type of the variable x in the following code: x = 5?
Answer: Integer
2. Which of the following is a valid way to represent a floating-point number in Python?
Answer: 5.0
3. Which of the following is a complex number in Python?
Answer: 5 + 3j
4. What is the data type of the result of the expression 5 ** 2?
Answer: Integer
5. Which of the following expressions will result in a floating-point number?
Answer: 5 / 2
6. What is the result of 5 ** 2?
Answer: 25
7. What is the data type of the variable x in x = 5.5?
Answer: Float
8. What is the result of 10 % 3?
Answer: 1
9. What will be the values of a, b, and c after executing the code: a, b, c = [1, 2, 3]?
Answer: a = 1, b = 2, c = 3
10. What will be the output of type(5.5)?
Answer: <class 'float'>
Score: 0 / 0 answered