Question: Please redesign this python program to be more complex. Be sure to create a new flowchart and quick explanation on changes. def isPalindrome(data): #The purpose
Please redesign this python program to be more complex. Be sure to create a new flowchart and quick explanation on changes.
def isPalindrome(data): #The purpose of this program is to take an input and determine if #it is a palindrome while(len(data)>0): if(data[0]!=data[len(data)-1]): # this base condition return False return isPalindrome(data[1:len(data)-1]) return True
def main(): info=input("Enter input:") data=list(info) # converting the data to list(Array) if(isPalindrome(data)): print(info,"is a palindrome") else: print(info,"is not a palindrome")
if __name__ == '__main__': main()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
