Autism test

23 views
Skip to first unread message

Casey Contreras

unread,
Apr 16, 2026, 8:12:57 AM (11 days ago) Apr 16
to openpyxl-users
from openpyxl import Workbook

wb = Workbook()
ws = wb.active
ws.title = "Autism Test"

headers = ["Question", "Now & Younger (2)", "Only Now (1)", "Only Younger (1)", "Never (0)", "Score"]
ws.append(headers)

questions = [
"I often don’t know how to start or end conversations",
"I find it hard to understand jokes or sarcasm",
"I struggle to read facial expressions or body language",
"I feel like I’m “acting” or copying others in social situations",
"I prefer texting/online communication over face-to-face",
"I’ve been told I come across as blunt or rude without meaning to",
"Certain sounds, lights, or textures overwhelm me",
"I get irritated by small noises others ignore",
"I avoid crowded or busy places",
"I notice details others miss (patterns, sounds, visuals)",
"I get stressed when plans change suddenly",
"I prefer strict routines or predictable schedules",
"I develop deep, intense interests in specific topics",
"I can spend hours focused on one thing and lose track of time",
"I feel different from other people in a hard-to-explain way",
"Social interaction drains me, even if I enjoy it",
"I rehearse conversations in my head",
"I’ve been misunderstood a lot in my life",
"I find it hard to identify or explain my own emotions",
"As a kid, I felt socially out of place"
]

for i, q in enumerate(questions, start=2):
    ws.cell(row=i, column=1, value=q)
    ws.cell(row=i, column=6, value=f"=B{i}*2+C{i}+D{i}")

# Total score
ws["E23"] = "Total Score:"
ws["F23"] = "=SUM(F2:F21)"

# Interpretation
ws["E25"] = "Interpretation:"
ws["F25"] = '=IF(F23<=15,"Low likelihood",IF(F23<=30,"Some traits",IF(F23<=45,"Strong traits","High likelihood")))'

file_path = "/mnt/data/autism_test_auto_interpret.xlsx"
wb.save(file_path)

file_path
Reply all
Reply to author
Forward
0 new messages