This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 25 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 25 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What is the index of the name 'Paula' in the following list:names = ["Paul", "Phillip", "Paula", "Phillipa"] A) 0. B) 1. C) 2. D) 3. Show Answer Correct Answer: C) 2. 2. Identify the string membership operators of Python A) In, not in. B) Like, not like. C) As, not as. D) Between, not between. Show Answer Correct Answer: A) In, not in. 3. Tracy always starts facing which direction? A) North. B) South. C) East. D) West. Show Answer Correct Answer: C) East. 4. The condition for a while loop to continue could include which of the following? A) While something equals something. B) While something is greater than something. C) While something is True. D) All of these. Show Answer Correct Answer: D) All of these. 5. List1 = ["hello", "hey", "hi"]print(list1)How many items will be printed? A) 1. B) 2. C) 3. D) 0. Show Answer Correct Answer: C) 3. 6. What will be the output shape of the following Python code?import turtlet=turtle.Pen()for i in range(1, 4):t.forward(60)t.left(90) A) Rectangle. B) Trapezium. C) Triangle. D) Square. Show Answer Correct Answer: D) Square. 7. Select the correct operator for Exponentiation: A) **. B) )). C) XX. D) ==. Show Answer Correct Answer: A) **. 8. What is the output of the following code?for i in range(5, 0, -1):print(i) A) 12345. B) 1234. C) 54321. D) 432 1. Show Answer Correct Answer: C) 54321. 9. Why is using lists beneficial? A) Shorter Code. B) More Accurate. C) It takes less time for the program to run. D) Its not beneficial. Show Answer Correct Answer: A) Shorter Code. 10. What is the output of the following code?salary = 8000def printSalary():salary = 12000print("Salary:", salary)printSalary()print("Salary:", salary) A) Salary:12000 Salary:8000. B) Salary:8000 Salary:12000. C) The program failed with errors. D) None of the above. Show Answer Correct Answer: A) Salary:12000 Salary:8000. 11. Numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]Which of the following code will give the output as[4, 6, 8] A) [numbers[i] for i in [3, 5, 7]]. B) Numbers[4, 6, 8]. C) Numbers[3, 5, 7]. D) None of the above. Show Answer Correct Answer: A) [numbers[i] for i in [3, 5, 7]]. 12. In programming, what is iteration/looping? A) The repetition of steps within a program. B) The order in which instructions are carried out. C) A decision point in a program. D) None of the above. Show Answer Correct Answer: A) The repetition of steps within a program. 13. What symbol do you type in to add a short comment? A) """. B) #. C) @. D) /. Show Answer Correct Answer: B) #. 14. What will be the output of the following code?def max(a, b):if a > b:print('a is the max')else:print('b is the max')max(1, 2) A) 1 is the max. B) A is the max. C) 2 is the max. D) B is the max. Show Answer Correct Answer: D) B is the max. 15. Which of the following operator is valid in Lists? A) /. B) **. C) +. D) -. Show Answer Correct Answer: C) +. 16. What computer science concept does something different depending on the situation? A) Conditional. B) Variable. C) Loop. D) Function. Show Answer Correct Answer: A) Conditional. 17. Which of the following types of computer languages uses binary code to communicate with the computer? A) High-level languages. B) Assembly languages. C) Machine language. D) Database languages. Show Answer Correct Answer: C) Machine language. 18. A:Strings can be changed during executionB. Strings can be enclosed within single, double or even triple quotesC. Strings are immutable A) A, B & C are True. B) A, B are True but C is False. C) B, C are True but A is False. D) A, C are True but B is False. Show Answer Correct Answer: C) B, C are True but A is False. 19. What will:answer = input("Give me a number")print(answer * 5)output? A) An error message. B) The value of answer multiplied by 5. C) Answer * 5. D) The value of answer repeated 5 times. Show Answer Correct Answer: D) The value of answer repeated 5 times. 20. Which method is used to add a value at a specified position in the list? A) Append. B) Extend. C) Insert. D) Pop. Show Answer Correct Answer: C) Insert. 21. The output of the following code is# program for addition of 2 numbersa = 10b = 3c = a + bprint("the sum is ", c) A) 7. B) 10. C) 13. D) 3. Show Answer Correct Answer: C) 13. 22. Which function accepts all data as string or characters but not as numbers? A) Int(). B) Output(). C) Input(). D) Print(). Show Answer Correct Answer: C) Input(). 23. What are class variables? A) Variables with a sense of style. B) Variables that apply to all instances of the class. C) Variables that change with every instance of the class. D) Integers. Show Answer Correct Answer: B) Variables that apply to all instances of the class. 24. Which character represents a comment in Python code? A) *. B) #. C) &. D) $. Show Answer Correct Answer: B) #. 25. ..... statement can also be used without specifying Exception. A) Try. B) Finally. C) Except. D) Else. Show Answer Correct Answer: C) Except. ← 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