This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 11 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 11 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. In the following code, "city" is an example of a what?city= "Exeter" A) Loop. B) Variable. C) List. D) Array. Show Answer Correct Answer: B) Variable. 2. How does Python support community engagement? A) Python does not have any forums or conferences. B) Python engages its community through open-source contributions, forums, conferences, and educational resources. C) Python only supports community engagement through paid memberships. D) Python's community engagement is limited to social media posts. Show Answer Correct Answer: B) Python engages its community through open-source contributions, forums, conferences, and educational resources. 3. Which control flow statement is used for decision making? A) For. B) While. C) If. D) Break. Show Answer Correct Answer: C) If. 4. What will be the output of the following code?x = 10x = "Hello" print(x) A) 10. B) 10 Hello. C) Hello. D) Error. Show Answer Correct Answer: C) Hello. 5. Teaching-Learning Process:Which online tool is suggested for visualizing Python code? A) Pythontutor.com. B) Codeacademy.com. C) Coursera.org. D) Edx.org. Show Answer Correct Answer: A) Pythontutor.com. 6. Which method converts a string to lowercase in Python? A) Str.lower(). B) Str.toLower(). C) Str.lowercase(). D) Str.tolower(). Show Answer Correct Answer: A) Str.lower(). 7. What is the correct file extension for Python files? A) .py. B) .pt. C) .pyt. D) .txt. Show Answer Correct Answer: A) .py. 8. Which of Python's collection types is ordered and changeable (elements can be modified)? A) List. B) Float. C) Dictionary. D) Tuple. Show Answer Correct Answer: A) List. 9. Which element type is considered falsy in Python when evaluating tuples? A) Non-empty strings only. B) All numbers and strings. C) Non-zero numbers only. D) 0 and empty collections. Show Answer Correct Answer: D) 0 and empty collections. 10. When you want to print something to the screen you should use A) The keyboard to type it. B) The computer Display. C) A monitor. D) A print statement. Show Answer Correct Answer: D) A print statement. 11. Who conceived Python programming? A) Dennis Ritchie. B) Bjarne Stroustrup. C) James Gosling. D) Guido van Rossum. Show Answer Correct Answer: D) Guido van Rossum. 12. Which of the following will give "Simon" as output?If str1="John, Simon, Aryan" A) Print(str1[-7:-12]). B) Print(str1[-11:-7]). C) Print(str1[-11:-6]). D) Print(str1[-7:-11]). Show Answer Correct Answer: C) Print(str1[-11:-6]). 13. What does the "turtle" represent in the Python Turtle Library? A) An image on the screen. B) An animated character. C) A physical turtle. D) A controllable object on the screen. Show Answer Correct Answer: D) A controllable object on the screen. 14. Which of the following will convert the string '"3.5"' to a float? A) Int("3.5"). B) Str(3.5). C) Float("3.5"). D) Bool("3.5"). Show Answer Correct Answer: C) Float("3.5"). 15. Choose the operators to represent "not equal to" in PYTHON A) <>. B) /=. C) Not=. D) !=. Show Answer Correct Answer: D) !=. 16. What happens if you try to add a string and an integer? A) It prints both. B) It multiplies. C) It gives an error. D) It converts automatically. Show Answer Correct Answer: C) It gives an error. 17. What is the purpose of using quotes in a 'print()' statement? A) To indicate a comment. B) To define a string. C) To perform a calculation. D) To declare a variable. Show Answer Correct Answer: B) To define a string. 18. What happens if you leave out some of the brackets in a Python command? A) The program ignores the missing brackets. B) The program runs normally. C) The program displays a warning. D) The program gives an error message. Show Answer Correct Answer: D) The program gives an error message. 19. What will the output be from the following code?print(3*4+5) A) 27. B) 17. C) 12. D) SyntaxError. Show Answer Correct Answer: B) 17. 20. What does 'if' statement do in Python? A) The 'if' statement always executes regardless of conditions. B) The 'if' statement executes code based on a condition being true. C) The 'if' statement is used to declare variables in Python. D) The 'if' statement defines a function in Python. Show Answer Correct Answer: B) The 'if' statement executes code based on a condition being true. 21. What is the correct way to check if a number is greater than 17 in Python? A) If number < 17:. B) If number > 17:. C) If number >= 17:. D) If number == 17:. Show Answer Correct Answer: B) If number > 17:. 22. What is the output of the following code?name = Steveprint(len(Steve)) A) 5. B) Len(Steve). C) 7. D) (Steve). Show Answer Correct Answer: A) 5. 23. What is the best way to read an entire file into a single string? A) .read(). B) .readline(). C) .readlines(). D) .read(all). Show Answer Correct Answer: A) .read(). 24. ..... spaces should be left for indentation. A) 0. B) 5. C) 4. D) 3. Show Answer Correct Answer: C) 4. 25. Who created the Python programming language and when? A) Mark Zuckerberg in 2004. B) Ada Lovelace in 1843. C) Guido van Rossum in 1991. D) Bill Gates in 1985. Show Answer Correct Answer: C) Guido van Rossum in 1991. ← 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