Skip to content

Commit

Permalink
Issue pclubuiet#44 resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
Aviral-Sharma-10 committed Oct 13, 2018
1 parent 6d5c3ab commit 7c2686f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
2 changes: 0 additions & 2 deletions introduction/Aviral/test.md

This file was deleted.

25 changes: 25 additions & 0 deletions programs/Palindrome_py3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""
Program to check whether entered string is Palindrome or not
using list manipulation.
"""

print("Palindrome Test\n\n")

str1=input("Enter string to be tested : ")
l1=list(str1)
palindrome=True

if(len(l1)%2==0):
v = int(len(l1)/2)
else:
v = int((len(l1)-1)/2)

for i in range(v):
if(l1[i].upper() != l1[-1-i].upper()):
palindrome=False
break

if(palindrome==False):
print("\n",str1,"is not Palindrome.")
else:
print("\n",str1,"is Palindrome.")

0 comments on commit 7c2686f

Please sign in to comment.