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.3k points

Related questions

asked Aug 26, 2022 78.1k views
TheSHEEEP asked Aug 26, 2022
by TheSHEEEP
7.8k points
1 answer
12 votes
78.1k views
asked Oct 16, 2024 145k views
Galatians asked Oct 16, 2024
by Galatians
8.4k points
1 answer
2 votes
145k views
1 answer
4 votes
5.1k views