This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 9 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 9 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What is the output of the following code:num = (11, 12, 13, 14)num[-4:-3] A) (11, ). B) (11, 12). C) (12, 13). D) None of the above. Show Answer Correct Answer: A) (11, ). 2. If a function contains more than one argument, how are the arguments separated? A) With a semi-colon. B) With a full stop. C) With a comma. D) With a question mark. Show Answer Correct Answer: C) With a comma. 3. What is the purpose of an assignment in programming constructs? A) To execute a command repeatedly. B) To set or change the value of a variable. C) To determine the scope and extent of variables. D) To execute a command if a condition is true. Show Answer Correct Answer: B) To set or change the value of a variable. 4. What is the output of print(type(3.14))? A) . B) . C) . D) . Show Answer Correct Answer: A) . 5. How do you print the string 'Welcome to Python!' using double quotes? A) Print('Welcome to Python!'). B) Print("Welcome to Python!"). C) Print("""Welcome to Python!"""). D) All of the above. Show Answer Correct Answer: B) Print("Welcome to Python!"). 6. The only language a computer and other electronic devices understand is: A) English. B) Python. C) Machine language. D) High-level language. Show Answer Correct Answer: C) Machine language. 7. What is the correct way to take user input in Python? A) Read(). B) Input(). C) Get(). D) Scan(). Show Answer Correct Answer: B) Input(). 8. Sunday = Sunday A) TRUE. B) FALSE. C) All the above. D) None of the above. Show Answer Correct Answer: A) TRUE. 9. Python adalah bahasa pemrograman yang ..... A) Bersifat interpreted, high-level, dan general-purpose. B) Bersifat compiled, low-level, dan specific-purpose. C) Bersifat object-oriented, dynamic, dan functional. D) Semua jawaban benar. Show Answer Correct Answer: A) Bersifat interpreted, high-level, dan general-purpose. 10. The default return value of any function in Python is ..... A) Null. B) 0. C) None. D) Garbage value. Show Answer Correct Answer: C) None. 11. Which of the following statements will not work properly within a while loop? A) Continue. B) Break. C) Return. D) Pass. Show Answer Correct Answer: C) Return. 12. What is Python named after, and who created it? A) A species of snake; Bill Gates. B) A Greek god; Guido van Rossum. C) A British comedy group; Guido van Rossum. D) A type of car; Larry Page. Show Answer Correct Answer: C) A British comedy group; Guido van Rossum. 13. Which of the following is a valid way to define a variable in Python? A) 1variable = 5. B) Variable-1 = 5. C) Variable 1 = 5. D) Variable.1 = 5. Show Answer Correct Answer: C) Variable 1 = 5. 14. Which mode of using the Python interpreter allows for immediate code execution? A) Script mode. B) Compile mode. C) Interactive mode. D) Debug mode. Show Answer Correct Answer: C) Interactive mode. 15. What command do you use to display text in Python? A) Show(). B) Display(). C) Print(). D) Text(). Show Answer Correct Answer: C) Print(). 16. What is the output of the following code?print(type(10.5)) A) . B) . C) . D) . Show Answer Correct Answer: C) . 17. Use ..... to assign a value to a variable. A) ==. B) >>>. C) =. D) All of the choices mentioned. Show Answer Correct Answer: C) =. 18. What will be the result of the following code?def add ..... numbers (a, b):return a + bprint(add ..... numbers (5) ) A) None. B) 5. C) 10. D) Error. Show Answer Correct Answer: D) Error. 19. What is the output of the following code? print(10 / 2) A) Error. B) 10. C) 2. D) 5. Show Answer Correct Answer: D) 5. 20. Connecting 2 strings in Python with the + Operator is called A) Concatenation. B) Condogenation. C) Conmousenation. D) Contamination. Show Answer Correct Answer: A) Concatenation. 21. What does SQL stand for? A) Structured Query Language. B) Simple Query Language. C) Standard Query Language. D) Sequential Query Language. Show Answer Correct Answer: A) Structured Query Language. 22. What is a integer? A) Whole number. B) Decimal Number. C) Text. D) Code. Show Answer Correct Answer: A) Whole number. 23. Which code snippet correctly creates a tuple containing three integers? A) Nums = [1, 2, 3]. B) Nums = \{1, 2, 3\}. C) Nums = 1, 2, 3. D) Nums = (1, 2, 3). Show Answer Correct Answer: D) Nums = (1, 2, 3). 24. Which symbol is used to comment in Python? A) //. B) #. C) . D) *. Show Answer Correct Answer: B) #. 25. What is the purpose of the 'else' clause in a try-except block? A) To handle the exception. B) To execute if an exception occurs. C) To ignore the exception. D) To define the exception. Show Answer Correct Answer: B) To execute if an exception occurs. ← 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 10Class 11 Computer Science Chapter 2 Introduction To Python Quiz 11 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books