This quiz works best with JavaScript enabled. Home > Cbse > Class 11 > Science > Computer Science > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 15 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 15 (30 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What is the name of the method that is always called when a new object is created from a class? A) Object . B) Init . C) Start . D) Method . Show Answer Correct Answer: B) Init . 2. Which of these is correct Python conditional statement? A) IF answer == "Yes":. B) If answer = "yes":. C) If answer == "Yes":. D) If answer == "Yes". Show Answer Correct Answer: C) If answer == "Yes":. 3. What will be printed to the screen?x = 5y = "John"print (x + y) A) 5 + John. B) Syntax error-you cannot add str and int together. C) John. D) JohnJohnJohnJohnJohn. Show Answer Correct Answer: B) Syntax error-you cannot add str and int together. 4. Makes it easy to repeat steps over and over A) Strings. B) Modules. C) For loops. D) Variables. Show Answer Correct Answer: C) For loops. 5. The order of the commands in a program. A) Objects. B) Sequence. C) Code. D) Debug. Show Answer Correct Answer: B) Sequence. 6. Which symbol is used to make a comment line in Python? A) &. B) #. C) //. D) '. Show Answer Correct Answer: B) #. 7. Numbers = [1, 2, 3, 4, 5]Which of the following code removes all the elements from the list but retains the list A) Delete numbers. B) Del numbers. C) Numbers.clear(). D) Numbers.del(). Show Answer Correct Answer: C) Numbers.clear(). 8. Select the correct operator for subtraction: A) *. B) -. C) *. D) . Show Answer Correct Answer: B) -. 9. What is the index of "grape" in the list[ "apple" , "grape" , "orange" , "watermelon" ]? A) 0. B) 1. C) 2. D) 3. Show Answer Correct Answer: B) 1. 10. What will be the value of variable y after execution of following Python code?x="55"y=x + str(9) A) 64. B) 55. C) Error. D) 559. Show Answer Correct Answer: D) 559. 11. The rules for how programming languages statements can be assembled is known as A) Variable. B) Syntax. C) Debugging. D) Algorithm. Show Answer Correct Answer: B) Syntax. 12. What is the Python Software Foundation? A) Non-profit organization managing Python programming language. B) A sports team. C) A hardware manufacturer. D) A social media platform. Show Answer Correct Answer: A) Non-profit organization managing Python programming language. 13. How many parameters are there in the sum() function call below?sum(1, 3, 5) A) 1. B) 0. C) 2. D) 3. Show Answer Correct Answer: D) 3. 14. If I want to store multiple names in variables, which of the following would be good variable names in best practice? A) Abc. B) Name1name2name3. C) AudreyBenJohn. D) Blah1blah2blah3. Show Answer Correct Answer: B) Name1name2name3. 15. A while loop is used when A) You know how many times you are going to loop. B) You want to loop for an unknown number of times, and possibly forever. C) You only want to run the code in the loop once. D) You see the word while in the problem description. Show Answer Correct Answer: B) You want to loop for an unknown number of times, and possibly forever. 16. What is the output of the following list function?sampleList = [10, 20, 30, 40, 50]sampleList.append(60)print(sampleList)sampleList.append(60)print(sampleList) A) [10, 20, 30, 40, 50, 60][10, 20, 30, 40, 50, 60, 60]. B) [10, 20, 30, 40, 50, 60][10, 20, 30, 40, 50, 60]. C) Both are wrong. D) None of the above. Show Answer Correct Answer: A) [10, 20, 30, 40, 50, 60][10, 20, 30, 40, 50, 60, 60]. 17. Which of these definitions correctly describes a module? A) Denoted by triple quotes for providing the specification of certain program elements. B) Design and implementation of specific functionality to be incorporated into a program. C) Defines the specification of how it is to be used. D) Any program that reuses code. Show Answer Correct Answer: B) Design and implementation of specific functionality to be incorporated into a program. 18. Which two statements are used to implement iteration? A) IF and WHILE. B) ELSE and WHILE. C) FOR and WHILE. D) IF and ELSE. Show Answer Correct Answer: C) FOR and WHILE. 19. Which function allows us to add one element to a list at a desired location? A) Pop(). B) Extend(). C) Insert(). D) Append(). Show Answer Correct Answer: C) Insert(). 20. Which function can be used to convert list to a tuple A) Tuple. B) List. C) To tuple. D) To list. Show Answer Correct Answer: A) Tuple. 21. What is the output of program below?mariana ..... islands = ['Saipan', 'Tinian', 'Rota']del mariana ..... islands[0]print(mariana ..... islands) A) ['Tinian', 'Rota']. B) ['Saipan', 'Tinian']. C) ['Saipan', 'Tinian', 'Rota']. D) ['Saipan', 'Rota']. Show Answer Correct Answer: A) ['Tinian', 'Rota']. 22. Look at the following code:name = "John"age = 23What type of data is stored in the variable name? A) Float. B) Nothing. C) Int. D) Str. Show Answer Correct Answer: D) Str. 23. ..... statement are used to assign a value to a variable. A) String. B) Assignment. C) Relational. D) Logical. Show Answer Correct Answer: B) Assignment. 24. Name the keyword used to define a function. A) Function. B) Define. C) Fu. D) Def. Show Answer Correct Answer: D) Def. 25. In the following code, what type of variable is being created?foo = "3" A) Integer. B) Float. C) String. D) None of the above. Show Answer Correct Answer: C) String. 26. Which of these in not a core data type? A) Tuples. B) Dictionary. C) Lists. D) Class. Show Answer Correct Answer: D) Class. 27. A file or set of files with related variables, functions, and classes that can be reused in other programs defines A) Module. B) Loop. C) Comments. D) Expression. Show Answer Correct Answer: A) Module. 28. Look at the following code:name = input ("What is your name? ")name = input ("What is your age? ")If the user answered "John" to the first question and "23" to the second, what type of data is in name? A) Str. B) Int. C) Float. D) None of the above. Show Answer Correct Answer: A) Str. 29. Mathematical operations can be performed on a string A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 30. In which year Python was developed A) 1992. B) 1993. C) 1991. D) 1994. Show Answer Correct Answer: C) 1991. ← PreviousRelated QuizzesScience QuizzesClass 11 QuizzesClass 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 1Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 2Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 3Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 4Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 5Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 6Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 7Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 8 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books