This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 72 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 72 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What does the message 'Setup was successful' indicate in the Python installation process? A) The installation failed. B) The installation was successful. C) The installation is pending. D) The installation was canceled. Show Answer Correct Answer: B) The installation was successful. 2. Which of these is not a component of a variable A) IDENTITIY. B) VALUE. C) NUMERIC. D) TYPE. Show Answer Correct Answer: C) NUMERIC. 3. What is the output of the following code? "'pythonnumbers = [10, 20, 30]numbers[2] = 50print(numbers) "' A) [10, 20, 30]. B) [10, 50, 30]. C) [10, 20, 50]. D) [50, 20, 30]. Show Answer Correct Answer: C) [10, 20, 50]. 4. What is the result of the following code:fname= "Esslam "lname= "Fahmi "print ("Hi" , lname + fname) A) Hi Esslam fahmi. B) Hi Fahmi Esslam. C) Hi fname lname. D) Hi there. Show Answer Correct Answer: B) Hi Fahmi Esslam. 5. What is the correct way to take input from a user in Python? A) Input(). B) Get input(). C) Read input(). D) User input(). Show Answer Correct Answer: A) Input(). 6. How do you create a list in Python with the elements 1, 2, and 3? A) 'list = (1, 2, 3)'. B) 'list = [1, 2, 3]'. C) 'list = \{1, 2, 3\}'. D) 'list = <1, 2, 3>'. Show Answer Correct Answer: B) 'list = [1, 2, 3]'. 7. Given t = (10, 20, 30, 40), which expression retrieves the second element using zero-based indexing? A) T[-1]. B) T[0]. C) T[1]. D) T[2]. Show Answer Correct Answer: C) T[1]. 8. Which command is used to display a message on the screen in Python? A) Show. B) Echo. C) Print. D) Display. Show Answer Correct Answer: C) Print. 9. What is the significance of indentation in Python? A) Indentation is significant in Python as it defines code blocks and enforces readability. B) Indentation is only used for comments and does not affect functionality. C) Indentation is optional in Python and has no impact on code execution. D) Indentation is a stylistic choice that can be ignored in Python. Show Answer Correct Answer: A) Indentation is significant in Python as it defines code blocks and enforces readability. 10. Which loop is used to iterate over a sequence in Python? A) For loop. B) Repeat-until loop. C) Foreach loop. D) Do-while loop. Show Answer Correct Answer: A) For loop. 11. Identify the invalid identifier. A) Keyword. B) And. C) Operator. D) Token. Show Answer Correct Answer: B) And. 12. In Python values that can not be changed after they are created are called A) Indestructable. B) Invincible. C) Immutable. D) Independent. Show Answer Correct Answer: C) Immutable. 13. Identifiers in Python must start with which of the following? A) A special character. B) A number. C) An underscore. D) A space. Show Answer Correct Answer: C) An underscore. 14. A data type than can have one of two values:True or False A) Boolean. B) Basic Calculation. C) For. D) While. Show Answer Correct Answer: A) Boolean. 15. Which of the following variable names is invalid? A) Name 123. B) FirstName. C) User-name. D) Value1. Show Answer Correct Answer: C) User-name. 16. Karel can A) Take ball. B) Eat. C) Draw ball. D) None of the above. Show Answer Correct Answer: A) Take ball. 17. Which of the following is used to get input from a user in Python? A) Print(). B) Input(). C) Output(). D) Read(). Show Answer Correct Answer: B) Input(). 18. The term which describes errors in a programme which are due to programmers making typing mistakes or spelling mistakes A) Syntax. B) Syntax error. C) Logic error. D) Bug. E) Debug. Show Answer Correct Answer: B) Syntax error. 19. What will print([1, 2, 3][0]) output? A) 0. B) 1. C) 2. D) Error. Show Answer Correct Answer: B) 1. 20. What is the output of print('Welcome to Python')? A) Welcome to Python. B) Welcome. C) Python. D) None of the above. Show Answer Correct Answer: A) Welcome to Python. 21. Which python operator means 'less than or equal to'? A) >=. B) >. C) <. D) <=. Show Answer Correct Answer: D) <=. 22. What is the purpose of the as keyword when importing a module? A) To specify a function from the module. B) To copy the module. C) To create an alias for the module. D) To include the module in the current script. Show Answer Correct Answer: C) To create an alias for the module. 23. What is the process of developing and implementing various sets of instructions to enable a computer to do a certain task? A) Computer Engineering. B) Computer Programming. C) Computer Processing. D) Computer Servicing. Show Answer Correct Answer: B) Computer Programming. 24. What will be the output of print("Python"[::-1])? A) Python. B) Pyt. C) NohtyP. D) Error. Show Answer Correct Answer: C) NohtyP. 25. Apa tujuan dari pernyataan 'if ..... name ..... == " ..... main ..... ":'? A) Untuk memungkinkan kode dijalankan hanya ketika skrip dieksekusi langsung, bukan saat diimpor. B) Untuk mencegah kesalahan sintaks dalam skrip. C) Untuk memastikan skrip berjalan lebih cepat saat dieksekusi. D) Untuk memungkinkan skrip dieksekusi di lingkungan mana pun. Show Answer Correct Answer: A) Untuk memungkinkan kode dijalankan hanya ketika skrip dieksekusi langsung, bukan saat diimpor. ← 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