#ifExamples.py
#if-elif-else examples
# play computer by hand on the next of these examples,  
# and then check yourself by running that one,
# before going on to play computer on the next.  

def if1():
    for x in [5, 8]:
        print x,
        if x < 7:
            print 'A',
        print 'Z'

def if2():
    for x in [5, 8]:
        print x,
        if x < 7:
            print 'A',
        else:
            print 'B',
        print 'Z'


def if3():
    for x in [5, 10, 12]:
        print x,
        if x < 7:
            print 'A',
        elif x > 10:
            print 'B',
        print 'Z'

def if4():
    for x in [5, 10, 12]:
        print x,
        if x < 7:
            print 'A',
        elif x > 10:
            print 'B',
        else:
            print 'C',
        print 'Z'

def if5():
    for x in [5, 10, 12]:
        print x,
        if x < 7:
            print 'A',
        else:
            print 'B',
        if x > 10:
            print 'C',
        else:
            print 'D',
        print 'Z'


def if6():
    for x in [5, 10, 12]:
        print x,
        if x < 7:
            print 'A',
        else:
            print 'B',
            if x > 10:
                print 'C',
            else:
                print 'D',
        print 'Z'

for func in [if1, if2, if3, if4, if5, if6]:
    raw_input("When you have played computer on %s, press enter."
              % func.__name__)
    func()
