Created
April 20, 2017 07:35
-
-
Save uktechreviews/62da73d5861c80823727a46fe94c6969 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_answer(expected): | |
while True: | |
if sensor.touch_status_changed(): | |
sensor.update_touch_data() | |
if sensor.is_new_touch(expected): | |
if expected !=99: | |
print ("Correct") | |
state = True | |
return state | |
break | |
else: | |
if expected !=99: | |
print ("Incorrect") | |
state = False | |
return state | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment