[Tutor] mnemonics to better learn Python

Alan Gauld alan.gauld at btinternet.com
Fri Jul 31 18:09:48 CEST 2009


"Eduardo Vieira" <eduardo.susan at gmail.com> wrote

> Hello, would anybody have a good memorization technique for boolean
> results? Like when using 'or'/'and' what it returns when both are
> false, the last is false, etc?

Hmm, I don't try to remember those, I just work it out based on 
the meaning. 

A and B is true only if both A and B are True
A or B is true if either A or B is True.

Thats it really, what's to remember?

I guess for a non native English speaker it might be more difficult 
because you need to translate and/or into the native language?
But I assume every language has an equivalent for both of those 
concepts?

In hardware engineering its more complex because you have 
nand and nor gates to deal with too, but they don't apply in 
software - at least not directly.


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list