Why does my function think that “uiouioiu”is a plaindrome?

I was reading Introduction to Computation and Programming using Python and there in an exercise, we had to write a function which would tell us if a given word is a palindrome or not, recursively.

This is the code which I wrote:

word = input()  def isPalindrome(x):     if len(x) > 1:         if x[0] == x[-1] and isPalindrome(x[1:-1]):             return('The word is Plaindrome.')         else:             return('It is not.')     else:         return(True) #As this is a base case.   print(isPalindrome(word)) 

This seems to work for all the words I pass into it except uiouioiu. isPalindrome(uiouioiu) returns The word is Palindrome.

Could someone explain what is happening?

EDIT 1: If I modify the code to:

word = input()  def isPalindrome(x):     if len(x) > 1:         if x[0] == x[-1] and isPalindrome(x[1:-1]):             return(True)         else:             return(False)     else:         return(True) #As this is a base case.   print(isPalindrome(word)) 

isPalindrome(uiouioiu) returns False as expected. Why is this happening?

What do you think about the forgery diploma?

I just read a thread on collegeconfidential about this issue and it got me thinking, I know plenty of people who forge unofficial transcripts who are in college to get jobs. But couldn't a lot of people from high school have faked their transcript to get into Harvard, Yale, Princeton, or whatever university they want to get into? It sounds hard but it's really not. It seems pretty easy to photoshop your grades and fake a seal or figure out something to send a fake transcript, or even fake…

What do you think about the forgery diploma?

I think my laptop’s touchpad isn’t supported by ubuntu (or any linux distro)

Touchpad experience was really horrible. I know for sure that it’s not a hardware issue since I can get my trackpad working in BIOS. I tried Ubuntu, Linux Mint, and Manjaro. None of them worked. Anything else works flawlessly.

Really frustrating part it that there was a time that it worked. I bought this laptop like 2 days ago and first day was awesome. Although I had to reinstall once because my trackpad, at first, didn’t work, everything worked just fine after that and I had a great time. Everything went wrong right after that day. I booted my device again the next day and suddenly trackpad was not working again. I had the exact same issue and although it was frustrating I reinstalled ubuntu again. But it didn’t work. More surprisingly the keyboard stopped working. I did like 4 re-installation of Ubuntu and they all had different issues. The following list is what I experienced so far

  • Trackpad worked, but keyboard didn’t
  • Keyboard worked, but trackpad didn’t
  • Both keyboard and trackpad didn’t work
  • Keyboard and trackpad stopped working right after logging-in
  • Trackpad didn’t work including external usb mouse

After all that, all that issues finally converged to trackpad. The list is what I have tried and failed

  1. acpi=off
  2. sudo apt install xserver-xorg-input-libinput
  3. xinput list => No trackpad visible.
  4. sudo apt-get install xserver-xorg-input-synaptics
  5. Using different distro => Manjaro didn’t work
  6. less /proc/bus/input/devices => No trackpad visible.
  7. Putting i8042.reset in grub
  8. Turning On/Off virtual trackpad or whatever in my BIOS => I don’t know what that is.

I’m really frustrated by this. I am giving my best hope at upgrading into 18.10 but I highly doubt that that’s going to work. Anything else I can try? If this laptop’s touchpad is really not supported by linux itself and that’s the problem, what should I do? Should I give up?

I really need your help

Is this spell/item interaction as infinite (and potentially deadly) as I think it is?

The 12th-level Path of Destruction spell, Sphere of Destruction, takes 30 Zeon to cast, for an effect that does 30 Base Damage (+5 per an Added Effect).

The Prometheum Exxet introduces an effect, Power Boost, which “increases the number of Zeon points powering the wielder’s spells (the listed amount is added on to the total Zeon, without cost to the character).”

If I have an item with Power Boost 30 or 40 (which exists, and is oddly attainable in my party…), can I then ‘infinitely’ (subject to not fumbling my magic projection roll etc. etc.) cast Sphere of Destruction (or indeed, any number of other spells that have a cost of 40 or less)?

Furthermore, in the case of Sphere of Destruction specifically, is this as combat-effective as I think it is (especially with the 40 Zeon variant)?

The wording of the Power Boost bonus is replicated below.

Zeon +X: The amount of Zeon added to the spell when the wielder casts it. For example, a spell that normally costs 50 Zeon points to cast would only cost the caster 30 points if used with an item with a +20 Zeon Boost. This power does not work for High Magic or Divine Magic spells.