This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 79 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 79 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What function is used to display output in Python? A) Display(). B) Print(). C) Output(). D) Show(). Show Answer Correct Answer: B) Print(). 2. What is the main advantage of using Python over Java? A) More libraries. B) Better for system programming. C) Easier learning curve. D) Faster performance. Show Answer Correct Answer: C) Easier learning curve. 3. How to create a numeric variable age with a value of 10 A) Age = 10. B) Int age = 10. C) Age = "10". D) None of the above. Show Answer Correct Answer: A) Age = 10. 4. What is the output of the following code?x = 5 if x > 2:print("Greater")else:print("Smaller") A) Greater. B) Smaller. C) Error. D) None. Show Answer Correct Answer: A) Greater. 5. What is the purpose of the input() function? A) To read files from the system. B) To execute a command in the terminal. C) To take input from the user. D) To display output to the user. Show Answer Correct Answer: C) To take input from the user. 6. Why are tuples considered immutable? A) Their elements cannot be changed after creation. B) Their size can change dynamically. C) They are faster than lists. D) Their elements can be modified. Show Answer Correct Answer: A) Their elements cannot be changed after creation. 7. Input("Enter the password")Inside the bracket is known as a ..... A) Prompt. B) Promise. C) Printing. D) Press. Show Answer Correct Answer: A) Prompt. 8. What is the output of the below code snippet?tup1=([3, 6], [2, 1])list1=[(8, 9), (7, 0)]list2=tup1[0]list2[1]=5list1[1]=(5, 2)print(tup1, list1) A) ([3, 6], [2, 1]) [(8, 9), (5, 2)]. B) Error. C) ([3, 5], [2, 1]) [(8, 9), (5, 2)]. D) None of the above. Show Answer Correct Answer: C) ([3, 5], [2, 1]) [(8, 9), (5, 2)]. 9. How are letters represented in binary? A) By using a standard mapping of numbers to letters. B) By using a system called unary. C) By using a system called hexadecimal. D) By using a system called octal. Show Answer Correct Answer: A) By using a standard mapping of numbers to letters. 10. Which of the following is a valid way to append an element to a list in Python? A) 'list.append(element)'. B) 'list.add(element)'. C) 'list.insert(element)'. D) 'list.push(element)'. Show Answer Correct Answer: A) 'list.append(element)'. 11. What will be printed after running this FOR loop:for number in range(6):print(number) A) The number 6. B) The numbers 0-5. C) The number 5. D) The numbers 1-6. Show Answer Correct Answer: B) The numbers 0-5. 12. Which of the following is an application of Python? A) Cooking recipes. B) Game development. C) Gardening. D) Playing sports. Show Answer Correct Answer: B) Game development. 13. How to check the datatype? A) Type="". B) Type. C) Type . D) Type(). Show Answer Correct Answer: D) Type(). 14. What can you do with Python? A) Python can only be used for gaming development. B) Python is only suitable for basic scripting tasks. C) Python is a popular programming language for database management. D) Python can be used for web development, data analysis, artificial intelligence, automation, and more. Show Answer Correct Answer: D) Python can be used for web development, data analysis, artificial intelligence, automation, and more. 15. Which symbol is used to separate string and integer data? A) ,. B) :. C) (. D) ". Show Answer Correct Answer: A) ,. 16. Which subprogram in PLS is used to return the length of an object? A) Ord. B) Len. C) Print. D) Range. Show Answer Correct Answer: B) Len. 17. What is the purpose of identifiers in Python? A) To handle exceptions. B) To create loops. C) To name variables and functions. D) To define functions. Show Answer Correct Answer: C) To name variables and functions. 18. For tuple t = (0, False, 3), what is the step at which any(t) returns True? A) At the first element, 0 is truthy. B) It never returns True for this tuple. C) At the third element, 3 is truthy. D) At the second element, False is truthy. Show Answer Correct Answer: C) At the third element, 3 is truthy. 19. # in Python programming refers to A) Comments. B) Importing Library. C) Hash Tag. D) Random Operator. Show Answer Correct Answer: A) Comments. 20. What is a multi-line statement in Python? A) A statement that spans multiple lines. B) A variable that holds multiple values. C) A comment that is longer than one line. D) A function that takes multiple arguments. Show Answer Correct Answer: A) A statement that spans multiple lines. 21. What is the purpose of the tab key in Python programming? A) To save the file. B) To run the program. C) To indent a line. D) To delete a line. Show Answer Correct Answer: C) To indent a line. 22. A variable may be assigned a value of one type, and then later assigned a value of a different type: A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 23. Which of the following is the first step in setting up Python? A) Installing Python. B) Learning syntax. C) Debugging code. D) Writing a program. Show Answer Correct Answer: A) Installing Python. 24. Which data structure does NOT allow duplicate values? A) List. B) Tuple. C) Set. D) String. Show Answer Correct Answer: C) Set. 25. What is the correct way to declare a constant in Python? A) PI = 3.14. B) Const PI = 3.14. C) Let PI = 3.14. D) PI:= 3.14. Show Answer Correct Answer: A) PI = 3.14. ← 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