Why doesn't Sage return `True` for `e < 3`?
I would like to know why Sage does not return True if I type e < 3 or False for pi > 4.
Is there a way to have that as output?
add a comment
I would like to know why Sage does not return True if I type e < 3 or False for pi > 4.
Is there a way to have that as output?
You have to enforce the check of the inequality by asking for a Boolean:
sage: bool(e<3)
True
sage: bool(pi>4)
False
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2021-01-31 22:11:52 +0200
Seen: 283 times
Last updated: Feb 01 '21
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.