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