This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 50 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 50 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What will be the output of the following code?print("Hello", "World", sep="-") A) Hello World. B) Hello-World. C) HelloWorld. D) Hello, World. Show Answer Correct Answer: B) Hello-World. 2. A = 10b=5b=a+5print(b)What would be printed to the screen in this example? A) 5. B) 10. C) 105. D) 15. Show Answer Correct Answer: D) 15. 3. Which of the following is an example of Python's uses and application? A) Value and Marketing. B) Business and Enterprise. C) Traffic System. D) Online Shopping. Show Answer Correct Answer: B) Business and Enterprise. 4. How do you concatenate two strings in Python? A) Use the '&' operator to combine strings. B) Use the '*' operator to concatenate strings. C) Use the 'concat()' method to join strings. D) Use the '+' operator to concatenate strings. Show Answer Correct Answer: D) Use the '+' operator to concatenate strings. 5. What is NumPy used for? A) Data visualization and plotting. B) Numerical data analysis and scientific computing. C) Web development and design. D) Database management and querying. Show Answer Correct Answer: B) Numerical data analysis and scientific computing. 6. How do you take user input in Python? A) Use the 'input()' function to take user input. B) Use the 'get()' function to take user input. C) Use the 'scan()' function to take user input. D) Use the 'read()' function to take user input. Show Answer Correct Answer: A) Use the 'input()' function to take user input. 7. What are the two types of IDLE mode in Python? A) Interactive mode and Script mode. B) Command line and GUI mode. C) Text mode and Graphical mode. D) Debug mode and Release mode. Show Answer Correct Answer: A) Interactive mode and Script mode. 8. The instructions in an algorithm ..... A) Can be expressed in any language. B) Can be expressed in any language, as long as they are precise. C) Can only be expressed using a programming language. D) Can only be expressed using binary digits. Show Answer Correct Answer: B) Can be expressed in any language, as long as they are precise. 9. What is Flask used for? A) Flask is used for creating mobile applications. B) Flask is a database management tool. C) Flask is a game development framework. D) Flask is used for developing web applications in Python. Show Answer Correct Answer: D) Flask is used for developing web applications in Python. 10. Which approach best handles sorting when duplicates exist in a tuple? A) Use sort on tuple to place duplicates last. B) Reverse tuple and rely on stable ordering. C) Convert to set to remove duplicates before sort. D) Use sorted to return list including duplicates. Show Answer Correct Answer: D) Use sorted to return list including duplicates. 11. What is the word (command) used to display numbers and text on the screen? A) Display. B) Show. C) Print. D) Output. Show Answer Correct Answer: C) Print. 12. What is the purpose of the 'len()' function? A) The 'len()' function calculates the sum of numbers in a list. B) The 'len()' function checks if an object is empty or not. C) The 'len()' function converts an object to a string. D) The 'len()' function returns the number of items in an object. Show Answer Correct Answer: D) The 'len()' function returns the number of items in an object. 13. Which of the following is NOT a way to do math in Python? A) 10 * 2. B) 10 / 2. C) 10-2. D) 10 X 2. E) 10 + 2. Show Answer Correct Answer: D) 10 X 2. 14. What is a lambda function? A) A lambda function is a type of variable used in programming. B) A lambda function is an anonymous function defined using the lambda keyword. C) A lambda function is a built-in function for data manipulation. D) A lambda function is a named function defined with a specific syntax. Show Answer Correct Answer: B) A lambda function is an anonymous function defined using the lambda keyword. 15. Which of the following is necessary before writing a Python program? A) Installation. B) Data Types. C) Loops. D) Functions. Show Answer Correct Answer: A) Installation. 16. Print(a, b)b = 64a = 6When this program is executed, what will be displayed on the screen? A) 64 6. B) 6 64. C) There is an error in the program because variables a and b are not assigned values in the right order. D) There is an error in the program because when line 1 is executed, variables a and b have not been assigned values. Show Answer Correct Answer: D) There is an error in the program because when line 1 is executed, variables a and b have not been assigned values. 17. Which of the following is NOT an application of Python? A) Data analysis. B) Making a splash in water. C) Web development. D) Game programming. Show Answer Correct Answer: B) Making a splash in water. 18. Which function is used to take user input in Python? A) Input(). B) Print(). C) Read(). D) Scan(). Show Answer Correct Answer: A) Input(). 19. Which of the following is a correct way to assign a value to a variable in Python? A) Int x = 5. B) X = 5. C) Declare x = 5. D) Var x = 5. Show Answer Correct Answer: B) X = 5. 20. Which of the following is a valid way to declare a variable in Python? A) Var length = 10. B) Let length = 10. C) Length:= 10. D) Length = 10. Show Answer Correct Answer: D) Length = 10. 21. What is the name of the environment in Python that write you programs and then test them out? A) Window. B) IDLE shell. C) MS Paint. D) Notepad. Show Answer Correct Answer: B) IDLE shell. 22. Which of the following statement will return error when x = 7? A) Print(eval(x)). B) Print(int(x)). C) None of the above. D) Print(x). Show Answer Correct Answer: A) Print(eval(x)). 23. What is the primary purpose of Python in real-world applications? A) Data Analysis. B) Game Development. C) Web Development. D) All of the above. Show Answer Correct Answer: D) All of the above. 24. What does an 'if' statement do in Python? A) Repeats code a set number of times. B) Runs code only when a condition is True. C) Stores text in a variable. D) Draws shapes on the screen. Show Answer Correct Answer: B) Runs code only when a condition is True. 25. Which of the following best describes Python's syntax? A) Complex and verbose. B) Simple and readable. C) Rigid and difficult. D) Obscure and cryptic. Show Answer Correct Answer: B) Simple and readable. ← 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