Explicitly bracketed comparisons in conditionals.
Made minor code formatting fix.
Clarified how input and output works in the documentation.