# code for strings def lowercase(c): # True if char c is lower-case alphabetical a = ord(c) # ascii value if (a>=ord('a') and a<=ord('z')): return True else: return False # better to write above if else as just: # return (a>=ord('a') and a<=ord('z')) # the if-else is redundant since the return values is a boolean ## def uppercase(c): # True if char c is upper-case alphabetical a = ord(c) # ascii value return (a>=ord('A') and a<=ord('Z')) # returns True or False value ## def alphabetical(c): return uppercase(c) or lowercase(c) ## def lower(s): # return s with all lower case t = "" # string to be returned i = 0 while i