I want to build a RECURSIVE function that takes a ternary letter tree and counts the number of uppercase letters in the tree. I know this is a simple task to many experienced programmers, but I cannot figure out what to do. Here is what I have so far:
def count_upper(tlt, ):
"""returns the number of uppercase letters in a ternary letter tree
tlt -> number"""
if i.isupper():
return count_upper(tlt, )
else:
return 0
Help if you can...
tlt?tlt.i?