2.12 LAB: Name format Many documents use a specific format for a person's name. Write a program whose input is: firstNam
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
2.12 LAB: Name format Many documents use a specific format for a person's name. Write a program whose input is: firstNam
2.12 LAB: Name format 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.middlelnitial. 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. OL
lark, 414446.2654246.qx3zqy7 LAB ACTIVITY 123456789 HANG 1 Name = 10 3 if(len (Name) ==3): 11 12 13 2.12.1: LAB: Name format 14 15 input().split() firstName Name[0] middleName Name [1] lastName Name [2] H print (lastName, if (Len (Name) == 2): firstName = Name [0] lastName Name [1] ", firstName, 3 print (lastName, firstName, sep= main.py middleName[0], end= ,') 1 sep= '') 0/10 Load default template... often as you'd like before submitting for arading Relow tyne any needed.