This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 30 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 30 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What is the output of the following code?for i in range(3):print(i) A) 0 1 2 3. B) 0 1 2. C) 1 2 3. D) 1 2. Show Answer Correct Answer: B) 0 1 2. 2. Which data type stores True or False? A) Bool. B) Str. C) Int. D) Float. Show Answer Correct Answer: A) Bool. 3. What is the output of the following code:print(type(5) is int)? A) True. B) Int. C) False. D) 5. Show Answer Correct Answer: A) True. 4. Read the Python program below:location = "Leeds" print("I live in", location)When this program is executed, what will be displayed on the screen? A) "I live in", location. B) I live in location. C) "I live in", Leeds. D) I live in Leeds. Show Answer Correct Answer: D) I live in Leeds. 5. Which of the following store data in pair? A) Dictionary. B) List. C) String. D) Tuple. Show Answer Correct Answer: A) Dictionary. 6. Is "You were born in" a string? A) Yes, because it is text inside quotes. B) Yes, because it has the + sign. C) No, because it has spaces. D) No, because it is not a variable. Show Answer Correct Answer: A) Yes, because it is text inside quotes. 7. What is the correct syntax to make Tracy move forward 100 pixels? A) Forward(100). B) Forward 100. C) Go(100). D) Move 100. Show Answer Correct Answer: A) Forward(100). 8. Which variable correctly stores a string value? A) Greeting = hello. B) Greeting = 81. C) Greeting = "hello". D) Greeting = 45.8. Show Answer Correct Answer: C) Greeting = "hello". 9. Which of the following is used to define a class in Python? A) Class. B) Define. C) Object. D) Struct. Show Answer Correct Answer: A) Class. 10. True is a boolean A) True. B) False. C) Neither. D) None of the above. Show Answer Correct Answer: A) True. 11. How do you handle exceptions in Python? A) Use if-else statements to manage exceptions in Python. B) Ignore exceptions and continue execution in Python. C) Use try-except blocks to handle exceptions in Python. D) Utilize switch-case structures for exception handling in Python. Show Answer Correct Answer: C) Use try-except blocks to handle exceptions in Python. 12. Which statement is true regarding how computers communicate? A) Computers only use one programming language. B) Computers communicate using natural human languages. C) Computers use multiple programming languages to communicate. D) Computers do not require programming languages. Show Answer Correct Answer: C) Computers use multiple programming languages to communicate. 13. What is the minimum passing mark for the Semester End Exam (SEE) as a percentage of the maximum marks? A) 35%. B) 25%. C) 50%. D) 40%. Show Answer Correct Answer: A) 35%. 14. Used in python to make decisions A) If statement. B) Print command. C) Input command. D) Logical operators. Show Answer Correct Answer: A) If statement. 15. What will be the output of the following Python program? x = 5 x = x + 10 print(x) A) 5. B) 10. C) 15. D) 20. Show Answer Correct Answer: C) 15. 16. What is the result of the expression 10 // 3? A) 3.333. B) 3. C) 3.0. D) 1. Show Answer Correct Answer: B) 3. 17. Which of the following Python code snippets asks the user to enter their name and greets them? A) Name = input('Enter your name:')print('Hello, ' + name + '!'). B) Print('Enter your name:')name = input()print('Goodbye, ' + name). C) Name = input('Enter your age:')print('Hello, ' + name + '!'). D) Print('Hello, World!'). Show Answer Correct Answer: A) Name = input('Enter your name:')print('Hello, ' + name + '!'). 18. Which of the following is an example of a famous application developed using Python? A) Microsoft Word. B) Instagram. C) WhatsApp. D) Minecraft. Show Answer Correct Answer: B) Instagram. 19. A, b, c=10, 20, 30p, q, r=c-5, a+3, b-4print ('A, B, C:', a, b, c)print ('P, Q, R:', p, q, r) A) A, B, C:10 20 30P, Q, R:24 12 16. B) A, B, C:10 20 30P, Q, R:25 13 16. C) A, B, C:10 20 30P, Q, R:25 14 16. D) A, B, C:10 20 30P, Q, R:25 13 18. Show Answer Correct Answer: B) A, B, C:10 20 30P, Q, R:25 13 16. 20. Which of the following is the correct way to check if two variables, a and b, are both greater than 5? A) If a > 5 and b > 5:. B) If a > 5 or b > 5:. C) If (a > 5) & (b > 5):. D) If a > 5, b > 5:. Show Answer Correct Answer: A) If a > 5 and b > 5:. 21. Which of the following makes Python easy to learn? A) Complex syntax. B) Simple and readable code. C) Requires extensive memory management. D) Requires pre-compilation. Show Answer Correct Answer: B) Simple and readable code. 22. Which of the following is not a mode of interacting with Python? A) Batch Mode. B) Interactive Mode. C) Script Mode. D) Hybrid Mode. Show Answer Correct Answer: D) Hybrid Mode. 23. How do you print a variable 'x' in Python? A) 'echo x'. B) 'print(x)'. C) 'console.log(x)'. D) 'printf(x)'. Show Answer Correct Answer: B) 'print(x)'. 24. Which of the following is the correct way to display the word "Hello" on the screen in Python? A) Print Hello. B) Print("Hello"). C) Echo("Hello"). D) Display("Hello"). Show Answer Correct Answer: B) Print("Hello"). 25. Which of the following is a valid way to create a list in Python? A) List = (). B) List = []. C) List = \{\}. D) List = <>. Show Answer Correct Answer: B) List = []. ← PreviousNext →Related QuizzesClass 11 Computer Science Chapter 2 Introduction To Python Quiz 1Class 11 Computer Science Chapter 2 Introduction To Python Quiz 2Class 11 Computer Science Chapter 2 Introduction To Python Quiz 3Class 11 Computer Science Chapter 2 Introduction To Python Quiz 4Class 11 Computer Science Chapter 2 Introduction To Python Quiz 5Class 11 Computer Science Chapter 2 Introduction To Python Quiz 6Class 11 Computer Science Chapter 2 Introduction To Python Quiz 7Class 11 Computer Science Chapter 2 Introduction To Python Quiz 8Class 11 Computer Science Chapter 2 Introduction To Python Quiz 9Class 11 Computer Science Chapter 2 Introduction To Python Quiz 10 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books