This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 24 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 24 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What is the assignment operator? A) +=. B) =. C) $\rightarrow$. D) ==. Show Answer Correct Answer: B) =. 2. NameList = ["John", "Harry", "Jesse", "John", "Marry", "Larry"]del nameList[3]print(nameList)What would be the output A) ['John', 'Harry', 'Jesse', 'Marry', 'Larry']. B) ['John', 'Harry', 'Jesse', 'John', 'Larry']. C) ['John', 'Harry', 'John', 'Marry', 'Larry']. D) Error. Show Answer Correct Answer: A) ['John', 'Harry', 'Jesse', 'Marry', 'Larry']. 3. What is the term for steps you follow to solve a problem? A) Program. B) Python. C) Algorithm. D) Hack. Show Answer Correct Answer: C) Algorithm. 4. True or False:There are only 3 different programming languages A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 5. If L1=[2, 4, 8, 16], L2=[32, 64] what is L1+L2 A) [2, 4, 8, 16, 32, 64]. B) [2, 4, 8, 16][32, 64]. C) [2, 4, 8, 16], [32, 64]. D) None of the above. Show Answer Correct Answer: A) [2, 4, 8, 16, 32, 64]. 6. Which operator is used to multiply numbers? A) X. B) #. C) %. D) *. Show Answer Correct Answer: D) *. 7. Look at the following code:age = "23"age = int(age)What does the int() function do to the data in my variable? A) Does nothing. B) Changes the string to a float. C) Changes the number to a string. D) Changes the string to an integer. Show Answer Correct Answer: D) Changes the string to an integer. 8. What is the output of the following python code?x=100def f1():global x x=90def f2():global x x=80print(x) A) 100. B) 90. C) 80. D) Error. Show Answer Correct Answer: A) 100. 9. What is displayed to the screen when the following code runs? esports = ["Donkey Kong", "Galaga", "Pac Man"] esports.reverse() print(esports) A) ['Pac Man', 'Galaga', 'Donkey Kong']. B) ['gnoK yeknoD', 'agalaG', naM caP']. C) ['Donkey Kong', 'Galaga', 'Pac Man']. D) Error; you cannot use the reverse() function on a list. Show Answer Correct Answer: A) ['Pac Man', 'Galaga', 'Donkey Kong']. 10. What will be the output of below Python code?list1=[8, 0, 9, 5]print(list1[::-1]) A) [5, 9, 0, 8]. B) [8, 0, 9]. C) [8, 0, 9, 5]. D) [0, 9, 5]. Show Answer Correct Answer: A) [5, 9, 0, 8]. 11. Koju verziju pythona koristimo? A) 1. B) 2. C) 3. D) 4. Show Answer Correct Answer: C) 3. 12. Carrying out instructions is known as A) Input. B) Output. C) Processing. D) Storage. Show Answer Correct Answer: C) Processing. 13. What symbol is used to multiply two numbers together? A) +. B) =. C) *. D) /. Show Answer Correct Answer: C) *. 14. Suppose a function called add() is defined in a module called adder.py. Which of the following code snippets correctly show how to import and use the add() function? Select all that apply. A) Import add from adderresult = add(2, 3). B) From adder import addresult = add(2, 3). C) From adder import addresult = adder.add(2, 3). D) Import addresult = adder.add(2, 3). Show Answer Correct Answer: B) From adder import addresult = add(2, 3). 15. What is one of the main challenges in studying Burmese Pythons in the wild? A) Their elusive nature makes them hard to track. B) There is too much human activity in their habitat. C) They are very aggressive towards humans. D) They are too small to be easily found. Show Answer Correct Answer: A) Their elusive nature makes them hard to track. 16. What does ..... init ..... do? A) Constructs the instance. B) Initialize the instance values. C) Calls the Super class. D) Creates a circle. Show Answer Correct Answer: B) Initialize the instance values. 17. Which of the following is NOT a Python rule for naming functions? A) Functions names can contain letters, numbers and underscores. B) Function names must be less than 32 characters. C) The first character in a function name cannot be a number. D) Function names are case-sensitive. Show Answer Correct Answer: B) Function names must be less than 32 characters. 18. Logical Operators:true if operand is false A) X and y. B) X or y. C) Not x. D) None of the above. Show Answer Correct Answer: C) Not x. 19. What code would you use to get an average of your maths and English test results? A) Average = (Maths+English)/2. B) Average = Maths+English/2. C) Average = (Maths+English)*2. D) Average = Maths+English*2. Show Answer Correct Answer: A) Average = (Maths+English)/2. 20. What is the purpose of comment lines in code? A) To compliment your work so you feel better about it. B) To explain the code that follows it. C) To make the code compile. D) To make your code longer so you get more points. Show Answer Correct Answer: B) To explain the code that follows it. 21. >>>str="computer">>> str1='science'>>> str3=str+str1>>> print(str3) A) Computerscience. B) 'computerscience'. C) "computer"'science'. D) "computerscience". Show Answer Correct Answer: A) Computerscience. 22. How are variable length arguments specified in the function heading? A) One star followed by a valid identifier. B) One underscore followed by a valid identifier. C) Two stars followed by a valid identifier. D) Two underscores followed by a valid identifier. Show Answer Correct Answer: A) One star followed by a valid identifier. 23. Print (name + '' is '' + age '' years old") This is an example of: A) Input. B) Output. C) Processing. D) Storage. Show Answer Correct Answer: A) Input. 24. Which value is a Boolean? A) 64. B) "Cat". C) True. D) 0.5. Show Answer Correct Answer: C) True. 25. What is the order of precedence in python?i) Parentheses, ii) Exponentialiii) Multiplication, iv) Divisionv) Addition, vi) Subtraction A) I, ii, iii, iv, vi, v. B) Ii, i, iv, iii, v, vi. C) Ii, i, iii, iv, v, vi. D) I, ii, iii, iv, v, vi. Show Answer Correct Answer: D) I, ii, iii, iv, v, vi. ← 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