![](https://secure.gravatar.com/avatar/2ac744269056aca0d53cd730b8e04902.jpg?s=120&d=mm&r=g)
Hi, I wrote a Python IDE / runner for the web, that supports the code you wrote as-is: https://educa.juegos/ As Andre Roberge, `input` works like `prompt` in Javascript. You can try copy pasting the code in the IDE - your feedback is welcome at the repository <https://github.com/somosazucar/Jappy>. It will be hard to avoid functions in Javascript since it wants to use callback functions all the time. Regards, Sebastian On 28/03/18 02:18, Aivar Annamaa wrote:
Hi!
Let's say my students are able to write programs like this:
name = input("name")
if name == "Pete": greeting = "Hi" else: greeting = "Hello!"
print(f""" <html> <body> {greeting} {name}! </body> </html> """)
I'd like to allow them start writing web-apps without introducing functions first (most web-frameworks require functions).
It occurred to me that it's not hard to create a wrapper, which presents this code as a web-app (input would be patched to look up GET or POST parameters with given name).
This approach would allow simple debugging of the code on local machine and no extra libraries are required in this phase.
Any opinions on this? Has this been tried before?
best regards, Aivar
_______________________________________________ Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig