This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 53 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 53 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. "and, or and not" are ..... A) Arithmetic operator. B) Logical operators. C) Assignment operator. D) Comparative operator. Show Answer Correct Answer: B) Logical operators. 2. Extension file in python is A) .python. B) .py. C) .pyt. D) .ppyt. Show Answer Correct Answer: B) .py. 3. What data type is used to represent text in Python? A) String. B) Text. C) Char. D) Str. Show Answer Correct Answer: D) Str. 4. Which of these is a valid variable name? A) 2name. B) Name 1. C) Name@3. D) Name-2. Show Answer Correct Answer: B) Name 1. 5. What method in Python is used to add an element to the end of a list? A) Extend( ). B) Append( ). C) Insert( ). D) Push( ). Show Answer Correct Answer: B) Append( ). 6. Write the output of the following code:x=2; x=5; x=x+x; print(x) A) 4. B) Error. C) 10. D) 7. Show Answer Correct Answer: C) 10. 7. Why is it important for students like Sebastian, Anaya, and Ella to learn computer science in school? A) To give them important skills for the future. B) To prepare them for GCSE and A level computer science. C) To teach them about algorithms and programming. D) To provide a solid foundation of knowledge. Show Answer Correct Answer: A) To give them important skills for the future. 8. Which of the following tasks should a program perform based on the given requirements? (a) Generate a Fibonacci sequence of length N. (b) Calculate factorial and binomial coefficient using N and R. A) Generate a Fibonacci sequence of length N and calculate factorial and binomial coefficient using N and R. B) Sort an array and find its median. C) Calculate the sum and average of N numbers. D) Generate random numbers and display their squares. Show Answer Correct Answer: A) Generate a Fibonacci sequence of length N and calculate factorial and binomial coefficient using N and R. 9. What does print('a' in 'cat') output? A) True. B) False. C) Error. D) 'a'. Show Answer Correct Answer: A) True. 10. What is the output of the following code? print( 100/5) A) 25. B) 15. C) 20. D) 22. Show Answer Correct Answer: C) 20. 11. What is the name of the Python environment that allows you to write your program and then test them out? A) Shell. B) Window. C) IDLE. D) CLI. Show Answer Correct Answer: C) IDLE. 12. In a flowchart, parallelogram is used to represent ..... A) Start and end point. B) Process. C) Input and output. D) Decision. Show Answer Correct Answer: C) Input and output. 13. What is the output of the following code?x = 3while x > 0:x-= 1print(x) A) 3, 2, 1. B) 2, 1, 0. C) 1, 0. D) 2, 1. Show Answer Correct Answer: B) 2, 1, 0. 14. Which of the following is a valid Python data type? A) Integer. B) Int. C) Number. D) Digit. Show Answer Correct Answer: B) Int. 15. What is the output of print('Age:', age) if age = 25? A) Age:25. B) Age:. C) 25. D) None of the above. Show Answer Correct Answer: A) Age:25. 16. Which one of these is floor division? A) //. B) /. C) %. D) None of the above. Show Answer Correct Answer: A) //. 17. How do you print "Hello, World!" in Python? A) Show("Hello, World!"). B) Display("Hello, World!"). C) Print("Hello, World!"). D) Text("Hello, World!"). Show Answer Correct Answer: C) Print("Hello, World!"). 18. What is the result of the following expression:$4 * (2 + 3)$ A) 20. B) 14. C) 12. D) 9. Show Answer Correct Answer: A) 20. 19. Python is known as ..... A) IDLE. B) Integrated Development Environment. C) Office. D) Excel. Show Answer Correct Answer: B) Integrated Development Environment. 20. How do you create a variable with the floating number 2.8? A) X=1.2. B) X=float(1.2). C) Both r correct. D) None of the above. Show Answer Correct Answer: C) Both r correct. 21. What is the role of a Python interpreter? A) To translate and execute Python programs. B) To display messages. C) To assign values to variables. D) To receive keyboard input. Show Answer Correct Answer: A) To translate and execute Python programs. 22. What will the following code output if the user inputs "Alice" ? 'name = input("Enter your name: ")' 'print("Hello '' + name)' A) Hello Alice. B) Hello "Alice". C) Hello name. D) Error. Show Answer Correct Answer: A) Hello Alice. 23. Which of the following correctly accesses value 85 from a dictionary d = \{"marks":85\}? A) D[0]. B) D["marks"]. C) D(marks). D) D\{marks\}. Show Answer Correct Answer: B) D["marks"]. 24. How can you handle errors in Python? A) Using 'try' and 'except' blocks. B) Using 'if' and 'else' statements. C) Using loops. D) Using functions. Show Answer Correct Answer: A) Using 'try' and 'except' blocks. 25. What is the purpose of indentation in Python? A) Specifies the scope of different chunks of code. B) To make the code look pretty. C) To create variables. D) None of the above. Show Answer Correct Answer: A) Specifies the scope of different chunks of code. ← 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