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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is the purpose of the 'else' statement in a conditional?
2. If a=\{5, 6, 7\}, what happens when a.add(5) is executed?
3. What is the first program you should create in a new programming language?
4. What is the output of the following code? "'pythonprint("Python" + "3") "'
5. A step by step set of instructions used to solve a problem
6. What is the output of the below code?num ..... list = [10.5, 30.5, -1.20, 10.10]num ..... list.insert(-3, -10.5)num ..... list.pop(0)print(num ..... list[0])
7. X=6y=7X=4, 8print(x, y)
8. Python is an example of a:
9. Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing operation?
10. How do you write a conditional statement that prints "Hello" if the variable a is greater than 5?
11. In python, decimal numbers are called
12. Given t = (4, 2, 7, 2). Which statement correctly describes applying sorted(t)?
13. How can you take an integer input from the user?
14. How do you check if 5 is more than 3?
15. What is the difference between a list and a tuple in Python?
16. A ..... is the smallest element of a python script that is meaningful to the interpreter?
17. What is the PLS equivalent for the data type 'integer'?
18. 'If' is a decision making statement
19. Who developed Python?
20. Which operator performs a multiplication?
21. What is the result of 3 + 5?
22. Optional or default parameters in functions can be defined with:
23. How do you create a new variable in Python?
24. What is the result of the expression 5 + 3 * 2?
25. Which of the following is not a use and application of Python?