This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 60 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 60 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What is the purpose of the PyCharm IDE? A) General-purpose IDE. B) Specifically designed for Python development. C) Primarily for mobile app development. D) Focused on web development. Show Answer Correct Answer: B) Specifically designed for Python development. 2. What is the output of the following code:print(type(5))? A) . B) . C) . D) . Show Answer Correct Answer: A) . 3. Given tuple t = (1, 5, False, 3, 9), what does any(t) return and why? A) False, because numbers are ignored by any. B) True, because tuples always evaluate True. C) False, because False makes all elements falsy. D) True, at least one element is truthy. Show Answer Correct Answer: D) True, at least one element is truthy. 4. Which of the following statements will print the value of variable 'score'? A) Print(score). B) Echo(score). C) Display(score). D) Show(score). Show Answer Correct Answer: A) Print(score). 5. Which of these is NOT a Python data type? A) String. B) Integer. C) Metre. D) Float. Show Answer Correct Answer: C) Metre. 6. Module-2:Example Program:Magic 8 Ball with a ..... A) List. B) Dictionary. C) Tuple. D) String. Show Answer Correct Answer: A) List. 7. In the interactive mode, the value of a variable x can be found by: A) X. B) Print(x). C) Both a) and b). D) Value(x). Show Answer Correct Answer: C) Both a) and b). 8. What will be the output of the following code? "'pythonprint("The temperature is", 22, "degrees Celsius.") "' A) The temperature is 22 degrees Celsius. B) The temperature is22degrees Celsius. C) The temperature is "22" degrees Celsius. D) The temperature is degrees Celsius 22. Show Answer Correct Answer: A) The temperature is 22 degrees Celsius. 9. Which print statement correctly prints the value stored in score? A) Print("10"). B) Print("score"). C) Print(score). D) Print(score = 10). Show Answer Correct Answer: C) Print(score). 10. What is the result of the following expression:$3^2 + 4^2$ A) '12'. B) '25'. C) '7'. D) '5'. Show Answer Correct Answer: B) '25'. 11. X = 50def func():global xprint('x is', x)x = 2print('Changed global x to', x)func()print('Value of x is', x) A) X is 50 Changed global x to 2 Value of x is 50. B) X is 50 Changed global x to 2 Value of x is 2. C) X is 50 Changed global x to 50 Value of x is 50. D) None. Show Answer Correct Answer: B) X is 50 Changed global x to 2 Value of x is 2. 12. Which of these is a valid string in Python? A) Hello World. B) "Hello World". C) Hello World". D) "Hello World. Show Answer Correct Answer: B) "Hello World". 13. Find the output.print(80+20*4//2) A) 120. B) 200. C) 80. D) Error. Show Answer Correct Answer: A) 120. 14. In Python, what must you put at the end of an 'if' line? A) A period (.). B) A comma (, ). C) A semicolon (;). D) A colon (:). Show Answer Correct Answer: D) A colon (:). 15. What symbol comes before a comment? A) $. B) >>. C) #. D) !. Show Answer Correct Answer: C) #. 16. You need to insert and remove items from a tuple, then restore it to an immutable form. What is the most appropriate workflow? A) Modify tuple directly using append and pop. B) Convert tuple to list, edit, convert back. C) Copy tuple, edit with slice assignment. D) Use sorted on tuple, then use del on it. Show Answer Correct Answer: B) Convert tuple to list, edit, convert back. 17. Which subprogram is used to make the turtle move backward? A) Turtle.forward(). B) Turtle.back(). C) Turtle.right(). D) Turtle.left(). Show Answer Correct Answer: B) Turtle.back(). 18. What will print('Hello' + 'World') show? A) Hello World. B) HelloWorld. C) Hello+World. D) Error. Show Answer Correct Answer: B) HelloWorld. 19. Which of the following is wrong in reference to naming of variable? A) Keywords are not allowed for variable names. B) Spaces are not allowed for variable names. C) Variable names can start from number. D) Special symbols are not allowed. Show Answer Correct Answer: C) Variable names can start from number. 20. In python programming, we DO NOT need to declare the type of data for variable A) TRUE. B) FALSE. C) All the above. D) None of the above. Show Answer Correct Answer: A) TRUE. 21. What is the purpose of the 'break' statement in the code snippet provided? A) To exit the current loop immediately when a condition is met. B) To skip the current iteration of the loop. C) To terminate the program execution. D) To restart the loop from the beginning. Show Answer Correct Answer: A) To exit the current loop immediately when a condition is met. 22. What is the difference between a statement and an expression? A) A statement is always true; an expression can be false. B) An expression performs an action; a statement evaluates to a value. C) A statement performs an action; an expression evaluates to a value. D) Both statements and expressions are the same in programming. Show Answer Correct Answer: C) A statement performs an action; an expression evaluates to a value. 23. Which of these is a computer coding program? A) Snake. B) Viper. C) Python. D) Cobra. Show Answer Correct Answer: C) Python. 24. An instruction is written to determine if the value in a is equal to the value in b.Choose the correct operator to complete the instruction:if a ..... b: A) < . B) =. C) ==. D) None of the above. Show Answer Correct Answer: C) ==. 25. How do you write a comment in Python? Why are comments important? A) Use '/* comment */' for multi-line comments. B) Comments are not necessary for code clarity. C) Use '//' for comments in Python. D) To write a comment in Python, use '#' for single-line comments or triple quotes for multi-line comments. Comments are important because they help explain the code, making it easier to understand and maintain. Show Answer Correct Answer: D) To write a comment in Python, use '#' for single-line comments or triple quotes for multi-line comments. Comments are important because they help explain the code, making it easier to understand and maintain. ← 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