# # GaTech CS 1301 # released to the public domain Spring 2009 # # #A function that counts the number of J's (capital and lowercase) in a string. def countJs(inputString): count = 0 for i in inputString: if (i == "J" or i == "j"): count = count + 1 return( count) #A function that will print out each letter in a string, converting any uppercase # letter [A-Z] into it's lowercase equivalent [a-z]. # def printLower(myString): for letter in myString: if (ord(letter) < 65) or (ord(letter) > 90): print letter else: tempVar = ord(letter) tempVar = tempVar + 32 print chr(tempVar)