This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 55 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 55 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which of the following is the correct way to get user input and store it in a variable called 'city'? A) City = input("Enter your city: "). B) City = get("Enter your city: "). C) City = read("Enter your city: "). D) City = scan("Enter your city: "). Show Answer Correct Answer: A) City = input("Enter your city: "). 2. What are sequence commands? A) The order which they are carried out. B) The unorder which they are carried out. C) The order which not they are carried out. D) Not sure. Show Answer Correct Answer: A) The order which they are carried out. 3. What is printed by the following statement?print("P" not in "APCSP") A) True. B) False. C) Error. D) None of the above. Show Answer Correct Answer: B) False. 4. Which of the following is a built-in data type in Python? A) List. B) Array. C) Set. D) Matrix. Show Answer Correct Answer: A) List. 5. Which is most appropriate statement to refer to Dynamic Typing. A) The data type of variable is not fixed at run time. B) The data type of variable is fixed at compile time. C) The data type of variable is fixed at run time. D) The data type of a variable is not known. Show Answer Correct Answer: A) The data type of variable is not fixed at run time. 6. What is Script mode? A) In script mode, You write your code in a text file then save it with a .py extension which stands for "Python" . B) You get a large script in this mode. C) It is where you write a short code. D) All of the above. Show Answer Correct Answer: A) In script mode, You write your code in a text file then save it with a .py extension which stands for "Python" . 7. Which of the following is the correct way to declare a variable called 'height' and assign it the value 1.75 (in metres) in Python? A) Height = 1.75. B) Var height = 1.75. C) Height:1.75. D) Let height = 1.75. Show Answer Correct Answer: A) Height = 1.75. 8. A Python program requires ..... to be executed. A) A computer. B) A program called 'the Python translator'. C) A program called 'the Python interpreter'. D) A program called 'a development environment'. Show Answer Correct Answer: C) A program called 'the Python interpreter'. 9. What is the correct way to start a Python program? A) Start code. B) Run. C) Print('Hello'). D) Begin. Show Answer Correct Answer: C) Print('Hello'). 10. What will:print(10 // 3) show? A) 3.3. B) 3. C) 3.0. D) 3.33. Show Answer Correct Answer: B) 3. 11. This is when you convert a variable value from one type to another. A) Casting. B) Declaring. C) Masting. D) Deciding. Show Answer Correct Answer: A) Casting. 12. What is the purpose of the assignment statement in programming? A) To display messages. B) To translate programming languages. C) To execute instructions. D) To assign values to variables. Show Answer Correct Answer: D) To assign values to variables. 13. How do you access elements in a Pandas Series? A) Using indexing or slicing. B) By using the .get() method. C) Through a for loop iteration. D) By applying a filter function. Show Answer Correct Answer: A) Using indexing or slicing. 14. What will be the output of print(5 + 3 * 2)? A) 13. B) 10. C) 11. D) 16. Show Answer Correct Answer: C) 11. 15. Code repeated / looped until a condition has been met or a set number of times. A) Sequence. B) Selection. C) Iteration. D) Variable. Show Answer Correct Answer: C) Iteration. 16. Is the result of the code:print ("Hello World) A) Hello World. B) "Hello world. C) "Hello World". D) Syntax error. Show Answer Correct Answer: D) Syntax error. 17. What is the output of the following code? "'pythontry:print(10 / 0)except ZeroDivisionError:print("Cannot divide by zero!") "' A) 0. B) Cannot divide by zero!. C) Error. D) 10. Show Answer Correct Answer: B) Cannot divide by zero!. 18. Which statement correctly assigns "Sophie" to the variable name? A) Name = print( "Sophie"). B) Input("Sophie"). C) Name = "Sophie". D) Name = input("Sophie"). Show Answer Correct Answer: C) Name = "Sophie". 19. A ..... function is a process in which a function calls itself directly or indirectly. A) Lambda. B) Recursive. C) User defined. D) Module. Show Answer Correct Answer: B) Recursive. 20. What should you do before running a Python program? A) Restart the computer. B) Delete the program. C) Save the program. D) Close the program. Show Answer Correct Answer: C) Save the program. 21. What will be the output of the following code?my ..... list = [1, 2, 3, 4, 5]print(my ..... list[2:4]) A) [1, 2]. B) [2, 3]. C) [3, 4]. D) [4, 5]. Show Answer Correct Answer: C) [3, 4]. 22. A Microsoft word document is saved with the extension .doc (e.g. My project.doc). What extension is used when saving python programs? A) .pyt. B) .python. C) .py. D) .p. Show Answer Correct Answer: C) .py. 23. What is the purpose of output formatting in Python? A) To control how data is displayed. B) To define functions. C) To change the data type of variables. D) To create loops. Show Answer Correct Answer: A) To control how data is displayed. 24. Which value is a Boolean data type? A) 64. B) "cat". C) True. D) 0.5. Show Answer Correct Answer: C) True. 25. Which operator type is used in the expression var ..... 1 > var ..... 2? A) Addition. B) Greater than. C) Multiplication. D) Exponent. Show Answer Correct Answer: B) Greater than. ← 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