BPSC TRE – Programming Languages & Web Technologies | Full Subject Test 1

Questions 56-60 of 80

0% completed (0/80 answered)
Your score 0/80 0 answered
Correct 0 Incorrect 0 Unanswered 80 Accuracy 0%

Question 56

MCQ · Single Correct 1 mark

What is the output of slicing expression 'Python'[-3:] in Python?

Answers for question 56

Question 57

MCQ · Single Correct 1 mark

In Python OOP, what special method serves as the class constructor to initialize instance attributes?

Answers for question 57

Question 58

MCQ · Single Correct 1 mark

Which dictionary method safely returns a value for a given key, returning a default value if the key is NOT present in the dictionary?

Answers for question 58

Question 59

MCQ · Single Correct 1 mark

What does list comprehension [x**2 for x in range(5) if x % 2 == 0] evaluate to?

Answers for question 59

Question 60

MCQ · Single Correct 1 mark

What does the @staticmethod decorator indicate when applied to a method inside a Python class?

Answers for question 60
Scroll to Top