|
MAIN_PROMPT = """ |
|
### **Module 4: Proportional Thinking with Percentages** |
|
"Welcome to this module on proportional reasoning with percentages! |
|
Your goal is to solve a real-world problem using different representations: |
|
1๏ธโฃ **Bar Model** |
|
2๏ธโฃ **Double Number Line** |
|
3๏ธโฃ **Equation-Based Approach** |
|
|
|
๐ **Hereโs the problem:** |
|
Orrin and Damen decided to invest money in a local ice cream shop. Orrin invests $1,500, which is 60% of their total investment. How much do Orrin and Damen invest together? |
|
|
|
๐ก **Before receiving guidance, choose a method AND explain your reasoning.** |
|
๐ **Which method would you like to use first?** |
|
(Type 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed.)" |
|
""" |
|
|
|
|
|
def get_prompt_for_method(method): |
|
if method.lower() == "bar model": |
|
return """ |
|
### **Bar Model Approach** |
|
Great choice! The Bar Model is a useful way to visualize proportions and percentages. |
|
๐ก **Now, apply the Bar Model and explain your process.** |
|
โ๏ธ **How would you draw the model and set up the problem?** |
|
โ๏ธ **What steps would you take to find the total investment?** |
|
๐ **The AI will wait for your explanation before providing any feedback.** |
|
""" |
|
|
|
elif method.lower() == "double number line": |
|
return """ |
|
### **Double Number Line Approach** |
|
Great choice! The Double Number Line helps align percentage values with real-world quantities. |
|
๐ก **Now, apply the Double Number Line and explain your process.** |
|
โ๏ธ **How would you draw and label the number line?** |
|
โ๏ธ **What values would you place at each interval?** |
|
๐ **The AI will wait for your explanation before providing any feedback.** |
|
""" |
|
|
|
elif method.lower() == "equation": |
|
return """ |
|
### **Equation-Based Approach** |
|
Great choice! Setting up an equation is a powerful way to represent proportional relationships. |
|
๐ก **Now, apply the equation method and explain your process.** |
|
โ๏ธ **How would you set up an equation to represent the given percentages?** |
|
โ๏ธ **What steps would you take to solve for the total investment?** |
|
๐ **The AI will wait for your explanation before providing any feedback.** |
|
""" |
|
|
|
return "I didnโt understand your choice. Please type 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed." |
|
|
|
|
|
def get_feedback_for_method(method, teacher_response): |
|
if not teacher_response.strip(): |
|
return "๐ **Please explain your thought process first before receiving guidance!**" |
|
|
|
if method.lower() == "bar model": |
|
if "divide" in teacher_response.lower() and "60%" in teacher_response.lower(): |
|
return "โ
Great start! You recognized that the bar should be divided into parts representing percentages. Now, can you calculate how much each part represents?" |
|
return "๐น It looks like you might need some help. Try dividing the bar into 10 equal parts, with 6 parts representing Orrinโs 60%. How much does one part represent?" |
|
|
|
elif method.lower() == "double number line": |
|
if "label" in teacher_response.lower() and "percentages" in teacher_response.lower(): |
|
return "โ
Nice work! Youโve set up the number line correctly. Can you now align the percentage values with the corresponding dollar amounts?" |
|
return "๐น No worries! Try labeling your number line with 0%, 60%, and 100% on one side and the corresponding dollar amounts on the other. How do the values align?" |
|
|
|
elif method.lower() == "equation": |
|
if "60/100" in teacher_response.lower() and "$1500/x" in teacher_response.lower(): |
|
return "โ
You're on the right track! Now, how can you solve for x in your equation?" |
|
return "๐น Try writing the proportion as (60/100) = (1500/x). What steps would you take to solve for x?" |
|
|
|
return "Interesting approach! Could you clarify your reasoning a bit more?" |
|
|