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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Each item in a list has an "address" or index. The first index in a Python list is what?
2. NameList = ["John", "Harry", "Jesse", "John", "Marry", "Larry"]print(nameList.count("John"))What would be the output
3. What will be the output of the following Python code?import turtlet=turtle.Pen()t.goto(300, 9)t.position()
4. Which of the following is the use of function in python?
5. What does the term 'debug' mean?
6. Which operator performs a division?
7. Random.randint(3, 8)
8. Why are local variable names beginning with an underscore discouraged?
9. Which of the operator can be used in Strings?
10. Code that decides whether or not to skip a section of code.
11. Numbers = [2, 4, 6, 8]for number in numbers:print("hello!")
12. 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!")
13. Which if the values below is an integer data type?
14. What is the syntax to check if a value is less than another value in Python?
15. What type of loop is used when you know how many times you want to repeat something?
16. Evaluate5 * 3 ** 2 + 3
17. What is another word for 'iteration'?
18. What key word definesthe laws and rules of a language?
19. A data type consisting of numbers with decimals.
20. What is the correct syntax to output the type of a variable or object in Python?
21. Which command should you use to display the text to the screen?
22. Operators in python are .....
23. 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]
24. Word = "amazing"For the given string if we run word[2:5:2] what does 2 mean in this function?
25. What term is used to describe data passed into/out of a program?