This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 18 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 18 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which of the following would be an example of a string variable: A) ValidInput = False. B) GuessCount = 100. C) Name = "Bilbo". D) Pi = 3.14159265359. Show Answer Correct Answer: C) Name = "Bilbo". 2. Look at the following code:age = input ("What is your age? ")age = int(age + 1)print (age)If the user inputs 23, what is the result of the code? A) 23. B) 24. C) Age. D) An error message. Show Answer Correct Answer: D) An error message. 3. Which symbol should you use to assign a value to a variable? A) +. B) =. C) %. D) /. Show Answer Correct Answer: B) =. 4. What will the be the output of the following code?if (10<0) and (0 <-10):print( "A" )else:print( "B" ) A) A. B) B. C) AB. D) BA. Show Answer Correct Answer: B) B. 5. Below are the valid data types in Python EXCEPT A) Int. B) Float. C) Char. D) Decimel. Show Answer Correct Answer: D) Decimel. 6. A step-by-step process, or a defined list of steps required to accomplish a goal A) Algorithm. B) Variable. C) String. D) Module. Show Answer Correct Answer: A) Algorithm. 7. How many keywords are there in python 3.7? A) 32. B) 33. C) 31. D) 30. Show Answer Correct Answer: B) 33. 8. What 'object' do you control in Python turtle? A) The pen object which draws your commands. B) The shape object which draws your commands. C) The pencil object which draws your commands. D) The turtle object which draws your commands. Show Answer Correct Answer: D) The turtle object which draws your commands. 9. What would you put in an if statement to see if two values are equal? A) ++. B) ==. C) //. D) ||. Show Answer Correct Answer: B) ==. 10. Numbers = [5, 14, 9, 17]for number in numbers:if number % 3 == 0:print(number)The output will be? A) 17. B) 9. C) 14917. D) 1417. Show Answer Correct Answer: B) 9. 11. A straight line passing from side to side through the center of a body or figure, especially a circle or sphere, defines A) Radius. B) Ulna. C) Diameter. D) Pixel. Show Answer Correct Answer: C) Diameter. 12. To fill a shape with the colour red, which command is correct? A) Turtle.fillcolor('Red'). B) Turtle.fillcolour('Red'). C) Turtle.fillcolor("Red"). D) Turtle.fillcolour("Red"). Show Answer Correct Answer: A) Turtle.fillcolor('Red'). 13. Select the correct operator for multiplication: A) X. B) *. C) **. D) +. Show Answer Correct Answer: B) *. 14. Choose the correct data type:"initial of a first name" A) Character. B) String. C) Integer. D) Real/Float. E) Boolean. Show Answer Correct Answer: A) Character. 15. List items are ordered, changeable, and allow duplicate values. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 16. Which of the following is used in Python to give a value to a variable A) :=. B) ==. C) =. D) None of the above. Show Answer Correct Answer: C) =. 17. Which of the following function is used to count the number of elements in a list? A) Count( ). B) Find( ). C) Len( ). D) Index( ). Show Answer Correct Answer: C) Len( ). 18. In python, "Hello World" is the same as 'Hello World' A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 19. What is the result of the following code?print(bool(0)) A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 20. . Which of the following definitions for the "haunted" function will correctly set the default value for the "surprise" parameter equal to the number 1? A) Haunted(fear, surprise) = 1. B) Def haunted(fear, surprise=1):. C) Def haunted(fear, surprise "1"). D) Def haunted[fear, surprise=1]. Show Answer Correct Answer: B) Def haunted(fear, surprise=1):. 21. Find the object in the following code:helper.build("upArrow") A) Helper. B) Build(). C) UpArrow. D) Hero. Show Answer Correct Answer: A) Helper. 22. A data type that can have one of two values:True or False A) Boolean. B) Variable. C) Modulo. D) Interpreter. Show Answer Correct Answer: A) Boolean. 23. Computer programs can store information like the user's progress in a videogame with ..... A) A keyboard. B) Adaptors. C) Variables. D) Conditionals. Show Answer Correct Answer: C) Variables. 24. A = Trueb = Falsec = Falseif a or b and c:print ("GEEKSFORGEEKS")else:print ("geeksforgeeks")What will be the output? A) GEEKSFORGEEKS. B) Geeksforgeeks. C) GEEKSFORGEEKSgeeksforgeeks. D) Run time error (Multiple operators in a single if statement). Show Answer Correct Answer: A) GEEKSFORGEEKS. 25. What data type represents only two possible outcomes? A) Float. B) Int. C) Boolean. D) String. Show Answer Correct Answer: C) Boolean. ← 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