There are a few directions you could go with this.
The obvious one, springing from your question title, would be to run your Python code on a web server and then generate web pages that interact with your core code. Those are the types of suggestions you got in the comments on your question. The problem with this approach is that you have to deal with the whole web stack for an interactive client-server application, and those stacks are complicated and heterogenous, so they're hard for beginners to setup. (Server receives request, sends it to server-side app, uses results to generate webpage and session information, sends webpage to client; client renders webpage with controls, then requests additional information either via a form [fairly easy but clunky] or via a websocket or Socket.io [dynamic but even more complicated].) See the comments you got for some pointers in this direction.
An easier option for a simple app like this would be just to do everything in a self-contained page in the web browser. In that case, you'd just need to write some javascript that does the equivalent of your Python app, using controls and buttons instead of input
statements. Then embed that javascript in an HTML file, and host the HTML file on any server (possibly even a Google Sites page), or just send the HTML file to your users and let them open it in a web browser. But that wouldn't reuse much of what you've learned about Python already.
Another option would be to use Python in the web browser. This would mean using a library that allows use of Python code directly in a webpage, possibly via WebAssembly. Emscripten and Skulpt seem to be among the more mature implementations of this. Here are some links to interesting discussions of the options for running Python in a browser: How to choose a package for Python in the browser, Compiling Python to WebAssembly, discussion on ycombinator of compiling to WebAssembly, and another discussion in the data science context.
If you want to reuse your Python code and don't care too much about having total control of the hosting environment, your best option would probably be to use a ready-made Python-in-browser hosting environment, like trinket.io (based on Skulpt). This lets you write Python scripts, which they host for you so anyone can run them in a web browser. e.g., here's an implementation of your script (click the pencil icon to edit it). There's also a pretty enthusiastic article about Trinket in Wired.