Programming and Problem Solving through Python (M3-R5)

O-Level Full Test-2

(M3-R5)

1 / 100

1. What is the output of print('Python Programming'.isupper())?

2 / 100

2. What is the output of print('Python Programming'.find('z'))?

3 / 100

3. What is the output of print('Python Programming'.isnumeric())?

4 / 100

4. How do you create a list of odd numbers from 1 to 10 in Python?

5 / 100

5. How do you convert a string s to lowercase in Python?

6 / 100

6. How do you create a list of numbers from 0 to 9 in Python?

7 / 100

7. What is the output of print('Python Programming'.replace('P', 'J'))?

8 / 100

8. What is the output of print('Python Programming'.isalpha())?

9 / 100

9. What is the output of print('Python Programming'.index('P'))?

10 / 100

10. How do you add an element to a set s in Python?

11 / 100

11. What is the output of print('Python Programming'.isalpha())?

12 / 100

12. What is the output of print('Python Programming'.isnumeric())?

13 / 100

13. What is the output of print('Python Programming'.lower())?

14 / 100

14. How do you join a list of strings words into a single string separated by commas in Python?

15 / 100

15. What is the output of print('Python Programming'.endswith('g'))?

16 / 100

16. How do you get the last two characters of a string s in Python?

17 / 100

17. What is the output of print('Python Programming'.startswith('J'))?

18 / 100

18. What is the output of print('Python Programming'.isalpha())?

19 / 100

19. What is the output of print('Python Programming'.replace(' ', '_'))?

20 / 100

20. How do you join a list of strings words into a single string separated by spaces in Python?

21 / 100

21. What is the output of print('Python Programming'.index('P'))?

22 / 100

22. How do you get the first two characters of a string s in Python?

23 / 100

23. How do you convert a string s to a list of characters in Python?

24 / 100

24. What is the output of print('Python Programming'.isalpha())?

25 / 100

25. How do you create an empty set in Python?

26 / 100

26. What is the output of print('Python Programming'.islower())?

27 / 100

27. How do you convert a string s to a float in Python?

28 / 100

28. How do you convert a string s to an integer in Python?

29 / 100

29. What is the output of print('Python Programming'.endswith('P'))?

30 / 100

30. How do you create a tuple with a single element in Python?

31 / 100

31. What is the output of print('Python Programming'.endswith('g'))?

32 / 100

32. How do you convert a string s to a list of words in Python?

33 / 100

33. What is the output of print('Python Programming'.endswith('y'))?

34 / 100

34. How do you convert a string s to a float in Python?

35 / 100

35. What is the output of print('Python Programming'.isalnum())?

36 / 100

36. How do you create a list of even numbers from 1 to 20 in Python?

37 / 100

37. What is the output of print('Python Programming'.lower())?

38 / 100

38. How do you reverse a string s in Python?

39 / 100

39. How do you concatenate two lists list1 and list2 in Python?

40 / 100

40. What is the output of print('Python Programming'.find('o'))?

41 / 100

41. What is the output of print('Python Programming'.find('n'))?

42 / 100

42. What is the output of print('Python Programming'.isalpha())?

43 / 100

43. What is the output of print('Python Programming'.find('h'))?

44 / 100

44. What is the output of print('Python Programming'.find('z'))?

45 / 100

45. What is the output of print('Python Programming'.index('P'))?

46 / 100

46. What is the output of print('Python Programming'.isalpha())?

47 / 100

47. How do you get the number of elements in a list my_list in Python?

48 / 100

48. What is the output of print('Python Programming'.find('h'))?

49 / 100

49. What is the output of print('Python Programming'.isnumeric())?

50 / 100

50. How do you create a new list from an existing list my_list with only the odd numbers?

51 / 100

51. How do you concatenate two lists list1 and list2 in Python?

52 / 100

52. How do you add an element to the front of a list my_list in Python?

53 / 100

53. How do you reverse a string s in Python?

54 / 100

54. What is the output of print('Python'.isnumeric())?

55 / 100

55. How do you check if a string s contains only alphabetic characters in Python?

56 / 100

56. What is the output of print('Python'.find('z'))?

57 / 100

57. What is the output of print('Python'.upper().lower())?

58 / 100

58. How do you add a key-value pair to a dictionary in Python?

59 / 100

59. How do you get the number of elements in a list my_list in Python?

60 / 100

60. How do you remove the last element from a list my_list in Python?

61 / 100

61. What is the output of print('Python'.split('t'))?

62 / 100

62. What is the output of print('Python'.index('y'))?

63 / 100

63. What is the output of print('Python'.index('y'))?

64 / 100

64. How do you create a tuple in Python?

65 / 100

65. Which of the following is used to define an anonymous function in Python?

66 / 100

66. How do you create a new dictionary with keys from a list and values set to a default value?

67 / 100

67. Which method is used to remove an item from a list by index in Python?

68 / 100

68. Which of the following is the correct syntax to create a tuple in Python?

69 / 100

69. What is the output of print('Python'.find('z'))?

70 / 100

70. What is the output of print('Python'.title())?

71 / 100

71. How do you create an empty list in Python?

72 / 100

72. What is the output of print('Python'.capitalize())?

73 / 100

73. How do you append a tuple (4, 5) to a list my_list in Python?

74 / 100

74. What is the output of print('Python Programming'.startswith('Py'))?

75 / 100

75. What is the output of print('Python Programming'.count('P'))?

76 / 100

76. How do you check if a string s ends with a specific suffix in Python?

77 / 100

77. How do you convert a string s to a float in Python?

78 / 100

78. What is the output of print('Python Programming'.isalpha())?

79 / 100

79. How do you check if a string s starts with a specific prefix in Python?

80 / 100

80. What is the output of print('Python Programming'.replace('P', 'J'))?

81 / 100

81. What is the output of print('Python Programming'.isnumeric())?

82 / 100

82. How do you check if a list my_list is empty in Python?

83 / 100

83. How do you create a list of even numbers from 1 to 10 in Python?

84 / 100

84. What is the output of print('Python Programming'.islower())?

85 / 100

85. What is the output of print('Python Programming'.index('P'))?

86 / 100

86. How do you copy a list my_list in Python?

87 / 100

87. How do you convert a string s to an integer in Python?

88 / 100

88. How do you check if a list my_list contains a specific value in Python?

89 / 100

89. How do you get the length of a string s in Python?

90 / 100

90. What is the output of print('Python'.find('t'))?

91 / 100

91. What is the output of print('Python Programming'.find('m'))?

92 / 100

92. How do you convert a tuple t to a list in Python?

93 / 100

93. How do you check if a string s is in uppercase in Python?

94 / 100

94. What is the output of print('Python Programming'.replace(' ', '_'))?

95 / 100

95. How do you check if a dictionary d contains a specific key in Python?

96 / 100

96. What is the output of print('Python Programming'.find('Pro'))?

97 / 100

97. What is the output of print('Python'.find('h'))?

98 / 100

98. What is the output of print('Python Programming'.replace('P', 'J'))?

99 / 100

99. How do you remove an element from a set s in Python?

100 / 100

100. What will be the output of the following code? print('Hello'.lower())

Your score is

The average score is 0%