I have to define a function add(c1, c2), where c1 and c2 are capital letters; 
the return value should be the sum (obtained by converting the letters to 
numbers, adding mod 26, then converting back to a capital letter). 

All I have so far is:

def add(c1, c2):
    ord(c1) - ord('a') + 1
    ord(c2) - ord('a') + 1

I know I need to use ord and chr, just not sure how.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to