This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 80 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 80 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Tuples are enclosed with in ..... A) ( ) symbols. B) [ ] symbols. C) \{ \} symbols. D) < > symbols. Show Answer Correct Answer: A) ( ) symbols. 2. What will be the output of the following code?for i in range(3):print("Hello")else:print("Done") A) Hello Done. B) Hello Hello Done. C) Hello Hello Hello. D) Hello Hello Hello Done. Show Answer Correct Answer: D) Hello Hello Hello Done. 3. What are the two main types of errors in programming? A) Syntax errors and Logical errors. B) Syntax errors and Runtime errors. C) Runtime errors and Logical errors. D) Syntax errors and Semantic errors. Show Answer Correct Answer: B) Syntax errors and Runtime errors. 4. What is missing from this line of code? A) Pencolor(red). B) Pencolor('red'). C) Pencolor("red"). D) Pencolor(red, blue). Show Answer Correct Answer: C) Pencolor("red"). 5. Which of the following cannot be a variable? A) Init . B) In. C) It. D) On. Show Answer Correct Answer: B) In. 6. Which of the following is the correct way to write a selection statement in Python? A) If age >= 18:. B) If age => 18:. C) If (age >= 18). D) If age >= 18. Show Answer Correct Answer: A) If age >= 18:. 7. Fungsi bawaan (built-in function) adalah fungsi yang ..... A) Dapat dipanggil tanpa perlu mengimpor modul atau pustaka. B) Dapat didefinisikan oleh pengguna sesuai kebutuhan. C) Dapat mengembalikan lebih dari satu nilai. D) Semua jawaban benar. Show Answer Correct Answer: A) Dapat dipanggil tanpa perlu mengimpor modul atau pustaka. 8. What is the purpose of the 'Disable path length limit' option in the Python setup? A) To shorten the path length. B) To allow longer file paths. C) To restrict file paths. D) To delete file paths. Show Answer Correct Answer: B) To allow longer file paths. 9. Python language use A) Upper case letters. B) Lower case letters. C) Upper and lower case letters. D) None of the above. Show Answer Correct Answer: B) Lower case letters. 10. Consider fruits = ('apple', 'banana', 'cherry'). Which conditional correctly prints 'Not found' when an item is absent? A) If item in fruits:print('Not found'). B) If fruits not in item:print('Not found'). C) If item not in fruits:print('Not found'). D) If fruits in item:print('Not found'). Show Answer Correct Answer: C) If item not in fruits:print('Not found'). 11. Which file extension should you use to save your code as a Python program file? A) .js. B) .html. C) .docx. D) .py. Show Answer Correct Answer: D) .py. 12. Python accepts single ('), double (") and triple (" ' or """) quotes to denote strings. Which of the following is NOT acceptable Python syntax? A) Print('Hello World'). B) Print("Hello World"). C) Print('Hello World"). D) Print(""'Hello World'""). Show Answer Correct Answer: C) Print('Hello World"). 13. Which statement correctly describes all(tuple)? A) Returns True if all elements are truthy. B) Returns True if any element is truthy. C) Returns False only for empty tuples. D) Ignores booleans inside tuples. Show Answer Correct Answer: A) Returns True if all elements are truthy. 14. What will be the data type of the following variable? A = '101' A) Float. B) String. C) Integer. D) None of the above. Show Answer Correct Answer: B) String. 15. What is the purpose of functions in Python? A) To execute a specific task only once in a program. B) To combine multiple variables into a single variable. C) To break code into modular chunks for reusability and organization. D) To declare built-in variables that are predefined in Python. Show Answer Correct Answer: C) To break code into modular chunks for reusability and organization. 16. What other name do Errors in Python have? A) Failures. B) Booleans. C) Exercises. D) Exceptions. Show Answer Correct Answer: D) Exceptions. 17. What does print("hello) display? A) Hello. B) Gives you an error. C) "hello". D) "hello. Show Answer Correct Answer: B) Gives you an error. 18. What is one of the key features of Python as a programming language? A) It is the fastest programming language available. B) It is difficult to learn for beginners. C) It has a complex syntax that is hard to read. D) It is an easy-to-learn programming language. Show Answer Correct Answer: D) It is an easy-to-learn programming language. 19. What is the output of the following Python code? a = "7" b = int(a) print(b + 3) A) 10. B) 73. C) 37. D) TypeError. Show Answer Correct Answer: A) 10. 20. In the expression (x + y) / 4, which symbols are the operators? A) X and y. B) ( and ). C) + and /. D) X and /. Show Answer Correct Answer: C) + and /. 21. How do you count rows in SQL? A) COUNT(). B) NUMBER(). C) SUM(). D) TOTAL. Show Answer Correct Answer: A) COUNT(). 22. Which of the following environments can be used to write Python code? A) Notepad. B) PyCharm. C) Command Prompt/Terminal. D) All of the above. Show Answer Correct Answer: D) All of the above. 23. For strings, the + operator represents A) Concatenation. B) Addition. C) Appending. D) Recantation. Show Answer Correct Answer: A) Concatenation. 24. Which of the following is a primitive data type in Python? A) Float. B) List. C) Int. D) String. Show Answer Correct Answer: C) Int. 25. Which of the following is a NOT a characteristic of a Lambda function? A) Anonymous function. B) Function calling itself. C) Function without def keyword. D) Function can take multiple arguments. Show Answer Correct Answer: B) Function calling itself. ← 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