# Write a function that takes no parameters, # and repeatedly asks for a single capital letter # from the user until the user enters one. # The function should return that letter. # Each time a user enters an invalid character, # print an error message. # built in ord('c') and chr(int) are useful #https://en.wikipedia.org/wiki/ASCII def valid_let(): char = raw_input("Enter capital") while char < 'A' or char > 'Z': print 'Invalid' char = raw_input("Enter again") return char