This quiz works best with JavaScript enabled. Home > Cbse > Class 11 > Science > Computer Science > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 4 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 4 (60 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Returns the remainder from division. A) Modulus. B) Boolean. C) Variables. D) Exponents. Show Answer Correct Answer: A) Modulus. 2. In a loop, as long as the user enters an answer that is "true, " A) The command repeats itself. B) The program ends. C) The programs starts over. D) The user gains 10 points. Show Answer Correct Answer: A) The command repeats itself. 3. What is the result of my ..... list[2:5] if my ..... list = [1, 2, 3, 4, 5, 6, 7] in Python? A) [1, 2, 3]. B) [3, 4, 5]. C) [2, 3, 4]. D) [4, 5, 6]. Show Answer Correct Answer: B) [3, 4, 5]. 4. What does the following comparison operator "==" represent in Python programming? A) Equal to. B) Assignment. C) Allocation. D) Not equal to. Show Answer Correct Answer: A) Equal to. 5. What will the output be from the following Python code?print(9/3) A) 3.0. B) SyntaxError. C) 3. D) 9/3. Show Answer Correct Answer: A) 3.0. 6. What is the correct name for this symbol?== A) Greater than. B) Assignment. C) Equal to. D) Less than. Show Answer Correct Answer: C) Equal to. 7. Select the illegal variable name A) My2-first name = "John". B) My-firstname = "John". C) My-first name = "John". D) 2my-first name = "John". Show Answer Correct Answer: D) 2my-first name = "John". 8. Identify the meaningful variable name to store high score of a student? A) Hs. B) S. C) HighScore. D) Score. Show Answer Correct Answer: C) HighScore. 9. What is wrong with the following attempt to initialize a list? data = ["hockey", 4, False] A) You should be using parentheses ( ) to surround the items in a list. B) "data" is not a valid variable name. C) You can't mix different types of data in a single list. D) Nothing; this will work correctly. Show Answer Correct Answer: D) Nothing; this will work correctly. 10. What is the output of the following list operationaList = [10, 20, 30, 40, 50, 60, 70, 80]print(aList[2:5])print(aList[:4])print(aList[3:]) A) [20, 30, 40, 50][10, 20, 30, 40][30, 40, 50, 60, 70, 80]. B) [30, 40, 50][10, 20, 30, 40][40, 50, 60, 70, 80]. C) None of these. D) None of the above. Show Answer Correct Answer: B) [30, 40, 50][10, 20, 30, 40][40, 50, 60, 70, 80]. 11. Choose the correct data type:yes / no A) String. B) Real/Float. C) Integer. D) Boolean. E) Character. Show Answer Correct Answer: D) Boolean. 12. In python, a function is defined using the following keyword A) Func. B) Functions. C) Def. D) Function(). Show Answer Correct Answer: C) Def. 13. Gjdk is not a good name for a variable, why? A) It's meaningless. B) It starts with a capital letter. C) It does not contain any spaces. D) There are no vowels. Show Answer Correct Answer: A) It's meaningless. 14. What is the output of the program below?mariana ..... islands = ['Guam', 'Saipan', 'Tinian', 'Rota']cmni = mariana ..... islands[1:]len(cmni) A) 4. B) 3. C) 2. D) 1. Show Answer Correct Answer: B) 3. 15. What is the Python built-in function used to display numbers and text on the screen? A) Print. B) Input. C) Output. D) Command. Show Answer Correct Answer: A) Print. 16. Numbers = [5, 14, 9, 17] for number in numbers:if number >= 9:print (number)The output will be? A) 17. B) 1417. C) 14 9 17. D) 9. Show Answer Correct Answer: C) 14 9 17. 17. If the number of arguments is unknown, which symbol is used before the parameter name A) /. B) *. C) #. D) %. Show Answer Correct Answer: B) *. 18. What is printed?cheer = "Go Eagles!"print cheer[5:8] A) Agle. B) Gle. C) Gles. D) Agles. Show Answer Correct Answer: B) Gle. 19. What is the result of following Program in python3for i in range(3, 1):print(i) A) 32. B) 321. C) 210. D) Error. Show Answer Correct Answer: A) 32. 20. What is the correct data type for the value of cat?cat = input("How many cats do you have?") A) Boolean. B) String. C) Float. D) Integer. Show Answer Correct Answer: B) String. 21. Inventor of Python Code Language A) Bill Gates. B) Roger van Grossman. C) Steve Jobs. D) Guido van Rossum. Show Answer Correct Answer: D) Guido van Rossum. 22. Identify the code that properly accesses an engine ..... sound() method in a Car class. A) Engine sound(tesla):. B) Mustang = engine sound(). C) Porsche.engine sound(). D) Engine sound.Car(camaro). Show Answer Correct Answer: C) Porsche.engine sound(). 23. An action performed by an object A) Plan. B) Syntax. C) Method. D) Object. Show Answer Correct Answer: C) Method. 24. The character used in comments in python is ..... A) @. B) &. C) #. D) $. Show Answer Correct Answer: C) #. 25. I am 71 years old! What will the output be?:IF you are 70 or older, say "You are aged to perfection!" ELIF you are exactly 50, say "Wow, you are half a century old!" ELSE say "You are a spring chicken!" A) "You are aged to perfection!". B) "Wow, you are half a century old!". C) "You are a spring chicken!". D) None of the above. Show Answer Correct Answer: A) "You are aged to perfection!". 26. What is the output of the following code?x = 5y = 3print(x + y) A) 8. B) 2. C) 15. D) 7. Show Answer Correct Answer: A) 8. 27. An algorithm is a set of precise instructions designed to solve a problem. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 28. Which keyword is used to take input from the user in Python? A) Get. B) Input. C) Read. D) Scan. Show Answer Correct Answer: B) Input. 29. Which method is used to convert a given string in Capital letters? A) ConverttoUpper. B) Upper. C) Capitalize. D) Capital. Show Answer Correct Answer: C) Capitalize. 30. In python the ' INTEGER data type' can be defined as ..... ? A) Holds either 'true' or 'false'. B) Holds numbers with a decimal point. C) Holds alphanumeric data as text. D) Holds whole numbers. Show Answer Correct Answer: D) Holds whole numbers. 31. What is the result of len([1, [2, 3], 4]) in Python? A) 6. B) 2. C) 4. D) 3. Show Answer Correct Answer: D) 3. 32. Which programming language influenced the creation of Python? A) XYZ. B) ABC. C) 123. D) Java. Show Answer Correct Answer: B) ABC. 33. What does t.forward(300) do? A) Moves in the direction it is facing 300 steps. B) Moves down the screen 300 steps. C) Moves up the screen 300 steps. D) None of the above. Show Answer Correct Answer: A) Moves in the direction it is facing 300 steps. 34. What is correct code for INTEGER in python? A) In. B) Ing. C) Int. D) None of the above. Show Answer Correct Answer: C) Int. 35. Which keyword marks a spot in a function where the program flow will go back to the calling code? A) Jump. B) Return. C) Continue. D) Break. Show Answer Correct Answer: B) Return. 36. Un conjunto de comandos conocidos se les denomina ..... A) Una lista de maquina. B) Una lista de instrucciones. C) Una lista de bajo nivel. D) None of the above. Show Answer Correct Answer: B) Una lista de instrucciones. 37. A character that is controlled by a program through code is referred to as a A) Person. B) Dojo. C) Sprite. D) Animal. Show Answer Correct Answer: C) Sprite. 38. What is the process of converting one datatype to another called? A) Concatenation. B) Data conversion. C) Type Conversion. D) Type Casting. Show Answer Correct Answer: D) Type Casting. 39. What will be the output of this code?x = 13y = 14if x!=y:print("Hello")else:print("Hi") A) Hello. B) 14. C) Hi. D) 13. Show Answer Correct Answer: A) Hello. 40. What is the result of following Program in python3if(32%2==0):print("32")else:print("2") A) 2. B) 32. C) Error. D) None of the above. Show Answer Correct Answer: B) 32. 41. Str="world of python programming" str+=" store" print(str) A) World of python programming store. B) World of python programming store. C) World of python programming store. D) World of python programmingstore. Show Answer Correct Answer: A) World of python programming store. 42. Create a variable named x and assign the value of integer 50 to it A) "x"=50. B) X=50. C) X:50. D) X="50". Show Answer Correct Answer: B) X=50. 43. Select the correct answer:x = 15y = 4print('x ** y =', x**y) A) 50254. B) 50621. C) 45658. D) 50625. Show Answer Correct Answer: D) 50625. 44. Suppose list1 is [3, 5, 25, 1, 3], what is min(list1)? A) 25. B) 3. C) 5. D) 1. Show Answer Correct Answer: D) 1. 45. If you type print("4"+"9") what result would you get A) Error. B) 13. C) 0. D) 49. Show Answer Correct Answer: D) 49. 46. What is the output of program below?mariana ..... islands = ['Saipan', 'Tinian', 'Rota']mariana ..... islands.insert(0, 'Guam')print(mariana ..... islands) A) ['Guam', 'Tinian', 'Rota']. B) ['Guam', 'Saipan', 'Tinian', 'Rota']. C) ['Saipan', 'Tinian', 'Rota']. D) ['Saipan', 'Tinian', 'Rota', 'Guam']. Show Answer Correct Answer: B) ['Guam', 'Saipan', 'Tinian', 'Rota']. 47. Python uses indentation to block code into chunks A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 48. Which of the following is not an advantage of using modules? A) Provides a means of reducing the size of the program. B) Provides a means of reuse of program code. C) Provides a means of testing individual parts of the program. D) Provides a means of dividing up tasks. Show Answer Correct Answer: A) Provides a means of reducing the size of the program. 49. Which method is used to delete a value from the list and display it also? A) Pop(). B) Remove(). C) Popshow(). D) Del(). Show Answer Correct Answer: A) Pop(). 50. Which logical operator is used to negate a condition? A) Not. B) Or. C) And. D) Xor. Show Answer Correct Answer: A) Not. 51. A programming statement that allows a block of code to be repeated for a given range of values defines A) Applications. B) While loop. C) For loops. D) Function. Show Answer Correct Answer: C) For loops. 52. Which line of code is written correctly? A) Hero.moveRight(). B) Hero.moveRight(). C) Hero.MoveRight(). D) Hero.moveRight. Show Answer Correct Answer: A) Hero.moveRight(). 53. A step-by-step set of instructions for completing a task A) Algorithm. B) Variable. C) Syntax. D) Loop. Show Answer Correct Answer: A) Algorithm. 54. You are in the car with traffic jammed at a junction. To cross that junction according to the traffic rules, which one is NOT applicable A) While loop. B) Conditional Statement. C) For loop. D) None of the above. Show Answer Correct Answer: C) For loop. 55. ..... statement is used to delete a dictionary. A) Del. B) Pop. C) Remove. D) Clear. Show Answer Correct Answer: A) Del. 56. NameList = ["John", "Harry", "Jesse", "John", "Marry", "Larry"]nameList[6] ="Susie"print(nameList)What would be the output A) ['Susie']. B) ['Susie', 'John', 'Harry', 'Jesse', 'John', 'Marry', 'Larry']. C) ['John', 'Harry', 'Jesse', 'John', 'Marry', 'Larry', 'Susie']. D) Error. Show Answer Correct Answer: D) Error. 57. A way of repeating code A) Repeat. B) Method. C) Loop. D) Do again. Show Answer Correct Answer: C) Loop. 58. Choose the correct data type:"Sarah" A) Real/Float. B) Integer. C) String. D) Character. E) Boolean. Show Answer Correct Answer: C) String. 59. A named, reusable set of programming statements to perform a specific task defines A) Functions. B) Modules. C) Applications. D) Algorithms. Show Answer Correct Answer: A) Functions. 60. Improper tab placement will prevent a block of code from running properly. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. ← PreviousNext →Related QuizzesScience QuizzesClass 11 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 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 9 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books