This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 20 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 20 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which of the following translators do not produce an object file? A) Compiler. B) Interpreter. C) Assembler. D) None of the above. Show Answer Correct Answer: B) Interpreter. 2. Which one is a list? A) (1, 2). B) \{1, 2\}. C) [1, 2]. D) <1, 2>. Show Answer Correct Answer: C) [1, 2]. 3. What is the result of 'type("Hello")' in Python? A) . B) . C) . D) . Show Answer Correct Answer: A) . 4. What is the output of the following code:print(int(3.14))? A) 3. B) 3.14. C) 3.1. D) 3.4. Show Answer Correct Answer: B) 3.14. 5. What is the purpose of tracing variables in a program? A) To display messages. B) To translate programming languages. C) To execute instructions. D) To track the values of variables. Show Answer Correct Answer: D) To track the values of variables. 6. Which of the following statements will print the data type of the variable 'a'? A) Print(type(a)). B) Print(datatype(a)). C) Print(typeof(a)). D) Print(typeOf(a)). Show Answer Correct Answer: A) Print(type(a)). 7. Which of the following is a feature of Python? A) No support for modules. B) Low-level data structures. C) Dynamic semantics. D) Static typing. Show Answer Correct Answer: C) Dynamic semantics. 8. What is the correct way to start a while loop? A) For (condition) \{. B) Do \{ while (condition); \}. C) Repeat (condition) until;. D) While (condition) \{. Show Answer Correct Answer: D) While (condition) \{. 9. What will print(type(age)) return if age = 25? A) Int. B) Str. C) Float. D) None of the above. Show Answer Correct Answer: A) Int. 10. What does a Python program do? A) Makes drawings. B) Tells the computer what to do. C) Writes books. D) Bakes cookies. Show Answer Correct Answer: B) Tells the computer what to do. 11. What is the name of the binary code (0s and 1s) that a CPU directly understands? A) Python Code. B) Machine Language. C) English. D) Assembly Language. Show Answer Correct Answer: B) Machine Language. 12. What is the difference between 'break' and 'continue' statements? A) 'break' skips to the next iteration; 'continue' exits a loop. B) 'break' exits a loop; 'continue' skips to the next iteration. C) 'break' can only be used in functions; 'continue' can be used anywhere. D) 'break' and 'continue' are interchangeable in loops. Show Answer Correct Answer: B) 'break' exits a loop; 'continue' skips to the next iteration. 13. Which one of these is a loop in Python? A) If. B) While. C) Elif. D) Def. Show Answer Correct Answer: B) While. 14. Which of the following is a valid for loop in Python? A) For(i=0; i < n; i++). B) For i in range(0, 5):. C) For i in range(0, 5). D) For i in range(5). Show Answer Correct Answer: B) For i in range(0, 5):. 15. What is Python known for? A) Speed. B) Readability. C) Security. D) Complexity. Show Answer Correct Answer: B) Readability. 16. Which of the following is a valid data type in Python? A) 'integer'. B) 'string'. C) 'character'. D) 'decimal'. Show Answer Correct Answer: B) 'string'. 17. Str1="poWer"str1.upper()print(str1) A) POWER. B) Power. C) Power. D) PoWer. Show Answer Correct Answer: D) PoWer. 18. Which of the below operators can be used to compare two numbers A) ==. B) /. C) =. D) None of the above. Show Answer Correct Answer: A) ==. 19. What is a list in Python? A) A list in Python is a mutable, ordered collection of items defined by square brackets. B) A list in Python is an immutable collection of items. C) A list in Python is a collection of items defined by curly braces. D) A list in Python is a fixed-size array of integers. Show Answer Correct Answer: A) A list in Python is a mutable, ordered collection of items defined by square brackets. 20. What data type is the value 'True' in Python? A) String. B) Integer. C) Boolean. D) Float. Show Answer Correct Answer: C) Boolean. 21. What is the process illustrated in the course objectives? A) Structuring the data using lists, tuples. B) Creating web pages. C) Building mobile apps. D) Designing graphics. Show Answer Correct Answer: A) Structuring the data using lists, tuples. 22. What must you do to correctly communicate a command to Tracy? A) Speak loudly. B) Follow specific syntax. C) Use any programming language. D) Use uppercase letters. Show Answer Correct Answer: B) Follow specific syntax. 23. What is the difference between a list and a tuple? A) Tuples are created using square brackets and lists with parentheses. B) Lists can contain only numbers while tuples can contain any data type. C) Both lists and tuples are mutable and can be changed after creation. D) The main difference is that lists are mutable and tuples are immutable. Show Answer Correct Answer: D) The main difference is that lists are mutable and tuples are immutable. 24. What kind of language does a computer understand? A) Unary. B) Decimal. C) Binary. D) Hexadecimal. Show Answer Correct Answer: C) Binary. 25. What is the output of the expression 'Hello' * 3? A) 3 Hello. B) Hello + Hello + Hello. C) Hello 3. D) HelloHelloHello. Show Answer Correct Answer: D) HelloHelloHello. ← 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