CodeSolved

Solved Programming Questions & Exercises

Names standardization

Practice Easy 1623/ Download 430 Views

Write a program that reads 4 names from the input and prints them in the output

Note: The standard name is the first letter of which is the uppercase English letter and the rest of the letters are small

11 Answers

This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
names = []
print('10 esm vared konid!')
for _ in range(10):
    name = str(input('esm ra vared konid:'))
    names.append(name)

standardized_names = []
for name in names:
    standardized_names.append(name.capitalize())

for name in standardized_names:
    print(name)
Ati.hamedi Download Python
names = []
for i in range(10):
    name = input(f"Enter name {i+1}: ").strip()
    names.append(name[0].upper() + name[1:].lower())
for esm in names:
    print(esm)
Reznum Download Python
names=[]
for x in range(10):
    name=input("Enter name:")
    names.append(name)
 
stnames=[l for l in names if l==l.lower().title()]
print(stnames)
Yasin.hn Download Python
def Standard():     names = []    for _ in range(10):        q = input("")        m = q.capitalize()        names.append(m)    print(names)  Standard()
list_names = []
while True:
    name = input("Enter Name: ")
    if name.isdigit():
        print("Invalid name. Try again.")
        continue
    if name.lower() == "end" :
        break
    name = name.capitalize()
    list_names.append(name)

print(list_names)

Emrimo Download Python
str = []
for i in range(10) :
    name = input("Enteer Name : ").lower()
    name = name.title()
    str.append(name)
print(str)

list_name = []

while len(list_name) < 10:
    name = str(input("Enter your name : "))

    capital_name = name.capitalize()
    list_name.append(capital_name)

    print(capital_name)
    print(list_name)
User 4207 Download Python
<< Previous page 1 2 Next page >>

Submit answer

Submitting answers is currently unavailable.

×
×
Close