Using Nested If Function Python Syntax Checker