Python Variables and Data Types Quiz [Python Quiz]

This is Python Variables and Data Types Quiz for Python Lovers. This Python Quiz for all who learning python. This quiz helps you to understand the concepts of Data Types and variables. Try to answer all questions. Best of Luck 🙂

1. Which Data Type represents a whole number?

 
 
 
 

2. In Python 3, what is the type of type(range(5))

 
 
 

3. Select the right way to create a string literal Ault'Kelly

 
 
 

4. What is the output of the following code

x = 70
def fun1():
    x = 35
    print(x)
fun1()
print(x)
 
 
 

5. Python allows you to be able to use Dictionaries to store values using keys.

 
 

6. What is the result of print(type([]) is list)

 
 

7. What is the data type of the following code

aTuple = (1, 'Jhon', 1+3j)
print(type(aTuple[2:3]))

 

 
 
 

8. Which of the following is used to represent ‘nothing’?

 
 
 
 

9. What is the output of the following code

print(bool(0), bool(3.14159), bool(-3), bool(1.0+1j))

 

 
 
 
 

10. Which of the following is an integer?

 
 
 

11. What is the data type of print(type(10))

 
 
 

12. What is the data type of print(type(0xFF))

 
 
 
 

I hope you like this quiz. Share this python quiz with your friend.

Play following python quiz.

Support CodeSnail

If you appreciate my work, or if it has helped you along your journey. It would mean a lot to me if you could write a message on my wall and share a cup of coffee (or tea) with me.

Buy Me A Coffee

Leave a Comment

Copy link
Powered by Social Snap