Answered # OR statment

Moschops 683 Discussion Starter rjstamey Im trying to bind my custom vertical scrollbar to datagridview is this possible.. Please help Thnak you..

0

**while(y!=1||y!=2);**

Can you imagine any value of y for which at least one side of the OR isn't true?

The answer is no - if y=1, then the right hand side is true, so the whole OR statement is true. If y=2, then the left hand side is true, so the whole OR statement is true. If y= anything else, both sides are true so the whole OR statement is true.

You want it to keep going when: y does not equal one AND y does not equal two.

0

while(y!=1||y!=2);Can you imagine any value of y for which at least one side of the OR isn't true?

The answer is no - if y=1, then the right hand side is true, so the whole OR statement is true. If y=2, then the left hand side is true, so the whole OR statement is true. If y= anything else, both sides are true so the whole OR statement is true.

You want it to keep going when: y does not equal one AND y does not equal two.

Thank you so much. Can't believe I didn't notice that.

This question has already been answered. Start a new discussion instead.

Recommended Articles

i am trying to create a library management system which is supposed to be used to store/keep infp for the library and the library members( book title, author, name and picture for borrower and other stuffs). The app has 6 buttons, delete, save, add,previsous,next, and upload( for upload ...

I am trying to send a message to my websocket server but I keep getting this error.

```
Traceback (most recent call last):
File "send.py", line 5, in <module>
ws = websocket.create_connection("ws://ipaddress:9001")
AttributeError: 'module' object has no attribute 'create_connection'
```

I created a python server file server is started but when I ...