This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 27 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 27 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What is the increment operator A) +=. B) -=. C) ==. D) =. Show Answer Correct Answer: A) +=. 2. Say whether the following statement is true or false?"True and False are special values that belong to the class bool; they are not strings" A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 3. Which one of the following is not a keyword in Python language? A) Pass. B) Eval. C) Assert. D) Nonlocal. Show Answer Correct Answer: B) Eval. 4. What will be the output for the following code:for x in range(6):print(x) A) 0 1 2 3 4 5 6. B) 1 2 3 4 5 6. C) 0 1 2 3 4 5. D) 1 2 3 4 5. Show Answer Correct Answer: C) 0 1 2 3 4 5. 5. A store your program must use as an identifier to keep track of a value is called a A) Algorithm. B) Variable. C) Program. D) Assignment. Show Answer Correct Answer: B) Variable. 6. Slicing stringx="BOnvoyageprint(x[4:]) A) BOnvo. B) Bonvo. C) Voyage. D) VOYAGE. Show Answer Correct Answer: C) Voyage. 7. When writing an if/else statement, you A) Always indent the line after the condition. B) Never indent the line after the condition. C) Capitalize every word. D) Put a colon at the beginning and the end. Show Answer Correct Answer: A) Always indent the line after the condition. 8. Lists are created using square brackets: A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 9. I want to allow the program to repeatedly ask the user to enter their guess if it does not equal the answer ..... Which option do I use? A) While guess == answer:guess=input(). B) While answer != guess:guess=input(). C) While answer =! guess:guess=input(). D) While guess != answer:guess=input(). Show Answer Correct Answer: D) While guess != answer:guess=input(). 10. What data type can hold more than one value? A) String. B) Integer. C) List. D) Boolean. Show Answer Correct Answer: C) List. 11. Which commands would draw a triangle A) Repeat the following five times:forward(10)turnright(72). B) Repeat the following three times:forward(10)turnright(120). C) Repeat the following four times:forward(10)turnright(90). D) Repeat the following three times:forward(10)turnright(110). Show Answer Correct Answer: B) Repeat the following three times:forward(10)turnright(120). 12. Statements or instructions written by a programmer in a language that computers can understand defines ..... A) Algorithm. B) Code. C) Software. D) Range. Show Answer Correct Answer: B) Code. 13. Predict the output:>>>str1="Rajathi Raja">>>print(str1.count('Raja')) A) 1. B) 2. C) Error. D) Raja. Show Answer Correct Answer: A) 1. 14. What will be the output of the following code:print (type(type(int))) A) . B) . C) Error. D) 0. Show Answer Correct Answer: B) . 15. Which of the following modules need to be imported to handle date time computations in Python? A) Datetime. B) Date. C) Time. D) Timedate. Show Answer Correct Answer: A) Datetime. 16. What data type would store the value:True A) Boolean. B) String. C) Integer. D) Float. Show Answer Correct Answer: A) Boolean. 17. Tuples in Python are mutable A) False. B) True. C) All the above. D) None of the above. Show Answer Correct Answer: A) False. 18. What is the result of the following code?print(10 == 9) A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 19. What is wrong with the following code? esports = ("Donkey Kong", "Galaga", "Pac Man")esports[1] = "Centipede" A) The item at index 1 does not exist. B) You cannot update an item in a tuple. C) The [1] notation after the variable name is not valid. D) Nothing; this will work fine. Show Answer Correct Answer: B) You cannot update an item in a tuple. 20. Predict the output from the following code:print("3*4+5") A) SyntaxErrror. B) 17. C) 3*4+5. D) 12. Show Answer Correct Answer: C) 3*4+5. 21. What purpose do wildlife drop centers serve? A) They offer pet adoption services. B) They provide a place for people to leave unwanted pets. C) They are breeding centers for endangered species. D) They are research facilities for studying invasive species. Show Answer Correct Answer: B) They provide a place for people to leave unwanted pets. 22. Which of the following is the correct code to define a function? A) Def area ( ):. B) Area ( ). C) Def area:. D) Def area ( ). Show Answer Correct Answer: A) Def area ( ):. 23. If foo is equal to 3, what is the value of foo after this operation?foo /= 3 A) 3. B) 2. C) 1. D) None of the above. Show Answer Correct Answer: C) 1. 24. What is the official logo of Python? A) A snake coiled around the word 'Python'. B) A cup of coffee with a snake design. C) A tree with branches shaped like snakes. D) A bear holding a computer. Show Answer Correct Answer: A) A snake coiled around the word 'Python'. 25. What value is stored in the "total" variable after the following code runs? total = 0 for i in range(1, 4):total = total + i A) 0. B) 6. C) 7. D) 5. Show Answer Correct Answer: B) 6. ← 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