MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the output of the following program?language = [’P’, ‘y’, ‘t’, ‘h’, ‘o’, ‘n’]print(language[:-4])
A
[’t’]
B
[’P’, ‘y’]
C
[’P’, ‘y’, ‘t’]
D
[’t’, ‘h’, ‘o’, ‘n’]
Explanation: 

Detailed explanation-1: -What will be the output of the following Python function? Explanation: The function max() is being used to find the maximum value from among-3, -4 and false. Since false amounts to the value zero, hence we are left with min(0, 2, 7) Hence the output is 0 (false).

Detailed explanation-2: -The correct answer to the question “What will be the output of the following Python code” is option (B). 0 1 2.

Detailed explanation-3: -05. What is output for − min(”hello world”) Explanation: python considers a blank space character as the minimum value in a string.

There is 1 question to complete.