This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 5 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 5 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which print statement correctly prints a variable called place ..... of ..... birth? A) Print("place of birth"). B) Print(place of birth). C) Print("Middlesbrough"). D) Print("place of birth = London"). Show Answer Correct Answer: B) Print(place of birth). 2. Used to structure code in Python A) Whitespace. B) Comments. C) Booleans. D) Variables. Show Answer Correct Answer: A) Whitespace. 3. Who developed the Python Programming language? A) Tim Berners-Lee. B) Bill Gates. C) Guido van Rossum. D) Ronald Reagan. Show Answer Correct Answer: C) Guido van Rossum. 4. The ..... operator checks whether a given value lies within a given set of values A) Between. B) Range. C) In. D) None of the above. Show Answer Correct Answer: C) In. 5. To get the last element from a list in Python we can use which index? A) 9999. B) -1. C) 0. D) -2. Show Answer Correct Answer: B) -1. 6. A data type consisting of numbers letters and symbols: A) String. B) Integer. C) Float. D) Boolean. Show Answer Correct Answer: A) String. 7. Which of the following is a key feature of Python? A) Compiled language. B) Low-level language. C) Object-oriented. D) Static typing. Show Answer Correct Answer: C) Object-oriented. 8. What statement can we use to check more conditions in an if ..... else statement? A) Elif. B) Else if. C) True. D) Len(). Show Answer Correct Answer: A) Elif. 9. Which of these is used to group code together in Python? A) Tabs or spaces. B) Commas. C) Slashes. D) Periods. Show Answer Correct Answer: A) Tabs or spaces. 10. You need an ordered container for values that must not change after creation. Which Python data type best fits this need? A) Dictionary, key-value and mutable. B) Tuple, ordered and immutable. C) List, ordered and mutable. D) Set, unordered and mutable. Show Answer Correct Answer: B) Tuple, ordered and immutable. 11. ..... is a set of valid characters that a language can recognize. A) Variables. B) Keywords. C) Character set. D) Literals. Show Answer Correct Answer: C) Character set. 12. Debugging is A) How characters are arranged in a statement. B) Detecting or removing errors from a program. C) Removing viruses from a computer. D) The meaning of each of the characters and symbols in the program. Show Answer Correct Answer: B) Detecting or removing errors from a program. 13. What is the output of the following code?def my ..... func ( ):return 5return 10print (my ..... func ( ) ) A) None. B) 5. C) 10. D) Both 5 and 10. Show Answer Correct Answer: B) 5. 14. True or False:The output of the following code will always be the same.from random import randintdiceroll = randint(1, 6)print("You rolled a", diceroll) A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 15. What is the result of the following code? "'pythonnumbers = [7, 8, 9]print(len(numbers)) "' A) 2. B) 3. C) 4. D) 9. Show Answer Correct Answer: B) 3. 16. What will be the output after the following statements?x = 6 y = 3 print(x / y) A) 2.0. B) 2. C) 18.0. D) 18. Show Answer Correct Answer: A) 2.0. 17. What does the split() function do in Python? A) It splits a string into a list of words. B) It combines a list of words into a string. C) It removes spaces from a string. D) It counts the number of words in a string. Show Answer Correct Answer: A) It splits a string into a list of words. 18. What will be the output of the following code:print('Hello' + ' World')? A) Hello World. B) Hello, World. C) Hello World!. D) HelloWorld. Show Answer Correct Answer: A) Hello World. 19. Which function is used to convert a number to a string? A) Str(). B) Int(). C) Float(). D) Chr(). Show Answer Correct Answer: A) Str(). 20. What operator would I need to times 5 by 10? A) *. B) /. C) +. D) -. Show Answer Correct Answer: A) *. 21. What is the output of the following code? "'pythonprint("Great Britain" .replace("Great", "United")) "' A) Great Britain. B) United Britain. C) GreatBritain. D) United. Show Answer Correct Answer: B) United Britain. 22. What is the data type of the value '"42"' in Python? A) Int. B) Str. C) Float. D) Bool. Show Answer Correct Answer: B) Str. 23. Used to make comments in a line of python code? A) #. B) %. C) **. D) (). Show Answer Correct Answer: A) #. 24. To insert an the string "strawberries" in the first position of a list we use A) Fruit.append("strawberries, 1"). B) Fruit.insert("strawberries", 0). C) Fruit.insert(1, "strawberries"). D) Fruit.insert(0, "strawberries"). Show Answer Correct Answer: D) Fruit.insert(0, "strawberries"). 25. Module-1:Which of the following is NOT mentioned as a function topic in Module-1? A) Def Statements with Parameters. B) Return Values and return Statements. C) None Value. D) Web Scraping. Show Answer Correct Answer: D) Web Scraping. ← 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 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 10Class 11 Computer Science Chapter 2 Introduction To Python Quiz 11 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books