0

Please ,, solve the error. palindrome word

def is_palindrome(word): if word == word[::-1]: return "name is palindrome" return "name is not palindrome" word = input ("enter name ") print (is_palindrome)

14th Jul 2019, 2:39 PM
Shourov Saha
Shourov Saha - avatar
5 Respostas
+ 2
dreams success return "Name is palindrome" return "Name is not palindrome" print(is_palindrome(word))
14th Jul 2019, 4:32 PM
Diego
Diego - avatar
+ 2
Because you called your function without passing it an argument. As Diego said, it should be print(is_palindrome(word)) not print(is_palindrome)
15th Jul 2019, 12:35 AM
David Ashton
David Ashton - avatar
+ 1
You can only return true or false in this case, but you can print name is palindrome or not
14th Jul 2019, 3:10 PM
Dejan Francuz🥇
Dejan Francuz🥇 - avatar
+ 1
Thank you 😊
14th Jul 2019, 4:33 PM
Shourov Saha
Shourov Saha - avatar
0
Why code show error??
14th Jul 2019, 4:40 PM
Shourov Saha
Shourov Saha - avatar