This quiz works best with JavaScript enabled. Home > Cbse > Class 11 > Science > Computer Science > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 10 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 10 (60 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. To display output on the screen python uses A) PRINT (" "). B) Print(). C) Print ("hello there"). D) Print (). Show Answer Correct Answer: B) Print(). 2. What will be the output of the following code? print(5 == 5) A) None. B) False. C) True. D) Error. Show Answer Correct Answer: C) True. 3. How do you sort data in SQL? A) ARRANGE BY. B) SORT BY. C) ALIGN BY. D) ORDER BY. Show Answer Correct Answer: D) ORDER BY. 4. What will be the result of 343 % 15? A) 11. B) 14. C) 13. D) 12. Show Answer Correct Answer: C) 13. 5. Which of the following symbol is used to write a comment? A) **. B) #. C) //. D) ?. Show Answer Correct Answer: B) #. 6. Which of the following is the correct syntax for importing a module in Python? A) Import . B) #import . C) Import module name. D) None of the mentioned. Show Answer Correct Answer: A) Import . 7. Which of the following will create an empty list? A) List = (). B) List = {}. C) List = "". D) List = []. Show Answer Correct Answer: D) List = []. 8. Which type of robots can be controlled by Python? A) A food processor. B) A hammer. C) A bicycle. D) Basic robots that pick up objects. Show Answer Correct Answer: D) Basic robots that pick up objects. 9. What is a data type in Python? A) A data type in Python is a way to format strings for output. B) A data type in Python is a method for defining classes. C) A data type in Python is a function that performs operations on data. D) A data type in Python is a classification that specifies the type of value a variable can hold. Show Answer Correct Answer: D) A data type in Python is a classification that specifies the type of value a variable can hold. 10. What will be displayed if the user types in "Bob" ? A) Hello, Bob!. B) Bob is not recognized. C) Welcome, user!. D) Your name is Bob. Show Answer Correct Answer: D) Your name is Bob. 11. Fill in the blank:The first program you write in Python is often called the ..... A) Python Introduction. B) Installation. C) Hello World Program. D) Data Types. Show Answer Correct Answer: C) Hello World Program. 12. Which of the following is not used in Python? A) Speak(). B) Input(). C) Len(). D) Print(). Show Answer Correct Answer: A) Speak(). 13. What is the purpose of setting up a Python environment? A) To manage system hardware. B) To write and execute Python code. C) To create a database. D) To design web pages. Show Answer Correct Answer: B) To write and execute Python code. 14. What, if anything, is wrong with the following?x=input("Type your password: ")print("You typed", x) A) Nothing is wrong. B) The input function is not secure. C) The variable x is not defined. D) The password is printed in plain text. Show Answer Correct Answer: A) Nothing is wrong. 15. What is the programming paradigm of Python? A) Functional programming. B) Object Oriented Programming OOP. C) Multi paradigm. D) Procedural programming. Show Answer Correct Answer: C) Multi paradigm. 16. Which of the following tools is used to create virtual environments in Python? A) Pip. B) Anaconda. C) Venv. D) Jupyter. Show Answer Correct Answer: C) Venv. 17. Which of these is an INVALID variable name in Python? A) 2nd place. B) Student name. C) Score. D) FirstName. Show Answer Correct Answer: A) 2nd place. 18. What is the output of the following code? "'pythondef add(a, b):return a + bprint(add(2, 3)) "' A) Error. B) 23. C) A + b. D) 5. Show Answer Correct Answer: D) 5. 19. What will be the output of print(10 // 3)? A) 3. B) 3.0. C) 4. D) 3.33. Show Answer Correct Answer: A) 3. 20. What will print(type(3.5)) output? A) Float. B) Bool. C) Int. D) Str. Show Answer Correct Answer: A) Float. 21. What are the three common data types in Python? A) Function, Class, Module. B) Dictionary, Set, None. C) Boolean, List, Tuple. D) String, Integer, Float. Show Answer Correct Answer: D) String, Integer, Float. 22. In age = 13, what is the identifier? A) 13. B) =. C) Age = 13. D) Age. Show Answer Correct Answer: D) Age. 23. When designating a variable, if more than one word is used, there needs to be a(n) ..... between the words A) Underscore ( ). B) Hyphen (-). C) Hashtag (#). D) Space. Show Answer Correct Answer: A) Underscore ( ). 24. How do you display text? A) Print. B) Input. C) Output. D) Command. Show Answer Correct Answer: B) Input. 25. Read the Python program below:answer = 3 + 13 * 3print("The Answer is", answer)When this program is executed, what will be displayed on the screen? A) The Answer is 42. B) The Answer is answer. C) The Answer is 48. D) The Answer is 3 + 13 * 3. Show Answer Correct Answer: A) The Answer is 42. 26. Name a popular library used for data analysis in Python. A) NumPy. B) Scikit-learn. C) Matplotlib. D) Pandas. Show Answer Correct Answer: D) Pandas. 27. What does symbol % do? A) Percentage. B) Remainder. C) Integer exact division. D) Division. Show Answer Correct Answer: B) Remainder. 28. Which of the following is the correct way to get input from a user in Python? A) Scan("Please enter your name: "). B) Input("Please enter your name: "). C) Get("Please enter your name: "). D) Read("Please enter your name: "). Show Answer Correct Answer: B) Input("Please enter your name: "). 29. To check if a list contains an item we can use which keyword? A) Out. B) Not in. C) Del. D) In. Show Answer Correct Answer: D) In. 30. What is the output of bool([])? A) True. B) False. C) None. D) Error. Show Answer Correct Answer: B) False. 31. What will print(5 == 5) output? A) False. B) 5. C) True. D) Error. Show Answer Correct Answer: C) True. 32. Which is a correct variable name? A) My-name. B) 1name. C) Print. D) My name. Show Answer Correct Answer: D) My name. 33. A Relational operator is also called as ..... A) Logical operator. B) Arithmetic operator. C) Comparative operator. D) Assignment operator. Show Answer Correct Answer: C) Comparative operator. 34. Which PLS data type represents a sequence of items with the same data type? A) Record. B) Array. C) Character. D) String. Show Answer Correct Answer: B) Array. 35. What will be the output of the following code?x = 10; if x < 5:print("Small"); else:print("Large") A) Small. B) 10. C) 5. D) Large. Show Answer Correct Answer: D) Large. 36. If the condition in a loop is false in the first step itself, you get ..... A) No output. B) Infinite. C) Error. D) None of the above. Show Answer Correct Answer: A) No output. 37. What is the purpose of the 'head()' method in a DataFrame? A) To summarize the DataFrame's statistics. B) To display the first n rows of the DataFrame. C) To filter the DataFrame based on a condition. D) To display the last n rows of the DataFrame. Show Answer Correct Answer: B) To display the first n rows of the DataFrame. 38. What will be the result of:Print("Hello Earth!")? A) "Hello Earth!". B) Syntax Error. C) No result. D) Hello Earth!. Show Answer Correct Answer: B) Syntax Error. 39. What is a data type? A) The data a user enters from a keyboard. B) The type of the data. C) The classification of data items. D) None of the above. Show Answer Correct Answer: C) The classification of data items. 40. To store a value in a Python program we can use a(n) A) Box. B) Drawer. C) Expression. D) Variable. Show Answer Correct Answer: D) Variable. 41. How do we communicate with computers in programming? A) By speaking to them. B) By giving them instructions using a programming language. C) By drawing pictures. D) By pressing random keys on the keyboard. Show Answer Correct Answer: B) By giving them instructions using a programming language. 42. What is an operator? A) Mathematical symbols. B) A type of variable. C) A programming error. D) None of the above. Show Answer Correct Answer: A) Mathematical symbols. 43. Which of these is the best description of a list in Python? A) A list is a collection of data that has an order and can be changed. B) A list is a lot of variables. C) A list is used for shopping. D) A list is a collection of data that cannot hold duplicated data and cannot be changed. Show Answer Correct Answer: A) A list is a collection of data that has an order and can be changed. 44. Return statement is mandatory in function definition (T/F) A) Depends on the function. B) False. C) Not applicable. D) True. Show Answer Correct Answer: B) False. 45. What will type(3.14) return? A) Float. B) Decimal. C) Int. D) Double. Show Answer Correct Answer: A) Float. 46. What is a syntax error? A) An error that causes a program to crash. B) An error in the data type. C) An error in the rules of the language. D) An error in the logic of the program. Show Answer Correct Answer: C) An error in the rules of the language. 47. What is the output of the following code? "'pythonprint([2, 4, 6] + [8, 10]) "' A) [2, 4, 6, 8, 10]. B) [2, 4, 6][8, 10]. C) [2, 4, 6, 10, 8]. D) [2, 4, 6, [8, 10]]. Show Answer Correct Answer: A) [2, 4, 6, 8, 10]. 48. Which chapters from Textbook 1 are covered in Module-1? A) Chapters 9-10. B) Chapters 4-5. C) Chapters 1-3. D) Chapters 6-8. Show Answer Correct Answer: C) Chapters 1-3. 49. What is the command to read a CSV file into a DataFrame? A) Pd.open csv('file path'). B) Pd.load csv('file path'). C) Pd.import csv('file path'). D) Pd.read csv('file path'). Show Answer Correct Answer: D) Pd.read csv('file path'). 50. To remove an item from a list we can use which keyword? A) Clear. B) Break. C) Del. D) Esc. Show Answer Correct Answer: C) Del. 51. What is the result of the following expression in Python:$5 + 3 * 2$ A) 21. B) 13. C) 16. D) 11. Show Answer Correct Answer: D) 11. 52. Why is Python considered easy to learn? A) Python is primarily used for low-level programming tasks. B) Python is difficult to read and understand for beginners. C) Python is considered easy to learn due to its simple syntax and readability. D) Python has a complex syntax that requires extensive training. Show Answer Correct Answer: C) Python is considered easy to learn due to its simple syntax and readability. 53. Which of the following will print the text Python Programming on the same line? A) Print("Python", "Programming"). B) Print("Python"); print("Programming"). C) Print("Python Programming"). D) Print("Python", end=" ") print("Programming"). Show Answer Correct Answer: C) Print("Python Programming"). 54. What is the purpose of saving your Python program? A) To open it up and do more work on it later. B) To restart the computer. C) To close the program. D) To delete the program. Show Answer Correct Answer: A) To open it up and do more work on it later. 55. Choose the keyword from the following A) IF. B) Else. C) IF. D) Else. Show Answer Correct Answer: B) Else. 56. Is Python free software? A) No. B) True. C) False. D) Maybe. Show Answer Correct Answer: D) Maybe. 57. Which of the following is a mutable data type in Python? A) String. B) Integer. C) List. D) Tuple. Show Answer Correct Answer: C) List. 58. What does 'if ..... name ..... == " ..... main ..... ":' do? A) It allows code to run in any imported module. B) It allows code to run only when the script is executed directly, not when imported. C) It makes the script run in a different namespace. D) It prevents the script from executing any code at all. Show Answer Correct Answer: B) It allows code to run only when the script is executed directly, not when imported. 59. Which function is used to display output in Python? A) Display(). B) Output(). C) Show(). D) Print(). Show Answer Correct Answer: D) Print(). 60. Which of the following is TRUE about Python? A) Python does not support object-orientated programming techniques. B) Python is a low-level language. C) Python is a compiled language. D) Python is an open-source programming language. Show Answer Correct Answer: D) Python is an open-source programming language. ← PreviousNext →Related QuizzesScience QuizzesClass 11 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 8 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books