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

User Wes Nolte
by
4.9k points

2 Answers

2 votes

Answer: item ==5

Explanation: trust me bro

User Luis Vargas
by
5.5k 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

User Haniff
by
4.6k points