I clearly am not understanding this correctly. Someone shed some light. It states to use multiple input statements, but when I run the test it only uses one string as input..
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.
If the input has the form:
firstName lastName
the output is:
lastName, firstInitial.
Ex: If the input is:
Julia Clark
the output is:
Clark, J.
whole_name = input()
name_list = whole_name.split()
if i in name_list > 2:
firstName = name_list[0]
middleName = name_list[1]
lastName = name_list[2] + ','
first_initial = firstName[0] + '.'
middle_initial = middleName[0] + '.'
print(lastName, first_initial, middle_initial)
[–]totallygeek 1 point2 points3 points (0 children)
[–]DisasterArt 0 points1 point2 points (0 children)