We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
deffunnyString(s):# Write your code herec=''.join(reversed(list(s)))flag=Trueforiinrange(1,len(s)):ifabs(ord(s[i])-ord(s[i-1]))!=abs(ord(c[i])-ord(c[i-1])):flag=FalseifflagisTrue:return'Funny'else:return'NotFunny'
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Funny String
You are viewing a single comment's thread. Return to all comments →