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