This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 32 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 32 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. C=35 if 34<43 else 43 A) 34. B) 43. C) 35. D) 1. Show Answer Correct Answer: C) 35. 2. What output will this code produce? A) ['France', 'Wales', 'England']France. B) France Wales EnglandFrance. C) France, Wales, EnglandWales. D) ['France', 'Wales', 'England']Wales. Show Answer Correct Answer: D) ['France', 'Wales', 'England']Wales. 3. What does the '#' allow you to do? A) Repeat code. B) Comment on code. C) Print code. D) End code. Show Answer Correct Answer: B) Comment on code. 4. Which one of the following is the correct way of calling a function? A) Function name(). B) Call function name(). C) Ret function name(). D) Function function name(). Show Answer Correct Answer: A) Function name(). 5. In Python, list is mutable A) False. B) True. C) All the above. D) None of the above. Show Answer Correct Answer: B) True. 6. If, else and elif is used for ..... A) Selection. B) Indentation. C) Printing. D) Iteration. Show Answer Correct Answer: A) Selection. 7. The result of this program:Friday = Falseif Friday:print "Jeans day!"else:print "Uniform day" A) Jeans day. B) Today is Friday. C) Uniform day. D) Not Friday. Show Answer Correct Answer: C) Uniform day. 8. In Python, iteration is another word for a: A) Loop. B) Variable. C) Function. D) Command. Show Answer Correct Answer: A) Loop. 9. What will be the output?names1 = ['Amir', 'Bala', 'Chales']if 'amir' in names1:print(1) else:print(2) A) None. B) 1. C) 2. D) Error. Show Answer Correct Answer: C) 2. 10. An expression is A) A set of steps for performing a task, like a recipe. B) An ordered list of values or objects. C) To combine two strings of text into a single string. D) Any valid set of values, variables, operators, and functions that produces a value or result. Show Answer Correct Answer: D) Any valid set of values, variables, operators, and functions that produces a value or result. 11. Which one of theses is floor division A) /. B) //. C) %. D) None of theses. Show Answer Correct Answer: B) //. 12. What method is used to remove the first occurrence of a specific value from a list in Python? A) Remove(). B) Clear(). C) Pop(). D) Delete(). Show Answer Correct Answer: A) Remove(). 13. The help statement display ..... from a module. A) Constants. B) Functions. C) Classes. D) Docstrings. Show Answer Correct Answer: D) Docstrings. 14. What is the output of the following lines of code?var1 = 12var1 = 23.4var1 = "I love AI!"print(var1) A) 12. B) 23.4. C) I love AI!. D) Error. Show Answer Correct Answer: C) I love AI!. 15. Look at the following code:age = int(input ("What is your age? "))age = age + 1print (age)If the user inputs 23, what is the result of the code? A) 23. B) 24. C) Age. D) An error message. Show Answer Correct Answer: B) 24. 16. What can we use to get the first character of a string txt= "Banana" A) X=txt(0). B) X=txt(1). C) X=txt[0]. D) X=txt[1]. Show Answer Correct Answer: C) X=txt[0]. 17. True or False:phone.number is a good name for a variable. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 18. What is used to print the length of a string A) Len(). B) Length(). C) Type.legth(). D) Fulllength(). Show Answer Correct Answer: A) Len(). 19. Which logical operator is used to combine two conditions and returns True if both conditions are True? A) And. B) Xor. C) Not. D) Or. Show Answer Correct Answer: A) And. 20. Choose the correct data type:"Resolution" A) Character. B) String. C) Integer. D) Real/Float. E) Boolean. Show Answer Correct Answer: B) String. 21. In the following code, what type of variable is being created?foo = "bar" A) Integer. B) Float. C) String. D) None of the above. Show Answer Correct Answer: C) String. 22. Read the following Python code carefully and point out the global variables?y, z = 1, 2def f():global x x = y+z A) X. B) Y and z. C) X, y and z. D) Neither x, nor y, nor z. Show Answer Correct Answer: C) X, y and z. 23. What is the position of the name 'Paula' in the following list:names = ["Paul", "Phillip", "Paula", "Phillipa"] A) 0. B) 1. C) 2. D) 3. Show Answer Correct Answer: C) 2. 24. Identify the data type of T:T = ['A', '23', '92', '(10, 20)'] A) List. B) Dictionary. C) String. D) Tuple. Show Answer Correct Answer: D) Tuple. 25. What will happen when we run this:Yourname = input()print ("Hi there, ", yourname) A) It will output Hi there, and the name entered. B) There is an error because there is nothing between the brackets on the input so the user can't input anything as they won't know what to enter. C) There is an error because the variables aren't named the same. D) It will output Hi there, your name. Show Answer Correct Answer: C) There is an error because the variables aren't named the same. ← 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