This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 3 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 3 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. A string is immutable in Python?Every time when we modify the string, Python Always creates a new String and assigns a new string to that variable. A) TRUE. B) FALSE. C) All the above. D) None of the above. Show Answer Correct Answer: A) TRUE. 2. Loop that runs till the condition is true A) List. B) While. C) For. D) If. Show Answer Correct Answer: B) While. 3. S="welcome"print( s. center (15, '*')) A) ***welcome***. B) ****welcome****. C) ****welcome***. D) Undefine function center. Show Answer Correct Answer: B) ****welcome****. 4. How do you identify the statements that belong to the body of a function? A) Indent those statement the same amount underneath the function "def" statement. B) Add opening and closing curly braces \{ and \} to mark the start and stop of the function body. C) Add the "def" keyword to the beginning of each statement. D) Add the same comment (#) to the right of each statement within the body. Show Answer Correct Answer: A) Indent those statement the same amount underneath the function "def" statement. 5. What will be printed for the value 8 for num# program to check even or oddnum = (int)(input("enter any number"))if num%2 == 0:print("the number is even")else:print("the number is odd") A) Even. B) The number is even. C) The number is odd. D) None. Show Answer Correct Answer: B) The number is even. 6. When using a command to move the turtle to a specific position on the drawing canvas, the middle of the canvas is represented by which coordinates? A) 1, 1. B) 100, 100. C) 0, 0. D) 500, 500. Show Answer Correct Answer: C) 0, 0. 7. In python, comment lines start with this symbol A) #. B) //. C) &. D) %. Show Answer Correct Answer: A) #. 8. If you wanted Tracy to complete her command immediately, which speed value would you use? A) 10. B) 5. C) 1. D) 0. Show Answer Correct Answer: D) 0. 9. What is the Python built-in function to converts a number to a string? A) Str(). B) Int(). C) ParseInt(). D) Convert. Show Answer Correct Answer: A) Str(). 10. Choose the correct data type:The surname of a userExample:Chapman A) Character. B) String. C) Integer. D) Real/Float. E) Boolean. Show Answer Correct Answer: B) String. 11. How do you access the last element of a list in Python? A) List name[-1]. B) List name.last. C) List name[last]. D) List name(1). Show Answer Correct Answer: A) List name[-1]. 12. Python is a ..... side programming language. A) Client. B) Server. C) West. D) East. Show Answer Correct Answer: B) Server. 13. Choose the correct data type:Age (in whole years)Example:17 A) Character. B) String. C) Integer. D) Real/Float. E) Boolean. Show Answer Correct Answer: C) Integer. 14. What data type would store the value:6.4? A) String. B) List. C) Boolean. D) Float. Show Answer Correct Answer: D) Float. 15. If you want to create an empty list called colours, which of the following pieces of code is correct? A) Colours = [ ]. B) Colours = ( ). C) Colours = \{ \}. D) Colors = [ ]. Show Answer Correct Answer: A) Colours = [ ]. 16. Choose the correct data type:"K" A) Character. B) String. C) Integer. D) Real/Float. E) Boolean. Show Answer Correct Answer: A) Character. 17. Drink ..... choices = ["coffee", "tea", "water", "juice", "soda"]for drink in drink ..... choices:print(drink) A) "coffee". B) ["coffee", "tea", "water", "juice", "soda"]. C) Drink. D) "coffee tea water juice soda". Show Answer Correct Answer: D) "coffee tea water juice soda". 18. What are Strings? A) A type of data that represents text. In both Python and JavaScript, strings are represented by text inside quotes. B) A character or thing that can perform actions. C) The rules for correct spelling, grammar, and punctuation in a programming language. D) An action performed by an object. Show Answer Correct Answer: A) A type of data that represents text. In both Python and JavaScript, strings are represented by text inside quotes. 19. What will be the output of the following Python expression? round(4.5676, 2)? A) 4.5. B) 4.6. C) 4.57. D) 4.56. Show Answer Correct Answer: C) 4.57. 20. ..... data type contain integer values with no decimal such as 1, 200, 999 etc. A) Int. B) Float. C) Char. D) String. Show Answer Correct Answer: A) Int. 21. What is the condition in this code?if name == "Catherine":print("Hello, '' + name) A) ==. B) Name == "Catherine". C) Print("Hello, '' + name). D) If name == "Catherine":. Show Answer Correct Answer: B) Name == "Catherine". 22. What type of programming language is Python? A) Block based. B) Command Line. C) Fill in the blanks. D) Object Oriented. Show Answer Correct Answer: B) Command Line. 23. Numbers = [1, 2, 3, 4, 5]print ( numbers.pop() )The program above prints A) 5. B) Syntax error. C) 1. D) [2, 3, 4, 5]. Show Answer Correct Answer: A) 5. 24. What is printed?cheer = "Go Eagles!"print cheer[0:1] A) G. B) "Go". C) Go. D) O. Show Answer Correct Answer: A) G. 25. L=[2, 4, 8, 16, 32, 64] what is L[:2] A) [2, 4]. B) [2, 4, 8]. C) 2, 4. D) None of the above. Show Answer Correct Answer: A) [2, 4]. ← 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 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 10Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 11 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books