Answer:
if __name__ == '__main__':
user_input = input() # read name
name = user_input.split() # split name into separate words
if len(name) == 3: # if number of words in name is 3
print(name[2] + ", " + name[0][0] + "." + name[1][0] + ".")
elif len(name) == 2: # if number of words in name is 2
print(name[1] + ", " + name[0][0] + ".")
Step-by-step explanation:
The code is written in "Python".