How to understand the error in my Python program - Stack Overflow

How to understand the error in my Python program - Stack Overflow