Get a list of names as an input from the user and make the first letters in caps and print each word as a list

Advertisements
Advertisements
Advertisements3
Advertisements4
Advertisements6
Advertisements66
#Get a list of name as an input from the user and make the first letters in caps and print each word as a list

n = int(input("Enter total number of names n = "))

names = []

print("\n Enter names: \n")

for i in range(0, n):
   x = input()
   names.append(x)

print("\n Names with first letters in caps are:\n")

for i in range(0, n):
   print(names[i].capitalize())




 

Author: Lakshmi Prasanna Ponnala

Completed M.Tech in Digital Electronics and Communication Systems.

Leave a Reply

error: Content is protected !!

Discover more from ece4uplp

Subscribe now to keep reading and get access to the full archive.

Continue reading