def Userinput(): x1 = str(input('string comparision[1(play), -1(quit)]:')) if x1 == str(1): s1 = str(input('First string entered by user: ')) s2 = str(input('Second string entered by user: ')) n = int(input('enter number of Character to Compare: ')) result=strNcompre(s1,s2,n) if result==1: print(s1+" It is greater than "+s2) elif result==-1: print(s1+" It is not greater than "+s2 else: print(s1+" It is equal to "+s2) Userinput() else: print("Finished") Userinput()