This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 22 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 22 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Generally speaking Python (TM) would run ..... than C++ and take ..... time to create A) Faster, less. B) Faster, more. C) Slower, less. D) Slower, more. Show Answer Correct Answer: C) Slower, less. 2. What is the primary focus of Python's design philosophy? A) Strict type enforcement. B) Complexity and obfuscation. C) Code readability and simplicity. D) Performance optimization. Show Answer Correct Answer: C) Code readability and simplicity. 3. Your program asks users to enter their age in years. What data type will Python return for that input if someone enters a value of 13.50? A) String. B) Float. C) Integer. D) Null. Show Answer Correct Answer: A) String. 4. Which of the following is NOT a valid data type in Python? A) Int. B) Float. C) Real. D) Str. Show Answer Correct Answer: C) Real. 5. How do you join two strings 'first' and 'last' with a space between them? A) First + last. B) First + '' '' + last. C) First & last. D) First.concat(last). Show Answer Correct Answer: B) First + '' '' + last. 6. What is the result of the following code? "'pythonweight = 8print(type(weight)) "' A) . B) . C) . D) . Show Answer Correct Answer: A) . 7. What is the purpose of the Matplotlib library? A) Used for data analysis and manipulation. B) Used for plotting graphs and visualisation. C) Used for web development and design. D) Used for machine learning and AI. Show Answer Correct Answer: B) Used for plotting graphs and visualisation. 8. Strings in Python are written inside: A) []. B) \{\}. C) '' or "". D) <>. Show Answer Correct Answer: C) '' or "". 9. What is the purpose of introducing extra spaces within a line of Python code? A) To make the code run faster. B) To make the code more easily understood when it involves nested subprogram calls. C) To change the syntax of Python. D) To create a syntax error. Show Answer Correct Answer: B) To make the code more easily understood when it involves nested subprogram calls. 10. Which random function returns a random 'float' number between 0 and 1? A) Random.random(). B) Random.floating(). C) Rand.floating(). D) None of the mentioned. Show Answer Correct Answer: A) Random.random(). 11. What type of value does the input() function return? A) Int. B) Float. C) Str. D) Bool. Show Answer Correct Answer: C) Str. 12. Which of the following is a string? A) 123. B) True. C) 'hello'. D) None. Show Answer Correct Answer: C) 'hello'. 13. What is the output of the following code? "'pythonprint("Hello, World!") "' A) 'Hello, World!'. B) 'hello, world!'. C) 'HELLO, WORLD!'. D) 'Hello World'. Show Answer Correct Answer: A) 'Hello, World!'. 14. Each statement in Python is terminated by ..... A) Comma(, ). B) Colon(:). C) Semicolon(;). D) None of the above. Show Answer Correct Answer: D) None of the above. 15. A software update often helps with the removal of ..... A) Harddisk. B) Bugs. C) All the above. D) None of the above. Show Answer Correct Answer: B) Bugs. 16. What is the correct syntax to print 'Hello, World!' in Python? A) Echo 'Hello, World!'. B) Print('Hello World!'). C) Println('Hello, World!'). D) Print('Hello, World!'). Show Answer Correct Answer: D) Print('Hello, World!'). 17. Read the Python program below:1 print("Where do you live?")2 location = input()3 print("I've never been to", location)When this program is executed, what will be displayed on the screen, as a result of executing line 3? A) I've never been to and whatever the user has typed at the keyboard. B) I've never been to location. C) I've never been to input(). D) It is not possible to know the output without executing the program. Show Answer Correct Answer: A) I've never been to and whatever the user has typed at the keyboard. 18. Which keyword is used to stop a loop? A) End. B) Break. C) Stop. D) Exit. Show Answer Correct Answer: B) Break. 19. How many times will the following loop execute?for i in range(3):print("Looping") A) 1. B) 2. C) 3. D) 4. Show Answer Correct Answer: C) 3. 20. WHO INVENTED PYTHON? A) CHARLES BABBAGE. B) RAY TOMLONSON. C) Guido van Rossum. D) None of the above. Show Answer Correct Answer: C) Guido van Rossum. 21. Which of the following expressions will evaluate to True? A) 7 > 10. B) 5 == 5. C) 3 < 2. D) 8 != 8. Show Answer Correct Answer: B) 5 == 5. 22. Which operator is used for logical AND in Python? A) &&. B) ||. C) And. D) &&&. Show Answer Correct Answer: C) And. 23. Which one of the following is the most appropriate python language feature? A) Open source. B) Usable with only one device. C) Syntax Free. D) High Level Language. Show Answer Correct Answer: D) High Level Language. 24. What is IDLE in the context of Python? A) IDLE is a command-line tool for Python scripting. B) IDLE is a Python framework for web development. C) IDLE is a type of Python library. D) IDLE is the Integrated Development and Learning Environment for Python. Show Answer Correct Answer: D) IDLE is the Integrated Development and Learning Environment for Python. 25. What is the result type of comparisons like y==z in Python? A) Int. B) Str. C) Bool. D) List. 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