This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 31 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 31 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Each item in a list has an "address" or index. The first index in a Python list is what? A) 1. B) 0. C) A. D) A. Show Answer Correct Answer: B) 0. 2. NameList = ["John", "Harry", "Jesse", "John", "Marry", "Larry"]print(nameList.count("John"))What would be the output A) 1. B) 2. C) 3. D) Error. Show Answer Correct Answer: B) 2. 3. What will be the output of the following Python code?import turtlet=turtle.Pen()t.goto(300, 9)t.position() A) 300.00, 9.00. B) 9, 300. C) 300, 9. D) 9.00, 300.00. Show Answer Correct Answer: A) 300.00, 9.00. 4. Which of the following is the use of function in python? A) Functions are reusable pieces of programs. B) Functions don't provide better modularity for your application. C) You can't also create your own functions. D) All of the mentioned. Show Answer Correct Answer: A) Functions are reusable pieces of programs. 5. What does the term 'debug' mean? A) Identify errors and fix them. B) Making a calculation. C) A set of instructions. D) Looking at code. Show Answer Correct Answer: A) Identify errors and fix them. 6. Which operator performs a division? A) -. B) +. C) /. D) *. Show Answer Correct Answer: C) /. 7. Random.randint(3, 8) A) 4, 5, 6, 7. B) 3, 4, 5, 6, 7. C) 3, 4, 5, 6, 7, 8. D) 0, 1, 2, 3, 4, 5, 6, 7, 8. Show Answer Correct Answer: C) 3, 4, 5, 6, 7, 8. 8. Why are local variable names beginning with an underscore discouraged? A) They confuse the interpreter. B) They are used to indicate a private variables of a class. C) They are used to indicate global variables. D) They slow down execution. Show Answer Correct Answer: B) They are used to indicate a private variables of a class. 9. Which of the operator can be used in Strings? A) +. B) *. C) Both of the above. D) None of the above. Show Answer Correct Answer: C) Both of the above. 10. Code that decides whether or not to skip a section of code. A) Conditional. B) For Loop. C) While Loop. D) Then Block. Show Answer Correct Answer: A) Conditional. 11. Numbers = [2, 4, 6, 8]for number in numbers:print("hello!") A) 2 hello! 4 hello! 6 hello! 8 hello!. B) Hello!. C) 2 4 6 8. D) Hello! hello! hello! hello!. Show Answer Correct Answer: D) Hello! hello! hello! hello!. 12. What would the output of the program be? thisList = ["square", "circle", "triangle", "octagon"]if "triangle" in thisList:print("Yes, 'triangle' is in the list") else:print("No triangle here!") A) Yes, 'triangle' is in the list. B) "No triangle here!". C) All the above. D) None of the above. Show Answer Correct Answer: A) Yes, 'triangle' is in the list. 13. Which if the values below is an integer data type? A) 1. B) 1.0. C) 1/2. D) "1". Show Answer Correct Answer: A) 1. 14. What is the syntax to check if a value is less than another value in Python? A) >. B) <=. C) ==. D) <. Show Answer Correct Answer: D) <. 15. What type of loop is used when you know how many times you want to repeat something? A) A WHILE Loop. B) An IF function. C) A FOR Loop. D) A Variable. Show Answer Correct Answer: C) A FOR Loop. 16. Evaluate5 * 3 ** 2 + 3 A) 33. B) 48. C) Error. D) None of the above. Show Answer Correct Answer: B) 48. 17. What is another word for 'iteration'? A) Selection. B) Variable Assignment. C) Repetition. D) Sequencing. Show Answer Correct Answer: C) Repetition. 18. What key word definesthe laws and rules of a language? A) Cast. B) Interpreter. C) Syntax. D) Algorithm. Show Answer Correct Answer: C) Syntax. 19. A data type consisting of numbers with decimals. A) Integer. B) Float. C) String. D) Boolean. Show Answer Correct Answer: B) Float. 20. What is the correct syntax to output the type of a variable or object in Python? A) Print(type(x)). B) Print(typeof(x)). C) Print(type of (x)). D) Print(typeOf(x)). Show Answer Correct Answer: A) Print(type(x)). 21. Which command should you use to display the text to the screen? A) Text(). B) Print. C) Output(). D) Print(). Show Answer Correct Answer: B) Print. 22. Operators in python are ..... A) Numbers. B) Symbols that perform an operation. C) A way to dissect the program. D) Things that do things. Show Answer Correct Answer: B) Symbols that perform an operation. 23. Numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]Which of the following code will give the output as below[7, 8, 9, 10] A) Numbers[6:]. B) Numbers[7:10]. C) Numbers[7, 10]. D) Numbers[7-10]. Show Answer Correct Answer: A) Numbers[6:]. 24. Word = "amazing"For the given string if we run word[2:5:2] what does 2 mean in this function? A) It will pick only second alphabet. B) It will pick only two alphabets. C) It will pick every alternate alphabet. D) It will pick first two alphabets. Show Answer Correct Answer: C) It will pick every alternate alphabet. 25. What term is used to describe data passed into/out of a program? A) Variable. B) Loop. C) Constant. D) Parameter. Show Answer Correct Answer: D) Parameter. ← 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