This quiz works best with JavaScript enabled. Home > Cbse > Class 11 > Science > Computer Science > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 11 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 11 (60 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What is the output of the following?x = 36 / 4 * (3 + 2) * 4 + 2print(x) A) 37. B) 117. C) ERROR. D) 182.0. Show Answer Correct Answer: D) 182.0. 2. What will be the output for following python programme:x = 100 y = float(x)print(y) A) 200. B) 100. C) 100.0. D) Can't convert an integer to a floating number. Show Answer Correct Answer: C) 100.0. 3. Hero.findNearestItem( )which of the following describes hero properly? A) Hero is an object. B) Hero is a variable. C) Hero is a function. D) It is just a python syntax. Show Answer Correct Answer: A) Hero is an object. 4. ..... data type contain a character (text) such as A, a, Z, z etc. A) Float. B) String. C) Char. D) Int. Show Answer Correct Answer: C) Char. 5. Suppose a tuple T is declared as T=(20, 36, 34, 49), which of the following is incorrect? A) Print(min(T)). B) Print(T.count(20)). C) T[3] = 49. D) Print(T[3]). Show Answer Correct Answer: C) T[3] = 49. 6. What is the output of the following codedict1 = {"key1":1, "key2":2}dict2 = {"key2":2, "key1":1}print(dict1 == dict2) A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 7. What is the increment operator A) =. B) ==. C) +=. D) -=. Show Answer Correct Answer: C) +=. 8. Say whether the following statement is true or false?"True and False are special values that belong to the class bool; they are not strings" A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 9. Which one of the following is not a keyword in Python language? A) Eval. B) Assert. C) Nonlocal. D) Pass. Show Answer Correct Answer: A) Eval. 10. What will be the output for the following code:for x in range(6):print(x) A) 0 1 2 3 4 5. B) 1 2 3 4 5 6. C) 0 1 2 3 4 5 6. D) 1 2 3 4 5. Show Answer Correct Answer: A) 0 1 2 3 4 5. 11. A store your program must use as an identifier to keep track of a value is called a A) Algorithm. B) Assignment. C) Variable. D) Program. Show Answer Correct Answer: C) Variable. 12. Slicing stringx="BOnvoyageprint(x[4:]) A) BOnvo. B) VOYAGE. C) Voyage. D) Bonvo. Show Answer Correct Answer: C) Voyage. 13. When writing an if/else statement, you A) Always indent the line after the condition. B) Never indent the line after the condition. C) Capitalize every word. D) Put a colon at the beginning and the end. Show Answer Correct Answer: A) Always indent the line after the condition. 14. Lists are created using square brackets: A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 15. I want to allow the program to repeatedly ask the user to enter their guess if it does not equal the answer ..... Which option do I use? A) While guess == answer:guess=input(). B) While guess != answer:guess=input(). C) While answer != guess:guess=input(). D) While answer =! guess:guess=input(). Show Answer Correct Answer: B) While guess != answer:guess=input(). 16. What data type can hold more than one value? A) String. B) Integer. C) List. D) Boolean. Show Answer Correct Answer: C) List. 17. Which commands would draw a triangle A) Repeat the following four times:forward(10)turnright(90). B) Repeat the following three times:forward(10)turnright(120). C) Repeat the following five times:forward(10)turnright(72). D) Repeat the following three times:forward(10)turnright(110). Show Answer Correct Answer: B) Repeat the following three times:forward(10)turnright(120). 18. Statements or instructions written by a programmer in a language that computers can understand defines ..... A) Range. B) Code. C) Software. D) Algorithm. Show Answer Correct Answer: B) Code. 19. Predict the output:>>>str1="Rajathi Raja">>>print(str1.count('Raja')) A) 1. B) 2. C) Raja. D) Error. Show Answer Correct Answer: A) 1. 20. What will be the output of the following code:print (type(type(int))) A) . B) 0. C) Error. D) . Show Answer Correct Answer: A) . 21. Which of the following modules need to be imported to handle date time computations in Python? A) Datetime. B) Time. C) Date. D) Timedate. Show Answer Correct Answer: A) Datetime. 22. What data type would store the value:True A) Float. B) Integer. C) String. D) Boolean. Show Answer Correct Answer: D) Boolean. 23. Tuples in Python are mutable A) False. B) True. C) All the above. D) None of the above. Show Answer Correct Answer: A) False. 24. What is the result of the following code?print(10 == 9) A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 25. What is wrong with the following code? esports = ("Donkey Kong", "Galaga", "Pac Man")esports[1] = "Centipede" A) Nothing; this will work fine. B) The item at index 1 does not exist. C) The [1] notation after the variable name is not valid. D) You cannot update an item in a tuple. Show Answer Correct Answer: D) You cannot update an item in a tuple. 26. Predict the output from the following code:print("3*4+5") A) 17. B) 12. C) 3*4+5. D) SyntaxErrror. Show Answer Correct Answer: C) 3*4+5. 27. What purpose do wildlife drop centers serve? A) They provide a place for people to leave unwanted pets. B) They are research facilities for studying invasive species. C) They are breeding centers for endangered species. D) They offer pet adoption services. Show Answer Correct Answer: A) They provide a place for people to leave unwanted pets. 28. Which of the following is the correct code to define a function? A) Def area ( ). B) Def area:. C) Area ( ). D) Def area ( ):. Show Answer Correct Answer: D) Def area ( ):. 29. If foo is equal to 3, what is the value of foo after this operation?foo /= 3 A) 3. B) 2. C) 1. D) None of the above. Show Answer Correct Answer: C) 1. 30. What is the official logo of Python? A) A bear holding a computer. B) A snake coiled around the word 'Python'. C) A tree with branches shaped like snakes. D) A cup of coffee with a snake design. Show Answer Correct Answer: B) A snake coiled around the word 'Python'. 31. What value is stored in the "total" variable after the following code runs? total = 0 for i in range(1, 4):total = total + i A) 6. B) 5. C) 0. D) 7. Show Answer Correct Answer: A) 6. 32. What is the output of the following code?a = "b"if True or True:a = "a"print(a * 2) A) Aa. B) Ba. C) Ab. D) Bb. Show Answer Correct Answer: A) Aa. 33. What technology is used to track Burmese Pythons in the wild? A) Microchips. B) GPS collars. C) Drones. D) Radio tags. Show Answer Correct Answer: D) Radio tags. 34. Operators with same precedence are evaluated in which manner? A) Left to Right. B) Right to Left. C) Can't Say. D) None of the mentioned. Show Answer Correct Answer: A) Left to Right. 35. Eval("20") will give us the number value of A) 2. B) 10. C) 20. D) 5. Show Answer Correct Answer: C) 20. 36. How do you tell python you want to use the turtle library A) From libraries import turtle. B) Import turtle. C) Turtle import. D) From turtle import libraries. Show Answer Correct Answer: B) Import turtle. 37. What is the default data type in Python? A) String. B) Integer. C) Real. D) Number. Show Answer Correct Answer: A) String. 38. Which brackets are used for Lists? A) ( ). B) [ ]. C) { }. D) None of the above. Show Answer Correct Answer: B) [ ]. 39. Operators used in python:divide, multiply, add, subtract A) /, *, +, -. B) Div, mul, +, -. C) , x, +, -. D) ~, *, +, -. Show Answer Correct Answer: A) /, *, +, -. 40. Predict the output:>>>saint="Thiruvalluvar">>>print(saint[5:]) A) Valluvar. B) Thiruvalluvar. C) Uvalluvar. D) Thiru. Show Answer Correct Answer: A) Valluvar. 41. Which of the following statements will successfully send the value "EEK" back from a function to the calling code? A) Return EEK. B) #print(EEK). C) Back EEK. D) EEK. Show Answer Correct Answer: A) Return EEK. 42. In Python, to make remarks that the computer will ignore, we use: A) ( ). B) IGNORE!. C) Rem. D) #. Show Answer Correct Answer: D) #. 43. What does import turtle mean? A) Loads the turtle library so the turtle functions are used automatically. B) Loads the turtle library and writes code automatically. C) Loads the turtle library so the turtle functions can be used in your program. D) Load the turtle library so you can choose the correct program to solve your problem. Show Answer Correct Answer: C) Loads the turtle library so the turtle functions can be used in your program. 44. How many except statements can a try-except block have? A) Zero. B) One. C) More than one. D) More than zero. Show Answer Correct Answer: D) More than zero. 45. Which of the following is true for variable names in python? A) Unlimited Length. B) All private members must have leading and trailing underscores. C) Underscores and ampersand are only two special characters allowed. D) None of these. Show Answer Correct Answer: A) Unlimited Length. 46. In the pyton example x = 9, x is the A) Multiplication. B) Variable. C) Value. D) Wrong answer. Show Answer Correct Answer: B) Variable. 47. Any number is True, except 1. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 48. What is the output from the following lines of code?a = [2, 4, 8]a[2] = 6print(a) A) [2, 6, 8]. B) [2, 4, 6]. C) [2, 4, 8]. D) [6, 4, 8]. Show Answer Correct Answer: B) [2, 4, 6]. 49. Choose the correct output of the following code.for i in range(10, 15):print(i) A) 1011121314. B) 101112131415. C) 11121314. D) 1112131415. Show Answer Correct Answer: A) 1011121314. 50. Look at the following code:age = "23"age = age + 1print (age)What is the result of this code? A) 23 + 1. B) An error message. C) 23. D) 24. Show Answer Correct Answer: B) An error message. 51. How many times does a for loop iterate if the range is (1, 5)? A) 1. B) 4. C) 2. D) 3. Show Answer Correct Answer: B) 4. 52. What is the latest stable version of Python as of 2021? A) Python 3.9. B) Python 4.0. C) Python 3.7. D) Python 3.8. Show Answer Correct Answer: A) Python 3.9. 53. Which character is used to denote long integer? A) LO. B) L. C) D. D) N. Show Answer Correct Answer: B) L. 54. ..... is a string literal denoted by triple quotes for providing the specifications of certain program elements. A) Interface. B) Docstring. C) Modularity. D) Client. Show Answer Correct Answer: B) Docstring. 55. What is printed?cheer = "Go Eagles!"print cheer[7:] A) Go Eagles. B) S!. C) Nothing-error. D) Es!. Show Answer Correct Answer: D) Es!. 56. Choose the correct data type:True A) Character. B) String. C) Integer. D) Real/Float. E) Boolean. Show Answer Correct Answer: E) Boolean. 57. What happens if you call your python progam "turtle" A) Your program runs fine. B) Your program crashes because it stops the import turtle line from working. C) Your program crashes because you have spelt it wrong. D) Your program crashes because it should have been saved as turtle.turtle. Show Answer Correct Answer: B) Your program crashes because it stops the import turtle line from working. 58. Is python is platform independent A) Yes. B) No. C) All the above. D) None of the above. Show Answer Correct Answer: A) Yes. 59. What does case sensitive mean? A) I don't like cases. B) Outcome is based on uppercase and lowercase fonts. C) A lawyers feelings. D) What i put my switch in. Show Answer Correct Answer: B) Outcome is based on uppercase and lowercase fonts. 60. Which of the following will give error?Suppose dict1={"a":1, "b":2, "c":3} A) Print(len(dict1)). B) Print(dict1.get("b")). C) Dict1["a"]=5. D) None of these. Show Answer Correct Answer: D) None of these. ← PreviousNext →Related QuizzesScience QuizzesClass 11 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 8 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books