Computer Science, asked by mayuriramteke1000, 3 months ago

5)
a.
Which of the following is true for "==" operator in python programming?
compares the values of both the operands and checks for value equality
b. checks whether both the operands refer to the same object
c. checks if the value is found in the sequence
d. None of the above
Оа
Ob
Ос
Od

Answers

Answered by indiantechsmith
3

(a) Compares the values of both the operands and checks for value equality

Answered by varshamittal029
0

Answer: Option (a) is the correct option.

Concept:

'==' is the equality operator in Python programming language.

Given:

Given options are:

a. compares the values of both the operands and checks for value equality.

b. checks whether both the operands refer to the same object.

c. checks if the value is found in the sequence.

d. None of the above.

Find:

Find the correct option.

Solution:

Option (a) is correct

'==' checks if the values of two operands are equal or not. It returns True if the given two operands are equal and return False if they are not equal.

Option (b) is incorrect

The 'is' operator determines whether or not both operands correspond to the same object (present in the same memory location).

Option (c) is incorrect

The 'in' operator is used to determine whether a value is present in a sequence.

Option (d) is incorrect

As option (a) is the correct answer, therefore this is incorrect.

Similar questions