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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What would be the output of the following code:for i in range(3):print(i)
2. Who is the inventor of python language?
3. Which symbol surrounds a dictionary?
4. Which of the following commands will return the length of the list mylist?
5. If the return statement is not used inside the function, the function will return:
6. The datatype whose representation is unknown are called
7. Please select all correct ways to empty the following dictionarystudent = \{ "name": "Emma", "class":9, "marks":75 \}
8. Consider the code and What is the result?s='AB CD'list=list(s)list.append('EF')print(list)
9. In Python, what are if-statements used for?
10. In a list called "players", if you wanted to add a player called "Bob" to the list, which of the following examples of code would be correct?
11. What button do you press to run your program?
12. A string is
13. Which of the following are not sequences supported in Python?
14. What error will occur when you execute the following code? MANGO = APPLE
15. Given the nested if-else below, what will be the value x when the code executed successfullyx = 0a = 5b = 5if a > 0:if b < 0:x = x + 5 elif a > 5:x = x + 4 else:x = x + 3else:x = x + 2print(x)
16. ..... method adds a single item to the end of the list.
17. Which symbol is used to print more than one item on a single line?
18. The command that will print a line of command on the program is:
19. Choose the correct data type:6
20. How do you define the range of a for loop in Python?
21. The datatype whose representation is known are called
22. What is the window called where you write your code?
23. NameList = ["John", "Harry", "Jesse", "John", "Marry", "Larry"]The list will be slice and show Harry and Jesse only. Which piece of code below would do this?
24. Presenting the results back to a user is known as
25. Enemy = hero.findNearestEnemy( )What is findNearestEnemy( )?