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
Answers
Answered by
8
Program in Python:
n = int(input("Enter total number of names : "))
Name = []
print("\nEnter names : ")
for i in range(0, n):
x = input()
Name.append(x)
print("\nNames are : ")
for i in range (0,n):
print(Name[i].capitalize())
Output:
Enter total number of names : 5
Enter names :
shivi
sankalp
nikita
rohit
pooja
Names are :
Shivi
Sankalp
Nikita
Rohit
Pooja
Similar questions