This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 61 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 61 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which of the following is a mapping type in Python? A) Dict. B) Tuple. C) List. D) Range. Show Answer Correct Answer: A) Dict. 2. Name the famous Module used for Web Scraping A) Random. B) Beautiful Soup. C) Pyautogui. D) Numpy. Show Answer Correct Answer: B) Beautiful Soup. 3. Write the output of the following:m, n, p = 1, 2, 3; print(m, n, p) A) Error. B) 1, 2, 3. C) 1 2 3. D) Print 1, 2 and 3 vertically. Show Answer Correct Answer: C) 1 2 3. 4. What does the for loop do? A) Asks for user input. B) Checks conditions. C) Repeats code a set number of times. D) Stores information. Show Answer Correct Answer: C) Repeats code a set number of times. 5. What is 3 + 2 in Python? A) 5. B) 6. C) 7. D) 8. Show Answer Correct Answer: A) 5. 6. Which of the following is a sequence type in Python? A) Dict. B) Int. C) List. D) None of the above. Show Answer Correct Answer: C) List. 7. How do you draw a half-circle using the turtle library's 'circle' subprogram? A) By setting the extent to 360. B) By setting the extent to 180. C) By setting the radius to 0. D) By not providing an extent. Show Answer Correct Answer: B) By setting the extent to 180. 8. What is missing from this line of code? pencolor(red) A) Pencolor('red'). B) Pencolor(red). C) Pencolor("red"). D) Pencolor(red, 0). Show Answer Correct Answer: A) Pencolor('red'). 9. Which of these is an integer? A) 5. B) 23.5. C) True/False. D) Lake Butler Middle School. Show Answer Correct Answer: A) 5. 10. What is a string in Python? A) A string in Python is a collection of functions. B) A string in Python is a sequence of characters enclosed in quotes. C) A string in Python is a type of number. D) A string in Python is a variable that holds a list. Show Answer Correct Answer: B) A string in Python is a sequence of characters enclosed in quotes. 11. What is the correct way to create an empty list in Python? A) [ ]. B) List. C) ( ). D) \{ \}. Show Answer Correct Answer: A) [ ]. 12. Who created python language? A) Guido van rossum. B) Goido wan rossum. C) Gallio van rose. D) Guild van rossum. Show Answer Correct Answer: A) Guido van rossum. 13. Which built-in function returns the maximum value in an iterable? A) Max(). B) Maximum(). C) Biggest(). D) High(). Show Answer Correct Answer: A) Max(). 14. How do you import the Pandas library with the alias pd? A) Import pandas as pd. B) Import Pandas as pd. C) Include pandas. D) Import panda. Show Answer Correct Answer: A) Import pandas as pd. 15. What will be the output of the following code?x = 1while x < 5:print(x)x = x + 1 A) 1 2 3 4 5. B) 1 2 3 4. C) 2 3 4 5. D) 0 1 2 3 4. Show Answer Correct Answer: B) 1 2 3 4. 16. What is the default Python IDE that comes with Python installation? A) PyCharm. B) Jupyter Notebook. C) IDLE. D) Eclipse. Show Answer Correct Answer: C) IDLE. 17. Struktur data DataFrame memiliki tiga identitas utama, yaitu ..... A) Kolom, baris, fungsi. B) Indeks, kolom, value. C) Label, nilai, tipe. D) Data, list, tuple. Show Answer Correct Answer: B) Indeks, kolom, value. 18. What does the 'for' loop in iteration constructs do when used with a range function? A) Executes commands for each element of a data structure in two dimensions. B) Executes commands for each element of a data structure in one dimension. C) Executes commands a fixed number of times, based on the numbers generated by the range function. D) Executes commands while a condition is true. Show Answer Correct Answer: C) Executes commands a fixed number of times, based on the numbers generated by the range function. 19. Which of the following variable names is invalid in Python? A) Name. B) Name1. C) Name . D) 1name. Show Answer Correct Answer: D) 1name. 20. Computer program that directly executes instructions written in a programming or scripting language. (i.e. Python IDLE) A) Interactive mode. B) Script mode. C) Sandbox. D) Interpreter. Show Answer Correct Answer: D) Interpreter. 21. What is the variable in the line of code below? firstname = input( "What is your name?" ) A) Firstname. B) Variable. C) Name. D) Input. Show Answer Correct Answer: A) Firstname. 22. High-level languages need to be compiled into machine code before they can be used by a computer. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 23. What is an if statement used for? A) To control the flow of execution in programming. B) To declare variables in programming. C) To create loops in programming. D) To define functions in programming. Show Answer Correct Answer: A) To control the flow of execution in programming. 24. What is self? A) Self represents the instance of the class in the class. B) Binds the Attr and methods. C) A default thing in classes with no use. D) None of the Above. Show Answer Correct Answer: A) Self represents the instance of the class in the class. 25. What will happen if you try to use a reserved keyword as a variable name? A) The code will work fine. B) It will raise a syntax error. C) It will be ignored. D) It will convert the keyword to a string. Show Answer Correct Answer: B) It will raise a syntax error. ← 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