pls help newbie?

J.P.Wagner nuclei at telkomsa.net
Tue May 20 18:26:04 EDT 2003


Hi!

I wrote some code for a "monkey puzzle"
I know that it's totally the wrong way of goin about it, but the idea is
there.
Can any1 pls help pointing me in the right direction of re-writing this in
the "right" way

a = 'drums'
b = 'guitar'
c = 'piano'
print 'CHET ATKINS = ','a:',a,'b:',b,'c:',c
answer = raw_input ('Please choose a, b or c: ')
if answer == 'b':
    print 'Yes'
else:
    print 'The correct answer was b:'

d = 'Francios van Heyningen'
e = 'Jurie Ferreira'
f = 'Bob Borowski'
print 'DORIS BRASCH = ','a:',d,'b:',e,'c:',f
answer1 = raw_input ('Please choose a, b, c: ')
if answer1 == 'c':
    print 'YES'
else:
    print 'The correct answer was c:'






More information about the Python-list mailing list