id stringlengths 23 26 | text stringlengths 20 1.37k | format stringclasses 2
values | messages listlengths 2 4 ⌀ | family stringclasses 1
value | sub stringclasses 3
values | variant stringclasses 1
value | variant_of stringclasses 0
values | generator stringclasses 1
value | sources listlengths 0 0 | source_ids listlengths 0 0 | n_tokens_alea int64 8 494 | meta stringlengths 47 170 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
nlprog_det-setting-0049153 | Split $1,470 between Idris and Jae in the ratio 1 to 2. What is Idris's share?
In Python:
```python
total = 1470
parts_a = 1
parts_b = 2
share_a = total * parts_a // (parts_a + parts_b) # 490
print(share_a)
```
Shell output: 490
Idris gets $490. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 117 | {"gold": "490", "printed": "490", "notation": null} |
nlprog_det-setting-0049154 | Pack A has 8 items for $8.68. Pack B has 18 items for $20.54. Which has the lower price per item?
As a program:
```python
pack_a = 8.68 / 8 # 1.085
pack_b = 20.54 / 18 # 1.141111111111111
cheaper = "A" if pack_a < pack_b else "B" # 'A'
print(cheaper)
```
# stdout: A
Pack A is cheaper per item. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 141 | {"gold": "A", "printed": "A", "notation": null} |
nlprog_det-setting-0049155 | Fines run at $100 per day up to a maximum of $5,000. How much after 30 days?
Coded up:
```python
per_day = 100
days = 30
cap = 5000
fine = min(per_day * days, cap) # 3000
print(fine)
```
Executing it gives 3000, as expected.
$3,000 is owed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 102 | {"gold": "3000", "printed": "3000", "notation": null} |
nlprog_det-setting-0049156 | At $31.43 an hour, what does 16 hours of work pay?
Let the code do the arithmetic:
```python
rate = 31.43
hours = 16
earnings = rate * hours # 502.88
print(f"{earnings:.2f}")
```
The run gives 502.88.
The pay is $502.88. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 96 | {"gold": "502.88", "printed": "502.88", "notation": null} |
nlprog_det-setting-0049157 | <|start|><|system|>
You have access to these functions:
[{"name": "python_exec", "description": "A Python interpreter. Returns standard output.", "parameters": {"type": "object", "properties": {"code": {"type": "string", "description": "Python source code"}}, "required": ["code"]}}, {"name": "convert_units", "descripti... | chat | [
{
"role": "system",
"content": "You have access to these functions:\n[{\"name\": \"python_exec\", \"description\": \"A Python interpreter. Returns standard output.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"code\": {\"type\": \"string\", \"description\": \"Python source code\"}}, \"require... | nlprog_det | setting | original | null | deterministic | [] | [] | 346 | {"gold": "5.00", "printed": "5.00", "notation": null} |
nlprog_det-setting-0049158 | <|start|><|user|>
7 boxes hold 8 headsets each. After 19 are handed out, how many are left?<|eot|>
<|assistant|>
37 headsets are left.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "7 boxes hold 8 headsets each. After 19 are handed out, how many are left?"
},
{
"role": "assistant",
"content": "37 headsets are left."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 39 | {"gold": "37", "printed": "37", "notation": null} |
nlprog_det-setting-0049159 | Find the mean of these test scores: 68, 69, 57, 93 and 83.
Script:
```python
scores = [68, 69, 57, 93, 83]
average = sum(scores) // len(scores)
print(average)
```
Printed result — 74
The average score is 74. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 88 | {"gold": "74", "printed": "74", "notation": null} |
nlprog_det-setting-0049160 | Prorate $1,800 of monthly rent for 19 days of a 31-day month.
Code:
```python
rent = 1800
days_in_month = 31
days_occupied = 19
prorated = rent * days_occupied / days_in_month # 1103.225806451613
print(f"{prorated:.2f}")
```
The program outputs 1103.23.
The prorated rent is $1,103.23. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 125 | {"gold": "1103.23", "printed": "1103.23", "notation": null} |
nlprog_det-setting-0049161 | <|start|><|user|>
A 32 lb package ships at $10 base plus $1.20/lb. What is the charge?<|eot|>
<|assistant|>
Shipping costs $48.40.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A 32 lb package ships at $10 base plus $1.20/lb. What is the charge?"
},
{
"role": "assistant",
"content": "Shipping costs $48.40."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 41 | {"gold": "48.40", "printed": "48.40", "notation": null} |
nlprog_det-setting-0049162 | A $12,000 grant pays $3,000 up front and the rest in 3 equal installments. How large is each installment?
One way, in code:
```python
grant = 12000
up_front = 3000
installments = 3
each = (grant - up_front) / installments # 3000.0
print(f"{each:.2f}")
```
It prints 3000.00, as expected.
Each installment is $3,000.00... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 127 | {"gold": "3000.00", "printed": "3000.00", "notation": null} |
nlprog_det-setting-0049163 | <|start|><|system|>
Tools (call with JSON):
{"name": "code_runner", "description": "A Python interpreter. Returns standard output.", "parameters": {"type": "object", "properties": {"source": {"type": "string", "description": "Python source code"}}, "required": ["source"]}}
{"name": "lookup_statute", "description": "Loo... | chat | [
{
"role": "system",
"content": "Tools (call with JSON):\n{\"name\": \"code_runner\", \"description\": \"A Python interpreter. Returns standard output.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"source\": {\"type\": \"string\", \"description\": \"Python source code\"}}, \"required\": [\"sou... | nlprog_det | setting | original | null | deterministic | [] | [] | 323 | {"gold": "13.8", "printed": "13.8", "notation": null} |
nlprog_det-setting-0049164 | A trial runs from September 21, 2018 to September 28, 2018, counting both days. How many calendar days is that?
That is 8 days. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 33 | {"gold": "8", "printed": "8", "notation": null} |
nlprog_det-setting-0049165 | <|start|><|user|>
5 swims at 350 calories each burn how many calories in total?<|eot|>
<|assistant|>
1750 calories in total.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "5 swims at 350 calories each burn how many calories in total?"
},
{
"role": "assistant",
"content": "1750 calories in total."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 33 | {"gold": "1750", "printed": "1750", "notation": null} |
nlprog_det-setting-0049166 | <|start|><|user|>
Sales went from 800 to 680. What is the percent change?<|eot|>
<|assistant|>
```python
old = 800
new = 680
change = (new - old) / old * 100 # -15.0
print(round(change))
```
Run it and it prints: -15
The change is -15%.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Sales went from 800 to 680. What is the percent change?"
},
{
"role": "assistant",
"content": "```python\nold = 800\nnew = 680\nchange = (new - old) / old * 100 # -15.0\nprint(round(change))\n```\nRun it and it prints: -15\n\nThe change is -15%."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 88 | {"gold": "-15", "printed": "-15", "notation": null} |
nlprog_det-setting-0049167 | <|start|><|user|>
A shift runs from 9:40 AM to 1:25 PM. How long is it in minutes?<|eot|>
<|assistant|>
```python
start = 9 * 60 + 40 # 580
end = 13 * 60 + 25 # 805
print(end - start)
```
The code prints: 225
It is 225 minutes long.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A shift runs from 9:40 AM to 1:25 PM. How long is it in minutes?"
},
{
"role": "assistant",
"content": "```python\nstart = 9 * 60 + 40 # 580\nend = 13 * 60 + 25 # 805\nprint(end - start)\n```\nThe code prints: 225\n\nIt is 225 minutes long."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 86 | {"gold": "225", "printed": "225", "notation": null} |
nlprog_det-setting-0049168 | <|start|><|user|>
How many units at $40 each (variable cost $32) cover $6,000 of fixed costs?<|eot|>
<|assistant|>
```python
import math
fixed = 6000
price = 40
variable = 32
units = math.ceil(fixed / (price - variable)) # 750
print(units)
```
This prints: 750
Break-even is 750 units.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "How many units at $40 each (variable cost $32) cover $6,000 of fixed costs?"
},
{
"role": "assistant",
"content": "```python\nimport math\nfixed = 6000\nprice = 40\nvariable = 32\nunits = math.ceil(fixed / (price - variable)) # 750\nprint(units)\n```\nThis prints: ... | nlprog_det | setting | original | null | deterministic | [] | [] | 111 | {"gold": "750", "printed": "750", "notation": null} |
nlprog_det-setting-0049169 | At 1.5% a month (simple), what interest builds on $7,500 over 6 months?
We write it as a program:
```python
balance = 7500
monthly_rate = 1.5 / 100
months = 6
interest = balance * monthly_rate * months
print(f"{interest:.2f}")
```
# out: 675.00
The interest is $675.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 106 | {"gold": "675.00", "printed": "675.00", "notation": null} |
nlprog_det-setting-0049170 | From a $2,500 retainer, 10 hours at $250/hour have been drawn. What remains?
A Python solution:
```python
retainer = 2500
hours = 10
rate = 250
left = retainer - hours * rate # 0
print(left)
```
It prints: 0
The remaining balance is $0. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 94 | {"gold": "0", "printed": "0", "notation": null} |
nlprog_det-setting-0049171 | Oskar has 9 documents to file, and each filing costs $90. How much are the filing fees in total?
Translated to Python:
```python
fee = 90
filings = 9
total = fee * filings # 810
print(total)
```
Executing it gives 810, as expected.
The filings cost $810 in all. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 95 | {"gold": "810", "printed": "810", "notation": null} |
nlprog_det-setting-0049172 | A car gets 36 miles per gallon. Gas is $3.45 a gallon. What does fuel cost for a 300-mile trip?
The trip uses $28.75 of gas. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 44 | {"gold": "28.75", "printed": "28.75", "notation": null} |
nlprog_det-setting-0049173 | A party has 21 days to respond to a motion served on February 7, 2022, with 3 days added because service was by mail. When is the response due?
```python
from datetime import date, timedelta
served = date(2022, 2, 7) # datetime.date(2022, 2, 7)
response_days = 21
mail_days = 3
due = served + timedelta(days=response_d... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 168 | {"gold": "2022-03-03", "printed": "2022-03-03", "notation": null} |
nlprog_det-setting-0049174 | At 45 miles per hour, how many minutes does a 270-mile trip take?
Let the code do the arithmetic:
```python
distance = 270
speed = 45
minutes = distance / speed * 60 # 360.0
print(round(minutes))
```
Execution result: 360
360 minutes. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 89 | {"gold": "360", "printed": "360", "notation": null} |
nlprog_det-setting-0049175 | 39 clipboards cost $5 apiece. With 8% tax added, what is the total?
As Python:
```python
quantity = 39
unit_price = 5
subtotal = quantity * unit_price # 195
total = subtotal * (1 + 8 / 100) # 210.60000000000002
print(f"{total:.2f}")
```
The code prints: 210.60
The total with tax is $210.60. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 131 | {"gold": "210.60", "printed": "210.60", "notation": null} |
nlprog_det-setting-0049176 | <|start|><|user|>
What is a 25% tip on a $165.27 bill?<|eot|>
<|assistant|>
```python
bill = 165.27
tip_rate = 25 / 100 # 0.25
tip = bill * tip_rate # 41.3175
print(f"{tip:.2f}")
```
Run result = 41.32
The tip is $41.32.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "What is a 25% tip on a $165.27 bill?"
},
{
"role": "assistant",
"content": "```python\nbill = 165.27\ntip_rate = 25 / 100 # 0.25\ntip = bill * tip_rate # 41.3175\nprint(f\"{tip:.2f}\")\n```\nRun result = 41.32\n\nThe tip is $41.32."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 103 | {"gold": "41.32", "printed": "41.32", "notation": null} |
nlprog_det-setting-0049177 | <|start|><|user|>
The rules require 1/3 of 58 members (round up) to be present. How many is that?<|eot|>
<|assistant|>
```python
import math
members = 58
quorum = math.ceil(members * 1 / 3) # 20
print(quorum)
```
(Program output: 20)
That is 20 members.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "The rules require 1/3 of 58 members (round up) to be present. How many is that?"
},
{
"role": "assistant",
"content": "```python\nimport math\nmembers = 58\nquorum = math.ceil(members * 1 / 3) # 20\nprint(quorum)\n```\n(Program output: 20)\n\nThat is 20 members."
... | nlprog_det | setting | original | null | deterministic | [] | [] | 93 | {"gold": "20", "printed": "20", "notation": null} |
nlprog_det-setting-0049178 | Copies cost $15 plus $0.10 for each page beyond 20. How much for 31 pages?
Python, step by step:
```python
pages = 31
base = 15
per_page = 0.1
free_pages = 20
cost = base + max(0, pages - free_pages) * per_page # 16.1
print(f"{cost:.2f}")
```
The program prints 16.10.
The copy costs $16.10. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 129 | {"gold": "16.10", "printed": "16.10", "notation": null} |
nlprog_det-setting-0049179 | A $2,500 security deposit has deductions of $85, $150 and $60. How much is refunded?
Python code:
```python
deposit = 2500
deductions = [85, 150, 60]
refund = deposit - sum(deductions) # 2205
print(refund)
```
Run it and it prints: 2205
$2,205 is returned. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 106 | {"gold": "2205", "printed": "2205", "notation": null} |
nlprog_det-setting-0049180 | What does $10,000 grow to in 2 years at 4% annual compounding?
A few lines of Python do it:
```python
principal = 10000
rate = 4 / 100 # 0.04
years = 2
value = principal * (1 + rate) ** years # 10816.000000000002
print(f"{value:.2f}")
```
The program outputs 10816.00.
The balance is $10,816.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 128 | {"gold": "10816.00", "printed": "10816.00", "notation": null} |
nlprog_det-setting-0049181 | What day of the week is December 10, 2024?
The program:
```python
from datetime import date
hearing = date(2024, 12, 10) # datetime.date(2024, 12, 10)
print(hearing.strftime("%A"))
```
On running, it outputs: Tuesday
December 10, 2024 is a Tuesday. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 97 | {"gold": "Tuesday", "printed": "Tuesday", "notation": null} |
nlprog_det-setting-0049182 | <|start|><|user|>
How many days are there from June 8, 2027 to June 8, 2028?<|eot|>
<|assistant|>
It is 366 days.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "How many days are there from June 8, 2027 to June 8, 2028?"
},
{
"role": "assistant",
"content": "It is 366 days."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 34 | {"gold": "366", "printed": "366", "notation": null} |
nlprog_det-setting-0049183 | What is the total rent on a 12-month lease at $1,475 a month?
Set it up in Python:
```python
monthly_rent = 1475
months = 12
total = monthly_rent * months # 17700
print(total)
```
Run result: 17700
In total, $17,700 is paid. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 97 | {"gold": "17700", "printed": "17700", "notation": null} |
nlprog_det-setting-0049184 | <|start|><|system|>
Tools you may use:
{"name": "business_days", "description": "Count business days between two dates.", "parameters": {"type": "object", "properties": {"start": {"type": "string"}, "end": {"type": "string"}}, "required": ["start", "end"]}}
{"name": "py_exec", "description": "Evaluates Python and retur... | chat | [
{
"role": "system",
"content": "Tools you may use:\n{\"name\": \"business_days\", \"description\": \"Count business days between two dates.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"start\": {\"type\": \"string\"}, \"end\": {\"type\": \"string\"}}, \"required\": [\"start\", \"end\"]}}\n{\... | nlprog_det | setting | original | null | deterministic | [] | [] | 324 | {"gold": "3750.00", "printed": "3750.00", "notation": null} |
nlprog_det-setting-0049185 | After a 30% fee is taken from a $30,000 judgment, 4 plaintiffs share the remainder equally. What is each plaintiff's share?
As a program:
```python
award = 30000
fee = award * 30 / 100 # 9000.0
remaining = award - fee # 21000.0
per_client = remaining / 4 # 5250.0
print(f"{per_client:.2f}")
```
Running it prints: 52... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 138 | {"gold": "5250.00", "printed": "5250.00", "notation": null} |
nlprog_det-setting-0049186 | <|start|><|user|>
One can of paint covers 250 square feet. How many cans are needed for 160 square feet of wall?<|eot|>
<|assistant|>
import math
area = 160
coverage = 250
cans = math.ceil(area / coverage) # 1
print(cans)
Out — 1
1 cans are needed.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "One can of paint covers 250 square feet. How many cans are needed for 160 square feet of wall?"
},
{
"role": "assistant",
"content": " import math\n area = 160\n coverage = 250\n cans = math.ceil(area / coverage) # 1\n print(cans)\nOut — 1\n\n1 cans ... | nlprog_det | setting | original | null | deterministic | [] | [] | 81 | {"gold": "1", "printed": "1", "notation": null} |
nlprog_det-setting-0049187 | <|start|><|system|>
Available functions (JSON Schema):
[{"name": "run_python", "description": "Python sandbox for calculations. Returns printed text.", "parameters": {"type": "object", "properties": {"program": {"type": "string", "description": "Python source code"}}, "required": ["program"]}}, {"name": "search_cases",... | chat | [
{
"role": "system",
"content": "Available functions (JSON Schema):\n[{\"name\": \"run_python\", \"description\": \"Python sandbox for calculations. Returns printed text.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"program\": {\"type\": \"string\", \"description\": \"Python source code\"}}, ... | nlprog_det | setting | original | null | deterministic | [] | [] | 304 | {"gold": "120.00", "printed": "120.00", "notation": null} |
nlprog_det-setting-0049189 | <|start|><|user|>
At a 6% tax rate, what is the tax on $258.98?<|eot|>
<|assistant|>
```python
price = 258.98
tax_rate = 6 / 100 # 0.06
tax = price * tax_rate # 15.5388
print(f"{tax:.2f}")
```
The printout reads: 15.54
The tax is $15.54.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "At a 6% tax rate, what is the tax on $258.98?"
},
{
"role": "assistant",
"content": "```python\nprice = 258.98\ntax_rate = 6 / 100 # 0.06\ntax = price * tax_rate # 15.5388\nprint(f\"{tax:.2f}\")\n```\nThe printout reads: 15.54\n\nThe tax is $15.54."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 105 | {"gold": "15.54", "printed": "15.54", "notation": null} |
nlprog_det-setting-0049190 | Of a $2,000 budget, $1,400 has been spent. What percent is that?
A short script:
```python
budget = 2000
spent = 1400
percent = spent / budget * 100 # 70.0
print(round(percent, 1))
```
The printout reads 70.0.
70.0% has been spent. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 90 | {"gold": "70.0", "printed": "70.0", "notation": null} |
nlprog_det-setting-0049191 | Prorate $1,500 of monthly rent for 22 days of a 30-day month.
Python version:
```python
rent = 1500
days_in_month = 30
days_occupied = 22
prorated = rent * days_occupied / days_in_month
print(f"{prorated:.2f}")
```
Python prints 1100.00.
The tenant owes $1,100.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 119 | {"gold": "1100.00", "printed": "1100.00", "notation": null} |
nlprog_det-setting-0049192 | <|start|><|user|>
A meeting starts at 2:20 PM and lasts 25 minutes. When does it end?<|eot|>
<|assistant|>
```python
start = 14 * 60 + 20
end = start + 25
hour, minute = divmod(end, 60)
print(f"{(hour - 1) % 12 + 1}:{minute:02d} {'AM' if hour < 12 else 'PM'}")
```
# run result: 2:45 PM
The meeting finishes at 2:45 PM.... | chat | [
{
"role": "user",
"content": "A meeting starts at 2:20 PM and lasts 25 minutes. When does it end?"
},
{
"role": "assistant",
"content": "```python\nstart = 14 * 60 + 20\nend = start + 25\nhour, minute = divmod(end, 60)\nprint(f\"{(hour - 1) % 12 + 1}:{minute:02d} {'AM' if hour < 12 else 'PM'}\")... | nlprog_det | setting | original | null | deterministic | [] | [] | 130 | {"gold": "2:45 PM", "printed": "2:45 PM", "notation": null} |
nlprog_det-setting-0049195 | <|start|><|user|>
What day of the week is July 18, 2022?<|eot|>
<|assistant|>
July 18, 2022 is a Monday.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "What day of the week is July 18, 2022?"
},
{
"role": "assistant",
"content": "July 18, 2022 is a Monday."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 30 | {"gold": "Monday", "printed": "Monday", "notation": null} |
nlprog_det-setting-0049196 | At $24.87 an hour, what does 24 hours of work pay?
The Python version:
```python
rate = 24.87
hours = 24
earnings = rate * hours # 596.88
print(f"{earnings:.2f}")
```
(Run result: 596.88)
That earns $596.88. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 98 | {"gold": "596.88", "printed": "596.88", "notation": null} |
nlprog_det-setting-0049197 | <|start|><|user|>
What does $1,000 grow to in 2 years at 2% annual compounding?<|eot|>
<|assistant|>
```python
principal = 1000
rate = 2 / 100 # 0.02
years = 2
value = principal * (1 + rate) ** years # 1040.4
print(f"{value:.2f}")
```
The program prints 1040.40.
It is worth $1,040.40.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "What does $1,000 grow to in 2 years at 2% annual compounding?"
},
{
"role": "assistant",
"content": "```python\nprincipal = 1000\nrate = 2 / 100 # 0.02\nyears = 2\nvalue = principal * (1 + rate) ** years # 1040.4\nprint(f\"{value:.2f}\")\n```\nThe program prints 1... | nlprog_det | setting | original | null | deterministic | [] | [] | 115 | {"gold": "1040.40", "printed": "1040.40", "notation": null} |
nlprog_det-setting-0049198 | Straight-line depreciation: cost $45,000, salvage $3,000, 3 years. How much per year?
Code:
cost = 45000
salvage = 3000
years = 3
per_year = (cost - salvage) / years # 14000.0
print(f"{per_year:.2f}")
# printed: 14000.00
$14,000.00 a year. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 109 | {"gold": "14000.00", "printed": "14000.00", "notation": null} |
nlprog_det-setting-0049199 | Marek earns a 5% commission on $23,984 of sales. What is the commission?
As Python:
sales = 23984
rate = 5 / 100
commission = sales * rate
print(f"{commission:.2f}")
When run, it prints 1199.20.
The commission is $1,199.20. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 89 | {"gold": "1199.20", "printed": "1199.20", "notation": null} |
nlprog_det-setting-0049200 | Fines run at $250 per day up to a maximum of $2,500. How much after 6 days?
Here's the code.
per_day = 250
days = 6
cap = 2500
fine = min(per_day * days, cap) # 1500
print(fine)
Output = 1500
$1,500 is owed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 88 | {"gold": "1500", "printed": "1500", "notation": null} |
nlprog_det-setting-0049201 | What is a 15% tip on a $101.78 bill?
```python
bill = 101.78
tip_rate = 15 / 100 # 0.15
tip = bill * tip_rate # 15.267
print(f"{tip:.2f}")
```
Executed, it shows: 15.27
The tip is $15.27. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 97 | {"gold": "15.27", "printed": "15.27", "notation": null} |
nlprog_det-setting-0049202 | <|start|><|user|>
A 5% increase is applied to $1,800 monthly rent. What is the new amount?<|eot|>
<|assistant|>
```python
rent = 1800
increase = 5 / 100 # 0.05
new_rent = rent * (1 + increase) # 1890.0
print(f"{new_rent:.2f}")
```
Output: 1890.00
The new rent is $1,890.00.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A 5% increase is applied to $1,800 monthly rent. What is the new amount?"
},
{
"role": "assistant",
"content": "```python\nrent = 1800\nincrease = 5 / 100 # 0.05\nnew_rent = rent * (1 + increase) # 1890.0\nprint(f\"{new_rent:.2f}\")\n```\nOutput: 1890.00\n\nThe ne... | nlprog_det | setting | original | null | deterministic | [] | [] | 109 | {"gold": "1890.00", "printed": "1890.00", "notation": null} |
nlprog_det-setting-0049204 | <|start|><|system|>
Use a tool when a calculation is needed. Tools:
[{"name": "python", "description": "Use for arithmetic and date math; returns stdout of the code.", "parameters": {"type": "object", "properties": {"program": {"type": "string", "description": "Python source code"}}, "required": ["program"]}}]<|eot|>
<... | chat | [
{
"role": "system",
"content": "Use a tool when a calculation is needed. Tools:\n[{\"name\": \"python\", \"description\": \"Use for arithmetic and date math; returns stdout of the code.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"program\": {\"type\": \"string\", \"description\": \"Python s... | nlprog_det | setting | original | null | deterministic | [] | [] | 195 | {"gold": "87000", "printed": "87000", "notation": null} |
nlprog_det-setting-0049205 | $5,000 is invested at 5% compounded yearly. What is it worth after 2 years?
In Python:
principal = 5000
rate = 5 / 100 # 0.05
years = 2
value = principal * (1 + rate) ** years # 5512.5
print(f"{value:.2f}")
Printed: 5512.50
The balance is $5,512.50. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 106 | {"gold": "5512.50", "printed": "5512.50", "notation": null} |
nlprog_det-setting-0049206 | Counting the first and last day, how many days are there from December 10, 2022 through December 18, 2022?
A Python solution:
```python
from datetime import date
first = date(2022, 12, 10) # datetime.date(2022, 12, 10)
last = date(2022, 12, 18) # datetime.date(2022, 12, 18)
days = (last - first).days + 1 # 9
print(... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 140 | {"gold": "9", "printed": "9", "notation": null} |
nlprog_det-setting-0049207 | <|start|><|user|>
A pack of 6 envelopes sells for $198. What does each cost?<|eot|>
<|assistant|>
total = 198
count = 6
per_item = total // count # 33
print(per_item)
Shell output: 33
Each one costs $33.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A pack of 6 envelopes sells for $198. What does each cost?"
},
{
"role": "assistant",
"content": " total = 198\n count = 6\n per_item = total // count # 33\n print(per_item)\nShell output: 33\n\nEach one costs $33."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 71 | {"gold": "33", "printed": "33", "notation": null} |
nlprog_det-setting-0049208 | The bridge was finished in 1990. How many years had passed by 1994?
Code:
```python
start_year = 1990
end_year = 1994
print(end_year - start_year)
```
Result — 4
4 years. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 65 | {"gold": "4", "printed": "4", "notation": null} |
nlprog_det-setting-0049209 | At 2% a month (simple), what interest builds on $4,000 over 5 months?
The Python version:
```python
balance = 4000
monthly_rate = 2 / 100 # 0.02
months = 5
interest = balance * monthly_rate * months # 400.0
print(f"{interest:.2f}")
```
Printed = 400.00
$400.00 accrues. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 113 | {"gold": "400.00", "printed": "400.00", "notation": null} |
nlprog_det-setting-0049210 | If a 150-minute appointment begins at 2:00 PM, what time does it finish?
```python
start = 14 * 60 + 0
end = start + 150
hour, minute = divmod(end, 60)
print(f"{(hour - 1) % 12 + 1}:{minute:02d} {'AM' if hour < 12 else 'PM'}")
```
Run output — 4:30 PM
It ends at 4:30 PM. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 123 | {"gold": "4:30 PM", "printed": "4:30 PM", "notation": null} |
nlprog_det-setting-0049211 | A settlement of $1,200 is split equally among 8 parties. How much does each party receive?
Let the code do the arithmetic:
```python
settlement = 1200
parties = 8
share = settlement // parties # 150
print(share)
```
Output — 150
Each party receives $150. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 85 | {"gold": "150", "printed": "150", "notation": null} |
nlprog_det-setting-0049212 | <|start|><|user|>
A customer buys 6 sticky pads at $12 each, 4 headsets at $12 each and pays with $150. How much change is due?<|eot|>
<|assistant|>
```python
items = [(6, 12), (4, 12)]
total = sum(q * p for q, p in items) # 120
paid = 150
change = paid - total # 30
print(change)
```
(Console output: 30)
The change ... | chat | [
{
"role": "user",
"content": "A customer buys 6 sticky pads at $12 each, 4 headsets at $12 each and pays with $150. How much change is due?"
},
{
"role": "assistant",
"content": "```python\nitems = [(6, 12), (4, 12)]\ntotal = sum(q * p for q, p in items) # 120\npaid = 150\nchange = paid - total... | nlprog_det | setting | original | null | deterministic | [] | [] | 125 | {"gold": "30", "printed": "30", "notation": null} |
nlprog_det-setting-0049213 | <|start|><|user|>
A lease runs for 36 months at $1,475 per month. How much rent is paid over the whole term?<|eot|>
<|assistant|>
```python
monthly_rent = 1475
months = 36
total = monthly_rent * months # 53100
print(total)
```
# out: 53100
The rent over the term is $53,100.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A lease runs for 36 months at $1,475 per month. How much rent is paid over the whole term?"
},
{
"role": "assistant",
"content": "```python\nmonthly_rent = 1475\nmonths = 36\ntotal = monthly_rent * months # 53100\nprint(total)\n```\n# out: 53100\n\nThe rent over th... | nlprog_det | setting | original | null | deterministic | [] | [] | 95 | {"gold": "53100", "printed": "53100", "notation": null} |
nlprog_det-setting-0049214 | A 18-month warranty starts on April 7, 2023. On what date does it end?
In Python:
```python
from datetime import date
start = date(2023, 4, 7)
months = 18
years, month_index = divmod(start.month - 1 + months, 12)
end = date(start.year + years, month_index + 1, start.day)
print(end.isoformat())
```
(Output: 2024-10-07)... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 145 | {"gold": "2024-10-07", "printed": "2024-10-07", "notation": null} |
nlprog_det-setting-0049215 | <|start|><|user|>
A client paid a $5,000 retainer. The firm has billed 10 hours at $150 per hour. How much of the retainer is left?<|eot|>
<|assistant|>
retainer = 5000
hours = 10
rate = 150
left = retainer - hours * rate # 3500
print(left)
# result: 3500
The remaining balance is $3,500.<|eot|>
<|... | chat | [
{
"role": "user",
"content": "A client paid a $5,000 retainer. The firm has billed 10 hours at $150 per hour. How much of the retainer is left?"
},
{
"role": "assistant",
"content": " retainer = 5000\n hours = 10\n rate = 150\n left = retainer - hours * rate # 3500\n print(left)\... | nlprog_det | setting | original | null | deterministic | [] | [] | 90 | {"gold": "3500", "printed": "3500", "notation": null} |
nlprog_det-setting-0049216 | A meal costs $30.64. How much is a 18% tip?
Python:
```python
bill = 30.64
tip_rate = 18 / 100 # 0.18
tip = bill * tip_rate # 5.5152
print(f"{tip:.2f}")
```
Execution prints 5.52, as expected.
The tip is $5.52. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 108 | {"gold": "5.52", "printed": "5.52", "notation": null} |
nlprog_det-setting-0049217 | Counting the first and last day, how many days are there from April 21, 2021 through April 30, 2021?
Set it up in Python:
```python
from datetime import date
first = date(2021, 4, 21) # datetime.date(2021, 4, 21)
last = date(2021, 4, 30) # datetime.date(2021, 4, 30)
days = (last - first).days + 1 # 10
print(days)
`... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 146 | {"gold": "10", "printed": "10", "notation": null} |
nlprog_det-setting-0049219 | Farah drove 165 miles for work. Mileage is reimbursed at 65 cents a mile. How much is the reimbursement?
Here's the code.
miles = 165
rate = 0.65
reimbursement = miles * rate # 107.25
print(f"{reimbursement:.2f}")
Python prints 107.25.
The reimbursement is $107.25. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 103 | {"gold": "107.25", "printed": "107.25", "notation": null} |
nlprog_det-setting-0049220 | Water costs $20 a month plus $4.20 for each 1,000 gallons over 2,000. What is owed for 15,000 gallons?
Translated to Python:
```python
base = 20
rate = 4.2
used = 15
free = 2
bill = base + rate * max(0, used - free) # 74.6
print(f"{bill:.2f}")
```
Execution result: 74.60
The bill is $74.60. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 129 | {"gold": "74.60", "printed": "74.60", "notation": null} |
nlprog_det-setting-0049221 | Jamal earns $16.00 an hour and time and a half for hours over 40. What is the pay for a 47-hour week?
```python
rate = 16.0
hours = 47
regular = 40 * rate
overtime = (hours - 40) * rate * 1.5
pay = regular + overtime
print(f"{pay:.2f}")
```
(Printed: 808.00)
The weekly pay is $808.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 119 | {"gold": "808.00", "printed": "808.00", "notation": null} |
nlprog_det-setting-0049222 | Printing costs 15 cents a page. What does it cost to print 106 copies of a 23-page handout?
Python:
```python
pages = 23
copies = 106
cost_per_page = 0.15
cost = pages * copies * cost_per_page # 365.7
print(f"{cost:.2f}")
```
Execution prints 365.70, as expected.
The job costs $365.70. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 124 | {"gold": "365.70", "printed": "365.70", "notation": null} |
nlprog_det-setting-0049223 | <|start|><|user|>
Starting with 889 file boxes and using 38 per day, how many remain after 8 days?<|eot|>
<|assistant|>
```python
stock = 889
per_day = 38
days = 8
left = stock - per_day * days # 585
print(left)
```
The run gives: 585
585 remain.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Starting with 889 file boxes and using 38 per day, how many remain after 8 days?"
},
{
"role": "assistant",
"content": "```python\nstock = 889\nper_day = 38\ndays = 8\nleft = stock - per_day * days # 585\nprint(left)\n```\nThe run gives: 585\n\n585 remain."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 91 | {"gold": "585", "printed": "585", "notation": null} |
nlprog_det-setting-0049224 | Elena's scores were 99, 87 and 63. What is the average score?
We write it as a program:
scores = [99, 87, 63]
average = sum(scores) // len(scores) # 83
print(average)
Executing it gives 83.
The average score is 83. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 78 | {"gold": "83", "printed": "83", "notation": null} |
nlprog_det-setting-0049225 | <|start|><|system|>
Be brief and correct.<|eot|>
<|user|>
If a 25-minute meeting begins at 4:15 PM, what time does it finish?<|eot|>
<|assistant|>
```python
start = 16 * 60 + 15
end = start + 25
hour, minute = divmod(end, 60)
print(f"{(hour - 1) % 12 + 1}:{minute:02d} {'AM' if hour < 12 else 'PM'}")
```
The run gives 4... | chat | [
{
"role": "system",
"content": "Be brief and correct."
},
{
"role": "user",
"content": "If a 25-minute meeting begins at 4:15 PM, what time does it finish?"
},
{
"role": "assistant",
"content": "```python\nstart = 16 * 60 + 15\nend = start + 25\nhour, minute = divmod(end, 60)\nprint(... | nlprog_det | setting | original | null | deterministic | [] | [] | 143 | {"gold": "4:40 PM", "printed": "4:40 PM", "notation": null} |
nlprog_det-setting-0049226 | <|start|><|user|>
Convert 56.2 km to meters.<|eot|>
<|assistant|>
56,200 m.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Convert 56.2 km to meters."
},
{
"role": "assistant",
"content": "56,200 m."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 26 | {"gold": "56200", "printed": "56200", "notation": null} |
nlprog_det-setting-0049227 | Filing fees are $90 per document. What do 7 filings cost?
```python
fee = 90
filings = 7
total = fee * filings # 630
print(total)
```
Output of the run: 630
The total fee is $630. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 77 | {"gold": "630", "printed": "630", "notation": null} |
nlprog_det-setting-0049228 | At $22.23 an hour, what does 36 hours of work pay?
Translated to Python:
```python
rate = 22.23
hours = 36
earnings = rate * hours # 800.28
print(f"{earnings:.2f}")
```
Executing it gives: 800.28
The pay is $800.28. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 98 | {"gold": "800.28", "printed": "800.28", "notation": null} |
nlprog_det-setting-0049229 | At $0.70 per mile, what is the reimbursement for 426 miles?
The program:
miles = 426
rate = 0.7
reimbursement = miles * rate # 298.2
print(f"{reimbursement:.2f}")
stdout = 298.20
The reimbursement is $298.20. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 83 | {"gold": "298.20", "printed": "298.20", "notation": null} |
nlprog_det-setting-0049230 | How many of 129 votes make 75% (round up)?
One way, in code:
```python
import math
voters = 129
needed = math.ceil(voters * 75 / 100) # 97
print(needed)
```
The program outputs: 97
At least 97 votes. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 89 | {"gold": "97", "printed": "97", "notation": null} |
nlprog_det-setting-0049231 | Walls total 980 sq ft and each can covers 400 sq ft. How many cans should be bought?
3 cans are needed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 35 | {"gold": "3", "printed": "3", "notation": null} |
nlprog_det-setting-0049232 | With 25% off, what does a $180 filing cabinet cost?
Code:
```python
price = 180
discount = 25 / 100 # 0.25
sale_price = price * (1 - discount) # 135.0
print(f"{sale_price:.2f}")
```
Interpreter output: 135.00
The sale price is $135.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 107 | {"gold": "135.00", "printed": "135.00", "notation": null} |
nlprog_det-setting-0049233 | With 23 rows of 15 chairs and 27 empty chairs, how many chairs are taken?
Python makes this quick:
```python
rows = 23
per_row = 15
empty = 27
seated = rows * per_row - empty # 318
print(seated)
```
# printed result: 318
318 people are seated. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 97 | {"gold": "318", "printed": "318", "notation": null} |
nlprog_det-setting-0049234 | <|start|><|user|>
What average speed covers 88 miles in 2 hours?<|eot|>
<|assistant|>
```python
distance = 88
hours = 2
speed = distance / hours # 44.0
print(round(speed))
```
Out: 44
It averages 44 miles per hour.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "What average speed covers 88 miles in 2 hours?"
},
{
"role": "assistant",
"content": "```python\ndistance = 88\nhours = 2\nspeed = distance / hours # 44.0\nprint(round(speed))\n```\nOut: 44\n\nIt averages 44 miles per hour."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 76 | {"gold": "44", "printed": "44", "notation": null} |
nlprog_det-setting-0049235 | <|start|><|user|>
Ivan buys 4 boxes of 10 lanyards each and gives away 20 lanyards. How many lanyards are left?<|eot|>
<|assistant|>
```python
boxes = 4
per_box = 10
given_away = 20
left = boxes * per_box - given_away # 20
print(left)
```
Interpreter output — 20
That leaves 20 lanyards.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Ivan buys 4 boxes of 10 lanyards each and gives away 20 lanyards. How many lanyards are left?"
},
{
"role": "assistant",
"content": "```python\nboxes = 4\nper_box = 10\ngiven_away = 20\nleft = boxes * per_box - given_away # 20\nprint(left)\n```\nInterpreter output ... | nlprog_det | setting | original | null | deterministic | [] | [] | 106 | {"gold": "20", "printed": "20", "notation": null} |
nlprog_det-setting-0049236 | A customer buys 2 chairs at $3 each, 1 cables at $4 each and pays with $50. How much change is due?
Here is the program.
```python
items = [(2, 3), (1, 4)]
total = sum(q * p for q, p in items) # 10
paid = 50
change = paid - total # 40
print(change)
```
It prints 40.
$40 comes back. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 118 | {"gold": "40", "printed": "40", "notation": null} |
nlprog_det-setting-0049237 | Walls total 1198 sq ft and each can covers 350 sq ft. How many cans should be bought?
Programmatically:
```python
import math
area = 1198
coverage = 350
cans = math.ceil(area / coverage) # 4
print(cans)
```
Printed result — 4
4 cans are needed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 98 | {"gold": "4", "printed": "4", "notation": null} |
nlprog_det-setting-0049238 | Straight-line depreciation: cost $30,000, salvage $2,000, 3 years. How much per year?
Set it up in Python:
```python
cost = 30000
salvage = 2000
years = 3
per_year = (cost - salvage) / years # 9333.333333333334
print(f"{per_year:.2f}")
```
The code prints: 9333.33
$9,333.33 a year. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 136 | {"gold": "9333.33", "printed": "9333.33", "notation": null} |
nlprog_det-setting-0049239 | Count the days between April 21, 2027 and October 14, 2027.
Set it up in Python:
```python
from datetime import date
first = date(2027, 4, 21) # datetime.date(2027, 4, 21)
second = date(2027, 10, 14) # datetime.date(2027, 10, 14)
print((second - first).days)
```
Interpreter output: 176
There are 176 days between th... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 132 | {"gold": "176", "printed": "176", "notation": null} |
nlprog_det-setting-0049240 | After a 30% fee is taken from a $48,000 judgment, 3 plaintiffs share the remainder equally. What is each plaintiff's share?
We write it as a program:
```python
award = 48000
fee = award * 30 / 100 # 14400.0
remaining = award - fee # 33600.0
per_client = remaining / 3 # 11200.0
print(f"{per_client:.2f}")
```
Executi... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 144 | {"gold": "11200.00", "printed": "11200.00", "notation": null} |
nlprog_det-setting-0049241 | A hearing is set for November 6, 1996. What day of the week is that?
Here's the code.
```python
from datetime import date
hearing = date(1996, 11, 6) # datetime.date(1996, 11, 6)
print(hearing.strftime("%A"))
```
(Result: Wednesday)
It is a Wednesday. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 104 | {"gold": "Wednesday", "printed": "Wednesday", "notation": null} |
nlprog_det-setting-0049242 | <|start|><|user|>
What percentage of $2,000 is $200?<|eot|>
<|assistant|>
10.0% has been spent.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "What percentage of $2,000 is $200?"
},
{
"role": "assistant",
"content": "10.0% has been spent."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 28 | {"gold": "10.0", "printed": "10.0", "notation": null} |
nlprog_det-setting-0049243 | 25 of 50 members attended. What percent attended?
The program:
```python
present = 25
total = 50
percent = present / total * 100 # 50.0
print(round(percent, 1))
```
Running it prints 50.0, as expected.
50.0% attended. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 83 | {"gold": "50.0", "printed": "50.0", "notation": null} |
nlprog_det-setting-0049244 | <|start|><|user|>
A chair costs $40. It is 25% off. What is the sale price?<|eot|>
<|assistant|>
```python
price = 40
discount = 25 / 100
sale_price = price * (1 - discount)
print(f"{sale_price:.2f}")
```
That prints 30.00.
The sale price is $30.00.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A chair costs $40. It is 25% off. What is the sale price?"
},
{
"role": "assistant",
"content": "```python\nprice = 40\ndiscount = 25 / 100\nsale_price = price * (1 - discount)\nprint(f\"{sale_price:.2f}\")\n```\nThat prints 30.00.\n\nThe sale price is $30.00."
}
... | nlprog_det | setting | original | null | deterministic | [] | [] | 98 | {"gold": "30.00", "printed": "30.00", "notation": null} |
nlprog_det-setting-0049245 | <|start|><|system|>
Be brief and correct.<|eot|>
<|user|>
Ulla buys 7 boxes of 6 notebooks each and gives away 11 notebooks. How many notebooks are left?<|eot|>
<|assistant|>
```python
boxes = 7
per_box = 6
given_away = 11
left = boxes * per_box - given_away # 31
print(left)
```
Running it prints: 31
That leaves 31 n... | chat | [
{
"role": "system",
"content": "Be brief and correct."
},
{
"role": "user",
"content": "Ulla buys 7 boxes of 6 notebooks each and gives away 11 notebooks. How many notebooks are left?"
},
{
"role": "assistant",
"content": "```python\nboxes = 7\nper_box = 6\ngiven_away = 11\nleft = bo... | nlprog_det | setting | original | null | deterministic | [] | [] | 122 | {"gold": "31", "printed": "31", "notation": null} |
nlprog_det-setting-0049246 | Sales went from 1,200 to 1,320. What is the percent change?
Python does the arithmetic:
old = 1200
new = 1320
change = (new - old) / old * 100 # 10.0
print(round(change))
The script prints 10, as expected.
The change is 10%. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 82 | {"gold": "10", "printed": "10", "notation": null} |
nlprog_det-setting-0049247 | With $8,000 in costs and $13,000 in revenue, what percent of revenue is profit? Round to one decimal.
Python does the arithmetic:
```python
revenue = 13000
costs = 8000
profit = revenue - costs # 5000
margin = profit / revenue * 100 # 38.46153846153847
print(round(margin, 1))
```
Result — 38.5
Profit is 38.5% of re... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 120 | {"gold": "38.5", "printed": "38.5", "notation": null} |
nlprog_det-setting-0049248 | <|start|><|user|>
A 120-mile drive at a steady 30 mph takes how many minutes?<|eot|>
<|assistant|>
```python
distance = 120
speed = 30
minutes = distance / speed * 60
print(round(minutes))
```
Running this gives 240.
The trip takes 240 minutes.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A 120-mile drive at a steady 30 mph takes how many minutes?"
},
{
"role": "assistant",
"content": "```python\ndistance = 120\nspeed = 30\nminutes = distance / speed * 60\nprint(round(minutes))\n```\nRunning this gives 240.\n\nThe trip takes 240 minutes."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 78 | {"gold": "240", "printed": "240", "notation": null} |
nlprog_det-setting-0049249 | To read 432 pages in 9 days, how many pages per day are needed?
Here is the program.
```python
pages = 432
days = 9
per_day = pages // days # 48
print(per_day)
```
Run it and it prints 48.
That is 48 pages per day. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 85 | {"gold": "48", "printed": "48", "notation": null} |
nlprog_det-setting-0049250 | Notice was given on April 9, 2020. The notice period is 10 days. When does it run out?
The program:
```python
from datetime import date, timedelta
start = date(2020, 4, 9) # datetime.date(2020, 4, 9)
end = start + timedelta(days=10) # datetime.date(2020, 4, 19)
print(end.isoformat())
```
Console:
2020-04-19
That da... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 139 | {"gold": "2020-04-19", "printed": "2020-04-19", "notation": null} |
nlprog_det-setting-0049251 | A shift runs from 9:46 AM to 2:59 PM. How long is it in minutes?
Computation in Python:
start = 9 * 60 + 46 # 586
end = 14 * 60 + 59 # 899
print(end - start)
(Execution result: 313)
It is 313 minutes long. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 83 | {"gold": "313", "printed": "313", "notation": null} |
nlprog_det-setting-0049252 | What day of the week is August 13, 1998?
We write it as a program:
```python
from datetime import date
hearing = date(1998, 8, 13) # datetime.date(1998, 8, 13)
print(hearing.strftime("%A"))
```
Shell output: Thursday
August 13, 1998 is a Thursday. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 96 | {"gold": "Thursday", "printed": "Thursday", "notation": null} |
nlprog_det-setting-0049253 | Find the mean of these test scores: 84, 56 and 79.
Let the code do the arithmetic:
```python
scores = [84, 56, 79]
average = sum(scores) // len(scores) # 73
print(average)
```
Output:
73
The mean is 73. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 87 | {"gold": "73", "printed": "73", "notation": null} |
nlprog_det-setting-0049254 | <|start|><|user|>
A party has 28 days to respond to a motion served on October 5, 2028, with 3 days added because service was by mail. When is the response due?<|eot|>
<|assistant|>
```python
from datetime import date, timedelta
served = date(2028, 10, 5) # datetime.date(2028, 10, 5)
response_days = 28
mail_days = 3
d... | chat | [
{
"role": "user",
"content": "A party has 28 days to respond to a motion served on October 5, 2028, with 3 days added because service was by mail. When is the response due?"
},
{
"role": "assistant",
"content": "```python\nfrom datetime import date, timedelta\nserved = date(2028, 10, 5) # datet... | nlprog_det | setting | original | null | deterministic | [] | [] | 179 | {"gold": "2028-11-05", "printed": "2028-11-05", "notation": null} |
nlprog_det-setting-0049255 | <|start|><|user|>
165 of 200 members attended. What percent attended?<|eot|>
<|assistant|>
```python
present = 165
total = 200
percent = present / total * 100 # 82.5
print(round(percent, 1))
```
(Console output: 82.5)
Attendance was 82.5%.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "165 of 200 members attended. What percent attended?"
},
{
"role": "assistant",
"content": "```python\npresent = 165\ntotal = 200\npercent = present / total * 100 # 82.5\nprint(round(percent, 1))\n```\n(Console output: 82.5)\n\nAttendance was 82.5%."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 86 | {"gold": "82.5", "printed": "82.5", "notation": null} |
nlprog_det-setting-0049256 | A quorum is 3/5 of the 16 members, rounded up. How many members make a quorum?
```python
import math
members = 16
quorum = math.ceil(members * 3 / 5) # 10
print(quorum)
```
Printed result — 10
10 members are needed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 88 | {"gold": "10", "printed": "10", "notation": null} |
nlprog_det-setting-0049257 | Prorate $1,800 of monthly rent for 23 days of a 31-day month.
Code:
```python
rent = 1800
days_in_month = 31
days_occupied = 23
prorated = rent * days_occupied / days_in_month # 1335.483870967742
print(f"{prorated:.2f}")
```
What it prints: 1335.48
The prorated rent is $1,335.48. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 128 | {"gold": "1335.48", "printed": "1335.48", "notation": null} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.