This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 70 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 70 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What does syntax refer to in programming languages? A) A. B) B. C) All the above. D) None of the above. Show Answer Correct Answer: A) A. 2. What is the importance of syntax in Python programming? A) It has no importance. B) It makes the code run faster. C) It helps in debugging errors. D) It is only for advanced programmers. Show Answer Correct Answer: C) It helps in debugging errors. 3. What is the output of the following Python code?a = 3b = a + 4print(a, b) A) 3 7. B) 4 7. C) 3 4. D) 7 3. Show Answer Correct Answer: A) 3 7. 4. What is the purpose of the turtle.Screen() subprogram? A) It closes the turtle window. B) It sets the size of the turtle window. C) It returns a variable to address the turtle window. D) It changes the turtle mode to "standard". Show Answer Correct Answer: C) It returns a variable to address the turtle window. 5. Evaluate the following expression:"dog" < "Dog" A) True. B) False. C) They are the same word. D) None of the above. Show Answer Correct Answer: B) False. 6. What are variables used for? A) Variables are used to store data values. B) Variables are used to print data values. C) Variables are used to input data values. D) Variables are used to output data values. Show Answer Correct Answer: A) Variables are used to store data values. 7. Python teaches computers to think for themselves. What is this called? A) Python Intelligence (PI). B) Computer Intelligence (CI). C) Anti-Intelligence (AI). D) Artificial Intelligence (AI). Show Answer Correct Answer: D) Artificial Intelligence (AI). 8. What will the following code output? 'print("Hello, World!")' A) Hello, World!. B) "Hello, World!". C) Hello, World. D) Error. Show Answer Correct Answer: A) Hello, World!. 9. Which of these platforms do we use for Python coding exercises? A) Microsoft Word. B) Roblox Studio. C) PyCharm. D) Canva. Show Answer Correct Answer: C) PyCharm. 10. What is the main purpose of the print() function in Python? A) To do math operations. B) To show output on the screen. C) To take user input. D) To open a website. Show Answer Correct Answer: B) To show output on the screen. 11. What type of error is a syntax error in Python? A) Compilation error. B) Logical error. C) Typographical error. D) Runtime error. Show Answer Correct Answer: D) Runtime error. 12. Is Python case sensitive language? A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 13. The Python programming language is named after A) A snake. B) The british comedy group Monty Python. C) A Mountain. D) It's a made-up word. Show Answer Correct Answer: B) The british comedy group Monty Python. 14. Which of these is a Python data type? A) Banana. B) Integer. C) Car. D) Pencil. Show Answer Correct Answer: B) Integer. 15. What does print() do in Python? A) Stores a value inside a variable. B) Joins strings together. C) Changes the type of a variable. D) Displays output on the screen. Show Answer Correct Answer: D) Displays output on the screen. 16. What is the purpose of the if statement in Python? A) To define a function in Python. B) To create a loop that iterates over a list. C) To execute code conditionally based on a boolean expression. D) To import modules and libraries in Python. Show Answer Correct Answer: C) To execute code conditionally based on a boolean expression. 17. Which of the following is the correct way to write a comment in Python? A) // This is a comment. B) # This is a comment. C) /* This is a comment */. D) This is a comment. Show Answer Correct Answer: B) # This is a comment. 18. What does the APPEND procedure do in the following code:teams = [ "Man Utd" , "Man City" , "Arsenal"] teams.append( "Liverpool" ) A) Deletes Liverpool from the list. B) Adds Chelsea to the list. C) Removes Arsenal from the list. D) Adds Liverpool the list. Show Answer Correct Answer: D) Adds Liverpool the list. 19. What will the following code output if the user enters "Harry" ? "'pythonname = input("What is your name? ")print("Hello, '' + name) "' A) Hello,. B) Hello, Harry. C) What is your name? Harry. D) Harry. Show Answer Correct Answer: B) Hello, Harry. 20. How do you activate a virtual environment in Python (Windows)? A) Activate. B) Env. C) Source env/bin/activate. D) . activate. Show Answer Correct Answer: A) Activate. 21. In a flowchart, which shape is used to represent a decision? A) Rectangle. B) Parallelogram. C) Oval. D) Diamond. Show Answer Correct Answer: D) Diamond. 22. In Python, what is the term used to describe the names given to variables, functions, classes, and modules? A) Keywords. B) Literals. C) Expressions. D) Identifiers. Show Answer Correct Answer: D) Identifiers. 23. Why is Python often used in scientific computing? A) Because Python is not suitable for other types of computing. B) Because Python has a large number of libraries that are useful in scientific computing. C) Because Python is the only language that can be used for scientific computing. D) Because Python is a low-level language. Show Answer Correct Answer: B) Because Python has a large number of libraries that are useful in scientific computing. 24. Which of the following is not the category of token? A) KEYWORDS. B) LITERALS. C) OPERATORS. D) CONSTANTS. Show Answer Correct Answer: D) CONSTANTS. 25. When does a SYNTAX error come? A) When you click on something. B) A SYNTAX error comes when your code is wrong. C) When you don't form a sentence. D) All of the above. Show Answer Correct Answer: B) A SYNTAX error comes when your code is wrong. ← 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