This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 20 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 20 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which code would display 'Hello World' A) Print("Hello World"). B) Print("Hello World"). C) Print(Hello World). D) Print=("hello world"). Show Answer Correct Answer: A) Print("Hello World"). 2. What data type represents a decimal number? A) Float. B) Int. C) Boolean. D) String. Show Answer Correct Answer: A) Float. 3. What is the Output of the following code?for x in range(0.5, 5.5, 0.5):print(x) A) [0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5]. B) [0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5]. C) The Program executed with errors. D) None of the above. Show Answer Correct Answer: C) The Program executed with errors. 4. Why would you use a loop? A) To repeat a piece of code. B) To create a loop. C) To input data. D) None of the above. Show Answer Correct Answer: A) To repeat a piece of code. 5. Which of the following best describes the purpose of a for loop? A) A for loop is for doing something an indeterminate number of times. B) A for loop is doing something an infinite number of times. C) A for loop is for doing something a fixed number of times. D) A for loop is for doing something three times. Show Answer Correct Answer: C) A for loop is for doing something a fixed number of times. 6. What is the proper syntax for Python comments? A) B) Python comment . C) # Python Comment. D) /* Python Comment */. Show Answer Correct Answer: C) # Python Comment. 7. What will the output be from the following code?print("Hello" + 2 + "world") A) Hello 2 world. B) Hello2world. C) TypeError. D) HelloHelloworld. Show Answer Correct Answer: C) TypeError. 8. The number or word we give to a variable A) Value. B) Bug. C) Information. D) Text. Show Answer Correct Answer: A) Value. 9. A function that can only be used by a class is called? A) Method. B) Conditional. C) Function. D) Value. Show Answer Correct Answer: A) Method. 10. What is Basic syntax? A) A step-by-step set of instructions for completing a task. B) A type of data that represents text. In both Python and JavaScript, strings are represented by text inside quotes. C) Repeat a block of code a certain number of times. D) The rules for correct spelling, grammar, and punctuation in a programming language. Show Answer Correct Answer: D) The rules for correct spelling, grammar, and punctuation in a programming language. 11. If Tracy started facing right, which direction would she be facing after we ran the following code? left(90)left(90)right(90) A) Up. B) Down. C) Right. D) Left. Show Answer Correct Answer: A) Up. 12. What is the correct programming name of this symbol?() A) Brackets. B) Parenthesis. C) Quotation marks. D) Smiley emoji. Show Answer Correct Answer: B) Parenthesis. 13. Which of these operators means EQUAL TO? A) '='. B) '=>'. C) '<='. D) '=='. Show Answer Correct Answer: D) '=='. 14. What data type would be used for storing someone's telephone numbers? A) Float (using a decimal point). B) Integer (just whole numbers). C) String (alphanumerical data). D) None of the above. Show Answer Correct Answer: B) Integer (just whole numbers). 15. Comments are used to make code easier to read. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 16. The Python IDE colour codes sections of your code to make it easier to debug A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 17. Python can be defined as A) A computer programming language designed for use in commerce. B) An object-oriented computer programming language commonly used to create interactive effects within web browsers. C) A high-level computer programming language used especially for scientific computation. D) A simple yet powerful scripting language used to run some of the most powerful apps in the world, like Gmail, Google Maps and YouTube. Show Answer Correct Answer: D) A simple yet powerful scripting language used to run some of the most powerful apps in the world, like Gmail, Google Maps and YouTube. 18. What initiated the Burmese Python invasion in South Florida? A) They were brought as pets and then released. B) They were native to the area. C) They migrated from Southeast Asia. D) They were introduced for pest control. Show Answer Correct Answer: A) They were brought as pets and then released. 19. Why did Guido van Rossum call his programming language Python? A) He thinks Pythons were cool. B) He couldn't think of anything else. C) A friend suggested it. D) He loves Monty Python. Show Answer Correct Answer: D) He loves Monty Python. 20. Try something a bunch of times, then change a little each time until it's right. A) Syntax. B) Property. C) Iterate. D) Code. Show Answer Correct Answer: C) Iterate. 21. What is input() called in Python coding? A) Keyboard. B) Function. C) Variable. D) String. Show Answer Correct Answer: B) Function. 22. What is the output of the following code?What is the output of following codeTemperature = 20 Thermo = 15 if Temperature < 15:Thermo = Thermo + 5 print(Thermo) A) 20. B) 15. C) 25. D) 10. Show Answer Correct Answer: B) 15. 23. If I want to store my height in a variable, which of the following would be a good variable name in best practice? A) Abcdefg. B) Inches. C) Number. D) Height. Show Answer Correct Answer: D) Height. 24. What is the result of following Program in python3for i in range(3, 0, -1)print("\{0\} Python" .format(i)) A) 3 Python2 Python1 Python. B) 2 Python1 Python0 Python. C) 3 Python. D) Error. Show Answer Correct Answer: D) Error. 25. If I declare a variable within a function, can I then use its value within the outer global scope of my application? A) Yes. B) No. C) All the above. D) None of the above. Show Answer Correct Answer: B) No. ← PreviousNext →Related QuizzesClass 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 1Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 2Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 3Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 4Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 5Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 6Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 7Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 8Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 9Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 10 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books