An easier solution is simply to type 'print' in place of 'test' in the
program. It will work.
regards,
Sarma.


On Mon, Oct 10, 2016 at 2:09 AM,  <jeremygaine...@gmail.com> wrote:
> Everytime I run this it says test is not defined . I don’t understand. Can 
> someone please help correct?
>
> #Question 10
>
> def reverse(mystr):
>     reversed = ''
>     for char in mystr:
>         reversed = char + reversed
>     return reversed
>
> def is_palindrome(myStr):
>     if myStr in reverse(myStr):
>         return True
>     else:
>         return False
>
> test(is_palindrome("abba"))
> test(not is_palindrome("abab"))
> test(is_palindrome("tenet"))
> test(not is_palindrome("banana"))
> test(is_palindrome("straw warts"))
> test(is_palindrome("a"))
> test(is_palindrome(""))
>
> -Jeremy Gainey
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
  • [Tutor] Pytho... jeremygainey14
    • Re: [Tut... Alan Gauld via Tutor
    • Re: [Tut... D . V . N . Sarma డి . వి . ఎన్ . శర్మ

Reply via email to