This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 63 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 63 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which of the following is a correct while loop in Python? A) While x < 5:. B) While (x < 5). C) While x < 5. D) While x < 5;. Show Answer Correct Answer: A) While x < 5:. 2. Web scraping is used in Data analytics. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 3. What is the output of the expression '5' * 2? A) Error. B) 55. C) 10. D) 5. Show Answer Correct Answer: B) 55. 4. ..... function is an anonymous function in python. A) Recursion. B) Lambda. C) User defined. D) Def. Show Answer Correct Answer: B) Lambda. 5. Which of the following is NOT a data type in Python? A) Integer. B) String. C) Character. D) Float. Show Answer Correct Answer: C) Character. 6. What is one feature that makes Python suitable for AI? A) High execution speed. B) Limited support for data visualization. C) Strictly typed language. D) Rich ecosystem of libraries and frameworks. Show Answer Correct Answer: D) Rich ecosystem of libraries and frameworks. 7. Which statement will display square of number (n)? A) Only First. B) All of the above. C) Print(math.pow(n, 2)) # math module is already imported. D) Print(n * n). Show Answer Correct Answer: B) All of the above. 8. In the line of code below, what does input() do?firstname = input( "What is your name?" ) A) Sets the variable to a random number. B) Asks the user to enter some data and saves this as the variable 'firstname'. C) It just prints a message on the screen. D) None of the above. Show Answer Correct Answer: B) Asks the user to enter some data and saves this as the variable 'firstname'. 9. In Python list indexes start at which number? A) 0. B) 1. C) -1. D) None (no number). Show Answer Correct Answer: A) 0. 10. Which of the following is a reserved word in Python? A) Variable. B) Def. C) Print. D) Function. Show Answer Correct Answer: B) Def. 11. True or False:Indentation in Python is for readability only. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 12. What symbol do we use when we want to add comments to a python program? A) #. B) %. C) **. D) (). Show Answer Correct Answer: A) #. 13. For nums = (4, 7, 4, 9, 4). Which expression gives the position of the first 4? A) Nums.count(4) returns position. B) Nums.index(4) returns position. C) Nums[4] returns position. D) 4 in nums returns position. Show Answer Correct Answer: B) Nums.index(4) returns position. 14. What keeps a record of every version of a file that has been saved to your Google Docs cloud account? A) Version history. B) Recent history. C) All the above. D) None of the above. Show Answer Correct Answer: A) Version history. 15. What is the output of the below code snippet?num1=10num2=7//2num2*=num1print(num2) A) 10. B) 35.0. C) 30. D) 30.0. Show Answer Correct Answer: C) 30. 16. What happens when 'time.sleep()' is executed in a program? A) The program immediately terminates. B) The program outputs the current system time. C) The current process is suspended for the given number of seconds, then resumes at the next line of the program. D) The program runs faster for the given number of seconds. Show Answer Correct Answer: C) The current process is suspended for the given number of seconds, then resumes at the next line of the program. 17. Name numeric data types in Python? A) Integer and float. B) String. C) Array. D) All of the above. Show Answer Correct Answer: A) Integer and float. 18. X, y=5, 6print(x==5 and y==6) A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 19. They expect to see 10, but they see the word score instead. Why? A) Variables cannot be printed. B) Quotes tell Python it is text, not a variable. C) Python always prints variable names first. D) Print() can only print numbers. Show Answer Correct Answer: B) Quotes tell Python it is text, not a variable. 20. What is the output of the following code?print("The answer is", 3 + 2) A) The answer is 5. B) The answer is 6. C) The answer is 32. D) The answer is 3 + 2. Show Answer Correct Answer: A) The answer is 5. 21. Statement below 'function definition' begin with spaces called ..... A) Indentation. B) Condition. C) Definition. D) None of the above. Show Answer Correct Answer: A) Indentation. 22. Which statement is used to stop a loop in Python? A) Stop. B) Break. C) End. D) Exit. Show Answer Correct Answer: B) Break. 23. Is a comment ignored or followed by a program? A) Ignored. B) Executed. C) Displayed. D) Processed. Show Answer Correct Answer: A) Ignored. 24. What is pseudocode? A) A representation of an algorithm in English. B) A graphical programming language. C) A system for representing codes in python. D) A standard mapping of numbers to letters. Show Answer Correct Answer: A) A representation of an algorithm in English. 25. What will print('school'[0]) output? A) S. B) H. C) O. D) L. Show Answer Correct Answer: A) S. ← 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