An app that will help others learn to code

Hi all,

Apologies for the long post. This is a rather ambitious idea for me, but I wanted to get your feedback.

I have this idea of making an app that will help my fellow co-workers learn Python for data analysis.

I really like the DataCamp interface that allows users to script and execute code in a console, and, of course, that code is examined to determine whether it is correct or not.

I’d like to have a similar environment where the lessons are tailored to our specific needs. I’ve looked into embedding a pythonanywhere console, but that has limitations in terms of number of consoles, the lack of inline visualizations, as well as the fact that I’m not sure how I’d return data back to examine it’s correctness.

As far as I can figure, the simplest way to go about this would be to present the problem using text and markdown (for code snippets ), allow the user to fool around in a live console (e.g., pythonanywhere), and get them to copy/paste the answer into an anvil box where the code can be evaluated to determine if it is correct or not. Of course this would not allow for easy practice with visualization but for basic data wrangling it might be okay.

Do you guys think this idea is feasible or have any insights that might help?

Al

I’m not familiar with the DataCamp interface, but I wonder whether Jupyter notebooks might be a useful alternative to PythonAnywhere? Here’s a place that allows collaborative cloud notebooks (just first thing that came up in a Google search): https://colab.research.google.com/notebooks/welcome.ipynb Maybe you can use Google Drive API to interact with the files from Anvil? https://stackoverflow.com/questions/50595831/google-colab-api

I’m pretty new to Python still so this may be way off.

@hugetim Thanks for the reply.

You are not way off. We use colab regularly here and I spent quite a while considering it for this purpose. It turns out, as far as I can tell, that you cannot embed a colab notebook in an iframe. If I could, I think I would have just about everything I need for this app.

I even tried using an iframe component that meredydd created.

Again, I could be missing something, but this what I understand at the moment. I’m certainly open to other approaches as well.

Have you considered Skulpt? It’s what Anvil uses under the hood. The Skulpt website has a simple example that gets you going with an interactive textarea pretty quickly. I’ve included it as a custom component in this Anvil app.

https://anvil.works/ide#clone:NY4M3I6V4JFHCVXM=QN7ZVKEUOJWNU4HV6NLSK6BT

4 Likes

Wow. Clearly a great approach. Exactly what I was looking for. Thanks so much Shaun. I really appreciate it.