Python Quiz for Beginners. 0% 0 Oops! Time up! Python programming Python Basic Quiz This Quiz for beginners. You can enhance and check your knowledge in python after attending this quiz. Login Here. NameEmail 1 / 50 Category: Syntax & Errors 1. def fun(): print("Hi") a. Syntax Error b. Name Error c. No Error d. Indentation Error 2 / 50 Category: Syntax & Errors 2. print(10 / 0) a. SyntaxError b. infinity c. ZeroDivisionError d. 0 3 / 50 Category: Syntax & Errors 3. list = 10 print(list[0]) a. 1 b. TypeError c. IndexError d. 0 4 / 50 Category: Syntax & Errors 4. if 5 > 3 print("Yes") a. No Error b. Logical Error c. Syntax Error d. Indentation Error 5 / 50 Category: Syntax & Errors 5. a = [1,2,3] print(a[5]) a. None b. 3 c. KeyError d. IndexError 6 / 50 Category: Syntax & Errors 6. for i in range(5) print(i) a. Syntax Error b. Type Error c. Name Error d. No Error 7 / 50 Category: Syntax & Errors 7. int("abc") a. abc b. ValueError c. 0 d. TypeError 8 / 50 Category: Syntax & Errors 8. print(unknown) a. unknown b. 0 c. SyntaxError d. NameError 9 / 50 Category: Syntax & Errors 9. print(x) a. NameError b. x is printed c. SyntaxError d. 0 10 / 50 Category: Syntax & Errors 10. print("Hello) a. Name Error b. Syntax Error c. Value Error d. No Error 11 / 50 Category: True / False 1. while loop executes at least once. a. False b. True 12 / 50 Category: True / False 2. Indentation is mandatory in Python. a. True b. False 13 / 50 Category: True / False 3. Python supports object-oriented programming. a. False b. True 14 / 50 Category: True / False 4. Python supports multiple inheritance. a. True b. False 15 / 50 Category: True / False 5. Python code runs faster than C language. a. True b. False 16 / 50 Category: True / False 6. = is a comparison operator in Python. a. False b. True 17 / 50 Category: True / False 7. print() is used for input in Python. a. False b. True 18 / 50 Category: True / False 8. Tuples are mutable data types. a. True b. False 19 / 50 Category: True / False 9. None represents absence of a value. a. False b. True 20 / 50 Category: True / False 10. Python is case-sensitive. a. False b. True 21 / 50 Category: Output Based Questions 1. print(type(3.14)) a. decimal b. float c. int 22 / 50 Category: Output Based Questions 2. print(5 + 3) a. 53 b. 8 c. Error d. None 23 / 50 Category: Output Based Questions 3. x = 5 x += 3 print(x) a. 8 b. 5 c. Error d. 2 24 / 50 Category: Output Based Questions 4. print(len("Python")) a. 7 b. 8 c. 5 d. 6 25 / 50 Category: Output Based Questions 5. print("Python"[0]) a. y b. P c. Error d. Python 26 / 50 Category: Output Based Questions 6. print(bool(0)) a. Error b. 0 c. True d. False 27 / 50 Category: Output Based Questions 7. print(type("10")) a. string b. float c. int 28 / 50 Category: Output Based Questions 8. print(5 % 2) a. 0 b. 1 c. Error d. 2 29 / 50 Category: Output Based Questions 9. print("Hello" + "World") a. Error b. Hello World c. HelloWorld d. Hello+World 30 / 50 Category: Output Based Questions 10. print(2 ** 3) a. 8 b. Error c. 9 d. 6 31 / 50 Category: Output Based Questions 11. x = 10 print(x) a. 0 b. 10 c. Error d. x 32 / 50 Category: Output Based Questions 12. a = [1,2,3] print(len(a)) a. 3 b. 2 c. Error d. 1 33 / 50 Category: Output Based Questions 13. print(10 == 10) a. 10 b. Error c. True d. False 34 / 50 Category: Output Based Questions 14. print(10 > 5) a. True b. False c. 10 d. Error 35 / 50 Category: Output Based Questions 15. print(10 / 2) a. 2 b. Error c. 5 d. 5.0 36 / 50 Category: Fill in the Blanks 1. Python is a __________ typed language. a. Dynamically b. Strongly c. Weakly d. Statically 37 / 50 Category: Fill in the Blanks 2. Lists in Python are enclosed within __________ brackets. a. [] b. () c. {} 38 / 50 Category: Fill in the Blanks 3. The correct file extension for Python files is __________. a. .pyt b. .pt c. .python d. .py 39 / 50 Category: Fill in the Blanks 4. The value of True in Python is __________. a. True b. 0 c. 1 d. true 40 / 50 Category: Fill in the Blanks 5. __________ is used to exit a loop in Python. a. break b. stop c. exit d. end 41 / 50 Category: Fill in the Blanks 6. Python is an __________ language. a. Binary b. Interpreted c. Compiled d. Assembled 42 / 50 Category: Fill in the Blanks 7. The multiplication operator in Python is __________. a. X b. * c. x d. % 43 / 50 Category: Fill in the Blanks 8. Python is a __________ level programming language. a. High b. Assembly c. Low d. Machine 44 / 50 Category: Fill in the Blanks 9. __________ is used to take input from the user in Python. a. scan() b. get() c. input() d. read() 45 / 50 Category: Fill in the Blanks 10. __________ function returns the length of a list. a. len() b. count() c. length() d. size() 46 / 50 Category: Fill in the Blanks 11. The symbol used for comments in Python is __________. a. # b. // c. <!-- --> d. /**/ 47 / 50 Category: Fill in the Blanks 12. Python was created by __________. a. Bjarne Stroustrup b. Guido van Rossum c. James Gosling d. Dennis Ritchie 48 / 50 Category: Fill in the Blanks 13. __________ keyword is used to check a condition in Python. a. check b. if c. while d. for 49 / 50 Category: Fill in the Blanks 14. The output of print(type(10)) is __________. a. integer b. number c. int 50 / 50 Category: Fill in the Blanks 15. The keyword used to define a function in Python is __________. a. function b. define c. fun d. def Your score isThe average score is 0% 0% Restart quiz Rate the Quiz. Thank You For Rating Us! Send feedback Like this: Table of Contents ToggleLike this: Like Loading...Share post Please Share This Share this content Opens in a new window Opens in a new window Opens in a new window Opens in a new window Read more articles Previous PostLearn Python: A Comprehensive Guide for Beginners Next PostPython List Datatype Quiz Prajjwal Singh Tech Blogger || Web developer || Computer Networking Enthusiast || Microsoft SQL Database Management Expert || Software Debugger || Learned DOS OS Structure You Might Also Like Python List Datatype Quiz January 30, 2026 What is Python PL? August 12, 2022 Learn Python: A Comprehensive Guide for Beginners May 18, 2025 Leave a ReplyCancel reply