firstName = input()
middleName = input()
lastName = input()
#middleInitial
#firstInitial
middleInitial=middleName[0]
firstInitial=firstName[0]
print(lastName,',',end='')
print(firstInitial,'.',middleInitial,'.')
This is just an example, the problem I have is getting the output to print the way I want it to.
Pat <<input
Silly <<input
Doe <<input
Doe ,P . S . <<output
^^^this is what my program produces.
Many documents use a specific format for a person's name. Write a program whose input is:
firstName middleName lastName
and whose output is:
lastName, firstInitial.middleInitial.
Ex: If the input is:
Pat Silly Doe
the output is:
Doe, P.S. << expected output.
I've included the assignment that is attached to this particular bit of code for clarification. Any help would be appreciated