File size: 5,731 Bytes
ce5b5d6 bdeb397 fdd608f 8ff790f af15398 fdd608f af15398 308b412 af15398 dd6ab30 c93e57e dd6ab30 c93e57e 15f53a0 fdd608f c93e57e 20f40f0 dd6ab30 c93e57e 15f53a0 fdd608f c93e57e 20f40f0 dd6ab30 c93e57e 15f53a0 fdd608f c93e57e 20f40f0 dd6ab30 c93e57e 20f40f0 c93e57e 20f40f0 c93e57e dd6ab30 15f53a0 fdd608f c93e57e fdd608f c93e57e dd6ab30 15f53a0 fdd608f c93e57e fdd608f c93e57e 15f53a0 dd6ab30 15f53a0 fdd608f c93e57e fdd608f c93e57e 15f53a0 dd6ab30 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
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.)"
"""
# Function to prompt teachers to explain first
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, can you apply the Bar Model and explain your plan?**
- How would you set up the model?
- How would you represent the percentages?
- What steps do you think are needed to find the total investment?
🚀 **Explain your thinking first, and then I will provide 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, can you apply the Double Number Line and explain your plan?**
- How would you structure the number lines?
- What values would you place on each line?
- How do you think this will help you find the total investment?
🚀 **Explain your thinking first, and then I will provide feedback!**
"""
elif method.lower() == "equation":
return """
### **Equation-Based Approach**
Great choice! Setting up an equation is a powerful way to represent proportional relationships.
**Now, can you apply the Equation-Based Approach and explain your plan?**
- What variables would you use?
- How would you set up the proportion?
- What would be your first step in solving for the total investment?
🚀 **Explain your thinking first, and then I will provide feedback!**
"""
return "I didn’t understand your choice. Please type 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed."
# Function to ensure teachers explain before receiving guidance
def check_explanation_before_guidance(method, teacher_response):
if not teacher_response.strip():
return f"I noticed you haven’t explained your reasoning yet! 🚀 Before I provide guidance, please apply the {method} and explain your plan."
return get_feedback_for_method(method, teacher_response)
# Function to provide feedback before guiding to correct solutions
def get_feedback_for_method(method, teacher_response):
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?"
elif "10%" in teacher_response.lower():
return "Good thinking! Since 10% is one part of the bar, what happens if you multiply that by 10 to get the full investment?"
else:
return """
🔹 It looks like you might need some help. Here’s how the Bar Model can be used:
1️⃣ **Draw a bar** representing the total investment.
2️⃣ **Divide it into 10 equal parts**, since percentages work in 10s.
3️⃣ **Shade 6 parts** to represent Orrin’s 60% investment.
4️⃣ **Find the value of 10%**:
- Since 60% = $1,500, divide $1,500 by 6.
5️⃣ **Find 100%** by multiplying the value of 10% by 10.
💡 What do you think about this approach? Would you like to adjust your method?
"""
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. Now, can you match the percentage values with the corresponding dollar amounts?"
elif "find 100%" in teacher_response.lower():
return "That's a key step! If you have 60% labeled, what do you need to do to determine 100%?"
else:
return """
🔹 It looks like you might need some guidance. Here’s how the Double Number Line can be used:
1️⃣ **Draw two parallel number lines** – one for percentages (0% to 100%) and one for dollar amounts.
2️⃣ **Mark 60% on the percentage line** and align it with $1,500 on the dollar line.
3️⃣ **Find 10%** by dividing $1,500 by 6.
4️⃣ **Find 100%** by multiplying 10% by 10.
💡 Does this approach make sense? Let me know what you think!
"""
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, what would you do to solve for x?"
elif "cross multiply" in teacher_response.lower():
return "Good step! Can you complete the cross multiplication and solve for x?"
else:
return """
🔹 It looks like you might need some help. Here’s how an equation can be set up:
1️⃣ **Write the proportion:**
- (60/100) = (1500/x)
2️⃣ **Solve for x** by cross multiplying:
- 60x = 1500 × 100
3️⃣ **Divide by 60** to find x.
💡 Try solving it using this approach. What do you get?
"""
return "Interesting approach! Could you clarify your reasoning a bit more?"
|