This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 31 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 31 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which one is a Boolean value? A) Yes. B) No. C) True. D) Maybe. Show Answer Correct Answer: C) True. 2. A note to the programmer that tells about the code is called a- A) Comment. B) Annotation. C) Documentation. D) Description. Show Answer Correct Answer: A) Comment. 3. What symbol is used for multiplication in Python? A) X. B) X. C) *. D) #. Show Answer Correct Answer: C) *. 4. What does len('apple') return? A) 4. B) 5. C) 6. D) Error. Show Answer Correct Answer: B) 5. 5. Which of the following is a characteristic of Python? A) None of the above. B) Compiled language. C) Interpreted language. D) Static typing. Show Answer Correct Answer: C) Interpreted language. 6. Read the Python program below:number = 13if number == 0:print("zero")else:print(number)number = 0When this program is executed, what will be displayed on the screen? A) Nothing will be displayed on the screen. B) 13. C) 13zero. D) 13zero0. Show Answer Correct Answer: B) 13. 7. What is the default package manager for Python? A) Npm. B) Pip. C) Conda. D) Brew. Show Answer Correct Answer: B) Pip. 8. What is the purpose of the subprogram turtle.Turtle() in the turtle library module? A) Moves the turtle forward. B) Creates a new turtle with a variable name. C) Makes the turtle invisible. D) Turns the turtle clockwise. Show Answer Correct Answer: B) Creates a new turtle with a variable name. 9. Consider the list:myList=["r", "o", "y", "g", "b", "i", "v"]What prints from the following statement?print(myList[0:3]) A) [r, o, y]. B) ['r', 'o', 'y']. C) ['r', 'o', 'y', 'g']. D) Nothing, this is an error. Show Answer Correct Answer: B) ['r', 'o', 'y']. 10. How can Python help in robotics? A) Building kitchen cabinets. B) Writing storybooks. C) Programming robots to do tasks. D) Making sandwiches. Show Answer Correct Answer: C) Programming robots to do tasks. 11. PyCharm needs Python interpreter installed to work. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 12. Print("12"*3)What would this print? A) 36. B) 121212. C) 24. D) 12*3. Show Answer Correct Answer: B) 121212. 13. What will the output be from the following code?print(3+4) A) 3+4. B) 7. C) SyntaxError. D) Print(3+4). Show Answer Correct Answer: B) 7. 14. What does the 'len()' function return when applied to a string? A) Number of characters. B) ASCII value of the first character. C) Error. D) None. Show Answer Correct Answer: A) Number of characters. 15. Writing comments is mandatory in Python programs (T/F) A) Depends on the context. B) True. C) Not applicable. D) False. Show Answer Correct Answer: D) False. 16. What is the file extension of a Python program? A) .py. B) .java. C) .cpp. D) .txt. Show Answer Correct Answer: A) .py. 17. Print my ..... list[-1]my ..... list = [0, 1, 2, 3, 4, 5] A) 5. B) 0. C) -1. D) My list not defined. Show Answer Correct Answer: D) My list not defined. 18. How many 'else' blocks can an 'if-elif-else' chain have? A) Only one. B) As many as you want. C) Exactly two. D) None (Python doesn't allow 'else'). Show Answer Correct Answer: A) Only one. 19. What is the output of print 'Hello world!'? A) Hello world!. B) Hello. C) World!. D) None of the above. Show Answer Correct Answer: A) Hello world!. 20. What is the keyword to create a class? A) Import. B) Int . C) Class. D) Def. Show Answer Correct Answer: C) Class. 21. Which of the following statements is true about recursion in Python? A) A function used for infinite loops. B) A function that can call itself. C) A function must always return None. D) Recursion is not allowed in Python. Show Answer Correct Answer: B) A function that can call itself. 22. What is the output of the expression 3 + 4 * 2? A) 14. B) 11. C) 10. D) 8. Show Answer Correct Answer: B) 11. 23. Read the Python program below:number = 13if number < 10:print("small")if number < 100:print("medium")if number < 1000:print("large")When this program is executed, what will be displayed on the screen? A) Small. B) Medium. C) Mediumlarge. D) Large. Show Answer Correct Answer: C) Mediumlarge. 24. How to insert comments in Python? A) # this is a comment. B) // this is a comment. C) /* this is a comment */. D) None of the above. Show Answer Correct Answer: A) # this is a comment. 25. What function is used to take input from the user in Python? A) Scan(). B) Write(). C) Read(). D) Input(). Show Answer Correct Answer: D) Input(). ← PreviousNext →Related QuizzesClass 11 Computer Science Chapter 2 Introduction To Python Quiz 1Class 11 Computer Science Chapter 2 Introduction To Python Quiz 2Class 11 Computer Science Chapter 2 Introduction To Python Quiz 3Class 11 Computer Science Chapter 2 Introduction To Python Quiz 4Class 11 Computer Science Chapter 2 Introduction To Python Quiz 5Class 11 Computer Science Chapter 2 Introduction To Python Quiz 6Class 11 Computer Science Chapter 2 Introduction To Python Quiz 7Class 11 Computer Science Chapter 2 Introduction To Python Quiz 8Class 11 Computer Science Chapter 2 Introduction To Python Quiz 9Class 11 Computer Science Chapter 2 Introduction To Python Quiz 10 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books