This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 1 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 1 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What is called when a function is defined inside a class? A) Class. B) Method. C) Module. D) Function. Show Answer Correct Answer: B) Method. 2. Str="world of python programming"print(str.capitalize()) A) World of Python Programming. B) World of python Programming. C) World of python programming. D) World of Python programming. Show Answer Correct Answer: C) World of python programming. 3. L ..... names=['Harsh', 'Amit', 'Sahil', 'Viresh']min(L ..... names) A) 'Harsh'. B) 'Amit'. C) 'Viresh'. D) None of the above. Show Answer Correct Answer: B) 'Amit'. 4. A data type consisting of letters, numbers and symbols enclosed in quotation marks. A) Integer. B) Float. C) String. D) Boolean. Show Answer Correct Answer: C) String. 5. What does this symbol represent?> A) Less than. B) Greater than. C) Equal to. D) Less than or equal to. Show Answer Correct Answer: B) Greater than. 6. Arithmetic OperatorsWhat is a %? A) Multiplication. B) Division. C) Modulo. D) Increment. Show Answer Correct Answer: C) Modulo. 7. What is the result of following Program in python3a=10b=20c=a+bprint("Sum is"+c) A) Sum 30. B) Sum is 30. C) Error. D) 30. Show Answer Correct Answer: C) Error. 8. Look at the following code:name = "John"age = "23"What type of data is stored in the variable age? A) Str. B) Int. C) Float. D) Nothing. Show Answer Correct Answer: A) Str. 9. Which of these will allow me to count from 0-20 in steps of 5? A) For x in range(0, 20):print(x). B) While x = (0, 20, 5):print(x). C) For x in range(0, 21, 5):print(x). D) For x in range(0, 21, 5):print(y). Show Answer Correct Answer: C) For x in range(0, 21, 5):print(x). 10. Which of the following character is used to give single-line comments in Python? A) //. B) #. C) D) $. Show Answer Correct Answer: B) #. 11. If I declare a global variable, can I then use its value within the scope of a function? A) Yes. B) No. C) All the above. D) None of the above. Show Answer Correct Answer: A) Yes. 12. Which of the following is a compound structure? A) Pair. B) Triplet. C) Single. D) Quadrat. Show Answer Correct Answer: A) Pair. 13. Index of a string begins with A) 1. B) 0. C) A. D) -1. Show Answer Correct Answer: B) 0. 14. Comparison Operators:Select the correct operator for not equal to A) =!=. B) !. C) =!. D) !=. Show Answer Correct Answer: D) !=. 15. What character should be placed at the end of the function "def" line, after the parentheses? A) Hashtag (#). B) Colon(:). C) Exclamation (!). D) Dash (-). Show Answer Correct Answer: B) Colon(:). 16. Which of the following is an advantage of using local variables? A) They allow the variable to be used throughout the whole program. B) They allow variable identifiers to be reused each time. C) They are easier to program than global variables. D) A wider range of data types can be used. Show Answer Correct Answer: B) They allow variable identifiers to be reused each time. 17. In a Python program, what would be the increment value for the looping variable in the FOR LOOP code?for x in range (25, 10, -5) A) 10. B) -5. C) 25. D) 5. Show Answer Correct Answer: B) -5. 18. Inheritance can only be applied between one sub class and one super class. A) True. B) False. C) Occasionally. D) Depending on instantiation. Show Answer Correct Answer: B) False. 19. What is the output of this expression, 3*1**3 A) 27. B) 9. C) 3. D) 1. Show Answer Correct Answer: C) 3. 20. A WHILE loop is ..... A) A COUNT controlled loop. B) A CONDITION controlled loop. C) All the above. D) None of the above. Show Answer Correct Answer: B) A CONDITION controlled loop. 21. Consider this list, what will be the highest index the list can have:li=[1, 2, 3, 4, 5] A) 2. B) 3. C) 4. D) 5. Show Answer Correct Answer: C) 4. 22. Items are accessed by their keys in a dictionary A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 23. Given a list with 3 items, what is the lowest and highest valid index number into that list? A) 1 and 2. B) 0 and 2. C) 0 and 3. D) 3. Show Answer Correct Answer: B) 0 and 2. 24. Which of the following is not a valid string function? A) Isalphanumeric. B) Isspace. C) Islower. D) Isalnum. Show Answer Correct Answer: A) Isalphanumeric. 25. Symbols used to store data; they represent a value that can change. A) Variable. B) Algorithm. C) Loop. D) Object. Show Answer Correct Answer: A) Variable. Next →Related QuizzesClass 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 10Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 11 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books