asked 209k views
3 votes
When searching you will need to compare a data value to the desired value. Which line of code returns true when the item is equal to five?

item == 5

item = 5

item != 5

item is 5

2 Answers

2 votes

Answer: item ==5

Explanation: trust me bro

answered
User Luis Vargas
by
8.4k points
4 votes

Answer:

The right answer is: item==5

Step-by-step explanation:

In Python, two operators are used for equal to comparison.

  • ==
  • is

From these, == is used when two data values have to be compared or actual values of two variables have to be compared while "is" is used when it has to be checked if two variables refer to same object or data.

Hence,

In this case, == will be used as two data values are being compared.

So,

The right answer is: item==5

answered
User Haniff
by
8.0k points

No related questions found