<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi!</p>
    Let's say my students are able to write programs like this:
    <blockquote><tt>name = input("name")<br>
        <br>
        if name == "Pete":<br>
            greeting = "Hi"<br>
        else:<br>
            greeting = "Hello!"<br>
        <br>
        print(f"""<br>
        <html><br>
        <body><br>
        {greeting} {name}!<br>
        </body><br>
        </html><br>
        """)</tt></blockquote>
    <p>I'd like to allow them start writing web-apps without introducing
      functions first (most web-frameworks require functions).</p>
    <p>It occurred to me that it's not hard to create a wrapper, which
      presents this code as a web-app (<tt>input</tt> would be patched
      to look up GET or POST parameters with given name).</p>
    <p>This approach would allow simple debugging of the code on local
      machine and no extra libraries are required in this phase.<br>
    </p>
    <p>Any opinions on this? Has this been tried before? <br>
    </p>
    <p>best regards,<br>
      Aivar<br>
    </p>
  </body>
</html>