Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

klifka Group Title

Hi everyone, small question. For lecture 6 I tried, before seeiing the answer, to write a bit of code for the palindrome problem. I wrote this: def IsPalin(word): if len(word)<=1: return 'input is palindrome' else: if word[0]!=word[-1]: return 'input is not a palindrome' else: word=word[1:-1] IsPalin(word) Ok, there is room for improv, but the issue I'm having is this: when I command eg print('kook'), it prints None! If I switch the return statements by print statements it returns stat and! None, why is this?

  • one year ago
  • one year ago

  • This Question is Closed
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...


  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.