Skip to content

Instantly share code, notes, and snippets.

@korayal
Created February 25, 2020 20:45
Show Gist options
  • Save korayal/a6ddb72ab2e9eaf2a8be7d8faeb5a115 to your computer and use it in GitHub Desktop.
Save korayal/a6ddb72ab2e9eaf2a8be7d8faeb5a115 to your computer and use it in GitHub Desktop.
# Parent Assessment at "Raising An Emotionally Intelligent Child"
# your answers to the questions at http://media1.razorplanet.com/share/510260-9563/resources/1084755_Parent.Assessment.docx
a = {'1': False, '2': True}
def countTrues(trues, answers, divider):
return len(list(filter(lambda x: x[0] in trues and x[1], answers.items()))) / divider
# Dismissing (divide by 25)
dismissingTrue = ['1', '2', '6', '7', '9', '12', '13', '14', '15', '17', '18',
'19', '24', '25', '28', '33', '43', '62', '66', '67', '68', '76',
'77', '78', '80']
disapprovingTrue = ['3', '4', '5', '8', '10', '11', '20', '21', '22', '41',
'42', '54', '55', '56', '57', '58', '59', '60', '61', '63', '65', '69', '70']
laissezTrue = ['26', '44', '45', '46', '47', '48', '49', '50', '52', '53']
emcoTrue = ['16', '23', '27', '29', '30', '31', '32', '34', '35', '36', '37',
'38', '39', '40', '51', '64', '71', '72', '73', '74', '75', '79', '81']
template = '''
Dismissing: %0.02f
Disapproving: %0.02f
Laissez-Faire: %0.02f
Emotion Coaching: %0.02f
'''
print(template % (countTrues(dismissingTrue, a, 25),
countTrues(disapprovingTrue, a, 23),
countTrues(laissezTrue, a, 10),
countTrues(emcoTrue, a, 23)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment