Computer Science, asked by Anonymous, 3 months ago

Spammer answer will be reprted imidetly
Which of the following is/are not a valid operator in python?
(a) - =
(b) or
(c) > =
(d) = !​

Plz answer it ! Fasttttttttttttttttt
Need your help

Answers

Answered by BrainlyUnnati
3

ANswer :

(d) =! is the invalid operator among the given options.

ExplanatioN :

(a) -=

  • This is an assignment operator, that first subtracts and then stores the result into the variable it's assigned to.

For example:

>>> num = 7

>>> num -= 4

>>> print(num)

3

#what happens is num's value, [7] gets subtracted by 4, and the resultant value becomes the new value of the variable 'num'.

(b) or

  • This is a logical operator that returns 'True' only if both sides of the operator/one side of the operator are/is a True value(s).

For example:

>>> n1 = 7

>>> n2 = 9

>>> n1 == 7 or n2 == 9

True

#returns 'True' since both the relations are true.

(c) >=

  • This is the greater than or equal to operator. It returns 'True' if a value is greater than/equal to another value.

For example:

>>> 7 >= 8

False

#returns 'False' since 7 is not greater than/equal to 8.

(d) =!

  • This isn't a valid operator. The correct operator for the not equal to operation, is !=.

For example:

>>> 7 != 10

True

#returns 'True' since 7 is not equal to 10.

Answered by FindingLove
2

ANswer :

(d) =! is the invalid operator among the given options.

ExplanatioN :

(a) -=

  • This is an assignment operator, that first subtracts and then stores the result into the variable it's assigned to.

For example:

>>> num = 7

>>> num -= 4

>>> print(num)

3

#what happens is num's value, [7] gets subtracted by 4, and the resultant value becomes the new value of the variable 'num'.

(b) or

  • This is a logical operator that returns 'True' only if both sides of the operator/one side of the operator are/is a True value(s).

For example:

>>> n1 = 7

>>> n2 = 9

>>> n1 == 7 or n2 == 9

True

#returns 'True' since both the relations are true.

(c) >=

  • This is the greater than or equal to operator. It returns 'True' if a value is greater than/equal to another value.

For example:

>>> 7 >= 8

False

#returns 'False' since 7 is not greater than/equal to 8.

(d) =!

  • This isn't a valid operator. The correct operator for the not equal to operation, is !=.

For example:

>>> 7 != 10

True

#returns 'True' since 7 is not equal to 10.

Similar questions