This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 3 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 3 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which of the following is a feature of Python's cross-platform compatibility? A) Python can only run on Windows operating systems. B) Python can run on multiple operating systems such as Windows, macOS, and Linux. C) Python is limited to Linux-based systems. D) Python can run only on mobile platforms. Show Answer Correct Answer: B) Python can run on multiple operating systems such as Windows, macOS, and Linux. 2. KEYWORDS ARE ALSO CALLED ..... A) RESERVED WORDS. B) VARIABLES. C) FOR STATEMENTS. D) None of the above. Show Answer Correct Answer: A) RESERVED WORDS. 3. What does term 'debug' mean: A) Looking at the code. B) A set of instructions. C) Identify errors and fix them. D) Making a calculation. Show Answer Correct Answer: C) Identify errors and fix them. 4. An escape sequence is represented by ..... slash followed by one or two characters. A) Double. B) Forward. C) Back. D) None of the above. Show Answer Correct Answer: C) Back. 5. Which line is correct? A) From turtle import *. B) From Turtle import *. C) From turtle inport *. D) Form turtle import *. Show Answer Correct Answer: A) From turtle import *. 6. How do you write a single-line comment in Python? A) //. B) #. C) /*. D) . Show Answer Correct Answer: B) #. 7. Which of the following combinations accurately matches mathematicalsymbols with their respective operations? A) + for addition, -for subtraction. B) * for exponentiation, / for modulus. C) % for multiplication, ** for division. D) ** for multiplication, % for subtraction. Show Answer Correct Answer: A) + for addition, -for subtraction. 8. Which of the following is a valid way to assign the value 5 to a variable named 'length' in Python? A) Length:= 5. B) Length = 5. C) 5 = length. D) Let length = 5. Show Answer Correct Answer: B) Length = 5. 9. What can you create using Python? A) A painting. B) A website. C) A song. D) A car. Show Answer Correct Answer: B) A website. 10. How do you create a variable with the numeric value 5? A) X=5. B) X=int(5). C) Both are correct. D) None of the above. Show Answer Correct Answer: C) Both are correct. 11. Python is an interpreted language.When the code is run. What happens? A) Read line of code one at time. B) Read line of code twice at time. C) Read line of code three at time. D) Not sure. Show Answer Correct Answer: A) Read line of code one at time. 12. Which of the following is a valid variable name in Python? A) 1st variable. B) FirstVariable. C) First-variable. D) First variable. Show Answer Correct Answer: B) FirstVariable. 13. What is the purpose of using 'try' and 'except' in Python? A) To handle exceptions. B) To create errors. C) To ignore errors. D) To stop the program. Show Answer Correct Answer: A) To handle exceptions. 14. Def maximum(x, y):if x > y:return xelif x == y:return 'The numbers are equal'else:return y print(maximum(2, 3)) A) 2. B) 3. C) Numbers are equal. D) None. Show Answer Correct Answer: B) 3. 15. How do you check if a number is greater than 10 in Python? A) Use 'if number < 10:' to check if a number is greater than 10. B) Use 'if number > 10:' to check if a number is greater than 10. C) Use 'if number == 10:' to determine if a number is greater than 10. D) Check with 'while number > 10:' for greater than 10. Show Answer Correct Answer: B) Use 'if number > 10:' to check if a number is greater than 10. 16. Which of the following data structures in Python are mutable (can be modified later after being created)?List, Dictionary, Tuple A) Only List. B) Tuple and Dictionary. C) List and Tuple. D) List and Dictionary. Show Answer Correct Answer: D) List and Dictionary. 17. Insert the missing part of the code below to output ..... "My name is ". A) Print. B) PRINT. C) Print. D) None of the above. Show Answer Correct Answer: A) Print. 18. How do you check if a DataFrame contains any missing values? A) Using the isnull() method. B) Using the isna() method. C) Using the dropna() method. D) Using the fillna() method. Show Answer Correct Answer: A) Using the isnull() method. 19. What is the purpose of a function in programming? A) To confuse programmers. B) To perform a specific task. C) To hide errors. D) To slow down program execution. Show Answer Correct Answer: B) To perform a specific task. 20. What is the purpose of the 'print' command in Python? A) To run the program. B) To save the program. C) To display text on the screen. D) To print documents. Show Answer Correct Answer: C) To display text on the screen. 21. What is the purpose of creating a folder to save files in Python? A) To delete unnecessary files. B) To organize and store files. C) To increase computer speed. D) To create a backup of files. Show Answer Correct Answer: B) To organize and store files. 22. Which Python statement can be used to catch an Error? A) While. B) Global. C) Try except. D) Return. Show Answer Correct Answer: C) Try except. 23. Python is case sensitive (T/F) A) False. B) True. C) Not applicable. D) Depends on the context. Show Answer Correct Answer: B) True. 24. Which character is used in Python to make a single line comment? A) /. B) //. C) #. D) !. Show Answer Correct Answer: C) #. 25. What does the following Python code do?if user == "Elizabeth":print("Good morning Your Majesty")else:print("Hello", user) A) Checks if the user is Elizabeth and prints a personalized greeting. B) Prints "Hello" followed by the user's name for all inputs. C) Compares if two variables are equal. D) Always prints "Good morning Your Majesty.". Show Answer Correct Answer: A) Checks if the user is Elizabeth and prints a personalized greeting. ← 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 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 10Class 11 Computer Science Chapter 2 Introduction To Python Quiz 11 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books