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: True / False 1. Python supports multiple inheritance. a. True b. False 2 / 50 Category: True / False 2. while loop executes at least once. a. False b. True 3 / 50 Category: True / False 3. = is a comparison operator in Python. a. True b. False 4 / 50 Category: True / False 4. Indentation is mandatory in Python. a. True b. False 5 / 50 Category: True / False 5. Python is case-sensitive. a. True b. False 6 / 50 Category: True / False 6. None represents absence of a value. a. True b. False 7 / 50 Category: True / False 7. Python supports object-oriented programming. a. True b. False 8 / 50 Category: True / False 8. print() is used for input in Python. a. False b. True 9 / 50 Category: True / False 9. Python code runs faster than C language. a. True b. False 10 / 50 Category: True / False 10. Tuples are mutable data types. a. False b. True 11 / 50 Category: Syntax & Errors 1. print(10 / 0) a. 0 b. infinity c. SyntaxError d. ZeroDivisionError 12 / 50 Category: Syntax & Errors 2. int("abc") a. 0 b. ValueError c. TypeError d. abc 13 / 50 Category: Syntax & Errors 3. list = 10 print(list[0]) a. 1 b. 0 c. IndexError d. TypeError 14 / 50 Category: Syntax & Errors 4. if 5 > 3 print("Yes") a. No Error b. Logical Error c. Syntax Error d. Indentation Error 15 / 50 Category: Syntax & Errors 5. print(unknown) a. 0 b. NameError c. SyntaxError d. unknown 16 / 50 Category: Syntax & Errors 6. print("Hello) a. Syntax Error b. Value Error c. No Error d. Name Error 17 / 50 Category: Syntax & Errors 7. a = [1,2,3] print(a[5]) a. IndexError b. 3 c. KeyError d. None 18 / 50 Category: Syntax & Errors 8. print(x) a. x is printed b. 0 c. SyntaxError d. NameError 19 / 50 Category: Syntax & Errors 9. for i in range(5) print(i) a. Syntax Error b. Name Error c. Type Error d. No Error 20 / 50 Category: Syntax & Errors 10. def fun(): print("Hi") a. Indentation Error b. Syntax Error c. Name Error d. No Error 21 / 50 Category: Output Based Questions 1. print(type("10")) a. string b. int c. float 22 / 50 Category: Output Based Questions 2. print("Hello" + "World") a. Hello World b. HelloWorld c. Hello+World d. Error 23 / 50 Category: Output Based Questions 3. print(len("Python")) a. 5 b. 6 c. 7 d. 8 24 / 50 Category: Output Based Questions 4. x = 10 print(x) a. 0 b. x c. Error d. 10 25 / 50 Category: Output Based Questions 5. print(10 == 10) a. 10 b. True c. Error d. False 26 / 50 Category: Output Based Questions 6. print(2 ** 3) a. 9 b. 8 c. Error d. 6 27 / 50 Category: Output Based Questions 7. print(10 / 2) a. 5.0 b. 5 c. Error d. 2 28 / 50 Category: Output Based Questions 8. print(5 % 2) a. 0 b. Error c. 1 d. 2 29 / 50 Category: Output Based Questions 9. print(type(3.14)) a. int b. float c. decimal 30 / 50 Category: Output Based Questions 10. print(5 + 3) a. 8 b. Error c. 53 d. None 31 / 50 Category: Output Based Questions 11. a = [1,2,3] print(len(a)) a. 1 b. 2 c. Error d. 3 32 / 50 Category: Output Based Questions 12. print(bool(0)) a. True b. False c. 0 d. Error 33 / 50 Category: Output Based Questions 13. x = 5 x += 3 print(x) a. 5 b. 2 c. 8 d. Error 34 / 50 Category: Output Based Questions 14. print("Python"[0]) a. Python b. Error c. P d. y 35 / 50 Category: Output Based Questions 15. print(10 > 5) a. True b. False c. Error d. 10 36 / 50 Category: Fill in the Blanks 1. __________ is used to take input from the user in Python. a. input() b. read() c. scan() d. get() 37 / 50 Category: Fill in the Blanks 2. Python is a __________ level programming language. a. High b. Low c. Machine d. Assembly 38 / 50 Category: Fill in the Blanks 3. The multiplication operator in Python is __________. a. % b. X c. * d. x 39 / 50 Category: Fill in the Blanks 4. The correct file extension for Python files is __________. a. .pyt b. .python c. .pt d. .py 40 / 50 Category: Fill in the Blanks 5. The value of True in Python is __________. a. True b. 0 c. true d. 1 41 / 50 Category: Fill in the Blanks 6. The symbol used for comments in Python is __________. a. /**/ b. <!-- --> c. # d. // 42 / 50 Category: Fill in the Blanks 7. The output of print(type(10)) is __________. a. integer b. int c. number 43 / 50 Category: Fill in the Blanks 8. __________ keyword is used to check a condition in Python. a. for b. check c. while d. if 44 / 50 Category: Fill in the Blanks 9. __________ function returns the length of a list. a. size() b. count() c. length() d. len() 45 / 50 Category: Fill in the Blanks 10. The keyword used to define a function in Python is __________. a. fun b. function c. def d. define 46 / 50 Category: Fill in the Blanks 11. Python was created by __________. a. James Gosling b. Bjarne Stroustrup c. Guido van Rossum d. Dennis Ritchie 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. Python is an __________ language. a. Assembled b. Interpreted c. Compiled d. Binary 49 / 50 Category: Fill in the Blanks 14. Python is a __________ typed language. a. Dynamically b. Weakly c. Statically d. Strongly 50 / 50 Category: Fill in the Blanks 15. __________ is used to exit a loop in Python. a. break b. end c. stop d. exit Your score isThe average score is 0% 0% Restart quiz Rate the Quiz. Thank You For Rating Us! Send feedback Share this: Share on Facebook (Opens in new window) Facebook Share on X (Opens in new window) X Like this:Like Loading… Related 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 Working in python August 23, 2022 DATA TYPE IN PYTHON March 16, 2023 Learn Python: A Comprehensive Guide for Beginners May 18, 2025 Leave a ReplyCancel reply