This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 2 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 2 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. If the PRINT function is correct it appears as ..... A) Purple. B) Purple and lowercase. C) Lowercase only. D) Purple and uppercase. Show Answer Correct Answer: B) Purple and lowercase. 2. The terms used to refer to variable's address in the memory and value to which a variable is bound A) Lvalue and rvalue respectively. B) Rvalue and lvalue respectively. C) Lvalues. D) Rvalues. Show Answer Correct Answer: A) Lvalue and rvalue respectively. 3. What is debugging in programming? A) Writing new code. B) The process of finding and fixing errors in code. C) Creating complex algorithms. D) Running the code without errors. Show Answer Correct Answer: B) The process of finding and fixing errors in code. 4. Language translator convert ..... code to ..... code. A) Machine, Source. B) Source, Object. C) None of the above. D) Object, Source. Show Answer Correct Answer: B) Source, Object. 5. Which of the following is a key feature of PyCharm for Python? A) Smart code completion & analysis. B) Basic text editing tools. C) Limited debugging capabilities. D) No support for version control. Show Answer Correct Answer: A) Smart code completion & analysis. 6. Which file extension is used for Python files? A) .java. B) .py. C) .cpp. D) .pyt. Show Answer Correct Answer: B) .py. 7. What does the = operator do in Python? A) Compares two values. B) Assigns a value to a variable. C) Checks for equality. D) Divides two numbers. Show Answer Correct Answer: B) Assigns a value to a variable. 8. Can we use reserved names as variable name A) True. B) False. C) I don't know. D) None of the above. Show Answer Correct Answer: B) False. 9. What is the output of:print(2 + 3)? A) 23. B) 5. C) 6. D) 2+3. Show Answer Correct Answer: B) 5. 10. Which field uses Python to analyze large sets of data? A) Gardening. B) Data analysis. C) Painting. D) Teaching yoga. Show Answer Correct Answer: B) Data analysis. 11. What will this code print?x = 2y = 3print(x ** y) A) 6. B) 8. C) 9. D) 5. Show Answer Correct Answer: B) 8. 12. Koji je izlaz za print('Hej' + ' Svijete')? A) Hej, Svijete. B) HejSvijete. C) Hej Svijete. D) Hej Svijete!. Show Answer Correct Answer: C) Hej Svijete. 13. What is the correct way to define a string in Python? A) Name = 'Abhishek'. B) Name = Abhishek. C) Name = ""Abhishek"". D) None of the above. Show Answer Correct Answer: A) Name = 'Abhishek'. 14. The correct way to write a variable in Python? A) My variable = 10. B) My variable = 10. C) My variable is 10. D) My variable:10. Show Answer Correct Answer: A) My variable = 10. 15. According to Guido van Rossum's goals for Python in 1999, what did he envision for the language? A) To be exclusive for Unix/C hackers. B) To be a descendant of ABC. C) To be an easy and intuitive language just as powerful as major competitors. D) To have a closed-source development model. Show Answer Correct Answer: C) To be an easy and intuitive language just as powerful as major competitors. 16. Which of the following is a correctly-formatted comment? A) &comment. B) "" Comment" ". C) !comment. D) #comment. Show Answer Correct Answer: D) #comment. 17. What will be the output of the following code?def add(a, b):return a + bprint(add(2, 3)) A) 23. B) 5. C) Error. D) None. Show Answer Correct Answer: B) 5. 18. Which of these is a Boolean value? A) True. B) True. C) 'boolean'. D) 12. Show Answer Correct Answer: A) True. 19. Which statement is used to exit a loop in Python? A) Break. B) Continue. C) Exit. D) Stop. Show Answer Correct Answer: A) Break. 20. What does 'input()' do? A) Gives output. B) Takes data from user. C) Prints data. D) Loops forever. Show Answer Correct Answer: B) Takes data from user. 21. Which line correctly creates the variable shown in the slides? A) Place of birth == "London". B) Place of birth = "London". C) Place of birth = London. D) "place of birth" = "London". Show Answer Correct Answer: B) Place of birth = "London". 22. Which loop is used when the number of iterations is known? A) Repeat-until. B) For. C) While. D) Do-while. Show Answer Correct Answer: B) For. 23. Which logical operator is used to check if two values are not equal in programming? A) ==. B) >=. C) !=. D) <. Show Answer Correct Answer: C) !=. 24. What is the output of the following code? "'pythonprint("5" + "3") "' A) 8. B) 53. C) 5 3. D) Error. Show Answer Correct Answer: B) 53. 25. What is a function in Python? A) A function in Python is a variable that stores data. B) A function in Python is a built-in library for data analysis. C) A function in Python is a type of loop that iterates over a sequence. D) A function in Python is a defined block of code that performs a specific task and can take inputs and return outputs. Show Answer Correct Answer: D) A function in Python is a defined block of code that performs a specific task and can take inputs and return outputs. ← PreviousNext →Related QuizzesClass 11 Computer Science Chapter 2 Introduction To Python Quiz 1Class 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 10Class 11 Computer Science Chapter 2 Introduction To Python Quiz 11 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books