This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 21 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 21 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. In Python single line comment starts with ..... A) %. B) /*. C) !. D) #. Show Answer Correct Answer: D) #. 2. What happens if you try to add a row with a duplicate index in a DataFrame? A) The existing row with that index will be updated. B) An error will be thrown and the row will not be added. C) The duplicate index will be ignored and a new row will be created. D) The DataFrame will automatically rename the duplicate index. Show Answer Correct Answer: A) The existing row with that index will be updated. 3. Which of the following is an interpreted language? A) C. B) C++. C) Python. D) Fortran. Show Answer Correct Answer: C) Python. 4. What is the purpose of Jython in integrating with Java? A) Jython is designed for low-level programming. B) Jython can communicate with existing Java infrastructure more effectively. C) Jython is a replacement for CPython in Java environments. D) Jython is used for developing microcontroller applications. Show Answer Correct Answer: B) Jython can communicate with existing Java infrastructure more effectively. 5. Which of the following is a valid way to import a module in Python? A) Import module name. B) Include module name. C) Require module name. D) Using module name. Show Answer Correct Answer: A) Import module name. 6. Age = '5'In the code above, age is a A) String. B) Integer. C) Floating point. D) None of the above. Show Answer Correct Answer: A) String. 7. X, y=5, 6print(x==5) A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 8. What will print('Hello') show on the screen? A) Hello. B) 'Hello'. C) Hello. D) Nothing. Show Answer Correct Answer: A) Hello. 9. What is the result of the 'not' operator in programming? A) It checks if both sides of the test are true. B) It checks if either side of the test is true. C) It inverts the result of the test. D) It divides one value by another. Show Answer Correct Answer: C) It inverts the result of the test. 10. In python do you have to declare the variable first? A) Yes. B) Do not have to declare the variable. C) Maybe. D) Nothing. Show Answer Correct Answer: B) Do not have to declare the variable. 11. Output of print(2 * 3 ** 2) is A) 64. B) 18. C) Error. D) 16. Show Answer Correct Answer: B) 18. 12. Which of the following is a sequence data type? A) Float. B) String. C) Integer. D) Dictionary. Show Answer Correct Answer: B) String. 13. Which data type is used to store:"D" A) Character. B) String. C) Integer. D) Double. Show Answer Correct Answer: A) Character. 14. What are binary digits called? A) Bytes. B) Bits. C) Transistors. D) Switches. Show Answer Correct Answer: B) Bits. 15. What is the significance of the 'index' parameter in the read ..... csv() function? A) It specifies whether to use the first row as the header. B) It determines the number of rows to read from the file. C) It sets the delimiter used in the CSV file. D) It indicates the data type of the columns. Show Answer Correct Answer: A) It specifies whether to use the first row as the header. 16. Output is A) The information that the user passes to the computer. B) The information that is displayed on the screen. C) The information that is stored in the computer. D) None of the above. Show Answer Correct Answer: B) The information that is displayed on the screen. 17. What is the result of the following code? "'pythoncount = 0while count < 3:print(count) count += 1 "' A) '0 1 2'. B) '1 2 3'. C) '0 1 2 3'. D) '0 1 2 3 4'. Show Answer Correct Answer: A) '0 1 2'. 18. How are elements accessed in a list? A) Using keys. B) Using index. C) Using values. D) Using functions. Show Answer Correct Answer: B) Using index. 19. What will be the output of the following code:print(10 > 5 and 5 < 3)? A) False. B) True. C) 10. D) 5 > 3. Show Answer Correct Answer: A) False. 20. Given the code score = 7 and print("Your score is '' + score), which option fixes the code without using concatenation, but still prints neatly? A) Print("Your score is" + score). B) Print(score + "Your score is"). C) Print("Your score is", score). D) Print("score", "Your score is"). Show Answer Correct Answer: C) Print("Your score is", score). 21. What does a variable do? A) Makes decisions. B) Holds information. C) Repeats actions. D) Draws pictures. Show Answer Correct Answer: B) Holds information. 22. Sophia is learning Python and wants to know which of the following is a loop structure in Python? A) For loop and while loop. B) Repeat until loop. C) Do while loop. D) Foreach loop. Show Answer Correct Answer: A) For loop and while loop. 23. A ..... is a collection of Python modules. A) List. B) Super module. C) Library. D) None of the mentioned. Show Answer Correct Answer: C) Library. 24. Which of the following is used to get input from the user in Python? A) Print(). B) Input(). C) Read(). D) Scan(). Show Answer Correct Answer: B) Input(). 25. What is the data type of the value 'True' in Python? A) Int. B) Str. C) Bool. D) Float. Show Answer Correct Answer: C) Bool. ← 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