This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 23 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 23 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which of the following best describes how many times the statements in the body of a "while" loop will run? A) 0, 1 or more times depending on the logical expression of the "while" statement. B) At least once. C) An infinite number of times until a "continue" statement is reached. D) A maximum of 10 times no matter what. Show Answer Correct Answer: A) 0, 1 or more times depending on the logical expression of the "while" statement. 2. In python the ' STRING data type' can be defined as ..... ? A) Holds alphanumeric text. B) Hold whole numbers. C) Holds numbers with a decimal point. D) Holds either a true or false value. Show Answer Correct Answer: A) Holds alphanumeric text. 3. [1, 2, 8, 9] < [9, 1]What will be the result if we compare these two lists? A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 4. Each item in a list has an index. What is the first index in a Python list? A) 0. B) 1. C) A. D) A. Show Answer Correct Answer: A) 0. 5. Look at the following code:Length = 50Width = 30Area = Length * Widthprint (Area)What is the result of this code? A) Area. B) 50. C) 150. D) An error message. Show Answer Correct Answer: C) 150. 6. Which of the operator means less than equal to? A) >. B) <. C) >=. D) <=. Show Answer Correct Answer: D) <=. 7. Which is the powerful function used for formatting strings? A) Chr( ). B) Format( ). C) Title( ). D) Capitalize( ). Show Answer Correct Answer: B) Format( ). 8. If i want to continuously check for a correct answer, what loop would i use? A) For loop. B) While loop. C) All the above. D) None of the above. Show Answer Correct Answer: B) While loop. 9. Which of the following symbols is used in Python to mean "Equal to" ? A) =. B) !=. C) ==. D) >=. Show Answer Correct Answer: C) ==. 10. Python functions=lower("INDIA)print(s) A) India. B) India. C) INDIA. D) INDIA. Show Answer Correct Answer: A) India. 11. Why do we learn Python? A) It's a really big snake. B) It's the name of a very funny comedy show. C) It's simple and easy to learn. D) It's so rare that no one else knows it. Show Answer Correct Answer: C) It's simple and easy to learn. 12. Say True or False:Bitwise shift operators (<<, >>) has higher precedence than Bitwise And(&) operator A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 13. True or False:You need to convert an integer to a string before you can use it in the print() function. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 14. What is the output of the following piece of code?class A:def ..... init ..... (self, x=3):self ..... x = x class B(A):def ..... init ..... (self):super() ..... init ..... (5) def display(self):print(self ..... x)def main():obj = B() obj.display()main() A) 5. B) Error, class member x has two values. C) 3. D) Error, protected class member can't be accessed in a subclass. Show Answer Correct Answer: A) 5. 15. Is the following statement true or false?More than one condition cannot be used with an IF statement. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 16. True or False:Python can be used to make games and phone apps. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 17. What is the output of the following piece of code when executed in Python shell?>>> a=("Check")*3>>> a A) ('Check', 'Check', 'Check'). B) * Operator not valid for tuples. C) ('CheckCheckCheck'). D) Syntax error. Show Answer Correct Answer: C) ('CheckCheckCheck'). 18. Which of the following pieces of code defines a list of all the numbers from 4 to 12? A) Range(4, 12). B) Range(4, 13). C) Range( 3, 12). D) Range(3, 13). Show Answer Correct Answer: B) Range(4, 13). 19. Which of the following are valid string manipulation functions in Python? A) Count(). B) Upper(). C) Strip(). D) All of the above. Show Answer Correct Answer: D) All of the above. 20. What is the output of the following code:print 10//3 A) 3.5. B) 3. C) 1. D) Error. Show Answer Correct Answer: B) 3. 21. What is missing in the square braces?cheer = "Go Eagles!"print (cheer[ ] + cheer [ ] + cheer [ ])If the output is Goggles A) 0:2 5 5:9. B) 1:2 6 6:10. C) 0:1 5 5:9. D) 0:1 5 5:8. Show Answer Correct Answer: A) 0:2 5 5:9. 22. Which type of Programming does Python support? A) Object oriented programming. B) Structured programming. C) Functional programming. D) All of the above. Show Answer Correct Answer: D) All of the above. 23. Str="world of python programming"str+=" store"str.replace('o', 'O') A) 'wOrld Of python prOgramming stOre'. B) 'wOrld Of pythOn prOgramming store'. C) 'wOrld Of pythOn prOgramming stOre'. D) 'wOrld Of pythOn programming stOre'. Show Answer Correct Answer: C) 'wOrld Of pythOn prOgramming stOre'. 24. The Boolean operator that means "not equal to" is A) XX. B) !=. C) <>. D) . Show Answer Correct Answer: B) !=. 25. What will the output be from the following code?print(9/3) A) 3. B) 3.0. C) 9/3. D) SyntaxError. Show Answer Correct Answer: B) 3.0. ← 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