This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 37 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 37 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What is displayed to the screen when the following code runs? esports = ["Donkey Kong", "Galaga", "Pac Man"] esports.insert(0, "Centipede") print(esports) A) ['Centipede', 'Centipede', 'Centipede']. B) ['Donkey Kong', 'Galaga', 'Pac Man', 'Centipede']. C) ['Centipede', 'Donkey Kong', 'Galaga', 'Pac Man']. D) ['Centipede', 'Galaga', 'Pac Man']. Show Answer Correct Answer: C) ['Centipede', 'Donkey Kong', 'Galaga', 'Pac Man']. 2. What is the output of the following code?Time = "Day" Sleepy = False Pajamas = "Off" if Time == "Night" and Sleepy == True:Pajamas = "On" print(Pajamas) A) Off. B) On. C) False. D) Day. Show Answer Correct Answer: A) Off. 3. Variable names can start with ..... A) Only capital letters. B) Any number, letter or an underscore ( ). C) Any letter or symbol. D) Any letter or an underscore ( ). Show Answer Correct Answer: D) Any letter or an underscore ( ). 4. Which data type is used to store whole numbers in Python? A) Float. B) Str. C) Bool. D) Int. Show Answer Correct Answer: D) Int. 5. ..... function can be used to insert an element/object at a specified index. A) Extend( ). B) Insert ( ). C) Append( ). D) None of the above. Show Answer Correct Answer: B) Insert ( ). 6. ..... is a data type that contains a single character such as A, a, Z, z etc. A) Int. B) Float. C) Char. D) String. Show Answer Correct Answer: C) Char. 7. What is an example of a boolean? A) "Hello!". B) 56. C) True/False. D) 46.7. Show Answer Correct Answer: C) True/False. 8. What is the output of the code shown below?g = (i for i in range(5))type(g) A) Class <'loop'>. B) Class <'iteration'>. C) Class <'range'>. D) Class <'generator'>. Show Answer Correct Answer: D) Class <'generator'>. 9. What is the name of the method that is always called when a new object is created from a class? A) Start . B) Object . C) Method . D) Init . Show Answer Correct Answer: D) Init . 10. 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":. 11. 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. 12. Comparison Operators:Select the correct operator for less than or equal to A) <=. B) =>. C) >=. D) ==. Show Answer Correct Answer: A) <=. 13. Makes it easy to repeat steps over and over A) For loops. B) Variables. C) Strings. D) Modules. Show Answer Correct Answer: A) For loops. 14. The order of the commands in a program. A) Code. B) Objects. C) Debug. D) Sequence. Show Answer Correct Answer: D) Sequence. 15. Which symbol is used to make a comment line in Python? A) &. B) //. C) #. D) '. Show Answer Correct Answer: C) #. 16. Numbers = [1, 2, 3, 4, 5]Which of the following code removes all the elements from the list but retains the list A) Numbers.clear(). B) Del numbers. C) Delete numbers. D) Numbers.del(). Show Answer Correct Answer: A) Numbers.clear(). 17. What will the output be from the following Python code?Print("Hello world!") A) NameError. B) Hello world!. C) "Hello world". D) Print(Hello world!). Show Answer Correct Answer: A) NameError. 18. Which symbol means "not equal" ? A) >=. B) !=. C) ==. D) +=. Show Answer Correct Answer: B) !=. 19. Select the correct operator for subtraction: A) *. B) -. C) . D) *. Show Answer Correct Answer: B) -. 20. 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. 21. What will be the value of variable y after execution of following Python code?x="55"y=x + str(9) A) 55. B) 559. C) 64. D) Error. Show Answer Correct Answer: B) 559. 22. The rules for how programming languages statements can be assembled is known as A) Variable. B) Algorithm. C) Syntax. D) Debugging. Show Answer Correct Answer: C) Syntax. 23. What is the Python Software Foundation? A) A social media platform. B) Non-profit organization managing Python programming language. C) A hardware manufacturer. D) A sports team. Show Answer Correct Answer: B) Non-profit organization managing Python programming language. 24. How many parameters are there in the sum() function call below?sum(1, 3, 5) A) 0. B) 1. C) 2. D) 3. Show Answer Correct Answer: D) 3. 25. 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. ← PreviousNext →Related 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 8Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 9Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 10 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books