name = input("Enter your full name: ")
words = name.split()
is_valid = True
for word in words:
if not word.isalpha() or word[0].islower():
is_valid = False
break
if is_valid:
print("The name is valid.")
else:
print("The name is not valid.")
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
name = input("Enter your full name: ")
words = name.split()
is_valid = True
for word in words:
if not word.isalpha() or word[0].islower():
is_valid = False
break
if is_valid:
print("The name is valid.")
else:
print("The name is not valid.")