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