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 8 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 8 (60 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which if the values below is a float data type? A) "2.11". B) 2/4. C) 2. D) 2.11. Show Answer Correct Answer: D) 2.11. 2. Which kind of loop would be used?I need a guessing game program that will let me keep guessing until I get the right answer. A) FOR Loop. B) WHILE Loop. C) All the above. D) None of the above. Show Answer Correct Answer: B) WHILE Loop. 3. Cleave = hero.isReadyToCleave( ) A) The confirms that hero is not ready to cleave. B) The cleave variable is checking if cleave is ready. C) Cleave is not a variable, it is a conditional here. D) Cleave is a variable storing True/False, depending on the hero to be ready to cleave or not. Show Answer Correct Answer: D) Cleave is a variable storing True/False, depending on the hero to be ready to cleave or not. 4. What will be displayed to the screen when the following code runs? esport = "Galaga" for letter in esport:print(letter + " ..... ", end="") A) G a l a g a . B) Error; you cannot iterate over the letters in a string using the "in" keyword. C) . D) Galaga. Show Answer Correct Answer: A) G a l a g a . 5. Find the output of the following code:>>>str1='Save Soil'>>>str1.isalnum( ) A) Save Soil. B) True. C) False. D) None of the above. Show Answer Correct Answer: C) False. 6. Which character must be at the end of the line for if? A) :. B) ;. C) {. D) . Show Answer Correct Answer: A) :. 7. It is possible to execute both the (block of) statements under if and the else clauses at the same time. A) Yes. B) No. C) All the above. D) None of the above. Show Answer Correct Answer: B) No. 8. If you want to create an empty list called islands, which of the following pieces of code is correct? A) Islands = { }. B) Islands = ( ). C) Islands = [ ]. D) Islands = < >. Show Answer Correct Answer: C) Islands = [ ]. 9. Given a list named "esports", which of the following statements will access only the first and second items in that list? A) Esports[0:2]. B) Esports(0:3). C) Esports(0:1). D) Esports.range(0, 2). Show Answer Correct Answer: A) Esports[0:2]. 10. An ordered set of values between a known start and end value is the A) Loop. B) Expression. C) Radius. D) Range. Show Answer Correct Answer: D) Range. 11. If I use the command right(180), which way will Tracy turn? A) She will turn around. B) She will turn to face up. C) She will turn to face left. D) She will turn in a circle. Show Answer Correct Answer: A) She will turn around. 12. What error occurs when you execute?apple = mango A) NameError. B) SyntaxError. C) TypeError. D) ValueError. Show Answer Correct Answer: A) NameError. 13. What will be the output of the following Python function? all([2, 4, 0, 6]) A) Error. B) False. C) 0. D) True. Show Answer Correct Answer: B) False. 14. Notes that explain to others what each part of your program does. A) Plan. B) Comment. C) Notes. D) Code. Show Answer Correct Answer: B) Comment. 15. Give the output of the following statements>>> str='Hello World'>>>str.istiltle() A) TRUE. B) FALSE. C) All the above. D) None of the above. Show Answer Correct Answer: A) TRUE. 16. What is the answer to this expression, 22%3 is A) 7. B) 5. C) 0. D) 1. Show Answer Correct Answer: D) 1. 17. What is the significance of the name 'Python'? A) The significance of the name 'Python' is that it was inspired by the British comedy show 'Monty Python's Flying Circus'. B) The name 'Python' refers to the snake species known for its constricting abilities. C) Python is named after a famous computer scientist named Monty Python. D) The name 'Python' is derived from a mythical creature in ancient folklore. Show Answer Correct Answer: A) The significance of the name 'Python' is that it was inspired by the British comedy show 'Monty Python's Flying Circus'. 18. Which commands would draw a square A) Repeat the following five times:forward(10)turnright(72). B) Repeat the following three times:forward(10)turnright(110). C) Repeat the following three times:forward(10)turnright(120). D) Repeat the following four times:forward(10)turnright(90). Show Answer Correct Answer: D) Repeat the following four times:forward(10)turnright(90). 19. What is used to separate elements in a list? A) Space. B) Comma. C) Bracket. D) Full Stop. Show Answer Correct Answer: B) Comma. 20. Which operator performs an addition? A) /. B) -. C) +. D) ==. Show Answer Correct Answer: C) +. 21. Fill in the blank if a> b:print("True") ..... :print("False") A) Elif:. B) Otherwise:. C) Else:. D) Then:. Show Answer Correct Answer: C) Else:. 22. Which code would display 'Hello World' A) Print("Hello World"). B) Print("Hello World"). C) Print(Hello World). D) Print=("hello world"). Show Answer Correct Answer: A) Print("Hello World"). 23. What data type represents a decimal number? A) String. B) Int. C) Boolean. D) Float. Show Answer Correct Answer: D) Float. 24. What is the Output of the following code?for x in range(0.5, 5.5, 0.5):print(x) A) [0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5]. B) [0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5]. C) The Program executed with errors. D) None of the above. Show Answer Correct Answer: C) The Program executed with errors. 25. Why would you use a loop? A) To repeat a piece of code. B) To create a loop. C) To input data. D) None of the above. Show Answer Correct Answer: A) To repeat a piece of code. 26. Which of the following best describes the purpose of a for loop? A) A for loop is for doing something three times. B) A for loop is for doing something a fixed number of times. C) A for loop is doing something an infinite number of times. D) A for loop is for doing something an indeterminate number of times. Show Answer Correct Answer: B) A for loop is for doing something a fixed number of times. 27. What is the proper syntax for Python comments? A) # Python Comment. B) Python comment . C) D) /* Python Comment */. Show Answer Correct Answer: A) # Python Comment. 28. What will the output be from the following code?print("Hello" + 2 + "world") A) Hello 2 world. B) TypeError. C) HelloHelloworld. D) Hello2world. Show Answer Correct Answer: B) TypeError. 29. The number or word we give to a variable A) Text. B) Information. C) Bug. D) Value. Show Answer Correct Answer: D) Value. 30. A function that can only be used by a class is called? A) Function. B) Value. C) Conditional. D) Method. Show Answer Correct Answer: D) Method. 31. What is Basic syntax? A) A step-by-step set of instructions for completing a task. B) A type of data that represents text. In both Python and JavaScript, strings are represented by text inside quotes. C) Repeat a block of code a certain number of times. D) The rules for correct spelling, grammar, and punctuation in a programming language. Show Answer Correct Answer: D) The rules for correct spelling, grammar, and punctuation in a programming language. 32. If Tracy started facing right, which direction would she be facing after we ran the following code? left(90)left(90)right(90) A) Down. B) Left. C) Up. D) Right. Show Answer Correct Answer: C) Up. 33. What is the correct programming name of this symbol?() A) Smiley emoji. B) Parenthesis. C) Quotation marks. D) Brackets. Show Answer Correct Answer: B) Parenthesis. 34. What data type would be used for storing someone's telephone numbers? A) Float (using a decimal point). B) Integer (just whole numbers). C) String (alphanumerical data). D) None of the above. Show Answer Correct Answer: B) Integer (just whole numbers). 35. Comments are used to make code easier to read. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 36. The Python IDE colour codes sections of your code to make it easier to debug A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 37. Python can be defined as A) A computer programming language designed for use in commerce. B) An object-oriented computer programming language commonly used to create interactive effects within web browsers. C) A high-level computer programming language used especially for scientific computation. D) A simple yet powerful scripting language used to run some of the most powerful apps in the world, like Gmail, Google Maps and YouTube. Show Answer Correct Answer: D) A simple yet powerful scripting language used to run some of the most powerful apps in the world, like Gmail, Google Maps and YouTube. 38. What initiated the Burmese Python invasion in South Florida? A) They were brought as pets and then released. B) They were native to the area. C) They migrated from Southeast Asia. D) They were introduced for pest control. Show Answer Correct Answer: A) They were brought as pets and then released. 39. Why did Guido van Rossum call his programming language Python? A) He loves Monty Python. B) A friend suggested it. C) He couldn't think of anything else. D) He thinks Pythons were cool. Show Answer Correct Answer: A) He loves Monty Python. 40. Try something a bunch of times, then change a little each time until it's right. A) Iterate. B) Syntax. C) Code. D) Property. Show Answer Correct Answer: A) Iterate. 41. What is input() called in Python coding? A) Variable. B) String. C) Keyboard. D) Function. Show Answer Correct Answer: D) Function. 42. What is the output of the following code?What is the output of following codeTemperature = 20 Thermo = 15 if Temperature < 15:Thermo = Thermo + 5 print(Thermo) A) 15. B) 25. C) 10. D) 20. Show Answer Correct Answer: A) 15. 43. If I want to store my height in a variable, which of the following would be a good variable name in best practice? A) Number. B) Inches. C) Abcdefg. D) Height. Show Answer Correct Answer: D) Height. 44. What is the result of following Program in python3for i in range(3, 0, -1)print("{0} Python" .format(i)) A) 3 Python2 Python1 Python. B) 3 Python. C) 2 Python1 Python0 Python. D) Error. Show Answer Correct Answer: D) Error. 45. If I declare a variable within a function, can I then use its value within the outer global scope of my application? A) Yes. B) No. C) All the above. D) None of the above. Show Answer Correct Answer: B) No. 46. How do we change a user input from string to integer? A) Flipping. B) Numerising. C) Casting. D) Casing. Show Answer Correct Answer: C) Casting. 47. Consider the code below. What prints?print(int(33.7)) A) 34.0. B) 33.70. C) 33. D) 34. Show Answer Correct Answer: C) 33. 48. Select the correct operator for Floor Division (Div): A) %%. B) //. C) . D) . Show Answer Correct Answer: B) //. 49. What is the output of program below?mariana ..... islands = ['Saipan', 'Tinian', 'Rota']mariana ..... islands.remove('Tinian')print(mariana ..... islands) A) ['Tinian', 'Rota']. B) ['Saipan', 'Rota']. C) ['Saipan', 'Tinian']. D) ['Saipan', 'Tinian', 'Rota']. Show Answer Correct Answer: B) ['Saipan', 'Rota']. 50. Which line of code is used to make a loop? A) For i in range(5). B) # Code normally executes in the order it's written. C) Hero.build("upArrow"). D) A = "door". Show Answer Correct Answer: A) For i in range(5). 51. Which type of loop iterates until instructed otherwise? A) Repeat-once loop. B) FOR loop. C) WHILE loop. D) A count-controlled loop. Show Answer Correct Answer: C) WHILE loop. 52. What is the function of the reverse method for lists? A) Removes the first occurrence of the information inside the parenthesis. B) Adds the information inside the parenthesis to the end of the list. C) Reverses the order of the elements inside a list. D) Sorts the list (lowest to highest for numbers and alphabetical order for strings). Show Answer Correct Answer: C) Reverses the order of the elements inside a list. 53. What is the output of program below?mariana ..... islands = ['Saipan', 'Tinian', 'Rota']mariana ..... islands.pop()print(mariana ..... islands) A) ['Saipan', 'Tinian']. B) ['Saipan', 'Tinian', 'Rota']. C) ['Saipan', 'Rota']. D) ['Tinian', 'Rota']. Show Answer Correct Answer: A) ['Saipan', 'Tinian']. 54. If you want to create an empty list called colours in Python, which of the following is correct? A) Colours = [ ]. B) Colours = { }. C) Colours = ( ). D) Colours = <>. Show Answer Correct Answer: A) Colours = [ ]. 55. What is iteration known as? A) Looping. B) Crashing. C) Repeating. D) None of the above. Show Answer Correct Answer: A) Looping. 56. What is the result of following Program in python3for i in range(1, 4):print(i)if(i==2):break; A) 12. B) 1234. C) Error. D) 1. Show Answer Correct Answer: D) 1. 57. What does the command 'wn' do? A) Closes the window where your drawing is created. B) Creates the window where your drawing is created. C) Creates the drawing on your screen. D) Controls how the window where your drawing is shown behaves. Show Answer Correct Answer: D) Controls how the window where your drawing is shown behaves. 58. Given a function that does not return any value, what value is thrown by default when executed in shell. A) Int. B) Bool. C) Void. D) None. Show Answer Correct Answer: D) None. 59. What is the output of the following code?for i in range(10, 15, 1):print( i, end=', ') A) 10, 11, 12, 13, 14,. B) 10, 11, 12, 13, 14, 15,. C) All the above. D) None of the above. Show Answer Correct Answer: A) 10, 11, 12, 13, 14,. 60. What symbol is used to either add two numbers together or join two strings? A) =. B) -. C) *. D) +. Show Answer Correct Answer: D) +. ← 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 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 9 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books