This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 32 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 32 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What is MicroPython optimized for? A) High-level web development. B) Scientific computing. C) Running on microcontrollers. D) Cloud computing. Show Answer Correct Answer: C) Running on microcontrollers. 2. What will be the output of the following code? print(type(3.14)) A) Float. B) Integer. C) String. D) None. Show Answer Correct Answer: A) Float. 3. Expand IDLE A) Internal Development Learning Environment. B) Integrated Development Learning Enforcement. C) Interactive Development Learning Environment. D) Integrated Development Learning Environment. Show Answer Correct Answer: D) Integrated Development Learning Environment. 4. What would happen if your forgot to include a colon at the end of an if statement? A) Codes works. B) Syntax error. C) Logical error. D) Compilation error. Show Answer Correct Answer: B) Syntax error. 5. What is the result of mistyping a command in Python? A) The program gives an error message. B) The program ignores the typo. C) The program displays a warning. D) The program runs faster. Show Answer Correct Answer: A) The program gives an error message. 6. Which of the following is a keyword in Python? A) Function. B) Method. C) Def. D) Define. Show Answer Correct Answer: C) Def. 7. Which of the following statements will correctly check if a number is even? A) If number % 2 == 0:. B) If number / 2 == 0:. C) If number // 2 == 0:. D) If number ** 2 == 0:. Show Answer Correct Answer: A) If number % 2 == 0:. 8. Select the tuple for which all() returns False. A) (0, 'b', 7). B) (1, 2, 3). C) ('a', [1], 9). D) (True, 5, 'x'). Show Answer Correct Answer: A) (0, 'b', 7). 9. What is a literal? A) Littering a country. B) Storage Device. C) Literals are a variety of data we use & store in computer program. D) A person who litters. Show Answer Correct Answer: C) Literals are a variety of data we use & store in computer program. 10. Comment statement in Python is A) /. B) /* */. C) #. D) '. Show Answer Correct Answer: C) #. 11. What will the following Python code output?print(2 + 3 * 4) A) 20. B) 14. C) 24. D) 18. Show Answer Correct Answer: B) 14. 12. An iterative statement is also known as a ..... statement. A) Looping. B) Conditional. C) Selection. D) None of the above. Show Answer Correct Answer: A) Looping. 13. Which one is used for division in Python? A) :. B) . C) /. D) -. Show Answer Correct Answer: C) /. 14. Python is most popular programming language. Based on the Stack Overflow Developer Survey 2021, which rank is Python in? A) 1st. B) 2nd. C) 3rd. D) 4th. Show Answer Correct Answer: C) 3rd. 15. In programming, what is iteration? A) The repetition of steps within a program. B) The order in which instructions are carried out. C) A decision point in a program. D) Testing a program to make sure it works. Show Answer Correct Answer: A) The repetition of steps within a program. 16. In which of the following loop in python, we can check the condition? A) For loop. B) While loop. C) Do while loop. D) None of the above. Show Answer Correct Answer: B) While loop. 17. Which of the following programs will print the 10 most frequently appearing words in a text file? A) A program that counts the frequency of each word and prints the top 10. B) A program that prints all words in alphabetical order. C) A program that prints the first 10 words in the file. D) A program that removes all duplicate words and prints the result. Show Answer Correct Answer: A) A program that counts the frequency of each word and prints the top 10. 18. What is the correct syntax for a for loop in Python to iterate over a list called 'my ..... list'? A) 'for i in my list:'. B) 'for (i in my list):'. C) 'foreach i in my list:'. D) 'for i = 0 to len(my list):'. Show Answer Correct Answer: A) 'for i in my list:'. 19. What is the correct way to ask the user for their name in Python and store it in a variable called 'name'? A) Name = input("What is your name?"). B) Input("What is your name?") = name. C) Name == input("What is your name?"). D) Name.input("What is your name?"). Show Answer Correct Answer: A) Name = input("What is your name?"). 20. To copy a list that contains other lists we can use which method of the copy module A) Clone(). B) Supercopy(). C) Shallowcopy(). D) Deepcopy(). Show Answer Correct Answer: D) Deepcopy(). 21. What data type is represented by the value 3.14? A) Str. B) Int. C) Float. D) Bool. Show Answer Correct Answer: C) Float. 22. What kind of applications can a Python programmer create? A) Websites and games. B) Poems. C) Sculptures. D) Garden designs. Show Answer Correct Answer: A) Websites and games. 23. In the example program, which Python function is used to get numeric input from the user before casting to float? A) Int(). B) Input(). C) Str(). D) Print(). Show Answer Correct Answer: B) Input(). 24. What is the output of the following Python code? name = "Alex" print("Hello", name) A) Hello Alex. B) HelloAlex. C) Hello, Alex. D) Alex Hello. Show Answer Correct Answer: A) Hello Alex. 25. Which of these is a correct string? A) 'Hello'. B) Hello. C) Hello". D) 'Hello. Show Answer Correct Answer: A) 'Hello'. ← 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