This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 14 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 14 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. The code you use to receive and input from the keyboard A) Enter(). B) Add(). C) Receive(). D) Input(). Show Answer Correct Answer: D) Input(). 2. Which of the following statement is true between char and string data types? A) Char data type contain only a character but string data type contain more than one characters. B) Char and string data type can use only one character. C) Char and string is not valid data type. D) Char and string can only be used with number values only. Show Answer Correct Answer: A) Char data type contain only a character but string data type contain more than one characters. 3. What is the correct order of the following? A) Ifelifelse. B) If elif else elif. C) If else elif. D) Elseif. Show Answer Correct Answer: A) Ifelifelse. 4. If L1=[2, 4, 8, 16] What is the result of the following statement16 in L1 A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 5. If function definition has no content, then what statement to be used to avoid getting an error. A) Nostatement. B) Empty. C) Blank. D) Pass. Show Answer Correct Answer: D) Pass. 6. Which one is not true about function? A) It breaks the large program into small modules. B) It avoids repetition. C) It makes code reusable. D) It makes the program unorganized. Show Answer Correct Answer: D) It makes the program unorganized. 7. "def" keyword is used in python to- A) Def is a variable. B) Define a new conditional variable. C) Use conditional. D) Define a new function. Show Answer Correct Answer: D) Define a new function. 8. Which of the following correctly stores 'price' as a decimal number? A) Price = int ( input ("Price: "). B) Price = str( input ("Price: "). C) Price = float ( input ("Price: "). D) Price = input ("Price: "). Show Answer Correct Answer: C) Price = float ( input ("Price: "). 9. What key word describesThe process of defining the 'type' of a piece of data? A) Casting. B) Operator. C) Sequence. D) Variable. Show Answer Correct Answer: A) Casting. 10. Which kind of loop would be used?I need a program that will keep letting me add a monthly payment for 12 months. A) FOR Loop. B) WHILE Loop. C) All the above. D) None of the above. Show Answer Correct Answer: A) FOR Loop. 11. Kind of loop used when you know the number of times you want it to repeat A) List. B) For. C) While. D) If. Show Answer Correct Answer: B) For. 12. Suppose list1 is [1, 5, 9], what is sum(list1)? A) 1. B) 9. C) 15. D) None. Show Answer Correct Answer: C) 15. 13. What is the output of the following code?str = "pynative"print (str[1:3]) A) Py. B) Yn. C) Pyn. D) Yna. Show Answer Correct Answer: B) Yn. 14. Docstrings A) Single quoted comments. B) Double quoted comments. C) Triple quoted comments. D) Hash tagged comments. Show Answer Correct Answer: C) Triple quoted comments. 15. How do i remove something from the end of a list? A) Variable.pop(). B) Variable.delete(). C) Variable.remove(). D) Variable=variable-end. Show Answer Correct Answer: A) Variable.pop(). 16. What brackets are used to create a list? A) (). B) []. C) All the above. D) None of the above. Show Answer Correct Answer: B) []. 17. Choose the correct data type:Attendance of a studentExample:yesExample 2:no A) Character. B) String. C) Integer. D) Real/Float. E) Boolean. Show Answer Correct Answer: C) Integer. 18. Which of the following symbols is used in the beginning of a line to create a single line comment in Python? A) &&. B) @. C) *. D) #. Show Answer Correct Answer: D) #. 19. What is the result of following Program in python3for i in range(1, 4):print(i)if(i==2):continue; A) 1. B) 123. C) Error. D) 13. Show Answer Correct Answer: A) 1. 20. In Python script editor, the errors will be shown in ..... color in the IDLE window? A) Green. B) Black. C) Red. D) Orange. Show Answer Correct Answer: C) Red. 21. A Python dictionary stores ..... A) Value-key pairs. B) Key-value pairs. C) All the above. D) None of the above. Show Answer Correct Answer: B) Key-value pairs. 22. How do Burmese Pythons affect the food chain in the Everglades? A) By introducing new species into the ecosystem. B) By building nests that provide habitats for other animals. C) By preying on top predators like alligators. D) By pollinating native plants. Show Answer Correct Answer: C) By preying on top predators like alligators. 23. A # in Python means the user is trying to ..... A) Hashtag. B) Ratio. C) Comment. D) Tic-tac-toe. Show Answer Correct Answer: C) Comment. 24. Sonam has written this program in Python. One of the lines contains at least one error. Which line is it? A) Print( "Hello world!" ). B) Name=input('please enter your name'). C) Print(happy to meet you). D) Print('you have great name'). Show Answer Correct Answer: C) Print(happy to meet you). 25. What is the result of the following condition if:A = 30B = 21C = 71B != A or C < A A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. ← 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