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

Quiz Instructions

Select an option to see the correct answer instantly.

1. The spelling and grammar rules of a programming language is called
2. What is the result of [1, 2, 3] + [4, 5, 6] in Python?
3. Which function is used to accept input from the user during the runtime.
4. Numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]numbers [-3]What is numbers [-3]
5. What is the output of this code?click = TrueLike = 0 if click:Like = Like + 1 print(Like)
6. A set of instructions that is repeated until a condition is reached is
7. Stores True or False
8. In Python, 'Hello', is the same as "Hello"
9. Slicing string X="BOnVoyage" print X[0:5]
10. What does "t '' make?
11. Which of the following is not a valid namespace?
12. To remove string "hello" from list1, we use which command?
13. Which is true about booleans?
14. How did the pet trade contribute to the python problem?
15. 19 % 2 in python
16. To make the turtle move forward, which command is used?
17. What is the function of the code:amount = int(input("Enter a conversion into pounds:))currency = input ("press 1 for indian rupees, 2 for Chinese yuan or 0 to exit:")
18. What controls a variable's scope?
19. Can we use the "else" clause for loops?for example:for i in range(1, 5):print(i)else:print("this is else block statement" )
20. If the coding steps are in the incorrect order, the computer can still execute the program.
21. Integers are ..... and floats are .....
22. What does the 'turtle' represent in Python?
23. Which of the following is constructed by placing expressions within square brackets?
24. Which of these are keyword?
25. What type of data is:a=[(1, 1), (2, 4), (3, 9)]?
26. Enemy = hero.findNearestEnemy( )in the variable enemy what is being stored?
27. Which commands do we need to fill a shape that we have just drawn?
28. Which method will remove an element the Dictionary data type?
29. How would you create a program to display "Hello World!"
30. For string symbol + means .....
31. What is the term for a list within another list in Python?
32. If p=25, what is p**2?
33. To solve a problem that requires the user to enter 10 numbers would use what type of iteration?
34. In Python, to have text stated for the user to see, we use:
35. ..... method adds one list at the end of another list.
36. How do i remove the item "juice" from a list?
37. Look at the following code:name = input ("What is your name? ")print (name)What would be printed from the print command?
38. Which of the following commands will create a list? a) list1 = list() b) list1 = []. c) list1 = list([1, 2, 3]) d) all of the mentioned
39. Each item in a list has an "address" or index. The first index in a Python list is what?
40. NameList = ["John", "Harry", "Jesse", "John", "Marry", "Larry"]print(nameList.count("John"))What would be the output
41. What will be the output of the following Python code?import turtlet=turtle.Pen()t.goto(300, 9)t.position()
42. Which of the following is the use of function in python?
43. Which operator performs a division?
44. Random.randint(3, 8)
45. Why are local variable names beginning with an underscore discouraged?
46. Which of the operator can be used in Strings?
47. Code that decides whether or not to skip a section of code.
48. Numbers = [2, 4, 6, 8]for number in numbers:print("hello!")
49. What would the output of the program be? thisList = ["square", "circle", "triangle", "octagon"]if "triangle" in thisList:print("Yes, 'triangle' is in the list") else:print("No triangle here!")
50. Which if the values below is an integer data type?
51. What type of loop is used when you know how many times you want to repeat something?
52. Evaluate5 * 3 ** 2 + 3
53. What is another word for 'iteration'?
54. What key word definesthe laws and rules of a language?
55. A data type consisting of numbers with decimals.
56. What is the correct syntax to output the type of a variable or object in Python?
57. Which command should you use to display the text to the screen?
58. Operators in python are .....
59. Numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]Which of the following code will give the output as below[7, 8, 9, 10]
60. Word = "amazing"For the given string if we run word[2:5:2] what does 2 mean in this function?