This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 17 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 17 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. The command which helps us to reset the pen (turtle): A) Turtle.reset. B) Turtle.penreset. C) Turtle.penreset(). D) Turtle.reset(). Show Answer Correct Answer: D) Turtle.reset(). 2. How do you start writing an if statement in Python? A) If x>y:. B) If (x>y). C) If (x>y) then:. D) If x is >y:. Show Answer Correct Answer: A) If x>y:. 3. Which of the following will delete key-value pair for key, "Name" from a dictionary stud? A) Stud.del["Name"]. B) Del stud["Name"]. C) Delete stud("Name"). D) None of the above. Show Answer Correct Answer: B) Del stud["Name"]. 4. What is the extension on a Python file name? A) .py. B) .xsl. C) .ppt. D) .docx. Show Answer Correct Answer: A) .py. 5. In python the Division sign is ..... A) %. B) (. C) [. D) /. Show Answer Correct Answer: D) /. 6. You are asked to write a program where the user types in the amount of marks they got for a paper with 70 marks. The program then calculates and displays their score as a percentage. What is the process? A) Marks (integer). B) Percentage (float). C) Percentage = marks/100*70. D) Percentage = marks/70*100. Show Answer Correct Answer: D) Percentage = marks/70*100. 7. What is Algorithm? A) Fixing bugs. B) Functions. C) A sequence of instructions. D) Game design. Show Answer Correct Answer: C) A sequence of instructions. 8. True or False:5.0 is an example of the 'float' datatype. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 9. What is the output for the provided code?print(type(15 == 14)) A) False. B) Boolean. C) Error:Data Type. D) . Show Answer Correct Answer: D) . 10. Python is a general purpose programming language created by A) Dennis M. Ritchie. B) Guido Van Rossum. C) James Gosling. D) Bjarne Stroustrup. Show Answer Correct Answer: B) Guido Van Rossum. 11. If Tracy starts at the left edge of the canvas and moves forward 50 pixels, how many times will this code need to be repeated to have Tracy reach the right edge of the canvas? A) 4 times. B) 8 times. C) 12 times. D) 16 times. Show Answer Correct Answer: B) 8 times. 12. User defined Exceptions are created from the ..... Parent Class A) Exception. B) Except. C) Handler. D) User Defined Exception. Show Answer Correct Answer: A) Exception. 13. What will the following code do? name = "Bob"if name == "Bob":print ("Hello '' + name) else:print ("I dont know you") A) Prints bob. B) Prints Hello Bob. C) Nothing syntax error. D) Prints I don't know you. Show Answer Correct Answer: B) Prints Hello Bob. 14. Following set of commands are executed in shell, what will be the output? >>>str="hello">>>str[:2] A) He. B) Lo. C) Olleh. D) Hello. Show Answer Correct Answer: A) He. 15. Which is the correct way to declare and initialize a variable in Python? A) My variable:10. B) My variable == 10. C) My variable = 10. D) My variable is 10. Show Answer Correct Answer: C) My variable = 10. 16. Which of the following functions build the abstract data type? A) Constructors. B) Destructors. C) Recursive. D) Nested. Show Answer Correct Answer: A) Constructors. 17. There are 40 students in a classroom. We would like to get all students whose name starts with "A" . Which looping is suitable? A) For loop. B) While loop. C) All the above. D) None of the above. Show Answer Correct Answer: A) For loop. 18. How is a function declared in Python?* A) Def function function name():. B) Declare function function name():. C) Def function name():. D) Declare function name():. Show Answer Correct Answer: C) Def function name():. 19. Create a variable named bike and assign the value Kawasaki H2R to it A) Bike= Kawasaki H2R. B) "bike" = Kawasaki. C) H2R bike= "Kawasaki H2R". D) "KawasakiH2R"= bike. Show Answer Correct Answer: C) H2R bike= "Kawasaki H2R". 20. If you want to test more than one condition (chained condition), what do you use after if statement? A) Elif. B) Else. C) Ifif. D) Else if. Show Answer Correct Answer: A) Elif. 21. All lines in a while loop must be indented this number of spaces to be included in the loop A) 3. B) 4. C) 5. D) 6. Show Answer Correct Answer: B) 4. 22. Python Moduleto be used while implementing DICE game. A) Math. B) Cmath. C) Random. D) Numpy. Show Answer Correct Answer: C) Random. 23. Choose the correct data type:10500 A) Character. B) String. C) Integer. D) Real/Float. E) Boolean. Show Answer Correct Answer: C) Integer. 24. What, if anything, is wrong with the following?input("Type your password: ") A) There is no variable. B) Input commands don't need ( ). C) Input commands don't need '' ''. D) Nothing is wrong. Show Answer Correct Answer: A) There is no variable. 25. Which of the following is a Python command word used to indicate we want to set up a fixed loop A) While. B) Print. C) Next. D) For. Show Answer Correct Answer: D) For. ← 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