Aug-29-2018, 02:14 AM
(This post was last modified: Aug-29-2018, 02:14 AM by wak_stephanie.)
I created a Python function that take an argument, full name, gets full name's initials and prints them out capitalized but the problem is with my main function I believe at the end of the code in terms of being a global scope vs local scope... I could be wrong though. Any help is appreciated
imports get_initials """ Given a person's name, returns the person's initials (uppercase) """ # TODO your code here def get_initials(fullname): fullname.split() name_list = xs.split() print(name_list) get_initials = input("What is your full name?") initials = "" def main(): for name in name_list: # go through each name initials += name[0].upper() # append the initial return intials if__name__ == '__main__': print: initials main()[error]invalid syntax (initials.py, line 16)