This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 33 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 33 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which of the following is an acceptable variable name? A) No-text. B) 8text. C) No text. D) No text$. Show Answer Correct Answer: C) No text. 2. What would be the output of the following code:for i in range(3):print(5) A) 0 1 2. B) 3 3 3 3 3. C) 5 5 5. D) 0 1 2 3 4. Show Answer Correct Answer: C) 5 5 5. 3. What is the syntax of a for loop in Python? A) For item in iterable:# code to be executed. B) For i in range(n):# code to be executed. C) For element in list:# code to be executed. D) For item in iterable:# code to be executed. Show Answer Correct Answer: A) For item in iterable:# code to be executed. 4. All keyword in python are in A) Lower case. B) Upper case. C) Lower case and uppercase. D) None of the above. Show Answer Correct Answer: A) Lower case. 5. In order to move the turtle 120 forward without drawing on the screen, which order is correct? A) Turtle.forward(120)turtle.penup()turtle.pendown(). B) Turtle.pendown()turtle.forward(120)turtle.penup(). C) Turtle.penup()turtle.forward(120)turtle.pendown(). D) None of the above. Show Answer Correct Answer: C) Turtle.penup()turtle.forward(120)turtle.pendown(). 6. What method is used to add an element to the end of a list in Python? A) Append(). B) Insert(). C) Remove(). D) Extend(). Show Answer Correct Answer: A) Append(). 7. Which of the following does not work in Lists? A) Lstrip & rstrip. B) + & * symbol. C) Membership operators. D) Slicing. Show Answer Correct Answer: A) Lstrip & rstrip. 8. What can a variable not start with? A) A special character. B) A capital letter. C) A number. D) A lower case letter. Show Answer Correct Answer: C) A number. 9. In order to store values in terms of key and value we use what core data type. A) List. B) Tuple. C) Set. D) Dict. Show Answer Correct Answer: D) Dict. 10. In the following code, what type of variable is being created?foo = 3.5 A) Integer. B) Float. C) String. D) None of the above. Show Answer Correct Answer: B) Float. 11. What is the output of the following range() function?for num in range(2, -5, -1):print(num, end=", ") A) 2, 1, 0. B) 2, 1, 0, -1, -2, -3, -4, -5. C) 2, 1, 0, -1, -2, -3, -4. D) 0. Show Answer Correct Answer: C) 2, 1, 0, -1, -2, -3, -4. 12. 4 is 100 in binary and 11 is 1011. What is the output of the following bitwise operators? a = 4b = 11print(a | b)print(a >> 2) A) 15 1. B) 14 1. C) All the above. D) None of the above. Show Answer Correct Answer: A) 15 1. 13. Is the following piece of code valid?>>> a=(1, 2, 3, 4)>>> del a A) No because tuple is immutable. B) Yes, the entire tuple is deleted. C) No, invalid syntax for del method. D) Yes, first element in the tuple is deleted. Show Answer Correct Answer: B) Yes, the entire tuple is deleted. 14. What kind of expression must be used as part of the "while" loop statement? A) Mathematical expression. B) Assignment statement. C) Logical expression. D) All of these will work. Show Answer Correct Answer: C) Logical expression. 15. What Python command is used to output text to the screen? A) Input(). B) Print(). C) Int(). D) Display(). Show Answer Correct Answer: B) Print(). 16. What data value would store the value:9? A) Float. B) Integer. C) String. D) Boolean. Show Answer Correct Answer: B) Integer. 17. Python uses ..... to define program blocks. A) Whitespace. B) Delimiter. C) Escape sequence. D) Curly braces. Show Answer Correct Answer: A) Whitespace. 18. What will the output be from the following code?print(9/3*2+4-5) A) 19. B) 5.0. C) 0.5. D) 5. Show Answer Correct Answer: B) 5.0. 19. A variable is a named value that can be changed in the program. A) False. B) True. C) All the above. D) None of the above. Show Answer Correct Answer: B) True. 20. What computer science concept stores information to be used later? A) Conditional. B) Variable. C) Loop. D) Function. Show Answer Correct Answer: B) Variable. 21. This statement is used to evaluate only one condition A) IF STATEMENT. B) IF-ELSE STATEMENT. C) IF-ELIF-ELSE STATEMENT. D) None of the above. Show Answer Correct Answer: A) IF STATEMENT. 22. What is the output of the following piece of code?class Test:def ..... init ..... (self):self.x = 0class Derived ..... Test(Test):def ..... init ..... (self):Test ..... init ..... (self) self.y = 1def main():b = Derived ..... Test() print(b.x, b.y)main() A) Error because class B inherits A but variable x isn't inherited. B) 0 1. C) 0 0. D) Error, the syntax of the invoking method is wrong. Show Answer Correct Answer: B) 0 1. 23. What type of loop do you use to loop through a list? A) While true. B) Do while. C) For in. D) Forever. Show Answer Correct Answer: C) For in. 24. We need import turtle at the top of the code to use Python turtle? A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 25. What is the output of the followingaList = [5, 10, 15, 25]print(aList[::-2]) A) [15, 10, 5]. B) [10, 5]. C) [25, 10]. D) None of the above. Show Answer Correct Answer: C) [25, 10]. ← 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