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-0049800 | What does $2,000 grow to in 2 years at 2% annual compounding?
The balance is $2,080.80. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 34 | {"gold": "2080.80", "printed": "2080.80", "notation": null} |
nlprog_det-setting-0049801 | <|start|><|user|>
Straight-line depreciation: cost $30,000, salvage $2,000, 10 years. How much per year?<|eot|>
<|assistant|>
cost = 30000
salvage = 2000
years = 10
per_year = (cost - salvage) / years
print(f"{per_year:.2f}")
Result — 2800.00
Depreciation is $2,800.00 per year.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Straight-line depreciation: cost $30,000, salvage $2,000, 10 years. How much per year?"
},
{
"role": "assistant",
"content": " cost = 30000\n salvage = 2000\n years = 10\n per_year = (cost - salvage) / years\n print(f\"{per_year:.2f}\")\nResult — 2800... | nlprog_det | setting | original | null | deterministic | [] | [] | 107 | {"gold": "2800.00", "printed": "2800.00", "notation": null} |
nlprog_det-setting-0049802 | <|start|><|user|>
On which weekday does June 4, 2015 fall?<|eot|>
<|assistant|>
```python
from datetime import date
hearing = date(2015, 6, 4) # datetime.date(2015, 6, 4)
print(hearing.strftime("%A"))
```
The interpreter prints Thursday.
June 4, 2015 is a Thursday.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "On which weekday does June 4, 2015 fall?"
},
{
"role": "assistant",
"content": "```python\nfrom datetime import date\nhearing = date(2015, 6, 4) # datetime.date(2015, 6, 4)\nprint(hearing.strftime(\"%A\"))\n```\nThe interpreter prints Thursday.\n\nJune 4, 2015 is a... | nlprog_det | setting | original | null | deterministic | [] | [] | 99 | {"gold": "Thursday", "printed": "Thursday", "notation": null} |
nlprog_det-setting-0049803 | What is a 22% tip on a $189.51 bill?
One way, in code:
```python
bill = 189.51
tip_rate = 22 / 100 # 0.22
tip = bill * tip_rate # 41.6922
print(f"{tip:.2f}")
```
What it prints — 41.69
The tip is $41.69. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 106 | {"gold": "41.69", "printed": "41.69", "notation": null} |
nlprog_det-setting-0049804 | A $96 dinner bill gets a 15% tip, and 5 people share the cost equally. What is each person's share?
We can compute it in Python.
```python
bill = 96
tip_rate = 15 / 100 # 0.15
people = 5
each = bill * (1 + tip_rate) / people # 22.08
print(f"{each:.2f}")
```
The program prints 22.08.
The share is $22.08 each. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 127 | {"gold": "22.08", "printed": "22.08", "notation": null} |
nlprog_det-setting-0049805 | <|start|><|system|>
You are a logic tutor.<|eot|>
<|user|>
What is the total rent on a 6-month lease at $1,200 a month?<|eot|>
<|assistant|>
The rent over the term is $7,200.<|eot|>
<|end|> | chat | [
{
"role": "system",
"content": "You are a logic tutor."
},
{
"role": "user",
"content": "What is the total rent on a 6-month lease at $1,200 a month?"
},
{
"role": "assistant",
"content": "The rent over the term is $7,200."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 50 | {"gold": "7200", "printed": "7200", "notation": null} |
nlprog_det-setting-0049806 | A storeroom has 338 calendars. The office uses 18 a day. How many are left after 13 days?
Programmatically:
stock = 338
per_day = 18
days = 13
left = stock - per_day * days # 104
print(left)
Running this gives 104.
104 remain. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 81 | {"gold": "104", "printed": "104", "notation": null} |
nlprog_det-setting-0049807 | <|start|><|user|>
What does $2,000 grow to in 3 years at 5% annual compounding?<|eot|>
<|assistant|>
```python
principal = 2000
rate = 5 / 100 # 0.05
years = 3
value = principal * (1 + rate) ** years # 2315.2500000000005
print(f"{value:.2f}")
```
Output = 2315.25
It is worth $2,315.25.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "What does $2,000 grow to in 3 years at 5% annual compounding?"
},
{
"role": "assistant",
"content": "```python\nprincipal = 2000\nrate = 5 / 100 # 0.05\nyears = 3\nvalue = principal * (1 + rate) ** years # 2315.2500000000005\nprint(f\"{value:.2f}\")\n```\nOutput =... | nlprog_det | setting | original | null | deterministic | [] | [] | 119 | {"gold": "2315.25", "printed": "2315.25", "notation": null} |
nlprog_det-setting-0049808 | A $2,400 loan carries 10% simple annual interest over 36 months. Interest and principal are repaid in equal monthly payments. What is each payment?
Here's the code.
```python
principal = 2400
annual_rate = 10 / 100 # 0.1
months = 36
interest = principal * annual_rate * months / 12 # 720.0
payment = (principal + inte... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 157 | {"gold": "86.67", "printed": "86.67", "notation": null} |
nlprog_det-setting-0049809 | <|start|><|user|>
A 90-mile drive at a steady 40 mph takes how many minutes?<|eot|>
<|assistant|>
```python
distance = 90
speed = 40
minutes = distance / speed * 60 # 135.0
print(round(minutes))
```
What it prints — 135
135 minutes.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A 90-mile drive at a steady 40 mph takes how many minutes?"
},
{
"role": "assistant",
"content": "```python\ndistance = 90\nspeed = 40\nminutes = distance / speed * 60 # 135.0\nprint(round(minutes))\n```\nWhat it prints — 135\n\n135 minutes."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 83 | {"gold": "135", "printed": "135", "notation": null} |
nlprog_det-setting-0049810 | Meals are $74 per day and lodging $175 per night. What is the allowance for 4 days and 3 nights?
The allowance is $821. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 39 | {"gold": "821", "printed": "821", "notation": null} |
nlprog_det-setting-0049811 | A customer buys 1 sticky pads at $21 each, 5 lanyards at $14 each, 1 keyboards at $19 each, 6 desk lamps at $7 each and pays with $200. How much change is due?
Python makes this quick:
```python
items = [(1, 21), (5, 14), (1, 19), (6, 7)]
total = sum(q * p for q, p in items) # 152
paid = 200
change = paid - total # ... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 153 | {"gold": "48", "printed": "48", "notation": null} |
nlprog_det-setting-0049812 | 5 friends split a $210 bill plus a 15% tip evenly. How much does each pay?
We can compute it in Python.
```python
bill = 210
tip_rate = 15 / 100 # 0.15
people = 5
each = bill * (1 + tip_rate) / people # 48.3
print(f"{each:.2f}")
```
It prints 48.30.
The share is $48.30 each. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 121 | {"gold": "48.30", "printed": "48.30", "notation": null} |
nlprog_det-setting-0049814 | <|start|><|system|>
Tools (call with JSON):
[{"name": "translate", "description": "Translate text into another language.", "parameters": {"type": "object", "properties": {"text": {"type": "string"}, "target": {"type": "string"}}, "required": ["text", "target"]}}, {"name": "sandbox_python", "description": "Runs a short ... | chat | [
{
"role": "system",
"content": "Tools (call with JSON):\n[{\"name\": \"translate\", \"description\": \"Translate text into another language.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"text\": {\"type\": \"string\"}, \"target\": {\"type\": \"string\"}}, \"required\": [\"text\", \"target\"]}... | nlprog_det | setting | original | null | deterministic | [] | [] | 394 | {"gold": "37800", "printed": "37800", "notation": null} |
nlprog_det-setting-0049815 | <|start|><|system|>
Tools (call with JSON):
{"name": "get_weather", "description": "Get the weather for a city.", "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}
{"name": "interpreter", "description": "Runs a short Python snippet and returns what it prints.", "paramet... | chat | [
{
"role": "system",
"content": "Tools (call with JSON):\n{\"name\": \"get_weather\", \"description\": \"Get the weather for a city.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city\": {\"type\": \"string\"}}, \"required\": [\"city\"]}}\n{\"name\": \"interpreter\", \"description\": \"Runs a ... | nlprog_det | setting | original | null | deterministic | [] | [] | 299 | {"gold": "1193.92", "printed": "1193.92", "notation": null} |
nlprog_det-setting-0049816 | 29 of 40 members attended. What percent attended?
```python
present = 29
total = 40
percent = present / total * 100 # 72.5
print(round(percent, 1))
```
The program outputs 72.5.
Attendance was 72.5%. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 75 | {"gold": "72.5", "printed": "72.5", "notation": null} |
nlprog_det-setting-0049817 | A $1,500 security deposit has deductions of $75 and $85. How much is refunded?
Translated to Python:
```python
deposit = 1500
deductions = [75, 85]
refund = deposit - sum(deductions) # 1340
print(refund)
```
# printed: 1340
The refund is $1,340. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 101 | {"gold": "1340", "printed": "1340", "notation": null} |
nlprog_det-setting-0049818 | 308 files go into boxes of 50. How many boxes does that take?
Python:
```python
import math
files = 308
per_box = 50
boxes = math.ceil(files / per_box) # 7
print(boxes)
```
(Printed result: 7)
7 boxes are needed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 95 | {"gold": "7", "printed": "7", "notation": null} |
nlprog_det-setting-0049819 | <|start|><|system|>
You help people work with structured data.<|eot|>
<|user|>
123 volunteers are split into 6 equal teams. How many are on each team, and how many are left over?<|eot|>
<|assistant|>
total = 123
groups = 6
per_group, remainder = divmod(total, groups)
print(f"{per_group} each, {remainder... | chat | [
{
"role": "system",
"content": "You help people work with structured data."
},
{
"role": "user",
"content": "123 volunteers are split into 6 equal teams. How many are on each team, and how many are left over?"
},
{
"role": "assistant",
"content": " total = 123\n groups = 6\n ... | nlprog_det | setting | original | null | deterministic | [] | [] | 105 | {"gold": "20 each, 3 left over", "printed": "20 each, 3 left over", "notation": null} |
nlprog_det-setting-0049820 | Which is cheaper per unit: 10 for $6.16 (A) or 20 for $20.62 (B)?
As Python:
```python
pack_a = 6.16 / 10 # 0.616
pack_b = 20.62 / 20 # 1.0310000000000001
cheaper = "A" if pack_a < pack_b else "B" # 'A'
print(cheaper)
```
Console output — A
Pack A is cheaper per item. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 136 | {"gold": "A", "printed": "A", "notation": null} |
nlprog_det-setting-0049821 | At a 9% tax rate, what is the tax on $178.95?
```python
price = 178.95
tax_rate = 9 / 100 # 0.09
tax = price * tax_rate # 16.1055
print(f"{tax:.2f}")
```
Out: 16.11
The tax is $16.11. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 95 | {"gold": "16.11", "printed": "16.11", "notation": null} |
nlprog_det-setting-0049822 | 10 boxes hold 24 sticky pads each. After 11 are handed out, how many are left?
Coded up:
```python
boxes = 10
per_box = 24
given_away = 11
left = boxes * per_box - given_away # 229
print(left)
```
The program prints 229, as expected.
229 sticky pads are left. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 105 | {"gold": "229", "printed": "229", "notation": null} |
nlprog_det-setting-0049823 | <|start|><|system|>
Use a tool when a calculation is needed. Tools:
{"name": "py_exec", "description": "Runs a short Python snippet and returns what it prints.", "parameters": {"type": "object", "properties": {"program": {"type": "string", "description": "Python source code"}}, "required": ["program"]}}
{"name": "searc... | chat | [
{
"role": "system",
"content": "Use a tool when a calculation is needed. Tools:\n{\"name\": \"py_exec\", \"description\": \"Runs a short Python snippet and returns what it prints.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"program\": {\"type\": \"string\", \"description\": \"Python source ... | nlprog_det | setting | original | null | deterministic | [] | [] | 299 | {"gold": "2560.00", "printed": "2560.00", "notation": null} |
nlprog_det-setting-0049824 | <|start|><|system|>
Keep answers short and correct.<|eot|>
<|user|>
At 1% a month (simple), what interest builds on $2,500 over 4 months?<|eot|>
<|assistant|>
balance = 2500
monthly_rate = 1 / 100 # 0.01
months = 4
interest = balance * monthly_rate * months # 100.0
print(f"{interest:.2f}")
# run r... | chat | [
{
"role": "system",
"content": "Keep answers short and correct."
},
{
"role": "user",
"content": "At 1% a month (simple), what interest builds on $2,500 over 4 months?"
},
{
"role": "assistant",
"content": " balance = 2500\n monthly_rate = 1 / 100 # 0.01\n months = 4\n i... | nlprog_det | setting | original | null | deterministic | [] | [] | 109 | {"gold": "100.00", "printed": "100.00", "notation": null} |
nlprog_det-setting-0049825 | A hearing lasted 2 hours and 22 minutes. How many minutes is that?
A few lines of Python do it:
```python
hours = 2
minutes = 22
total_minutes = hours * 60 + minutes # 142
print(total_minutes)
```
Out: 142
The hearing lasted 142 minutes. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 91 | {"gold": "142", "printed": "142", "notation": null} |
nlprog_det-setting-0049826 | Meals are $64 per day and lodging $175 per night. What is the allowance for 4 days and 3 nights?
```python
days = 4
meal_rate = 64
lodging_rate = 175
nights = days - 1 # 3
total = days * meal_rate + nights * lodging_rate # 781
print(total)
```
Run result: 781
The allowance is $781. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 116 | {"gold": "781", "printed": "781", "notation": null} |
nlprog_det-setting-0049827 | <|start|><|user|>
Water costs $18 a month plus $4.20 for each 1,000 gallons over 0,000. What is owed for 11,000 gallons?<|eot|>
<|assistant|>
```python
base = 18
rate = 4.2
used = 11
free = 0
bill = base + rate * max(0, used - free) # 64.2
print(f"{bill:.2f}")
```
Python prints 64.20, as expected.
The bill is $64.20.... | chat | [
{
"role": "user",
"content": "Water costs $18 a month plus $4.20 for each 1,000 gallons over 0,000. What is owed for 11,000 gallons?"
},
{
"role": "assistant",
"content": "```python\nbase = 18\nrate = 4.2\nused = 11\nfree = 0\nbill = base + rate * max(0, used - free) # 64.2\nprint(f\"{bill:.2f}... | nlprog_det | setting | original | null | deterministic | [] | [] | 130 | {"gold": "64.20", "printed": "64.20", "notation": null} |
nlprog_det-setting-0049828 | <|start|><|user|>
A chair costs $180. It is 15% off. What is the sale price?<|eot|>
<|assistant|>
```python
price = 180
discount = 15 / 100 # 0.15
sale_price = price * (1 - discount) # 153.0
print(f"{sale_price:.2f}")
```
The program prints: 153.00
It costs $153.00.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A chair costs $180. It is 15% off. What is the sale price?"
},
{
"role": "assistant",
"content": "```python\nprice = 180\ndiscount = 15 / 100 # 0.15\nsale_price = price * (1 - discount) # 153.0\nprint(f\"{sale_price:.2f}\")\n```\nThe program prints: 153.00\n\nIt c... | nlprog_det | setting | original | null | deterministic | [] | [] | 110 | {"gold": "153.00", "printed": "153.00", "notation": null} |
nlprog_det-setting-0049829 | Convert 25 °C to Fahrenheit.
As Python:
```python
celsius = 25
fahrenheit = celsius * 9 / 5 + 32 # 77.0
print(round(fahrenheit))
```
(Result: 77)
That is 77 °F. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 87 | {"gold": "77", "printed": "77", "notation": null} |
nlprog_det-setting-0049830 | A 3% increase is applied to $2,200 monthly rent. What is the new amount?
As Python:
rent = 2200
increase = 3 / 100 # 0.03
new_rent = rent * (1 + increase) # 2266.0
print(f"{new_rent:.2f}")
Execution result — 2266.00
It rises to $2,266.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 103 | {"gold": "2266.00", "printed": "2266.00", "notation": null} |
nlprog_det-setting-0049831 | <|start|><|user|>
A court charges $5 per request plus $0.25 per page after the first 0 pages. What does a 60-page copy cost?<|eot|>
<|assistant|>
The copy costs $20.00.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A court charges $5 per request plus $0.25 per page after the first 0 pages. What does a 60-page copy cost?"
},
{
"role": "assistant",
"content": "The copy costs $20.00."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 47 | {"gold": "20.00", "printed": "20.00", "notation": null} |
nlprog_det-setting-0049832 | A $24,000 grant pays $0 up front and the rest in 3 equal installments. How large is each installment?
Each installment is $8,000.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 41 | {"gold": "8000.00", "printed": "8000.00", "notation": null} |
nlprog_det-setting-0049834 | <|start|><|system|>
You are a data assistant.<|eot|>
<|user|>
What simple interest does $8,000 earn at 3% a year over 6 years?<|eot|>
<|assistant|>
```python
principal = 8000
rate = 3 / 100 # 0.03
years = 6
interest = principal * rate * years # 1440.0
print(f"{interest:.2f}")
```
When run, it prints 1440.00.
It earn... | chat | [
{
"role": "system",
"content": "You are a data assistant."
},
{
"role": "user",
"content": "What simple interest does $8,000 earn at 3% a year over 6 years?"
},
{
"role": "assistant",
"content": "```python\nprincipal = 8000\nrate = 3 / 100 # 0.03\nyears = 6\ninterest = principal * r... | nlprog_det | setting | original | null | deterministic | [] | [] | 124 | {"gold": "1440.00", "printed": "1440.00", "notation": null} |
nlprog_det-setting-0049835 | <|start|><|user|>
A claim accrued on November 6, 2018. The limitations period is 5 years. On what date does it expire?<|eot|>
<|assistant|>
```python
from datetime import date
accrued = date(2018, 11, 6) # datetime.date(2018, 11, 6)
years = 5
expires = accrued.replace(year=accrued.year + years) # datetime.date(2023, ... | chat | [
{
"role": "user",
"content": "A claim accrued on November 6, 2018. The limitations period is 5 years. On what date does it expire?"
},
{
"role": "assistant",
"content": "```python\nfrom datetime import date\naccrued = date(2018, 11, 6) # datetime.date(2018, 11, 6)\nyears = 5\nexpires = accrued.... | nlprog_det | setting | original | null | deterministic | [] | [] | 143 | {"gold": "2023-11-06", "printed": "2023-11-06", "notation": null} |
nlprog_det-setting-0049836 | An invoice lists 9 toner kits at $6 each, plus 6% sales tax. What is the invoice total?
Let's compute it with Python.
```python
quantity = 9
unit_price = 6
subtotal = quantity * unit_price # 54
total = subtotal * (1 + 6 / 100) # 57.24
print(f"{total:.2f}")
```
It prints 57.24, as expected.
The invoice total is $57.... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 139 | {"gold": "57.24", "printed": "57.24", "notation": null} |
nlprog_det-setting-0049837 | Parking is $3 per hour with a daily maximum of $24. What do 5 hours cost?
Python does the arithmetic:
```python
rate = 3
hours = 5
daily_max = 24
cost = min(rate * hours, daily_max) # 15
print(cost)
```
# stdout: 15
The charge is $15. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 97 | {"gold": "15", "printed": "15", "notation": null} |
nlprog_det-setting-0049838 | Each of Vera's runs burns 400 calories. How many calories over 7 runs?
A short script:
```python
per_session = 400
sessions = 7
total = per_session * sessions # 2800
print(total)
```
When run, it prints: 2800
That burns 2800 calories. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 93 | {"gold": "2800", "printed": "2800", "notation": null} |
nlprog_det-setting-0049840 | What is -15 degrees Celsius in Fahrenheit?
```python
celsius = -15
fahrenheit = celsius * 9 / 5 + 32 # 5.0
print(round(fahrenheit))
```
What it prints: 5
It equals 5 degrees Fahrenheit. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 89 | {"gold": "5", "printed": "5", "notation": null} |
nlprog_det-setting-0049841 | A settlement of $524 is split equally among 4 parties. How much does each party receive?
In Python:
```python
settlement = 524
parties = 4
share = settlement // parties # 131
print(share)
```
Console output: 131
Each share is $131. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 86 | {"gold": "131", "printed": "131", "notation": null} |
nlprog_det-setting-0049842 | Printing costs 15 cents a page. What does it cost to print 13 copies of a 20-page handout?
Python code:
```python
pages = 20
copies = 13
cost_per_page = 0.15
cost = pages * copies * cost_per_page # 39.0
print(f"{cost:.2f}")
```
This prints: 39.00
The job costs $39.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 117 | {"gold": "39.00", "printed": "39.00", "notation": null} |
nlprog_det-setting-0049843 | How many minutes pass from 8:17 AM to 12:51 PM on the same day?
Computing it:
```python
start = 8 * 60 + 17 # 497
end = 12 * 60 + 51 # 771
print(end - start)
```
Run output: 274
274 minutes pass. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 83 | {"gold": "274", "printed": "274", "notation": null} |
nlprog_det-setting-0049845 | Papers were served by mail on August 26, 2022. A response is due 21 days after service, plus 3 extra days for mailing. What is the due date?
Programmatically:
from datetime import date, timedelta
served = date(2022, 8, 26) # datetime.date(2022, 8, 26)
response_days = 21
mail_days = 3
due = served ... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 164 | {"gold": "2022-09-19", "printed": "2022-09-19", "notation": null} |
nlprog_det-setting-0049846 | <|start|><|user|>
A 340-mile drive at a steady 60 mph takes how many minutes?<|eot|>
<|assistant|>
```python
distance = 340
speed = 60
minutes = distance / speed * 60 # 340.0
print(round(minutes))
```
When run, it prints 340, as expected.
The trip takes 340 minutes.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A 340-mile drive at a steady 60 mph takes how many minutes?"
},
{
"role": "assistant",
"content": "```python\ndistance = 340\nspeed = 60\nminutes = distance / speed * 60 # 340.0\nprint(round(minutes))\n```\nWhen run, it prints 340, as expected.\n\nThe trip takes 34... | nlprog_det | setting | original | null | deterministic | [] | [] | 92 | {"gold": "340", "printed": "340", "notation": null} |
nlprog_det-setting-0049847 | <|start|><|user|>
2 friends split a $84 bill plus a 18% tip evenly. How much does each pay?<|eot|>
<|assistant|>
Each person pays $49.56.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "2 friends split a $84 bill plus a 18% tip evenly. How much does each pay?"
},
{
"role": "assistant",
"content": "Each person pays $49.56."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 40 | {"gold": "49.56", "printed": "49.56", "notation": null} |
nlprog_det-setting-0049848 | The bridge was finished in 2007. How many years had passed by 2041?
Let the code do the arithmetic:
```python
start_year = 2007
end_year = 2041
print(end_year - start_year)
```
It outputs: 34
34 years. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 73 | {"gold": "34", "printed": "34", "notation": null} |
nlprog_det-setting-0049849 | A measure needs at least 60% of 224 votes. How many votes is that, rounded up?
One way, in code:
```python
import math
voters = 224
needed = math.ceil(voters * 60 / 100) # 135
print(needed)
```
The program outputs 135.
135 votes are needed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 98 | {"gold": "135", "printed": "135", "notation": null} |
nlprog_det-setting-0049850 | <|start|><|user|>
A 5-day trip pays $69 a day for meals and $175 a night for lodging (4 nights). What is the total allowance?<|eot|>
<|assistant|>
That comes to $1,045.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A 5-day trip pays $69 a day for meals and $175 a night for lodging (4 nights). What is the total allowance?"
},
{
"role": "assistant",
"content": "That comes to $1,045."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 53 | {"gold": "1045", "printed": "1045", "notation": null} |
nlprog_det-setting-0049851 | <|start|><|user|>
Copies cost $5 plus $0.25 for each page beyond 10. How much for 37 pages?<|eot|>
<|assistant|>
```python
pages = 37
base = 5
per_page = 0.25
free_pages = 10
cost = base + max(0, pages - free_pages) * per_page # 11.75
print(f"{cost:.2f}")
```
Output of the run — 11.75
The total is $11.75.<|eot|>
<|en... | chat | [
{
"role": "user",
"content": "Copies cost $5 plus $0.25 for each page beyond 10. How much for 37 pages?"
},
{
"role": "assistant",
"content": "```python\npages = 37\nbase = 5\nper_page = 0.25\nfree_pages = 10\ncost = base + max(0, pages - free_pages) * per_page # 11.75\nprint(f\"{cost:.2f}\")\n... | nlprog_det | setting | original | null | deterministic | [] | [] | 126 | {"gold": "11.75", "printed": "11.75", "notation": null} |
nlprog_det-setting-0049852 | Pack A has 6 items for $4.84. Pack B has 20 items for $27.32. Which has the lower price per item?
Computation in Python:
```python
pack_a = 4.84 / 6
pack_b = 27.32 / 20
cheaper = "A" if pack_a < pack_b else "B"
print(cheaper)
```
The printout reads: A
Pack A is cheaper per item. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 124 | {"gold": "A", "printed": "A", "notation": null} |
nlprog_det-setting-0049853 | <|start|><|user|>
Fixed costs are $1,200. Each unit sells for $40 and costs $35 to make. How many units must be sold to break even?<|eot|>
<|assistant|>
```python
import math
fixed = 1200
price = 40
variable = 35
units = math.ceil(fixed / (price - variable)) # 240
print(units)
```
The script prints: 240
240 units are... | chat | [
{
"role": "user",
"content": "Fixed costs are $1,200. Each unit sells for $40 and costs $35 to make. How many units must be sold to break even?"
},
{
"role": "assistant",
"content": "```python\nimport math\nfixed = 1200\nprice = 40\nvariable = 35\nunits = math.ceil(fixed / (price - variable)) #... | nlprog_det | setting | original | null | deterministic | [] | [] | 113 | {"gold": "240", "printed": "240", "notation": null} |
nlprog_det-setting-0049854 | Copies cost $5 plus $0.50 for each page beyond 20. How much for 34 pages?
As Python:
```python
pages = 34
base = 5
per_page = 0.5
free_pages = 20
cost = base + max(0, pages - free_pages) * per_page # 12.0
print(f"{cost:.2f}")
```
The program prints 12.00.
The total is $12.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 126 | {"gold": "12.00", "printed": "12.00", "notation": null} |
nlprog_det-setting-0049855 | A $12,000 grant pays $0 up front and the rest in 3 equal installments. How large is each installment?
Python version:
```python
grant = 12000
up_front = 0
installments = 3
each = (grant - up_front) / installments
print(f"{each:.2f}")
```
Printed result — 4000.00
Each installment is $4,000.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 115 | {"gold": "4000.00", "printed": "4000.00", "notation": null} |
nlprog_det-setting-0049856 | Which is cheaper per unit: 8 for $3.30 (A) or 30 for $15.64 (B)?
Translated to Python:
```python
pack_a = 3.3 / 8 # 0.4125
pack_b = 15.64 / 30 # 0.5213333333333333
cheaper = "A" if pack_a < pack_b else "B" # 'A'
print(cheaper)
```
Execution result: A
A has the lower unit price. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 136 | {"gold": "A", "printed": "A", "notation": null} |
nlprog_det-setting-0049857 | With 15% off, what does a $90 bicycle helmet cost?
As a program:
```python
price = 90
discount = 15 / 100 # 0.15
sale_price = price * (1 - discount) # 76.5
print(f"{sale_price:.2f}")
```
It prints: 76.50
The sale price is $76.50. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 107 | {"gold": "76.50", "printed": "76.50", "notation": null} |
nlprog_det-setting-0049858 | A customer buys 2 binders at $23 each, 2 envelopes at $22 each, 3 binders at $25 each, 6 clipboards at $11 each and pays with $250. How much change is due?
We write it as a program:
```python
items = [(2, 23), (2, 22), (3, 25), (6, 11)]
total = sum(q * p for q, p in items) # 231
paid = 250
change = paid - total # 19... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 150 | {"gold": "19", "printed": "19", "notation": null} |
nlprog_det-setting-0049859 | <|start|><|system|>
Keep explanations short.<|eot|>
<|user|>
Of a $5,000 budget, $3,000 has been spent. What percent is that?<|eot|>
<|assistant|>
```python
budget = 5000
spent = 3000
percent = spent / budget * 100 # 60.0
print(round(percent, 1))
```
Interpreter output — 60.0
That is 60.0% of the budget.<|eot|>
<|end... | chat | [
{
"role": "system",
"content": "Keep explanations short."
},
{
"role": "user",
"content": "Of a $5,000 budget, $3,000 has been spent. What percent is that?"
},
{
"role": "assistant",
"content": "```python\nbudget = 5000\nspent = 3000\npercent = spent / budget * 100 # 60.0\nprint(rou... | nlprog_det | setting | original | null | deterministic | [] | [] | 103 | {"gold": "60.0", "printed": "60.0", "notation": null} |
nlprog_det-setting-0049860 | With 15% off, what does a $75 chair cost?
We write it as a program:
```python
price = 75
discount = 15 / 100 # 0.15
sale_price = price * (1 - discount) # 63.75
print(f"{sale_price:.2f}")
```
When run, it prints 63.75, as expected.
The sale price is $63.75. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 110 | {"gold": "63.75", "printed": "63.75", "notation": null} |
nlprog_det-setting-0049861 | A water bill is $15 plus $5.10 per thousand gallons beyond the first 3 thousand. What is the bill for 20 thousand gallons?
```python
base = 15
rate = 5.1
used = 20
free = 3
bill = base + rate * max(0, used - free) # 101.69999999999999
print(f"{bill:.2f}")
```
Output: 101.70
The bill is $101.70. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 121 | {"gold": "101.70", "printed": "101.70", "notation": null} |
nlprog_det-setting-0049862 | What day of the week is June 26, 2013?
Script:
```python
from datetime import date
hearing = date(2013, 6, 26) # datetime.date(2013, 6, 26)
print(hearing.strftime("%A"))
```
Printed = Wednesday
June 26, 2013 is a Wednesday. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 95 | {"gold": "Wednesday", "printed": "Wednesday", "notation": null} |
nlprog_det-setting-0049863 | <|start|><|system|>
Available functions (JSON Schema):
{"name": "compute", "description": "Evaluates Python and returns the printed output.", "parameters": {"type": "object", "properties": {"program": {"type": "string", "description": "Python source code"}}, "required": ["program"]}}<|eot|>
<|user|>
A measure needs at ... | chat | [
{
"role": "system",
"content": "Available functions (JSON Schema):\n{\"name\": \"compute\", \"description\": \"Evaluates Python and returns the printed output.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"program\": {\"type\": \"string\", \"description\": \"Python source code\"}}, \"required... | nlprog_det | setting | original | null | deterministic | [] | [] | 210 | {"gold": "141", "printed": "141", "notation": null} |
nlprog_det-setting-0049864 | To read 540 pages in 9 days, how many pages per day are needed?
In Python:
```python
pages = 540
days = 9
per_day = pages // days # 60
print(per_day)
```
The printout reads: 60
60 pages a day. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 82 | {"gold": "60", "printed": "60", "notation": null} |
nlprog_det-setting-0049865 | Which is cheaper per unit: 12 for $14.15 (A) or 24 for $24.50 (B)?
Code:
```python
pack_a = 14.15 / 12 # 1.1791666666666667
pack_b = 24.5 / 24 # 1.0208333333333333
cheaper = "A" if pack_a < pack_b else "B" # 'B'
print(cheaper)
```
Running this gives B.
B has the lower unit price. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 135 | {"gold": "B", "printed": "B", "notation": null} |
nlprog_det-setting-0049866 | <|start|><|user|>
Papers were served by mail on November 15, 2026. A response is due 30 days after service, plus 3 extra days for mailing. What is the due date?<|eot|>
<|assistant|>
```python
from datetime import date, timedelta
served = date(2026, 11, 15) # datetime.date(2026, 11, 15)
response_days = 30
mail_days = 3... | chat | [
{
"role": "user",
"content": "Papers were served by mail on November 15, 2026. A response is due 30 days after service, plus 3 extra days for mailing. What is the due date?"
},
{
"role": "assistant",
"content": "```python\nfrom datetime import date, timedelta\nserved = date(2026, 11, 15) # date... | nlprog_det | setting | original | null | deterministic | [] | [] | 181 | {"gold": "2026-12-18", "printed": "2026-12-18", "notation": null} |
nlprog_det-setting-0049867 | <|start|><|user|>
What day of the week is September 14, 2024?<|eot|>
<|assistant|>
```python
from datetime import date
hearing = date(2024, 9, 14) # datetime.date(2024, 9, 14)
print(hearing.strftime("%A"))
```
(Execution result: Saturday)
September 14, 2024 is a Saturday.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "What day of the week is September 14, 2024?"
},
{
"role": "assistant",
"content": "```python\nfrom datetime import date\nhearing = date(2024, 9, 14) # datetime.date(2024, 9, 14)\nprint(hearing.strftime(\"%A\"))\n```\n(Execution result: Saturday)\n\nSeptember 14, 20... | nlprog_det | setting | original | null | deterministic | [] | [] | 100 | {"gold": "Saturday", "printed": "Saturday", "notation": null} |
nlprog_det-setting-0049868 | How many days are there from December 15, 2020 to December 7, 2021?
Computation in Python:
```python
from datetime import date
first = date(2020, 12, 15) # datetime.date(2020, 12, 15)
second = date(2021, 12, 7) # datetime.date(2021, 12, 7)
print((second - first).days)
```
# console output: 357
There are 357 days be... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 129 | {"gold": "357", "printed": "357", "notation": null} |
nlprog_det-setting-0049869 | A quorum is 2/3 of the 59 members, rounded up. How many members make a quorum?
Code:
```python
import math
members = 59
quorum = math.ceil(members * 2 / 3) # 40
print(quorum)
```
Output of the run: 40
40 members are needed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 92 | {"gold": "40", "printed": "40", "notation": null} |
nlprog_det-setting-0049871 | A library charges $0.20 per book per day late. What is the fine for 2 books that are 17 days late?
Coded up:
per_day = 0.2
days_late = 17
books = 2
fine = per_day * days_late * books # 6.800000000000001
print(f"{fine:.2f}")
# printed result: 6.80
The fine is $6.80. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 105 | {"gold": "6.80", "printed": "6.80", "notation": null} |
nlprog_det-setting-0049872 | <|start|><|system|>
Use a tool when a calculation is needed. Tools:
{"name": "define_word", "description": "Return a dictionary definition.", "parameters": {"type": "object", "properties": {"word": {"type": "string"}}, "required": ["word"]}}
{"name": "interpreter", "description": "Use for arithmetic and date math; retu... | chat | [
{
"role": "system",
"content": "Use a tool when a calculation is needed. Tools:\n{\"name\": \"define_word\", \"description\": \"Return a dictionary definition.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"word\": {\"type\": \"string\"}}, \"required\": [\"word\"]}}\n{\"name\": \"interpreter\"... | nlprog_det | setting | original | null | deterministic | [] | [] | 313 | {"gold": "9000.00", "printed": "9000.00", "notation": null} |
nlprog_det-setting-0049873 | A settlement of $2,640 is split equally among 2 parties. How much does each party receive?
Set it up in Python:
```python
settlement = 2640
parties = 2
share = settlement // parties # 1320
print(share)
```
Python prints: 1320
Each share is $1,320. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 96 | {"gold": "1320", "printed": "1320", "notation": null} |
nlprog_det-setting-0049874 | Meals are $69 per day and lodging $110 per night. What is the allowance for 5 days and 4 nights?
```python
days = 5
meal_rate = 69
lodging_rate = 110
nights = days - 1 # 4
total = days * meal_rate + nights * lodging_rate # 785
print(total)
```
(Printed: 785)
That comes to $785. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 117 | {"gold": "785", "printed": "785", "notation": null} |
nlprog_det-setting-0049875 | <|start|><|system|>
Tools you may use:
[{"name": "get_weather", "description": "Get the weather for a city.", "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}, {"name": "python", "description": "A Python interpreter. Returns standard output.", "parameters": {"type": "o... | chat | [
{
"role": "system",
"content": "Tools you may use:\n[{\"name\": \"get_weather\", \"description\": \"Get the weather for a city.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"city\": {\"type\": \"string\"}}, \"required\": [\"city\"]}}, {\"name\": \"python\", \"description\": \"A Python interpr... | nlprog_det | setting | original | null | deterministic | [] | [] | 350 | {"gold": "73", "printed": "73", "notation": null} |
nlprog_det-setting-0049876 | <|start|><|user|>
A penalty of $25 a day accrues, capped at $1,000. What is owed after 59 days?<|eot|>
<|assistant|>
```python
per_day = 25
days = 59
cap = 1000
fine = min(per_day * days, cap) # 1000
print(fine)
```
Out — 1000
The fine is $1,000.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A penalty of $25 a day accrues, capped at $1,000. What is owed after 59 days?"
},
{
"role": "assistant",
"content": "```python\nper_day = 25\ndays = 59\ncap = 1000\nfine = min(per_day * days, cap) # 1000\nprint(fine)\n```\nOut — 1000\n\nThe fine is $1,000."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 101 | {"gold": "1000", "printed": "1000", "notation": null} |
nlprog_det-setting-0049877 | 2 books come back 11 days late, at $0.20 a day each. What is the fine?
The fine is $4.40. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 33 | {"gold": "4.40", "printed": "4.40", "notation": null} |
nlprog_det-setting-0049878 | A 7-day trip pays $74 a day for meals and $175 a night for lodging (6 nights). What is the total allowance?
Let the code do the arithmetic:
```python
days = 7
meal_rate = 74
lodging_rate = 175
nights = days - 1 # 6
total = days * meal_rate + nights * lodging_rate # 1568
print(total)
```
On running, it outputs 1568.
... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 134 | {"gold": "1568", "printed": "1568", "notation": null} |
nlprog_det-setting-0049879 | <|start|><|user|>
Shipping costs $5 plus $2.50 per pound. What does a 34-pound parcel cost to ship?<|eot|>
<|assistant|>
```python
base = 5
per_pound = 2.5
weight = 34
cost = base + per_pound * weight # 90.0
print(f"{cost:.2f}")
```
Console:
90.00
The charge is $90.00.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Shipping costs $5 plus $2.50 per pound. What does a 34-pound parcel cost to ship?"
},
{
"role": "assistant",
"content": "```python\nbase = 5\nper_pound = 2.5\nweight = 34\ncost = base + per_pound * weight # 90.0\nprint(f\"{cost:.2f}\")\n```\nConsole:\n90.00\n\nThe ... | nlprog_det | setting | original | null | deterministic | [] | [] | 110 | {"gold": "90.00", "printed": "90.00", "notation": null} |
nlprog_det-setting-0049880 | From a $10,000 retainer, 13 hours at $250/hour have been drawn. What remains?
Computing it:
```python
retainer = 10000
hours = 13
rate = 250
left = retainer - hours * rate # 6750
print(left)
```
The program prints 6750, as expected.
$6,750 of the retainer is left. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 103 | {"gold": "6750", "printed": "6750", "notation": null} |
nlprog_det-setting-0049881 | 127 of 200 members attended. What percent attended?
present = 127
total = 200
percent = present / total * 100 # 63.5
print(round(percent, 1))
The program outputs 63.5.
63.5% attended. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 63 | {"gold": "63.5", "printed": "63.5", "notation": null} |
nlprog_det-setting-0049882 | Express 164 hours in days and hours.
The computation:
```python
hours = 164
days, rest = divmod(hours, 24)
print(f"{days} days and {rest} hours")
```
Execution prints 6 days and 20 hours, as expected.
164 hours is 6 days and 20 hours. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 91 | {"gold": "6 days and 20 hours", "printed": "6 days and 20 hours", "notation": null} |
nlprog_det-setting-0049883 | A pack of 12 file boxes sells for $36. What does each cost?
Python:
```python
total = 36
count = 12
per_item = total // count # 3
print(per_item)
```
Out = 3
The unit price is $3. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 81 | {"gold": "3", "printed": "3", "notation": null} |
nlprog_det-setting-0049884 | <|start|><|system|>
Give the answer first.<|eot|>
<|user|>
The firm was founded in 2009. How many years had passed by 2044?<|eot|>
<|assistant|>
```python
start_year = 2009
end_year = 2044
print(end_year - start_year)
```
(Out: 35)
That is 35 years.<|eot|>
<|end|> | chat | [
{
"role": "system",
"content": "Give the answer first."
},
{
"role": "user",
"content": "The firm was founded in 2009. How many years had passed by 2044?"
},
{
"role": "assistant",
"content": "```python\nstart_year = 2009\nend_year = 2044\nprint(end_year - start_year)\n```\n(Out: 35)... | nlprog_det | setting | original | null | deterministic | [] | [] | 85 | {"gold": "35", "printed": "35", "notation": null} |
nlprog_det-setting-0049885 | Buying 2 headsets at $2 each, 3 desk lamps at $27 each, someone hands over $100. What change comes back?
Programmatically:
```python
items = [(2, 2), (3, 27)]
total = sum(q * p for q, p in items) # 85
paid = 100
change = paid - total # 15
print(change)
```
Run result = 15
$15 comes back. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 118 | {"gold": "15", "printed": "15", "notation": null} |
nlprog_det-setting-0049886 | <|start|><|user|>
How many weekdays (Monday to Friday) fall after June 12, 2019 up to and including July 4, 2019?<|eot|>
<|assistant|>
from datetime import date, timedelta
start = date(2019, 6, 12)
end = date(2019, 7, 4)
count = 0
for k in range(1, (end - start).days + 1):
if (start + timede... | chat | [
{
"role": "user",
"content": "How many weekdays (Monday to Friday) fall after June 12, 2019 up to and including July 4, 2019?"
},
{
"role": "assistant",
"content": " from datetime import date, timedelta\n start = date(2019, 6, 12)\n end = date(2019, 7, 4)\n count = 0\n for k in ra... | nlprog_det | setting | original | null | deterministic | [] | [] | 145 | {"gold": "16", "printed": "16", "notation": null} |
nlprog_det-setting-0049887 | <|start|><|user|>
A measure needs at least 67% of 251 votes. How many votes is that, rounded up?<|eot|>
<|assistant|>
```python
import math
voters = 251
needed = math.ceil(voters * 67 / 100) # 169
print(needed)
```
What it prints: 169
169 votes are needed.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A measure needs at least 67% of 251 votes. How many votes is that, rounded up?"
},
{
"role": "assistant",
"content": "```python\nimport math\nvoters = 251\nneeded = math.ceil(voters * 67 / 100) # 169\nprint(needed)\n```\nWhat it prints: 169\n\n169 votes are needed.... | nlprog_det | setting | original | null | deterministic | [] | [] | 98 | {"gold": "169", "printed": "169", "notation": null} |
nlprog_det-setting-0049888 | <|start|><|user|>
Convert -15 °C to Fahrenheit.<|eot|>
<|assistant|>
```python
celsius = -15
fahrenheit = celsius * 9 / 5 + 32 # 5.0
print(round(fahrenheit))
```
Console:
5
It equals 5 degrees Fahrenheit.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Convert -15 °C to Fahrenheit."
},
{
"role": "assistant",
"content": "```python\ncelsius = -15\nfahrenheit = celsius * 9 / 5 + 32 # 5.0\nprint(round(fahrenheit))\n```\nConsole:\n5\n\nIt equals 5 degrees Fahrenheit."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 92 | {"gold": "5", "printed": "5", "notation": null} |
nlprog_det-setting-0049889 | How many weekdays (Monday to Friday) fall after September 3, 2019 up to and including September 23, 2019?
Python makes this quick:
```python
from datetime import date, timedelta
start = date(2019, 9, 3)
end = date(2019, 9, 23)
count = 0
for k in range(1, (end - start).days + 1):
if (start + timedelta(days=k)).week... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 158 | {"gold": "14", "printed": "14", "notation": null} |
nlprog_det-setting-0049890 | How many minutes pass from 10:52 AM to 5:52 PM on the same day?
A short script:
start = 10 * 60 + 52 # 652
end = 17 * 60 + 52 # 1072
print(end - start)
stdout = 420
420 minutes pass. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 71 | {"gold": "420", "printed": "420", "notation": null} |
nlprog_det-setting-0049891 | <|start|><|system|>
You are a teaching assistant.<|eot|>
<|user|>
Find the mean of these test scores: 59, 79, 61, 88 and 98.<|eot|>
<|assistant|>
```python
scores = [59, 79, 61, 88, 98]
average = sum(scores) // len(scores) # 77
print(average)
```
Running it prints: 77
The mean is 77.<|eot|>
<|end|> | chat | [
{
"role": "system",
"content": "You are a teaching assistant."
},
{
"role": "user",
"content": "Find the mean of these test scores: 59, 79, 61, 88 and 98."
},
{
"role": "assistant",
"content": "```python\nscores = [59, 79, 61, 88, 98]\naverage = sum(scores) // len(scores) # 77\nprin... | nlprog_det | setting | original | null | deterministic | [] | [] | 105 | {"gold": "77", "printed": "77", "notation": null} |
nlprog_det-setting-0049892 | A hall has 8 rows of 10 seats, and 19 seats are empty. How many people are seated?
```python
rows = 8
per_row = 10
empty = 19
seated = rows * per_row - empty # 61
print(seated)
```
The program outputs 61.
61 seats are taken. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 88 | {"gold": "61", "printed": "61", "notation": null} |
nlprog_det-setting-0049893 | <|start|><|user|>
A meeting lasted 5 hours and 45 minutes. How many minutes is that?<|eot|>
<|assistant|>
hours = 5
minutes = 45
total_minutes = hours * 60 + minutes # 345
print(total_minutes)
The program prints: 345
That is 345 minutes.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A meeting lasted 5 hours and 45 minutes. How many minutes is that?"
},
{
"role": "assistant",
"content": " hours = 5\n minutes = 45\n total_minutes = hours * 60 + minutes # 345\n print(total_minutes)\nThe program prints: 345\n\nThat is 345 minutes."
}... | nlprog_det | setting | original | null | deterministic | [] | [] | 73 | {"gold": "345", "printed": "345", "notation": null} |
nlprog_det-setting-0049894 | Fines run at $250 per day up to a maximum of $2,500. How much after 11 days?
The computation:
```python
per_day = 250
days = 11
cap = 2500
fine = min(per_day * days, cap) # 2500
print(fine)
```
Running it prints: 2500
$2,500 is owed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 100 | {"gold": "2500", "printed": "2500", "notation": null} |
nlprog_det-setting-0049895 | <|start|><|user|>
What simple interest does $12,000 earn at 5% a year over 4 years?<|eot|>
<|assistant|>
```python
principal = 12000
rate = 5 / 100 # 0.05
years = 4
interest = principal * rate * years # 2400.0
print(f"{interest:.2f}")
```
This prints: 2400.00
It earns $2,400.00.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "What simple interest does $12,000 earn at 5% a year over 4 years?"
},
{
"role": "assistant",
"content": "```python\nprincipal = 12000\nrate = 5 / 100 # 0.05\nyears = 4\ninterest = principal * rate * years # 2400.0\nprint(f\"{interest:.2f}\")\n```\nThis prints: 240... | nlprog_det | setting | original | null | deterministic | [] | [] | 110 | {"gold": "2400.00", "printed": "2400.00", "notation": null} |
nlprog_det-setting-0049896 | A appointment starts at 12:40 PM and lasts 75 minutes. When does it end?
Python does the arithmetic:
```python
start = 12 * 60 + 40
end = start + 75
hour, minute = divmod(end, 60)
print(f"{(hour - 1) % 12 + 1}:{minute:02d} {'AM' if hour < 12 else 'PM'}")
```
Printed result — 1:55 PM
The appointment finishes at 1:55 P... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 134 | {"gold": "1:55 PM", "printed": "1:55 PM", "notation": null} |
nlprog_det-setting-0049897 | How many units at $30 each (variable cost $26) cover $6,000 of fixed costs?
Python code:
```python
import math
fixed = 6000
price = 30
variable = 26
units = math.ceil(fixed / (price - variable)) # 1500
print(units)
```
Printed result — 1500
Break-even is 1500 units. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 113 | {"gold": "1500", "printed": "1500", "notation": null} |
nlprog_det-setting-0049899 | <|start|><|user|>
Of a $5,000 budget, $200 has been spent. What percent is that?<|eot|>
<|assistant|>
```python
budget = 5000
spent = 200
percent = spent / budget * 100 # 4.0
print(round(percent, 1))
```
# printed result: 4.0
That is 4.0% of the budget.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Of a $5,000 budget, $200 has been spent. What percent is that?"
},
{
"role": "assistant",
"content": "```python\nbudget = 5000\nspent = 200\npercent = spent / budget * 100 # 4.0\nprint(round(percent, 1))\n```\n# printed result: 4.0\n\nThat is 4.0% of the budget."
... | nlprog_det | setting | original | null | deterministic | [] | [] | 90 | {"gold": "4.0", "printed": "4.0", "notation": null} |
nlprog_det-setting-0049900 | <|start|><|user|>
A $60,000 grant pays $3,000 up front and the rest in 3 equal installments. How large is each installment?<|eot|>
<|assistant|>
Each installment is $19,000.00.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A $60,000 grant pays $3,000 up front and the rest in 3 equal installments. How large is each installment?"
},
{
"role": "assistant",
"content": "Each installment is $19,000.00."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 50 | {"gold": "19000.00", "printed": "19000.00", "notation": null} |
nlprog_det-setting-0049901 | Convert 57.5 km to meters.
```python
km = 57.5
meters = km * 1000 # 57500.0
print(round(meters))
```
The code prints: 57500
That is 57,500 meters. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 75 | {"gold": "57500", "printed": "57500", "notation": null} |
nlprog_det-setting-0049902 | <|start|><|system|>
Use a tool when a calculation is needed. Tools:
{"name": "python_exec", "description": "Runs a short Python snippet and returns what it prints.", "parameters": {"type": "object", "properties": {"snippet": {"type": "string", "description": "Python source code"}}, "required": ["snippet"]}}<|eot|>
<|us... | chat | [
{
"role": "system",
"content": "Use a tool when a calculation is needed. Tools:\n{\"name\": \"python_exec\", \"description\": \"Runs a short Python snippet and returns what it prints.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"snippet\": {\"type\": \"string\", \"description\": \"Python sou... | nlprog_det | setting | original | null | deterministic | [] | [] | 229 | {"gold": "1.08", "printed": "1.08", "notation": null} |
nlprog_det-setting-0049903 | Monthly rent is $1,800. A tenant moves in with 19 days left in a 30-day month. What is the prorated rent?
Let's compute it with Python.
```python
rent = 1800
days_in_month = 30
days_occupied = 19
prorated = rent * days_occupied / days_in_month # 1140.0
print(f"{prorated:.2f}")
```
# run result: 1140.00
The prorated ... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 144 | {"gold": "1140.00", "printed": "1140.00", "notation": null} |
nlprog_det-setting-0049904 | A $12,000 grant pays $0 up front and the rest in 6 equal installments. How large is each installment?
grant = 12000
up_front = 0
installments = 6
each = (grant - up_front) / installments # 2000.0
print(f"{each:.2f}")
Running this gives: 2000.00
Each installment is $2,000.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 100 | {"gold": "2000.00", "printed": "2000.00", "notation": null} |
nlprog_det-setting-0049905 | A 8-day trip pays $64 a day for meals and $175 a night for lodging (7 nights). What is the total allowance?
```python
days = 8
meal_rate = 64
lodging_rate = 175
nights = days - 1
total = days * meal_rate + nights * lodging_rate
print(total)
```
Executed, it shows: 1737
The allowance is $1,737. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 119 | {"gold": "1737", "printed": "1737", "notation": null} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.