This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 35 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 35 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Low-level languages are more efficient that high-level ones. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 2. What will the output be from the following code?print("Hello world!") A) SyntaxError. B) Hello world!. C) "Hello world!". D) Print(Hello world!). Show Answer Correct Answer: B) Hello world!. 3. What will be the output of the following code? 'print("Learning", "Python", "is fun!")' A) LearningPythonis fun!. B) Learning Python is fun!. C) "Learning" "Python" "is fun!". D) LearningPythonisfun!. Show Answer Correct Answer: B) Learning Python is fun!. 4. Which of the following statements about variables is true? A) Variables can only store numbers. B) Variables can store strings, numbers, and other data types. C) Variables must be declared with a type. D) Variables cannot change their value once set. Show Answer Correct Answer: B) Variables can store strings, numbers, and other data types. 5. What is an error in programming? A) A type of statement. B) A type of function. C) A correct output. D) A mistake or problem in the code that prevents it from running correctly. Show Answer Correct Answer: D) A mistake or problem in the code that prevents it from running correctly. 6. What is the primary purpose of a computer program? A) To provide instructions for the computer to execute. B) To store data and information. C) To communicate with other Human. D) None of the above. Show Answer Correct Answer: A) To provide instructions for the computer to execute. 7. Python (TM) is owned and managed by A) Microsoft (c). B) Sun Microsystems (c). C) Python (TM) is open source and free to use. D) Google (c). Show Answer Correct Answer: C) Python (TM) is open source and free to use. 8. Which of the following is NOT a Python data type? A) Complex. B) Char. C) Float. D) Int. Show Answer Correct Answer: B) Char. 9. Which of the following is not correct about Python? A) Python is a compiled language. B) Python is developed by Guido Van Rossum. C) Python is based on ABC language. D) Python is an open source language. Show Answer Correct Answer: A) Python is a compiled language. 10. L = [1, 3, 5, 7, 9]print(L.pop(-3), end = ' ')print(L.remove(L[0]), end = ' ')print(L) A) 5 1 [3, 7, 9]. B) 5 None [1, 3, 7, 9]. C) 5 None [3, 7, 9]. D) None of the above. Show Answer Correct Answer: C) 5 None [3, 7, 9]. 11. Which of these professions might use Python? A) Artist. B) Web Developer. C) Chef. D) Athlete. Show Answer Correct Answer: B) Web Developer. 12. Which is the most appropriate data type for: "13th December" A) Float. B) Boolean. C) Integer. D) String. Show Answer Correct Answer: D) String. 13. What command is used to start drawing a circle? A) Line. B) Square. C) Triangle. D) Circle. Show Answer Correct Answer: D) Circle. 14. Which of the following is a programming language? A) Python. B) HTML. C) English. D) All of the above. Show Answer Correct Answer: A) Python. 15. What keyword is used to exit a loop early? A) Skip. B) Continue. C) Break. D) Exit. Show Answer Correct Answer: C) Break. 16. Which errors are detected by the Python IDLE? A) Runtime errors. B) Semantic errors. C) Syntax errors. D) Logical errors. Show Answer Correct Answer: C) Syntax errors. 17. What will print(len('Python')) output? A) 5. B) 6. C) 7. D) Error. Show Answer Correct Answer: B) 6. 18. Which of these is the correct code for creating a list of names? A) NameList = John, Harry, Jesse, John, Harry, Harry. B) NameList = ("John", "Harry", "Jesse", "John", "Harry", "Harry"). C) NameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]. D) NameList = [John, Harry, Jesse, John, Harry, Harry]. Show Answer Correct Answer: C) NameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]. 19. What is the purpose of importing the randint function from the random module? A) To allow the program to compare two numbers. B) To generate random integers within a specified range. C) To check if a condition is true or false. D) To handle user input more effectively. Show Answer Correct Answer: B) To generate random integers within a specified range. 20. What will the following code do? "'pythontry:print(1 / 0)except ZeroDivisionError:print("Cannot divide by zero") "' A) Print 0. B) Print "Cannot divide by zero". C) Print 1. D) Cause an error. Show Answer Correct Answer: B) Print "Cannot divide by zero". 21. Number1 = 15number2 = 10total = number1 + number2What is total? A) 15. B) 10. C) 25. D) 1510. Show Answer Correct Answer: C) 25. 22. What will the following code output?if not 0:print("True")else:print("False") A) True. B) False. C) None. D) Error. Show Answer Correct Answer: A) True. 23. What is the purpose of the 'return' statement in a function? A) To define the parameters of a function. B) To end the execution of a function immediately. C) To create a loop within a function. D) The purpose of the 'return' statement is to provide a value from a function to its caller. Show Answer Correct Answer: D) The purpose of the 'return' statement is to provide a value from a function to its caller. 24. Smallest element of Python coding is called ..... A) Delimiters. B) Token. C) Identifiers. D) Keywords. Show Answer Correct Answer: B) Token. 25. What does the following code do? "'pythonname = "Sam"print(name) "' A) Prints Sam. B) Prints name. C) Prints "name". D) Prints "Sam". Show Answer Correct Answer: A) Prints Sam. ← 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