Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 9 (60 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. To increment means to
2. I am 18 years old! What will the output be?:IF you are 70 or older, say "You are aged to perfection!" ELIF you are exactly 50, say "Wow, you are half a century old!" ELSE say "You are a spring chicken!"
3. Is the following statement True of False?Boolean variables can be used as conditions in an IF statement.
4. Sort () function in list by default sort the values in .....
5. Which of the following would give an error?
6. What function converts the data in a variable into a 'float'?
7. Python can work in ..... mode.
8. What is print() called in Python coding?
9. Correct file extension for python files?
10. Three of the for loops below will provide identical values for i. Which for loop will provide values that do not match the others?
11. What are the dimensions of Tracy's world?
12. Select the right syntax to create a function called my ..... function
13. Data that is collected and sent to a computer is
14. Fruit1="kiwi"fruit2="strawberry"print(len(fruit1))print(len(fruit2))
15. What is the difference between a subroutine and a function?
16. Display the sum of 5 + 10, using two variables:x and y
17. ..... method will not only delete the item from dictionary, but also return the deleted value.
18. Find the method in the following code:hero.use("door")
19. Which of the following rules is true about locally scoped variables?
20. What is the output of the following code?sampleList = ["Jon", "Kelly", "Jessa"]sampleList.append(2, "Scott")print(sampleList)
21. Which of these isn't a Python variable type?
22. X = 5y = 6print("x*y")The code above displays the following:
23. Are Double or single quotes used in Python?
24. To insert an the string "Pedro" in the first position of a the nameList we use
25. The rules for correct spelling, grammar, and punctuation in a programming language
26. What arithmetic operations does // perform in Python?
27. Which of the following will give output as [23, 2, 9, 75]?If list1=[6, 23, 3, 2, 0, 9, 8, 75]
28. Given the code below, which answer best describes how many times the "while" loop body will run? answer = 0 while True:add = int(input("Enter a positive integer to add, or 0 to quit: ")) answer = answer + add if (add <= 0):break print(answer)
29. Choose the correct way to access value 20 from the following tupleaTuple=("Orange", [10, 20, 30], (5, 15, 25))
30. Which of the following is the slicing operator?
31. A line of text Python won't try to run as code.
32. Which commands would draw a pentagon
33. Which of the following best describes how many times the statements in the body of a "while" loop will run?
34. In python the ' STRING data type' can be defined as ..... ?
35. [1, 2, 8, 9] < [9, 1]What will be the result if we compare these two lists?
36. Each item in a list has an index. What is the first index in a Python list?
37. Look at the following code:Length = 50Width = 30Area = Length * Widthprint (Area)What is the result of this code?
38. Which is the powerful function used for formatting strings?
39. If i want to continuously check for a correct answer, what loop would i use?
40. Python functions=lower("INDIA)print(s)
41. Why do we learn Python?
42. Say True or False:Bitwise shift operators (<<, >>) has higher precedence than Bitwise And(&) operator
43. True or False:You need to convert an integer to a string before you can use it in the print() function.
44. What is the output of the following piece of code?class A:def ..... init ..... (self, x=3):self ..... x = x class B(A):def ..... init ..... (self):super() ..... init ..... (5) def display(self):print(self ..... x)def main():obj = B() obj.display()main()
45. Is the following statement true or false?More than one condition cannot be used with an IF statement.
46. True or False:Python can be used to make games and phone apps.
47. What is the output of the following piece of code when executed in Python shell?>>> a=("Check")*3>>> a
48. Which of the following pieces of code defines a list of all the numbers from 4 to 12?
49. Which of the following are valid string manipulation functions in Python?
50. What is the output of the following code:print 10//3
51. What is missing in the square braces?cheer = "Go Eagles!"print (cheer[ ] + cheer [ ] + cheer [ ])If the output is Goggles
52. Which type of Programming does Python support?
53. Str="world of python programming"str+=" store"str.replace('o', 'O')
54. The Boolean operator that means "not equal to" is
55. What will the output be from the following code?print(9/3)
56. What is the assignment operator?
57. NameList = ["John", "Harry", "Jesse", "John", "Marry", "Larry"]del nameList[3]print(nameList)What would be the output
58. What is the term for steps you follow to solve a problem?
59. True or False:There are only 3 different programming languages
60. If L1=[2, 4, 8, 16], L2=[32, 64] what is L1+L2