Class 11 Computer Science Chapter 2 Introduction To Python Quiz 8 (60 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is the output of the following code when coin is 0?from random import randintcoin = randint(0, 1)if coin == 0:result = "heads" print(result)else:result = "tails"
2. What kind of statements does Python use in its code lines?
3. If you want more than one option for your code, what do you use (after if)?
4. Which of the following statements is true about Python?
5. What is the purpose of the 'else' statement in a conditional?
6. If a={5, 6, 7}, what happens when a.add(5) is executed?
7. What is the first program you should create in a new programming language?
8. What is the output of the following code? "'pythonprint("Python" + "3") "'
9. A step by step set of instructions used to solve a problem
10. 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])
11. X=6y=7X=4, 8print(x, y)
12. Python is an example of a:
13. Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing operation?
14. In python, decimal numbers are called
15. Given t = (4, 2, 7, 2). Which statement correctly describes applying sorted(t)?
16. How can you take an integer input from the user?
17. What is the difference between a list and a tuple in Python?
18. A ..... is the smallest element of a python script that is meaningful to the interpreter?
19. What is the PLS equivalent for the data type 'integer'?
20. 'If' is a decision making statement
21. Who developed Python?
22. Which operator performs a multiplication?
23. What is the result of 3 + 5?
24. Optional or default parameters in functions can be defined with:
25. How do you create a new variable in Python?
26. What is the result of the expression 5 + 3 * 2?
27. Which of the following is not a use and application of Python?
28. Which of the following translators do not produce an object file?
29. Which one is a list?
30. What is the result of 'type("Hello")' in Python?
31. What is the output of the following code:print(int(3.14))?
32. What is the purpose of tracing variables in a program?
33. Which of the following statements will print the data type of the variable 'a'?
34. Which of the following is a feature of Python?
35. What is the correct way to start a while loop?
36. What will print(type(age)) return if age = 25?
37. What does a Python program do?
38. What is the name of the binary code (0s and 1s) that a CPU directly understands?
39. What is the difference between 'break' and 'continue' statements?
40. Which one of these is a loop in Python?
41. Which of the following is a valid for loop in Python?
42. What is Python known for?
43. Which of the following is a valid data type in Python?
44. Str1="poWer"str1.upper()print(str1)
45. Which of the below operators can be used to compare two numbers
46. What is a list in Python?
47. What data type is the value 'True' in Python?
48. What is the process illustrated in the course objectives?
49. What must you do to correctly communicate a command to Tracy?
50. What is the difference between a list and a tuple?
51. What kind of language does a computer understand?
52. What is the output of the expression 'Hello' * 3?
53. In Python single line comment starts with .....
54. What happens if you try to add a row with a duplicate index in a DataFrame?
55. Which of the following is an interpreted language?
56. What is the purpose of Jython in integrating with Java?
57. Which of the following is a valid way to import a module in Python?
58. Age = '5'In the code above, age is a
59. X, y=5, 6print(x==5)
60. What will print('Hello') show on the screen?