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: Output Based Questions 1. print(bool(0)) a. Error b. 0 c. False d. True 2 / 50 Category: Output Based Questions 2. print(len("Python")) a. 8 b. 6 c. 7 d. 5 3 / 50 Category: Output Based Questions 3. print(5 + 3) a. None b. Error c. 8 d. 53 4 / 50 Category: Output Based Questions 4. print(2 ** 3) a. Error b. 6 c. 9 d. 8 5 / 50 Category: Output Based Questions 5. print("Hello" + "World") a. Error b. Hello World c. Hello+World d. HelloWorld 6 / 50 Category: Output Based Questions 6. a = [1,2,3] print(len(a)) a. 3 b. 2 c. 1 d. Error 7 / 50 Category: Output Based Questions 7. x = 10 print(x) a. 0 b. Error c. x d. 10 8 / 50 Category: Output Based Questions 8. print(5 % 2) a. 1 b. 0 c. Error d. 2 9 / 50 Category: Output Based Questions 9. print(10 == 10) a. Error b. True c. False d. 10 10 / 50 Category: Output Based Questions 10. print(type(3.14)) a. float b. decimal c. int 11 / 50 Category: Output Based Questions 11. print(10 / 2) a. 5 b. 2 c. Error d. 5.0 12 / 50 Category: Output Based Questions 12. print("Python"[0]) a. Error b. y c. P d. Python 13 / 50 Category: Output Based Questions 13. print(10 > 5) a. False b. Error c. True d. 10 14 / 50 Category: Output Based Questions 14. print(type("10")) a. int b. string c. float 15 / 50 Category: Output Based Questions 15. x = 5 x += 3 print(x) a. 5 b. Error c. 8 d. 2 16 / 50 Category: Syntax & Errors 1. int("abc") a. ValueError b. abc c. 0 d. TypeError 17 / 50 Category: Syntax & Errors 2. a = [1,2,3] print(a[5]) a. 3 b. None c. IndexError d. KeyError 18 / 50 Category: Syntax & Errors 3. print(10 / 0) a. infinity b. ZeroDivisionError c. 0 d. SyntaxError 19 / 50 Category: Syntax & Errors 4. print(x) a. NameError b. SyntaxError c. 0 d. x is printed 20 / 50 Category: Syntax & Errors 5. print("Hello) a. Value Error b. Name Error c. Syntax Error d. No Error 21 / 50 Category: Syntax & Errors 6. for i in range(5) print(i) a. Type Error b. Syntax Error c. Name Error d. No Error 22 / 50 Category: Syntax & Errors 7. print(unknown) a. NameError b. 0 c. unknown d. SyntaxError 23 / 50 Category: Syntax & Errors 8. def fun(): print("Hi") a. Syntax Error b. No Error c. Indentation Error d. Name Error 24 / 50 Category: Syntax & Errors 9. list = 10 print(list[0]) a. 1 b. IndexError c. TypeError d. 0 25 / 50 Category: Syntax & Errors 10. if 5 > 3 print("Yes") a. No Error b. Logical Error c. Syntax Error d. Indentation Error 26 / 50 Category: True / False 1. print() is used for input in Python. a. False b. True 27 / 50 Category: True / False 2. while loop executes at least once. a. True b. False 28 / 50 Category: True / False 3. None represents absence of a value. a. True b. False 29 / 50 Category: True / False 4. Python code runs faster than C language. a. False b. True 30 / 50 Category: True / False 5. Tuples are mutable data types. a. True b. False 31 / 50 Category: True / False 6. Python supports multiple inheritance. a. False b. True 32 / 50 Category: True / False 7. = is a comparison operator in Python. a. True b. False 33 / 50 Category: True / False 8. Python supports object-oriented programming. a. False b. True 34 / 50 Category: True / False 9. Indentation is mandatory in Python. a. True b. False 35 / 50 Category: True / False 10. Python is case-sensitive. a. False b. True 36 / 50 Category: Fill in the Blanks 1. The symbol used for comments in Python is __________. a. // b. # c. <!-- --> d. /**/ 37 / 50 Category: Fill in the Blanks 2. Python is an __________ language. a. Assembled b. Compiled c. Interpreted d. Binary 38 / 50 Category: Fill in the Blanks 3. __________ keyword is used to check a condition in Python. a. if b. for c. while d. check 39 / 50 Category: Fill in the Blanks 4. __________ function returns the length of a list. a. count() b. length() c. len() d. size() 40 / 50 Category: Fill in the Blanks 5. The value of True in Python is __________. a. 0 b. 1 c. true d. True 41 / 50 Category: Fill in the Blanks 6. Python was created by __________. a. James Gosling b. Guido van Rossum c. Dennis Ritchie d. Bjarne Stroustrup 42 / 50 Category: Fill in the Blanks 7. The output of print(type(10)) is __________. a. number b. integer c. int 43 / 50 Category: Fill in the Blanks 8. The multiplication operator in Python is __________. a. x b. * c. % d. X 44 / 50 Category: Fill in the Blanks 9. __________ is used to exit a loop in Python. a. break b. stop c. end d. exit 45 / 50 Category: Fill in the Blanks 10. The keyword used to define a function in Python is __________. a. function b. fun c. def d. define 46 / 50 Category: Fill in the Blanks 11. Python is a __________ level programming language. a. Assembly b. Machine c. High d. Low 47 / 50 Category: Fill in the Blanks 12. Lists in Python are enclosed within __________ brackets. a. () b. {} c. [] 48 / 50 Category: Fill in the Blanks 13. The correct file extension for Python files is __________. a. .py b. .python c. .pt d. .pyt 49 / 50 Category: Fill in the Blanks 14. __________ is used to take input from the user in Python. a. scan() b. get() c. read() d. input() 50 / 50 Category: Fill in the Blanks 15. Python is a __________ typed language. a. Dynamically b. Statically c. Strongly d. Weakly 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 Prajjwal Singh Tech Blogger || Web developer || Computer Networking Enthusiast || Microsoft SQL Database Management Expert || Software Debugger || Learned DOS OS Structure You Might Also Like Working with Math Module of Python April 27, 2023 Learn Python: A Comprehensive Guide for Beginners May 18, 2025 Conditional Construct In Python October 30, 2023 Leave a ReplyCancel reply