#!/usr/bin/env python
from __future__ import print_function
from __future__ import unicode_literals


def safe_input(prompt):
    """Return user input after catching KeyboardInterrupt and EOFError"""
    try:
        reply = raw_input(prompt)
    except (EOFError, KeyboardInterrupt):
        quit()
    else:
        return reply.decode('utf-8')  # Convert input to unicode

prompt = "Input a Lisp style statement '(test)': "
reply = safe_input(prompt)


def check_statement(value):
    where_open = value.find("(")
    where_close = value.find(")")

    if ((where_open == -1) and where_close != -1) or (where_open > where_close):
        return -1
   

@@ -485,148 +485,247 @@
     
-where_open = value.find(%22(%22)
+open_index = %5Bi for i, val in enumerate(reply) if val == %22(%22%5D
 %0A    
-where_close = value.find(%22)%22)
+close_index = %5Bi for i, val in enumerate(reply) if val == %22)%22%5D
 %0A%0A    
-if ((where_open == -1) and where_close != -1) or (where_open %3E where_clo
+paren_total_broken = %5Ba %3C b for a, b in zip(open_index, close_index)%5D%0A%0A    if paren_total_broken.find(Fal
 se):
@@ -746,9 +746,32 @@
 n -1%0A   
+ else:%0A        return 0
 %0A

Add function for broken and groundwork for other objectives