Make Initials
Python
Easy
2 views
Problem Description
Three words are provided: first, middle, last. Output initials like R.K.S (with dots).
Input Format
One line: first middle last.
Output Format
Initials string.
Constraints
Each word has at least 1 character.
Official Solution
import sys
p=sys.stdin.read().strip().split()
if len(p)<3: sys.exit(0)
ans=p[0][0].upper()+'.'+p[1][0].upper()+'.'+p[2][0].upper()
sys.stdout.write(ans)
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!