This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 44 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 44 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which programming language would a professional programmer be most likely to use in their jobs? A) Python. B) Scratch. C) All the above. D) None of the above. Show Answer Correct Answer: A) Python. 2. Which of the following is a method to remove an element from a dictionary in Python? A) Discard(). B) Pop(). C) Remove(). D) Delete(). Show Answer Correct Answer: B) Pop(). 3. Which one is a string in Python? A) "Hello". B) 123. C) Hello. D) 3+4. Show Answer Correct Answer: A) "Hello". 4. What is a logic error? A) An error in the logic of the program. B) An error in the rules of the language. C) An error that causes a program to crash. D) An error in the data type. Show Answer Correct Answer: A) An error in the logic of the program. 5. What is the output of print("Python is fun")? A) Python is fun. B) "Python is fun". C) Print(Python is fun). D) Nothing. Show Answer Correct Answer: A) Python is fun. 6. What is a punctuator? A) Punctuation marks. B) Punctuators help complete a SYNTAX. C) A symbol. D) All of the above. Show Answer Correct Answer: B) Punctuators help complete a SYNTAX. 7. What will this program do?print("Hello world") A) Output Hello world. B) Error. C) Output "Hello world". D) Output print. Show Answer Correct Answer: A) Output Hello world. 8. Who developed the Python language? A) Zim Den. B) Guido van Rossum. C) Niene Stom. D) Wick van Rossum. Show Answer Correct Answer: B) Guido van Rossum. 9. Operators of same precedence are executed from ..... A) Left to right. B) Right to left. C) In any order. D) None of the above. Show Answer Correct Answer: A) Left to right. 10. Which symbol is used for 'not equal to' in Python? A) <>. B) !=. C) =!. D) ><. Show Answer Correct Answer: B) !=. 11. What is the default return type of the input() function? A) Int. B) Str. C) Float. D) Bool. Show Answer Correct Answer: B) Str. 12. How do you correctly name the rules of a programming language? A) Syntax. B) Grammar. C) Code. D) None of these are true. Show Answer Correct Answer: A) Syntax. 13. What is the purpose of 'else' in an 'if-else' statement? A) It checks another condition if the first is True. B) It runs when the 'if' condition is False. C) It repeats the 'if' block twice. D) It ends the program immediately. Show Answer Correct Answer: B) It runs when the 'if' condition is False. 14. Which of these is used to repeat actions? A) Print. B) Loop. C) If. D) While. Show Answer Correct Answer: B) Loop. 15. Which of the following statements will display the temperature in Celsius entered by the user? A) Print("Temperature in Celsius is", input()). B) Print("Temperature in Celsius is '' + input()). C) Print("Temperature in Celsius is '' + str(input())). D) Print("Temperature in Celsius is", int(input())). Show Answer Correct Answer: A) Print("Temperature in Celsius is", input()). 16. In programming, a LIBRARY is a set of important functions and methods that you can access to make your programming easier A) False. B) True. C) All the above. D) None of the above. Show Answer Correct Answer: B) True. 17. In which situation would you prefer recursion over iteration? A) When the problem involves a fixed number of iterations. B) When you need the highest performance possible. C) When the problem is too simple for recursion. D) When the problem can be divided into smaller sub-problems that are similar to the original problem. Show Answer Correct Answer: D) When the problem can be divided into smaller sub-problems that are similar to the original problem. 18. A=1a, b=a+1, a+1print(a, b)a, b=a+2, a+3print(a, b) A) 2 25 4. B) 2 34 5. C) 2 25 5. D) 2 24 5. Show Answer Correct Answer: D) 2 24 5. 19. High and low-level programming languages can be understood by a computer. A) False. B) True. C) All the above. D) None of the above. Show Answer Correct Answer: A) False. 20. A testing environment that users can test code, run programs or files without impacting the system, application, or machine used. A) Interactive mode. B) Script mode. C) Sandbox. D) Interpreter. Show Answer Correct Answer: C) Sandbox. 21. What should you do every time you make a change to your Python program? A) Close the program. B) Save the program. C) Restart the computer. D) Delete the program. Show Answer Correct Answer: B) Save the program. 22. Which of the following is a correct way to take input from a user in Python? A) 'input("Enter your name: ")'. B) 'get input("Enter your name: ")'. C) 'read("Enter your name: ")'. D) 'scan("Enter your name: ")'. Show Answer Correct Answer: A) 'input("Enter your name: ")'. 23. What is the correct extension for python files? A) .py. B) .pyth. C) .python. D) None of the above. Show Answer Correct Answer: A) .py. 24. Which of the following is used to display output in Python? A) Display( ). B) Echo( ). C) Write( ). D) Print( ). Show Answer Correct Answer: D) Print( ). 25. What will be printed by the following code? "'pythonx = 5y = "5"print(x + int(y)) "' A) 10. B) 55. C) 5. D) Error. Show Answer Correct Answer: A) 10. ← 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