You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Program of Thoughts pattern Chen (2022), TMLR
2
+
defs:
3
+
program_of_thought:
4
+
function:
5
+
question: str
6
+
model: str
7
+
return:
8
+
- |
9
+
Question: Janet's ducks lay 16 eggs per day. She eats three for breakfast every morning and bakes muffins for her friends every day with four. She sells the remainder at the farmers' market daily for $2 per fresh duck egg. How much in dollars does she make every day at the farmers' market?
10
+
# Python code, return ans
11
+
total_eggs = 16
12
+
eaten_eggs = 3
13
+
baked_eggs = 4
14
+
sold_eggs = total_eggs - eaten_eggs - baked_eggs
15
+
dollars_per_egg = 2
16
+
result = sold_eggs * dollars_per_egg
17
+
18
+
Question: A robe takes 2 bolts of blue fiber and half that much white fiber. How many bolts in total does it take?
19
+
# Python code, return ans
20
+
bolts_of_blue_fiber = 2
21
+
bolts_of_white_fiber = num_of_blue_fiber / 2
22
+
result = bolts_of_blue_fiber + bolts_of_white_fiber
23
+
24
+
Question: Josh decides to try flipping a house. He buys a house for $80,000 and then puts in $50,000 in repairs. This increased the value of the house by 150%. How much profit did he make?
result = value_of_house - cost_of_repair - cost_of_original_house
31
+
32
+
Question: Every day, Wendi feeds each of her chickens three cups of mixed chicken feed, containing seeds, mealworms and vegetables to help keep them healthy. She gives the chickens their feed in three separate meals. In the morning, she gives her flock of chickens 15 cups of feed. In the afternoon, she gives her chickens another 25 cups of feed. How many cups of feed does she need to give her chickens in the final meal of the day if the size of Wendi's flock is 20 chickens?
result = cups_for_all_chicken - cups_in_the_morning - cups_in_the_afternoon
40
+
41
+
Question: Kylar went to the store to buy glasses for his new apartment. One glass costs $5, but every second glass costs only 60% of the price. Kylar wants to buy 16 glasses. How much does he need to pay for them?
42
+
# Python code, return ans
43
+
num_glasses = 16
44
+
first_glass_cost = 5
45
+
second_glass_cost = 5 * 0.6
46
+
result = 0
47
+
for i in range(num_glasses):
48
+
if i % 2 == 0:
49
+
result += first_glass_cost
50
+
else:
51
+
result += second_glass_cost
52
+
53
+
Question: Marissa is hiking a 12-mile trail. She took 1 hour to walk the first 4 miles, then another hour to walk the next two miles. If she wants her average speed to be 4 miles per hour, what speed (in miles per hour) does she need to walk the remaining distance?
Question: Carlos is planting a lemon tree. The tree will cost $90 to plant. Each year it will grow 7 lemons, which he can sell for $1.5 each. It costs $3 a year to water and feed the tree. How many years will it tak
63
+
e before he starts earning money on the lemon tree?
Question: When Freda cooks canned tomatoes into sauce, they lose half their volume. Each 16 ounce can of tomatoes that she uses contains three tomatoes. Freda's last batch of tomato sauce made 32 ounces of sauce. How many tomatoes did Freda use?
result = num_tomato_in_last_batch / (1 - lose_rate)
82
+
83
+
Question: Jordan wanted to surprise her mom with a homemade birthday cake. From reading the instructions, she knew it would take 20 minutes to make the cake batter and 30 minutes to bake the cake. The cake would require 2 hours to cool and an additional 10 minutes to frost the cake. If she plans to make the cake all on the same day, what is the latest time of day that Jordan can start making the cake to be ready to serve it at 5:00 pm?
Question: Janet's ducks lay 16 eggs per day. She eats three for breakfast every morning and bakes muffins for her friends every day with four. She sells the remainder at the farmers' market daily for $2 per fresh duck egg. How much in dollars does she make every day at the farmers' market?
113
+
# Python code, return ans
114
+
```python
115
+
total_eggs = 16
116
+
eaten_eggs = 3
117
+
baked_eggs = 4
118
+
sold_eggs = total_eggs - eaten_eggs - baked_eggs
119
+
dollars_per_egg = 2
120
+
result = sold_eggs * dollars_per_egg
121
+
```
122
+
123
+
Question: A robe takes 2 bolts of blue fiber and half that much white fiber. How many bolts in total does it take?
124
+
# Python code, return ans
125
+
```python
126
+
bolts_of_blue_fiber = 2
127
+
bolts_of_white_fiber = num_of_blue_fiber / 2
128
+
result = bolts_of_blue_fiber + bolts_of_white_fiber
129
+
```
130
+
131
+
Question: Josh decides to try flipping a house. He buys a house for $80,000 and then puts in $50,000 in repairs. This increased the value of the house by 150%. How much profit did he make?
result = value_of_house - cost_of_repair - cost_of_original_house
139
+
```
140
+
141
+
Question: Every day, Wendi feeds each of her chickens three cups of mixed chicken feed, containing seeds, mealworms and vegetables to help keep them healthy. She gives the chickens their feed in three separate meals. In the morning, she gives her flock of chickens 15 cups of feed. In the afternoon, she gives her chickens another 25 cups of feed. How many cups of feed does she need to give her chickens in the final meal of the day if the size of Wendi's flock is 20 chickens?
result = cups_for_all_chicken - cups_in_the_morning - cups_in_the_afternoon
150
+
```
151
+
152
+
Question: Kylar went to the store to buy glasses for his new apartment. One glass costs $5, but every second glass costs only 60% of the price. Kylar wants to buy 16 glasses. How much does he need to pay for them?
153
+
# Python code, return ans
154
+
```python
155
+
num_glasses = 16
156
+
first_glass_cost = 5
157
+
second_glass_cost = 5 * 0.6
158
+
result = 0
159
+
for i in range(num_glasses):
160
+
if i % 2 == 0:
161
+
result += first_glass_cost
162
+
else:
163
+
result += second_glass_cost
164
+
```
165
+
166
+
Question: Marissa is hiking a 12-mile trail. She took 1 hour to walk the first 4 miles, then another hour to walk the next two miles. If she wants her average speed to be 4 miles per hour, what speed (in miles per hour) does she need to walk the remaining distance?
Question: Carlos is planting a lemon tree. The tree will cost $90 to plant. Each year it will grow 7 lemons, which he can sell for $1.5 each. It costs $3 a year to water and feed the tree. How many years will it tak
178
+
e before he starts earning money on the lemon tree?
Question: When Freda cooks canned tomatoes into sauce, they lose half their volume. Each 16 ounce can of tomatoes that she uses contains three tomatoes. Freda's last batch of tomato sauce made 32 ounces of sauce. How many tomatoes did Freda use?
result = num_tomato_in_last_batch / (1 - lose_rate)
200
+
```
201
+
202
+
Question: Jordan wanted to surprise her mom with a homemade birthday cake. From reading the instructions, she knew it would take 20 minutes to make the cake batter and 30 minutes to bake the cake. The cake would require 2 hours to cool and an additional 10 minutes to frost the cake. If she plans to make the cake all on the same day, what is the latest time of day that Jordan can start making the cake to be ready to serve it at 5:00 pm?
0 commit comments