Created
June 18, 2021 14:23
-
-
Save TanjimReza/6f4046e399df42732a0d03c5b204fdd3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = input("Enter word: ") | |
length_of_name = len(name) | |
reversed_name = "" | |
for i in range(length_of_name-1, -1, -1): | |
reversed_name = reversed_name + name[i] | |
if reversed_name == name: | |
print("The word is palindrome!") | |
else: | |
print("The word is not palindrome.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment