This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 21 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 21 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. How do we change a user input from string to integer? A) Casing. B) Flipping. C) Casting. D) Numerising. Show Answer Correct Answer: C) Casting. 2. Consider the code below. What prints?print(int(33.7)) A) 34.0. B) 34. C) 33.70. D) 33. Show Answer Correct Answer: D) 33. 3. Select the correct operator for Floor Division (Div): A) //. B) . C) %%. D) . Show Answer Correct Answer: A) //. 4. What is the output of program below?mariana ..... islands = ['Saipan', 'Tinian', 'Rota']mariana ..... islands.remove('Tinian')print(mariana ..... islands) A) ['Saipan', 'Tinian', 'Rota']. B) ['Tinian', 'Rota']. C) ['Saipan', 'Tinian']. D) ['Saipan', 'Rota']. Show Answer Correct Answer: D) ['Saipan', 'Rota']. 5. 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). 6. Which type of loop iterates until instructed otherwise? A) FOR loop. B) A count-controlled loop. C) Repeat-once loop. D) WHILE loop. Show Answer Correct Answer: D) WHILE loop. 7. 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. 8. What is the output of program below?mariana ..... islands = ['Saipan', 'Tinian', 'Rota']mariana ..... islands.pop()print(mariana ..... islands) A) ['Saipan', 'Tinian', 'Rota']. B) ['Tinian', 'Rota']. C) ['Saipan', 'Tinian']. D) ['Saipan', 'Rota']. Show Answer Correct Answer: C) ['Saipan', 'Tinian']. 9. 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 = [ ]. 10. What is iteration known as? A) Looping. B) Crashing. C) Repeating. D) None of the above. Show Answer Correct Answer: A) Looping. 11. What is the result of following Program in python3for i in range(1, 4):print(i)if(i==2):break; A) 1. B) 12. C) 1234. D) Error. Show Answer Correct Answer: A) 1. 12. What does the command 'wn' do? A) Closes the window where your drawing is created. B) Controls how the window where your drawing is shown behaves. C) Creates the window where your drawing is created. D) Creates the drawing on your screen. Show Answer Correct Answer: B) Controls how the window where your drawing is shown behaves. 13. 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. 14. 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,. 15. What symbol is used to either add two numbers together or join two strings? A) -. B) =. C) +. D) *. Show Answer Correct Answer: C) +. 16. To increment means to A) Increase the value of a variable. B) Decrease the value of a variable. C) Add 1 to the variable. D) Subtract 1 from the variable. Show Answer Correct Answer: A) Increase the value of a variable. 17. Syntax is ..... A) An error. B) A coding language that explains Python what to do. C) Rules we follow in building sentences. D) Ways to express yourself. Show Answer Correct Answer: C) Rules we follow in building sentences. 18. I am 18 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 spring chicken!". D) None of the above. Show Answer Correct Answer: C) "You are spring chicken!". 19. Is the following statement True of False?Boolean variables can be used as conditions in an IF statement. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 20. What is the output of the following?x = ['ab', 'cd']for i in x:i.upper()print(x) A) ['ab', 'cd']. B) ['AB', 'CD']. C) None of the above. D) [None, None]. Show Answer Correct Answer: A) ['ab', 'cd']. 21. Sort () function in list by default sort the values in ..... A) Ascending order. B) Decending order. C) All the above. D) None of the above. Show Answer Correct Answer: A) Ascending order. 22. Which of the following would give an error? A) List1=[]. B) List1=[]*3. C) List1=[2, 8, 7]. D) None of the above. Show Answer Correct Answer: D) None of the above. 23. What function converts the data in a variable into a 'float'? A) Int(). B) Flt(). C) Bool(). D) Float(). Show Answer Correct Answer: D) Float(). 24. Python can work in ..... mode. A) 1. B) 2. C) 3. D) 4. Show Answer Correct Answer: B) 2. 25. What is print() called in Python coding? A) Function. B) Variable. C) String. D) Output. Show Answer Correct Answer: A) Function. ← 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