This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 5 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 5 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which of these codes is correct for creating a list of numbers? A) Num = ('10', '29', '37', '109'). B) Num = ['10', '29', '37', '109']. C) Num == ('10', '29', '37', '109'). D) Num = ['10 29 37 109']. Show Answer Correct Answer: B) Num = ['10', '29', '37', '109']. 2. Which of the following statements correctly defines a function named "haunted" that takes a parameter named "apple" ? A) Haunted(apple). B) Haunted. C) Def haunted(apple):. D) Apple. Show Answer Correct Answer: C) Def haunted(apple):. 3. Str="world of python programming"len(str) A) 24. B) 25. C) 27. D) 28. Show Answer Correct Answer: C) 27. 4. What can be used to store information and values so that it can be used later? A) Graphic. B) Variable. C) Print. D) Output. Show Answer Correct Answer: B) Variable. 5. Which of the following is not a keyword? A) Assert. B) Eval. C) Nonlocal. D) Pass. Show Answer Correct Answer: B) Eval. 6. What is missing in the square braces?cheer = "Go Eagles!"print cheer[ ]If the output is Eagle A) [4:9]. B) [2:8]. C) [3:7]. D) [3:8]. Show Answer Correct Answer: D) [3:8]. 7. Output of the following question is:#program for text addition# input() methodf ..... name= "hello"l ..... name ="world"print( f ..... name + l ..... name) A) Helloworld. B) Hello world. C) Error. D) F name+l name. Show Answer Correct Answer: A) Helloworld. 8. Numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]Which of the following code gives the following list as the output[4, 5, 6] A) Numbers[3:6]. B) Numbers[3, 4, 5]. C) Numbers[4, 5, 6]. D) Numbers[4:6]. Show Answer Correct Answer: A) Numbers[3:6]. 9. Concatenation is a ..... operator. A) Arithmetic. B) Logical. C) String. D) Relational. Show Answer Correct Answer: C) String. 10. What is the output of program below?mariana ..... islands = ['Saipan', 'Tinian', 'Rota']mariana ..... islands[0] = 'Guam'print(mariana ..... islands) A) ['Saipan', 'Tinian', 'Rota']. B) ['Guam', 'Tinian', 'Rota']. C) ['Saipan', 'Tinian', 'Rota', 'Guam']. D) ['Guam', 'Saipan', 'Tinian', 'Rota']. Show Answer Correct Answer: B) ['Guam', 'Tinian', 'Rota']. 11. A dictionary is an example of a sequence ..... A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 12. Booleans represent one of two values:True or False. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 13. Inside a function with two parameters, print the first parameter. def my ..... function(fname, lname):print( ..... ) A) My function. B) Fname. C) Lastname. D) Lname. Show Answer Correct Answer: B) Fname. 14. What do we use at the start of a comment line? A) @. B) #. C) ''. D) *. Show Answer Correct Answer: B) #. 15. In which language is Python written?English A) English. B) PHP. C) C. D) ALL OF THE ABOVE. Show Answer Correct Answer: C) C. 16. When you read code carefully to look for errors and fix them A) Debug. B) Fix. C) Try again. D) Mistake. Show Answer Correct Answer: A) Debug. 17. A count controlled loop will ..... A) Repeat code until a condition is met. B) Repeat code a specific amount of times. C) Repeat code a random amount of times. D) None of the above. Show Answer Correct Answer: B) Repeat code a specific amount of times. 18. What is the order of precedence in Python?i. Parenthesisii. Exponentialiii. Multiplicationiv. Divisionv. Additionvi. Subtraction A) I, ii, iii, iv, v, vi. B) Ii, i, iii, iv, v, vi. C) Ii, i, iv, iii, v, vi. D) I, ii, iii, vi, v, iv. Show Answer Correct Answer: A) I, ii, iii, iv, v, vi. 19. Choose the correct data type:240.00 A) Character. B) String. C) Integer. D) Real/Float. E) Boolean. Show Answer Correct Answer: D) Real/Float. 20. Which data type is used to store decimal numbers in Python? A) Boolean. B) String. C) Integer. D) Float. Show Answer Correct Answer: D) Float. 21. What will the output be from the following code?print("Hello" + str(2) + "world!") A) Hello world! Hello world!. B) Hello2world!. C) Hello Hello world! world!. D) Syntax Error. Show Answer Correct Answer: B) Hello2world!. 22. A condition controlled loop is ..... A) A while loop. B) A for loop. C) All the above. D) None of the above. Show Answer Correct Answer: A) A while loop. 23. What is the index number for 'Spain'?['England', 'Brazil', 'Spain', 'France'] A) 0. B) 1. C) 2. D) 3. Show Answer Correct Answer: C) 2. 24. Choose the correct alternative out of the following A) While loops can be used to create infinite loops only. B) Python if else conditionals cannot be used to compare values. C) Python is nothing but english. D) The inputs to the functions or methods are called arguments. Show Answer Correct Answer: D) The inputs to the functions or methods are called arguments. 25. This is a catch-all for every other situation besides the one where the condition is true. A) Then. B) Do. C) Else. D) If. Show Answer Correct Answer: C) Else. ← 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 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 10Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 11 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books