26.7k views
0 votes
Can someone help me on codehs. its 7.1.5: initials. here is what your supposed to do

Write a function called initials that will take a first and last name and return their initials using the following format:

initials("Tracy", "Turtle")
# => "T.T."
initials("Peter", "Parker")
# => "P.P."

User Bsquare
by
7.3k points

1 Answer

14 votes

Answer:

first = input( "What is your first name? " )

last = input( "What is your last name? " )

def initials():

print ("Your initials are: "+first[0]+"."+last[0]+".")

initials ()

Step-by-step explanation:

it works when I test but it won't submit. Hope this helps

User Laurent Gabiot
by
8.1k points