Class 11 Computer Science Chapter 2 Introduction To Python Quiz 64 (25 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is the index of the last element in a list called 'items' with 5 elements?
2. How can you make the turtle pen up and stop drawing?
3. What is the purpose of the 'input' subprogram in PLS?
4. What type of error is returned by the following statement? def abc(a):print(a)
5. Answer = 2 + 12 * 2 print("The Answer is", answer)When this program is executed, what will be displayed on the screen?
6. How do you handle errors in Python to prevent your programme from crashing?
7. What will the following code output?for i in range(2, 7, 2):print(i)
8. How many types of switch cases are there in total?
9. Which operator returns True if target string is somewhere in the search string; otherwise it returns False.
10. Which data type than can have one of two values:True or False?
11. Is print a predefine function in Python?
12. Which of the following is not a token?
13. Which Python function is used to get input from the user?
14. What is the purpose of the else block in a loop?
15. What is the purpose of the getPixel function?
16. What is the output of the following code:print(5 > 3 and 2 < 4)?
17. Which among the following is not a feature of Python?
18. What will the following Python program print if the user enters 20 as their age? age = int(input('Enter your age:'))if age >= 18:print('Adult')else:print('Child')
19. Is the statement valid/invalidx+1=x
20. What will be the output of the following code:for i in range(3):print(i)?
21. What should you do if you want to run your Python program?
22. Write the output of the following:def abc():print('abc')
23. Which function is used to get user input in Python 3?
24. X = ['ab', 'cd']for i in x:i.upper()print(x)
25. What will be the output of the following code? "'pythonprint("5" + "6") "'