Hi Im is create my own text game, it very basic :-) and it´s starting with enter name, the basic flow is working, to have the first letter capitalized in first name, but if capitalize the second letter also, it´s not working, my idea is only allow first letter capitalized, and program should go back if this condition is not fulfilled I was trying to fix this, by adding
elif i != i.upper()[:2]: print("The second letter was capitalized, please retype your name ")
def input_name(): # Take name as parameter and use it later
first_name = (input(str("What is your first name? ")))
sur_name = (input(str("What are your surname? ")))
first_capitalized_letter_first_name = first_name
first_capitalized_letter_sur_name = sur_name
for i in first_capitalized_letter_first_name[:1]:
if i == i.upper():
print("Good you can start with capitalized letter when you are writing your first name ")
elif i != i.upper()[:2]:
print("The second letter was capitalized, please retype your name ")