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