This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 4 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 4 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. ..... is used to define a block of code in programming. A) A text . B) A script . C) A tab . D) An indentation . Show Answer Correct Answer: D) An indentation . 2. What will print(3 + 2) show? A) 32. B) 5. C) 3+2. D) 7. Show Answer Correct Answer: B) 5. 3. What will be printed by the following code? "'pythonlength = 10width = 5print(length * width) "' A) 50. B) 15. C) 105. D) 2. Show Answer Correct Answer: A) 50. 4. How do you access the third element in a list called 'colours'? A) 'colours[2]'. B) 'colours[3]'. C) 'colours[1]'. D) 'colours[-3]'. Show Answer Correct Answer: A) 'colours[2]'. 5. What is one of the goals defined by Guido van Rossum for Python's code? A) To be as complex as possible. B) To be as exclusive as possible. C) To be as understandable as plain English. D) To prioritize long development times. Show Answer Correct Answer: C) To be as understandable as plain English. 6. What colour is the information that is that is displayed in the shell? A) Green. B) Purple. C) Blue. D) Brown. Show Answer Correct Answer: C) Blue. 7. What does the relational operator '<=' represent? A) Greater than. B) Less than. C) Equal to. D) Less than or equal to. Show Answer Correct Answer: D) Less than or equal to. 8. All keywords in Python are in lower case (T/F). A) Depends on the context. B) False. C) Not applicable. D) True. Show Answer Correct Answer: B) False. 9. Is python an object oriented language? A) Yes. B) No. C) All the above. D) None of the above. Show Answer Correct Answer: A) Yes. 10. An expression can often be evaluated as true or false, for instance print(10>9) would return as true. What is this an example of? A) A string. B) A boolean value. C) A float. D) None of the above. Show Answer Correct Answer: B) A boolean value. 11. What is a correct syntax to get output as "Hello World" in Python? A) PRINT("Hello World"). B) Print("Hello World"). C) Print("hello world"). D) Echo("hello world"). Show Answer Correct Answer: C) Print("hello world"). 12. How do you specify a default value for an argument in a function? A) By using the default keyword. B) By initializing the argument inside the function body. C) By declaring the argument as a global variable. D) By assigning a value to the parameter in the function definition. Show Answer Correct Answer: D) By assigning a value to the parameter in the function definition. 13. What is Python A) A game. B) A coding Platform. C) A website. D) None of these. Show Answer Correct Answer: B) A coding Platform. 14. The operator < means A) Greater than. B) Less than. C) Equal to. D) None of the above. Show Answer Correct Answer: B) Less than. 15. Which of the following would be an example of an integer variable: A) ValidInput = False. B) GuessCount = 100. C) Name = "Bilbo". D) Pi = 3.14159265359. Show Answer Correct Answer: B) GuessCount = 100. 16. You can declare string variables with single or double quotes.x = "John"# is the same asx = 'John' A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 17. Which one is a correct way to get user input? A) Ask(). B) Say(). C) Input(). D) Question(). Show Answer Correct Answer: C) Input(). 18. What is the output of print(type(5)) in Python? A) . B) . C) . D) . Show Answer Correct Answer: A) . 19. What is the purpose of the 'def' keyword in Python? A) To create a loop. B) To declare a variable. C) To import a module. D) To define a function. Show Answer Correct Answer: D) To define a function. 20. How do you take input from a user in Python? A) 'input()'. B) 'get()'. C) 'read()'. D) 'scan()'. Show Answer Correct Answer: A) 'input()'. 21. Python is named after: A) A snake. B) A TV comedy show. C) A movie. D) A book. Show Answer Correct Answer: B) A TV comedy show. 22. Which of the following is NOT a common application of Python? A) Game Development. B) Web Development. C) Hardware Design. D) Machine Learning. Show Answer Correct Answer: C) Hardware Design. 23. Why data analysis is important? A) Widely used in popular websites. B) Know the trend. C) Use to plan for next action. D) ALL of the answers stated. Show Answer Correct Answer: D) ALL of the answers stated. 24. No, a function can only have one return statement A) No, a function can only have one return statement. B) No, return statements are not allowed in functions. C) Yes, and all return statements will execute. D) Yes, but only one return statement will execute. Show Answer Correct Answer: D) Yes, but only one return statement will execute. 25. What is the result of the following operation:$10 / 4$ A) 2. B) 2.5. C) 2.0. D) 25. Show Answer Correct Answer: B) 2.5. ← 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 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 10Class 11 Computer Science Chapter 2 Introduction To Python Quiz 11 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books