[Tutor] Running a loop

Alan Gauld alan.gauld at btinternet.com
Sat Oct 15 21:18:45 CEST 2011


On 15/10/11 16:58, Jason Barry wrote:

> wheel1=['ZOMBIE', 'WITCH', 'CAT', 'GHOST',
> 'CANDY','PUMPKIN','PUMPKIN','CANDY', 'GHOST','CANDY']

> def checkwin (wheel1index, wheel2index, wheel3index):
>
> if wheel1index=='zombie' and wheel2index=='zombie' and wheel3index==
> 'zombie':


The values are defined as uppercase(eg 'ZOMBIE')
but the tests are for lowercase ('zombie').

Those are two entirely different things so far as Python is concerned.

HTH,

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



More information about the Tutor mailing list