Your task for today is to take the Number Statistics Tool and turn it into a Flask-based web app. Instead of using the command line, users will enter numbers into a web form, and the app will display a neatly formatted statistics report in the browser. This teaches you how to connect backend Python logic with a web interface using Flask.
📝 Project Task
The program should:
Create a Flask app with one main route (
/
)Show a web form with a text input where the user can enter numbers (comma-separated)
When submitted, process the numbers and calculate:
Minimum and maximum
Average
Variance and standard deviation
Return the results as an HTML page with a small report
Bonus (optional):
Add error handling (e.g., invalid input shows an error message)
Use Bootstrap for nicer styling
Provide a “Reset” button to clear the form
This project helps you practice web development with Flask, connecting Python functions to user input via HTML forms, and rendering results dynamically in a web page.
📌 Expected Output
The user types in some numbers divided by commas and after pressing “Submit” they get the statistics displayed:
💻 Launch This Project in Colab
Open the interactive Google Colab notebook for today’s project — with full instructions, hints, and solutions.
Click the button below to start coding — no setup needed: