Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 7 Online
OpenStudy (anonymous):

Can anyone briefly explain these to me <= >= == =+ Thanks very much

OpenStudy (anonymous):

um is the question asking equal to or greater than then i might be able to explain it.

OpenStudy (anonymous):

< with a line under it could mean it could be the same number or or less than. ex: 6<6, 7, 8, ect...

OpenStudy (anonymous):

srry if i read the question wrong

OpenStudy (anonymous):

In order: less than or equal to greater than or equal to equal to (because = is the assignment operator) add to (x+=2 is a quicker way of writing x=x+2)

OpenStudy (rsmith6559):

The last one is actually written +=.

OpenStudy (anonymous):

These are all great answers. To delve into it a little more: The first three: <=, >=, == are comparison/relational operators. Basically, they compare what is before the symbol to what comes after and are usually used to return a boolean (True or False). Example: if (x >= y) // assume x and y are integers. This line asks if the value of x is equal to or greater than the value of y. /*code goes here*/ //if x is greater than or equal to y then do this line of code. (if x >= y was True) else /*different code here*/ //this line of code would be called if x is less than y. (if x >= y was False) The =+ should be written += and works as Morewrite mentioned above.

OpenStudy (anonymous):

I find all answers very helpful. appreciate allot

OpenStudy (anonymous):

yw

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!