This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 26 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 26 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. How would we round the variable hourspermonth to 2 decimal places A) Hourspermonth = round/2(hourspermonth). B) Hourspermonth = round(hourspermonth). C) Hourspermonth = round (hourspermonth, 2. D) Hourspermonth = round (hourspermonth, 2). Show Answer Correct Answer: D) Hourspermonth = round (hourspermonth, 2). 2. Lists are used to store single item in a single variable. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 3. A command that lets us repeat an action multiple times in your code A) Algorithm. B) Loop. C) Variable. D) Method. Show Answer Correct Answer: B) Loop. 4. What is the syntax for creating a list in Python? A) My list = \{1, 2, 3, 4, 5\}. B) My list = [1, 2, 3, 4, 5]. C) My list = [1 2 3 4 5]. D) My list = (1, 2, 3, 4, 5). Show Answer Correct Answer: B) My list = [1, 2, 3, 4, 5]. 5. Which if the values below return FALSE if executed? A) 10 > 3. B) 10 < 3. C) 10 >< 3. D) 10 <> 3. Show Answer Correct Answer: B) 10 < 3. 6. Logical Operators:True if either of the operands is true A) X and y. B) X or y. C) Not x. D) None of the above. Show Answer Correct Answer: B) X or y. 7. The expression int(x) implies that the variable x is converted to integer. State whether true or false. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 8. Bundling two values together into one can be considered as A) Pair. B) Triplet. C) Single. D) Quadrat. Show Answer Correct Answer: A) Pair. 9. Which method is used to merge two lists? A) Append. B) Merge. C) Join. D) Extend. Show Answer Correct Answer: D) Extend. 10. What data type would store the value:Oranges A) String. B) Float. C) Boolean. D) Integer. Show Answer Correct Answer: A) String. 11. Numbers = [1, 3, 2, 4, 5]Which of the following code can output a sorted list without actually sorting the original list A) Sorted(numbers). B) Numbers.sort(). C) Numbers.sorted(). D) Sort(numbers). Show Answer Correct Answer: A) Sorted(numbers). 12. What will be the output of the following Python function? any([2>8, 4>2, 1>2]) A) Error. B) True. C) False. D) 4 > 2. Show Answer Correct Answer: B) True. 13. What will be the output of the following code snippet? name1 = "jazz"name 2 = "madonna"if name1 != name2:print("No")else:print("Yes") A) No. B) Madonna. C) Yes. D) Compilation Error. Show Answer Correct Answer: A) No. 14. What is the output from the following code?print ("hello world") A) Hello World. B) Hello world. C) Print hello world. D) None of the above. Show Answer Correct Answer: B) Hello world. 15. Select the correct Operator for addition A) +. B) =. C) X. D) $. Show Answer Correct Answer: A) +. 16. Predict output for the following code snippet.print('No pain, no gain'.split('a')) A) ['No pain', ' no gain']. B) ['No p', 'in, no g', 'in']. C) ['No', 'pain, ', 'no', 'gain']. D) ['No pai', ', ', 'o gai', '']. Show Answer Correct Answer: B) ['No p', 'in, no g', 'in']. 17. What is the average value of the code that is executed below?>>>grade1 = 80>>>grade2 = 90>>>average = (grade1 + grade2) / 2 A) 85. B) 85.0. C) 85.1. D) 90.0. Show Answer Correct Answer: B) 85.0. 18. Look at the following code:age = 23age = age * 2print (age)What is printed? A) 23. B) 23 * 2. C) 25. D) 46. Show Answer Correct Answer: D) 46. 19. Anil is writing a "rock, scissors, paper" program. He wants the game to repeat until the user doesn't want to play anymore. What loop should he use? A) A FOR loop. B) A WHILE loop. C) All the above. D) None of the above. Show Answer Correct Answer: B) A WHILE loop. 20. What is the output of the following?x = 36 / 4 * (3 + 2) * 4 + 2print(x) A) 182.0. B) 37. C) 117. D) ERROR. Show Answer Correct Answer: A) 182.0. 21. What will be the output for following python programme:x = 100 y = float(x)print(y) A) 200. B) 100.0. C) 100. D) Can't convert an integer to a floating number. Show Answer Correct Answer: B) 100.0. 22. Hero.findNearestItem( )which of the following describes hero properly? A) Hero is a function. B) Hero is an object. C) Hero is a variable. D) It is just a python syntax. Show Answer Correct Answer: B) Hero is an object. 23. ..... data type contain a character (text) such as A, a, Z, z etc. A) Int. B) Float. C) Char. D) String. Show Answer Correct Answer: C) Char. 24. Suppose a tuple T is declared as T=(20, 36, 34, 49), which of the following is incorrect? A) Print(T[3]). B) T[3] = 49. C) Print(min(T)). D) Print(T.count(20)). Show Answer Correct Answer: B) T[3] = 49. 25. What is the output of the following codedict1 = \{"key1":1, "key2":2\}dict2 = \{"key2":2, "key1":1\}print(dict1 == dict2) A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. ← 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