An interactive web app built using Python, Streamlit, and Google's Gemini 1.5 Flash model to solve Grade 6–10 level math problems with step-by-step explanations.
In this project, a simple AI-powered math tutor app has been developed using:
- Google Generative AI (
google-generativeai) - Streamlit for the frontend
- Python and
dotenvfor API integration and environment management
Users can input math problems in natural language and receive clear, detailed solutions from Google's Gemini model.
- 🧮 Solves arithmetic, algebra, probability, and word problems
- 📚 Explains steps in a human-readable way
- 🖼️ Simple and clean web interface using Streamlit
- 🔒 API key managed via
.envfile
- Type your math problem in the text input field.
- Click the "Solve" button.
- The AI Math Tutor sends the problem to Gemini 1.5 Flash model.
- The solution (along with explanation) is shown on screen.
Here are some examples the AI successfully solved with explanations:
-
Distance Problem:
Two runners are 48 miles apart when they start running toward each other. The speed of the second runner is 2 mph slower than the speed of the first runner. What is the speed of the first runner if they meet in two hours?
-
Percentage Population Growth:
The population of a town increased by 16.66% in 1990 and by 10% in 1991. If the population at the beginning of 1990 was 30,000, what was it at the end of 1991?
-
Arithmetic Progression (AP):
Ramkali saved Rs 5 in the first week of a year and then increased her weekly saving by Rs 1.75. If in the nth week, her weekly savings become Rs 20.75, find n.
-
Unit Conversion & Ratio:
A baker has 50 pounds of flour and needs to make 100 cupcakes. If each cupcake requires 1/4 cup of flour, and there are 16 cups in a pound, how many cupcakes can the baker make?
-
Probability:
Throw a dice 3 times. What's the probability that we get three 6s?