Answer to Question #228703 in Python for srikanth

Question #228703
Acronyms

You are given some abbreviations as input. Write a program to print the acronyms separated by a dot(

.) of those abbreviations.

Input

The first line of input contains space-separated strings.

Explanation

Consider the given abbreviation, 

Indian Administrative Service. We need to consider the first character in each of the words to get the acronym. We get the letter I from the first string Indian, we get the letter A from the second word Administrative, and we get the letter S from the third word Service. So, the final output should be I.A.S.

Sample Input 1
Indian Administrative Service
Sample Output 1
I.A.S
Sample Input 2
Very Important Person
Sample Output 2
V.I.P

1
Expert's answer
2021-08-25T17:30:18-0400
abbreviation = ''
for word in input().split():
    abbreviation += word[0] + '.'
abbreviation = abbreviation[:-1]
print(abbreviation)





Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS