This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 75 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 75 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Is python case sensitive? A) Yes. B) No. C) All the above. D) None of the above. Show Answer Correct Answer: A) Yes. 2. Consider scores = (10, 15, 25). What is the result of sum(scores)? A) It returns 15 total. B) It returns 3 total. C) It returns 25 total. D) It returns 50 total. Show Answer Correct Answer: D) It returns 50 total. 3. What is the output of the following code? "'pythondef add(a, b):return a + bprint(add(3, 4)) "' A) 7. B) 34. C) 12. D) Error. Show Answer Correct Answer: A) 7. 4. In which year was Python officially made available to the public? A) 1989. B) 1991. C) 1919. D) 1998. Show Answer Correct Answer: B) 1991. 5. What will be the data type of y after the following statements?x = 48 y = str(x) A) Float. B) String. C) Integer. D) List. Show Answer Correct Answer: A) Float. 6. What does the range() function do in a for loop? A) Formats strings. B) Reads user input. C) Executes code indefinitely. D) Creates a list of numbers. Show Answer Correct Answer: D) Creates a list of numbers. 7. What exciting tool can Python create that we use on the internet? A) A toy. B) A website. C) A shoe. D) A pencil. Show Answer Correct Answer: B) A website. 8. What will the following code print? print('Hello, Universe!') A) Hello, universe. B) Hello, Universe!. C) Hello, Universe!. D) Hello universe!. Show Answer Correct Answer: B) Hello, Universe!. 9. What will the output be from the following code? Print ( "Hello world!" ) A) SyntaxError. B) Hello world!. C) Print (Hello world!). D) None of the above. Show Answer Correct Answer: B) Hello world!. 10. Given t = ('x', 'y', 'z'), what does list(enumerate(t)) produce? A) Only values as strings. B) Only indices as integers. C) Index-value pairs as tuples. D) Value-index pairs as lists. Show Answer Correct Answer: C) Index-value pairs as tuples. 11. What are the rules for naming variables? A) Start with a letter or underscore, can contain letters, numbers, and underscores. B) Can start with a number. C) Can contain spaces. D) None of the above. Show Answer Correct Answer: A) Start with a letter or underscore, can contain letters, numbers, and underscores. 12. What does string concatenation mean? A) Deleting a string. B) Joining two or more strings together using +. C) Turning a string into a number. D) Printing a string in capital letters. Show Answer Correct Answer: B) Joining two or more strings together using +. 13. Which of the following is used to handle exceptions in Python? A) Try. B) Catch. C) Except. D) Finally. Show Answer Correct Answer: A) Try. 14. What is the correct extension of a Python file? A) .pyt. B) .py. C) .pt. D) .python. Show Answer Correct Answer: B) .py. 15. In which of the following mode, the interpreter executes the statement and displays the result as soon as we press 'Enter' key? A) Hybrid mode. B) Script mode. C) None of the above. D) Interactive mode. Show Answer Correct Answer: D) Interactive mode. 16. Look at the code below and identify which of the statements below are true:for loopCounter in range(10, 101, 10):print(loopCounter) A) Starts at 10, goes up to 100, increases by 10. B) Starts at 10, goes upto 101, increases by 10. C) Starts at 1, goes upto 100, increases by 1. D) Starts at 10, goes upto 10, increases by 10. Show Answer Correct Answer: A) Starts at 10, goes up to 100, increases by 10. 17. Which of the following is a command to have a message appear on the screen? A) Print. B) Write. C) Msg. D) Input. Show Answer Correct Answer: A) Print. 18. What does the following code print? "'pythonx = 5if x > 3:print("High")else:print("Low") "' A) High. B) Low. C) 5. D) Error. Show Answer Correct Answer: A) High. 19. What's the output of the below code?D = \{1:1, 2:'2', '1':1, '2':3\} D['1'] = 2print(D[D[D[str(D[1])]]]) A) '1'. B) 1. C) 3. D) '2'. Show Answer Correct Answer: C) 3. 20. What is the difference between a tuple and a list in Python? A) Lists are faster than tuples in all operations. B) Tuples can be changed after creation, while lists cannot. C) The main difference is that tuples are immutable and lists are mutable. D) Tuples can hold only one data type, while lists can hold multiple types. Show Answer Correct Answer: C) The main difference is that tuples are immutable and lists are mutable. 21. Which of the following functions display an output to the screen? A) Display(). B) Output(). C) Print(). D) Post(). Show Answer Correct Answer: C) Print(). 22. What does the following code output? 'print("Bananas", 3, "Peaches", sep="-")' A) Bananas3Peaches. B) Bananas-3-Peaches. C) Bananas-3-Peaches. D) "Bananas"-"3"-"Peaches". Show Answer Correct Answer: B) Bananas-3-Peaches. 23. How do you create a string in Python? A) You can create a string in Python using single quotes, double quotes, or triple quotes. B) You can create a string using only numbers. C) You must use a specific library to create strings. D) Strings can only be created with special characters. Show Answer Correct Answer: A) You can create a string in Python using single quotes, double quotes, or triple quotes. 24. Comments are executable statement in Python A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 25. Course Objective:The course aims to appraise the need for working with various documents like ..... , PDF, Word and Others. A) Excel. B) PowerPoint. C) Notepad. D) Photoshop. Show Answer Correct Answer: A) Excel. ← 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