Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit2-record_video-logical operator precedence #433

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fardinafdideh
Copy link
Contributor

Hi,
In "unit2.ipynb", function "record_video", it seems like there is an issue with "not" and "or" logical operators precedence in the following "while" expression:
"while not terminated or truncated"
The logical expression "terminated or truncated" should be enclosed in parentheses, otherwise for terminated = 0 and truncated = 1 the logical expression "not terminated or truncated" will not yield the False value.
So:
"while not terminated or truncated" -> "while not (terminated or truncated)"

The current version (without parentheses) would be true if "or" had higher precedence than "not", while the opposite is true, i.e., "not">"or".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant