Inspiration
We wanted to create something to fit the challenge from RecourseAI to create an educational hack.
What it does
Teaches basic python skills and processes python commands live on the website.
How I built it
Using django backend to run a separate thread to process the user's code. Returns the stdout to the website to be displayed, and checks against a database value to see if it is what was expected/desired. If correct, next level is unlocked.
Challenges I ran into
Ensuring the editor doesn't crash due to infinite loops - still an issue, but avoids the most obvious cases.
Accomplishments that I'm proud of
Running a python file as a background process and comparing its output to the stored values. I'm pretty happy because in theory it won't be hard to expand to other languages!
What I learned
How to use python subprocess and run python code through a web interface.
What's next for pyLearn
Adding additional levels, and further authentication that each level is correct than just the output. Ideally checking which functions and techniques are used, not just the prints.

Log in or sign up for Devpost to join the conversation.