This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 18 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 18 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What is the output of this code? print("Hello", "World") A) HelloWorld. B) Hello World. C) "Hello", "World". D) None of the above. Show Answer Correct Answer: B) Hello World. 2. What is the big question in computer science? A) How do you eat an elephant?. B) How do you make and run a computer program in Python?. C) What are the main strands of computer science?. D) What skills does the computer science curriculum provide?. Show Answer Correct Answer: A) How do you eat an elephant?. 3. Python has a simple syntax similar to the A) Coding language. B) English language. C) Spanish language. D) None of the above. Show Answer Correct Answer: B) English language. 4. Comments help the programmer make ..... within the program without affecting the code. A) Notes. B) Changes. C) Revisions. D) A mess. Show Answer Correct Answer: A) Notes. 5. Which common error occurs when you forget a colon (:) after an if statement, for loop, or function definition? A) ValueError. B) NameError. C) SyntaxError. D) TypeError. Show Answer Correct Answer: C) SyntaxError. 6. What will be the output of the following code? "'pythonfruits = ['apple', 'banana', 'cherry']print(fruits[-1]) "' A) 'apple'. B) 'banana'. C) 'cherry'. D) 'Error'. Show Answer Correct Answer: C) 'cherry'. 7. The instructions in a program, when expressed in Python, ..... A) Can only be carried out by humans, as long as they understand Python. B) Can only be carried out by computers. C) Can be carried out by computers, as long as an interpreter is available. D) Can be carried out by humans, as long as they understand Python, and computers, as long as an interpreter is available. Show Answer Correct Answer: D) Can be carried out by humans, as long as they understand Python, and computers, as long as an interpreter is available. 8. What does the return statement without any arguments return? A) 0. B) False. C) None. D) Error. Show Answer Correct Answer: C) None. 9. What are the three main programming structures? A) Sequence, selection, iteration. B) Structured, object-oriented, procedural. C) Java, Python, Visual Basic. D) Machine, assembly, high-level. Show Answer Correct Answer: A) Sequence, selection, iteration. 10. Explain the concept of tuple assignment in Python with an example. A) A, b = [1, 2] results in a = 1 and b = 2. B) A, b = (1, 2, 3) results in a = 1 and b = 2. C) A, b = 1, 2 results in a = 1 and b = 2. D) Example:a, b = (1, 2) results in a = 1 and b = 2. Show Answer Correct Answer: D) Example:a, b = (1, 2) results in a = 1 and b = 2. 11. Complete the code:x= ..... (input("The first integer") A) Int. B) Bool. C) Float. D) Integer. Show Answer Correct Answer: A) Int. 12. In age = 13, what is the value? A) Age. B) =. C) 13. D) Print. Show Answer Correct Answer: C) 13. 13. What is the official form for the for loop in Python? A) For in:. B) For in:. C) For:. D) For:. Show Answer Correct Answer: A) For in:. 14. What's the value of the below code snippet?a, b, c = 1, 2, 3a, b, c = c, a, b = b, a, c = c, b, aprint(a, b, c) A) 1 2 3. B) 2 3 1. C) 3 2 1. D) 1 3 2. Show Answer Correct Answer: B) 2 3 1. 15. In what year was Python released? A) 1995. B) 1991. C) 1989. D) 2000. Show Answer Correct Answer: B) 1991. 16. What is the output of the following code? "'pythonprint("Hello World"[6:11]) "' A) World. B) Hello. C) O Wor. D) Worl. Show Answer Correct Answer: D) Worl. 17. You have animals = ("cat", "dog", "cat", "bird", "cat"). What is animals.count("cat")? A) 4 because index starts at one. B) 3 because appears three times. C) 1 because unique values counted. D) 2 because pairs are combined. Show Answer Correct Answer: B) 3 because appears three times. 18. Every flowchart has ..... A) Has words. B) Start and End. C) Numbers. D) Nothing. Show Answer Correct Answer: B) Start and End. 19. What will be the output of the following code?x, y, z = 1, 2, 3print (x + y + z) A) 123. B) 1, 2, 3. C) 6. D) Error. Show Answer Correct Answer: C) 6. 20. How do you import the Turtle module in Python? A) From turtle import *. B) Import turtle module. C) Import turtle. D) Require turtle. Show Answer Correct Answer: C) Import turtle. 21. Which arithmetic operator is used for exponentiation? A) *. B) **. C) +. D) //. Show Answer Correct Answer: B) **. 22. What is the output of the following code when coin is 0?from random import randintcoin = randint(0, 1)if coin == 0:result = "heads" print(result)else:result = "tails" A) "heads". B) "tails". C) "Either heads or nothing". D) "Either heads or tails". Show Answer Correct Answer: A) "heads". 23. What kind of statements does Python use in its code lines? A) Machine language statements. B) English-like statements. C) Binary code statements. D) Symbolic statements. Show Answer Correct Answer: B) English-like statements. 24. If you want more than one option for your code, what do you use (after if)? A) Elif. B) Else. C) Ifif. D) None of the above. Show Answer Correct Answer: A) Elif. 25. Which of the following statements is true about Python? A) Python is a paid programming language. B) Python is a low-level programming language. C) Python uses English-like statements that are easy to understand. D) Python cannot be used for communication with computers. Show Answer Correct Answer: C) Python uses English-like statements that are easy to understand. ← 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