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-0057652 | A appointment starts at 1:15 PM and lasts 75 minutes. When does it end?
We can compute it in Python.
```python
start = 13 * 60 + 15
end = start + 75
hour, minute = divmod(end, 60)
print(f"{(hour - 1) % 12 + 1}:{minute:02d} {'AM' if hour < 12 else 'PM'}")
```
Python prints 2:30 PM, as expected.
It ends at 2:30 PM. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 139 | {"gold": "2:30 PM", "printed": "2:30 PM", "notation": null} |
nlprog_det-setting-0057653 | From a $7,500 retainer, 11 hours at $275/hour have been drawn. What remains?
Python version:
```python
retainer = 7500
hours = 11
rate = 275
left = retainer - hours * rate # 4475
print(left)
```
# run result: 4475
The remaining balance is $4,475. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 100 | {"gold": "4475", "printed": "4475", "notation": null} |
nlprog_det-setting-0057654 | Starting with 671 folders and using 30 per day, how many remain after 15 days?
The program:
stock = 671
per_day = 30
days = 15
left = stock - per_day * days # 221
print(left)
Interpreter output: 221
221 remain. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 77 | {"gold": "221", "printed": "221", "notation": null} |
nlprog_det-setting-0057655 | <|start|><|user|>
Parking is $2 per hour with a daily maximum of $24. What do 3 hours cost?<|eot|>
<|assistant|>
```python
rate = 2
hours = 3
daily_max = 24
cost = min(rate * hours, daily_max) # 6
print(cost)
```
The script prints 6.
The charge is $6.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Parking is $2 per hour with a daily maximum of $24. What do 3 hours cost?"
},
{
"role": "assistant",
"content": "```python\nrate = 2\nhours = 3\ndaily_max = 24\ncost = min(rate * hours, daily_max) # 6\nprint(cost)\n```\nThe script prints 6.\n\nThe charge is $6."
... | nlprog_det | setting | original | null | deterministic | [] | [] | 94 | {"gold": "6", "printed": "6", "notation": null} |
nlprog_det-setting-0057656 | <|start|><|system|>
You have access to these functions:
[{"name": "calculator", "description": "Executes Python code and returns stdout.", "parameters": {"type": "object", "properties": {"snippet": {"type": "string", "description": "Python source code"}}, "required": ["snippet"]}}, {"name": "translate", "description": ... | chat | [
{
"role": "system",
"content": "You have access to these functions:\n[{\"name\": \"calculator\", \"description\": \"Executes Python code and returns stdout.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"snippet\": {\"type\": \"string\", \"description\": \"Python source code\"}}, \"required\":... | nlprog_det | setting | original | null | deterministic | [] | [] | 285 | {"gold": "93900", "printed": "93900", "notation": null} |
nlprog_det-setting-0057657 | A 2% increase is applied to $1,800 monthly rent. What is the new amount? The new rent is $1,836.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 32 | {"gold": "1836.00", "printed": "1836.00", "notation": null} |
nlprog_det-setting-0057658 | <|start|><|user|>
The bridge was finished in 2010. How many years had passed by 2048?<|eot|>
<|assistant|>
start_year = 2010
end_year = 2048
print(end_year - start_year)
It outputs: 38
38 years.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "The bridge was finished in 2010. How many years had passed by 2048?"
},
{
"role": "assistant",
"content": " start_year = 2010\n end_year = 2048\n print(end_year - start_year)\nIt outputs: 38\n\n38 years."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 59 | {"gold": "38", "printed": "38", "notation": null} |
nlprog_det-setting-0057659 | <|start|><|user|>
Of a $2,000 budget, $1,700 has been spent. What percent is that?<|eot|>
<|assistant|>
```python
budget = 2000
spent = 1700
percent = spent / budget * 100 # 85.0
print(round(percent, 1))
```
(Output: 85.0)
85.0% has been spent.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Of a $2,000 budget, $1,700 has been spent. What percent is that?"
},
{
"role": "assistant",
"content": "```python\nbudget = 2000\nspent = 1700\npercent = spent / budget * 100 # 85.0\nprint(round(percent, 1))\n```\n(Output: 85.0)\n\n85.0% has been spent."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 92 | {"gold": "85.0", "printed": "85.0", "notation": null} |
nlprog_det-setting-0057660 | Prorate $1,800 of monthly rent for 8 days of a 31-day month.
Python, step by step:
```python
rent = 1800
days_in_month = 31
days_occupied = 8
prorated = rent * days_occupied / days_in_month # 464.51612903225805
print(f"{prorated:.2f}")
```
Console output: 464.52
The tenant owes $464.52. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 132 | {"gold": "464.52", "printed": "464.52", "notation": null} |
nlprog_det-setting-0057661 | Shipping costs $12 plus $2.00 per pound. What does a 13-pound parcel cost to ship?
Translated to Python:
```python
base = 12
per_pound = 2.0
weight = 13
cost = base + per_pound * weight
print(f"{cost:.2f}")
```
Printed = 38.00
The charge is $38.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 108 | {"gold": "38.00", "printed": "38.00", "notation": null} |
nlprog_det-setting-0057662 | How many units at $20 each (variable cost $14) cover $1,200 of fixed costs?
Break-even is 200 units. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 36 | {"gold": "200", "printed": "200", "notation": null} |
nlprog_det-setting-0057663 | A library charges $0.15 per book per day late. What is the fine for 4 books that are 7 days late?
per_day = 0.15
days_late = 7
books = 4
fine = per_day * days_late * books # 4.2
print(f"{fine:.2f}")
Running it prints: 4.20
The fine is $4.20. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 96 | {"gold": "4.20", "printed": "4.20", "notation": null} |
nlprog_det-setting-0057664 | <|start|><|system|>
Answer the user's question directly.<|eot|>
<|user|>
The landlord deducts $150, $150 and $150 from a $800 deposit. What is returned to the tenant?<|eot|>
<|assistant|>
```python
deposit = 800
deductions = [150, 150, 150]
refund = deposit - sum(deductions) # 350
print(refund)
```
(Run result: 350)
... | chat | [
{
"role": "system",
"content": "Answer the user's question directly."
},
{
"role": "user",
"content": "The landlord deducts $150, $150 and $150 from a $800 deposit. What is returned to the tenant?"
},
{
"role": "assistant",
"content": "```python\ndeposit = 800\ndeductions = [150, 150... | nlprog_det | setting | original | null | deterministic | [] | [] | 111 | {"gold": "350", "printed": "350", "notation": null} |
nlprog_det-setting-0057665 | How many weekdays (Monday to Friday) fall after March 8, 2018 up to and including April 6, 2018?
21 weekdays. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 37 | {"gold": "21", "printed": "21", "notation": null} |
nlprog_det-setting-0057666 | After an initial $0, the remainder of a $24,000 grant is paid in 4 equal parts. What is each part?
The computation:
```python
grant = 24000
up_front = 0
installments = 4
each = (grant - up_front) / installments # 6000.0
print(f"{each:.2f}")
```
Execution result — 6000.00
$6,000.00 per installment. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 117 | {"gold": "6000.00", "printed": "6000.00", "notation": null} |
nlprog_det-setting-0057667 | How much sales tax is charged on a $393.27 purchase at 9%?
The computation:
```python
price = 393.27
tax_rate = 9 / 100 # 0.09
tax = price * tax_rate # 35.394299999999994
print(f"{tax:.2f}")
```
Execution result: 35.39
$35.39 in tax. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 107 | {"gold": "35.39", "printed": "35.39", "notation": null} |
nlprog_det-setting-0057668 | A lawyer's fee is 40% of a $12,000 recovery. How large is the fee?
Python, step by step:
```python
recovery = 12000
rate = 40 / 100 # 0.4
fee = recovery * rate # 4800.0
print(f"{fee:.2f}")
```
Shell output: 4800.00
The lawyer's fee comes to $4,800.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 113 | {"gold": "4800.00", "printed": "4800.00", "notation": null} |
nlprog_det-setting-0057669 | <|start|><|user|>
A 120-mile drive at a steady 30 mph takes how many minutes?<|eot|>
<|assistant|>
distance = 120
speed = 30
minutes = distance / speed * 60 # 240.0
print(round(minutes))
Out:
240
240 minutes.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A 120-mile drive at a steady 30 mph takes how many minutes?"
},
{
"role": "assistant",
"content": " distance = 120\n speed = 30\n minutes = distance / speed * 60 # 240.0\n print(round(minutes))\nOut:\n240\n\n240 minutes."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 67 | {"gold": "240", "printed": "240", "notation": null} |
nlprog_det-setting-0057670 | Ada and Fiona share $2,708 in the ratio 1:3. How much does Ada get?
A short script:
total = 2708
parts_a = 1
parts_b = 3
share_a = total * parts_a // (parts_a + parts_b) # 677
print(share_a)
Output — 677
Ada gets $677. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 100 | {"gold": "677", "printed": "677", "notation": null} |
nlprog_det-setting-0057671 | Water costs $15 a month plus $4.75 for each 1,000 gallons over 0,000. What is owed for 15,000 gallons?
Program:
```python
base = 15
rate = 4.75
used = 15
free = 0
bill = base + rate * max(0, used - free) # 86.25
print(f"{bill:.2f}")
```
It prints: 86.25
The bill is $86.25. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 122 | {"gold": "86.25", "printed": "86.25", "notation": null} |
nlprog_det-setting-0057673 | <|start|><|system|>
Be exact with numbers.<|eot|>
<|user|>
Straight-line depreciation: cost $12,000, salvage $2,000, 5 years. How much per year?<|eot|>
<|assistant|>
```python
cost = 12000
salvage = 2000
years = 5
per_year = (cost - salvage) / years # 2000.0
print(f"{per_year:.2f}")
```
Result = 2000.00
Depreciation ... | chat | [
{
"role": "system",
"content": "Be exact with numbers."
},
{
"role": "user",
"content": "Straight-line depreciation: cost $12,000, salvage $2,000, 5 years. How much per year?"
},
{
"role": "assistant",
"content": "```python\ncost = 12000\nsalvage = 2000\nyears = 5\nper_year = (cost -... | nlprog_det | setting | original | null | deterministic | [] | [] | 132 | {"gold": "2000.00", "printed": "2000.00", "notation": null} |
nlprog_det-setting-0057674 | <|start|><|system|>
The following tools are available. Call one when it helps.
{"name": "convert_units", "description": "Convert a quantity between units.", "parameters": {"type": "object", "properties": {"value": {"type": "number"}, "from_unit": {"type": "string"}, "to_unit": {"type": "string"}}, "required": ["value",... | chat | [
{
"role": "system",
"content": "The following tools are available. Call one when it helps.\n{\"name\": \"convert_units\", \"description\": \"Convert a quantity between units.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"value\": {\"type\": \"number\"}, \"from_unit\": {\"type\": \"string\"}, ... | nlprog_det | setting | original | null | deterministic | [] | [] | 332 | {"gold": "281", "printed": "281", "notation": null} |
nlprog_det-setting-0057675 | A hall has 30 rows of 20 seats, and 13 seats are empty. How many people are seated?
587 people are seated. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 34 | {"gold": "587", "printed": "587", "notation": null} |
nlprog_det-setting-0057676 | <|start|><|user|>
What is the total rent on a 24-month lease at $1,640 a month?<|eot|>
<|assistant|>
```python
monthly_rent = 1640
months = 24
total = monthly_rent * months # 39360
print(total)
```
# program output: 39360
In total, $39,360 is paid.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "What is the total rent on a 24-month lease at $1,640 a month?"
},
{
"role": "assistant",
"content": "```python\nmonthly_rent = 1640\nmonths = 24\ntotal = monthly_rent * months # 39360\nprint(total)\n```\n# program output: 39360\n\nIn total, $39,360 is paid."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 92 | {"gold": "39360", "printed": "39360", "notation": null} |
nlprog_det-setting-0057677 | <|start|><|user|>
Someone born May 6, 1960 turns how old by September 27, 2026? Give the age in whole years.<|eot|>
<|assistant|>
```python
from datetime import date
born = date(1960, 5, 6) # datetime.date(1960, 5, 6)
on = date(2026, 9, 27) # datetime.date(2026, 9, 27)
age = on.year - born.year - ((on.month, on.day) ... | chat | [
{
"role": "user",
"content": "Someone born May 6, 1960 turns how old by September 27, 2026? Give the age in whole years."
},
{
"role": "assistant",
"content": "```python\nfrom datetime import date\nborn = date(1960, 5, 6) # datetime.date(1960, 5, 6)\non = date(2026, 9, 27) # datetime.date(2026... | nlprog_det | setting | original | null | deterministic | [] | [] | 159 | {"gold": "66", "printed": "66", "notation": null} |
nlprog_det-setting-0057680 | Divide 112 items among 8 groups as evenly as possible with equal groups. How many per group, and how many remain?
Written as code:
```python
total = 112
groups = 8
per_group, remainder = divmod(total, groups)
print(f"{per_group} each, {remainder} left over")
```
The script prints 14 each, 0 left over, as expected.
14... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 115 | {"gold": "14 each, 0 left over", "printed": "14 each, 0 left over", "notation": null} |
nlprog_det-setting-0057681 | A garage charges $3 an hour, never more than $24 a day. How much for 6 hours?
Programmatically:
```python
rate = 3
hours = 6
daily_max = 24
cost = min(rate * hours, daily_max) # 18
print(cost)
```
Run result — 18
Parking costs $18. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 95 | {"gold": "18", "printed": "18", "notation": null} |
nlprog_det-setting-0057682 | <|start|><|system|>
Double-check numbers before answering.<|eot|>
<|user|>
Tomas lends $8,000 at 6% simple interest per year for 3 years. How much interest is earned?<|eot|>
<|assistant|>
```python
principal = 8000
rate = 6 / 100 # 0.06
years = 3
interest = principal * rate * years # 1440.0
print(f"{interest:.2f}")
`... | chat | [
{
"role": "system",
"content": "Double-check numbers before answering."
},
{
"role": "user",
"content": "Tomas lends $8,000 at 6% simple interest per year for 3 years. How much interest is earned?"
},
{
"role": "assistant",
"content": "```python\nprincipal = 8000\nrate = 6 / 100 # 0... | nlprog_det | setting | original | null | deterministic | [] | [] | 132 | {"gold": "1440.00", "printed": "1440.00", "notation": null} |
nlprog_det-setting-0057683 | How much sales tax is charged on a $226.53 purchase at 4%?
Code:
```python
price = 226.53
tax_rate = 4 / 100 # 0.04
tax = price * tax_rate # 9.0612
print(f"{tax:.2f}")
```
The program prints: 9.06
$9.06 in tax. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 99 | {"gold": "9.06", "printed": "9.06", "notation": null} |
nlprog_det-setting-0057684 | A kettle costs $40. It is 20% off. What is the sale price?
```python
price = 40
discount = 20 / 100 # 0.2
sale_price = price * (1 - discount) # 32.0
print(f"{sale_price:.2f}")
```
Interpreter output — 32.00
It costs $32.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 102 | {"gold": "32.00", "printed": "32.00", "notation": null} |
nlprog_det-setting-0057685 | A hearing is set for October 20, 2009. What day of the week is that?
We write it as a program:
```python
from datetime import date
hearing = date(2009, 10, 20) # datetime.date(2009, 10, 20)
print(hearing.strftime("%A"))
```
When run, it prints Tuesday, as expected.
October 20, 2009 is a Tuesday. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 107 | {"gold": "Tuesday", "printed": "Tuesday", "notation": null} |
nlprog_det-setting-0057686 | A room is 25 feet by 18 feet. Flooring costs $8 per square foot. What does it cost to floor the room?
The flooring costs $3,600. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 40 | {"gold": "3600", "printed": "3600", "notation": null} |
nlprog_det-setting-0057687 | Pilar buys 6 boxes of 8 clipboards each and gives away 20 clipboards. How many clipboards are left?
boxes = 6
per_box = 8
given_away = 20
left = boxes * per_box - given_away # 28
print(left)
Running this gives 28.
28 clipboards are left. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 91 | {"gold": "28", "printed": "28", "notation": null} |
nlprog_det-setting-0057688 | At an exchange rate of 0.74 CAD per USD, how many CAD is 3,115 USD?
Python makes this quick:
```python
amount = 3115
rate = 0.74
converted = amount * rate
print(f"{converted:.2f}")
```
Run result — 2305.10
That is 2,305.10 CAD. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 105 | {"gold": "2305.10", "printed": "2305.10", "notation": null} |
nlprog_det-setting-0057689 | How many units at $25 each (variable cost $20) cover $9,000 of fixed costs?
The Python version:
```python
import math
fixed = 9000
price = 25
variable = 20
units = math.ceil(fixed / (price - variable)) # 1800
print(units)
```
The program outputs 1800.
Break-even is 1800 units. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 110 | {"gold": "1800", "printed": "1800", "notation": null} |
nlprog_det-setting-0057690 | <|start|><|user|>
Sofia drove 568 miles for work. Mileage is reimbursed at 62 cents a mile. How much is the reimbursement?<|eot|>
<|assistant|>
miles = 568
rate = 0.62
reimbursement = miles * rate # 352.16
print(f"{reimbursement:.2f}")
stdout — 352.16
Sofia is owed $352.16.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Sofia drove 568 miles for work. Mileage is reimbursed at 62 cents a mile. How much is the reimbursement?"
},
{
"role": "assistant",
"content": " miles = 568\n rate = 0.62\n reimbursement = miles * rate # 352.16\n print(f\"{reimbursement:.2f}\")\nstdout ... | nlprog_det | setting | original | null | deterministic | [] | [] | 102 | {"gold": "352.16", "printed": "352.16", "notation": null} |
nlprog_det-setting-0057691 | Someone born April 6, 1970 turns how old by December 21, 2023? Give the age in whole years.
We write it as a program:
```python
from datetime import date
born = date(1970, 4, 6) # datetime.date(1970, 4, 6)
on = date(2023, 12, 21) # datetime.date(2023, 12, 21)
age = on.year - born.year - ((on.month, on.day) < (born.m... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 157 | {"gold": "53", "printed": "53", "notation": null} |
nlprog_det-setting-0057692 | <|start|><|system|>
Tools you may use:
{"name": "interpreter", "description": "Evaluates Python and returns the printed output.", "parameters": {"type": "object", "properties": {"program": {"type": "string", "description": "Python source code"}}, "required": ["program"]}}<|eot|>
<|user|>
Counting only Monday through Fr... | chat | [
{
"role": "system",
"content": "Tools you may use:\n{\"name\": \"interpreter\", \"description\": \"Evaluates Python and returns the printed output.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"program\": {\"type\": \"string\", \"description\": \"Python source code\"}}, \"required\": [\"progr... | nlprog_det | setting | original | null | deterministic | [] | [] | 276 | {"gold": "28", "printed": "28", "notation": null} |
nlprog_det-setting-0057693 | The rules require 1/3 of 18 members (round up) to be present. How many is that?
Script:
import math
members = 18
quorum = math.ceil(members * 1 / 3)
print(quorum)
Printed: 6
6 members are needed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 72 | {"gold": "6", "printed": "6", "notation": null} |
nlprog_det-setting-0057694 | <|start|><|user|>
How many weekdays (Monday to Friday) fall after January 21, 2018 up to and including February 5, 2018?<|eot|>
<|assistant|>
```python
from datetime import date, timedelta
start = date(2018, 1, 21)
end = date(2018, 2, 5)
count = 0
for k in range(1, (end - start).days + 1):
if (start + timedelta(day... | chat | [
{
"role": "user",
"content": "How many weekdays (Monday to Friday) fall after January 21, 2018 up to and including February 5, 2018?"
},
{
"role": "assistant",
"content": "```python\nfrom datetime import date, timedelta\nstart = date(2018, 1, 21)\nend = date(2018, 2, 5)\ncount = 0\nfor k in rang... | nlprog_det | setting | original | null | deterministic | [] | [] | 150 | {"gold": "11", "printed": "11", "notation": null} |
nlprog_det-setting-0057695 | <|start|><|user|>
An unpaid balance of $1,000 accrues 1.5% simple interest per month. How much interest accrues in 3 months?<|eot|>
<|assistant|>
```python
balance = 1000
monthly_rate = 1.5 / 100 # 0.015
months = 3
interest = balance * monthly_rate * months # 45.0
print(f"{interest:.2f}")
```
This prints: 45.00
The ... | chat | [
{
"role": "user",
"content": "An unpaid balance of $1,000 accrues 1.5% simple interest per month. How much interest accrues in 3 months?"
},
{
"role": "assistant",
"content": "```python\nbalance = 1000\nmonthly_rate = 1.5 / 100 # 0.015\nmonths = 3\ninterest = balance * monthly_rate * months # ... | nlprog_det | setting | original | null | deterministic | [] | [] | 123 | {"gold": "45.00", "printed": "45.00", "notation": null} |
nlprog_det-setting-0057696 | <|start|><|system|>
Write short, precise answers.<|eot|>
<|user|>
A $3,600 loan carries 5% simple annual interest over 12 months. Interest and principal are repaid in equal monthly payments. What is each payment?<|eot|>
<|assistant|>
```python
principal = 3600
annual_rate = 5 / 100 # 0.05
months = 12
interest = princi... | chat | [
{
"role": "system",
"content": "Write short, precise answers."
},
{
"role": "user",
"content": "A $3,600 loan carries 5% simple annual interest over 12 months. Interest and principal are repaid in equal monthly payments. What is each payment?"
},
{
"role": "assistant",
"content": "``... | nlprog_det | setting | original | null | deterministic | [] | [] | 158 | {"gold": "315.00", "printed": "315.00", "notation": null} |
nlprog_det-setting-0057697 | One can of paint covers 350 square feet. How many cans are needed for 658 square feet of wall?
Python makes this quick:
```python
import math
area = 658
coverage = 350
cans = math.ceil(area / coverage) # 2
print(cans)
```
# console output: 2
Buy 2 cans. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 102 | {"gold": "2", "printed": "2", "notation": null} |
nlprog_det-setting-0057698 | From a $5,000 retainer, 5 hours at $275/hour have been drawn. What remains?
The remaining balance is $3,625. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 37 | {"gold": "3625", "printed": "3625", "notation": null} |
nlprog_det-setting-0057699 | A penalty of $100 a day accrues, capped at $2,500. What is owed after 25 days?
$2,500 is owed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 37 | {"gold": "2500", "printed": "2500", "notation": null} |
nlprog_det-setting-0057700 | A water bill is $20 plus $3.50 per thousand gallons beyond the first 3 thousand. What is the bill for 10 thousand gallons?
We can compute it in Python.
```python
base = 20
rate = 3.5
used = 10
free = 3
bill = base + rate * max(0, used - free) # 44.5
print(f"{bill:.2f}")
```
Program output: 44.50
The bill is $44.50. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 125 | {"gold": "44.50", "printed": "44.50", "notation": null} |
nlprog_det-setting-0057701 | A hearing is set for August 7, 2008. What day of the week is that?
Set it up in Python:
```python
from datetime import date
hearing = date(2008, 8, 7) # datetime.date(2008, 8, 7)
print(hearing.strftime("%A"))
```
Out: Thursday
It is a Thursday. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 101 | {"gold": "Thursday", "printed": "Thursday", "notation": null} |
nlprog_det-setting-0057702 | A count moves from 1,200 to 1,020. By what percent did it change (use a minus sign for a drop)?
Python does the arithmetic:
```python
old = 1200
new = 1020
change = (new - old) / old * 100 # -15.0
print(round(change))
```
It prints -15.
It changed by -15%. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 102 | {"gold": "-15", "printed": "-15", "notation": null} |
nlprog_det-setting-0057704 | <|start|><|user|>
Revenue is $20,500 and costs are $20,000. What is the profit margin as a percent of revenue (one decimal)?<|eot|>
<|assistant|>
revenue = 20500
costs = 20000
profit = revenue - costs # 500
margin = profit / revenue * 100 # 2.4390243902439024
print(round(margin, 1))
stdout: 2.4
P... | chat | [
{
"role": "user",
"content": "Revenue is $20,500 and costs are $20,000. What is the profit margin as a percent of revenue (one decimal)?"
},
{
"role": "assistant",
"content": " revenue = 20500\n costs = 20000\n profit = revenue - costs # 500\n margin = profit / revenue * 100 # 2.43... | nlprog_det | setting | original | null | deterministic | [] | [] | 108 | {"gold": "2.4", "printed": "2.4", "notation": null} |
nlprog_det-setting-0057705 | Of a $2,000 budget, $1,400 has been spent. What percent is that?
Python makes this quick:
```python
budget = 2000
spent = 1400
percent = spent / budget * 100 # 70.0
print(round(percent, 1))
```
The script prints 70.0.
70.0% has been spent. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 93 | {"gold": "70.0", "printed": "70.0", "notation": null} |
nlprog_det-setting-0057706 | <|start|><|user|>
Each storage box holds 20 files. How many boxes are needed for 223 files?<|eot|>
<|assistant|>
import math
files = 223
per_box = 20
boxes = math.ceil(files / per_box) # 12
print(boxes)
It prints 12, as expected.
12 boxes are needed.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Each storage box holds 20 files. How many boxes are needed for 223 files?"
},
{
"role": "assistant",
"content": " import math\n files = 223\n per_box = 20\n boxes = math.ceil(files / per_box) # 12\n print(boxes)\nIt prints 12, as expected.\n\n12 boxe... | nlprog_det | setting | original | null | deterministic | [] | [] | 83 | {"gold": "12", "printed": "12", "notation": null} |
nlprog_det-setting-0057707 | <|start|><|system|>
You are a math tutor.<|eot|>
<|user|>
A desk lamp costs $250. It is 10% off. What is the sale price?<|eot|>
<|assistant|>
```python
price = 250
discount = 10 / 100 # 0.1
sale_price = price * (1 - discount) # 225.0
print(f"{sale_price:.2f}")
```
(Run result: 225.00)
It costs $225.00.<|eot|>
<|end|... | chat | [
{
"role": "system",
"content": "You are a math tutor."
},
{
"role": "user",
"content": "A desk lamp costs $250. It is 10% off. What is the sale price?"
},
{
"role": "assistant",
"content": "```python\nprice = 250\ndiscount = 10 / 100 # 0.1\nsale_price = price * (1 - discount) # 225... | nlprog_det | setting | original | null | deterministic | [] | [] | 121 | {"gold": "225.00", "printed": "225.00", "notation": null} |
nlprog_det-setting-0057708 | A storeroom has 1272 file boxes. The office uses 24 a day. How many are left after 14 days?
Code:
stock = 1272
per_day = 24
days = 14
left = stock - per_day * days # 936
print(left)
The run gives 936, as expected.
936 file boxes are left. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 86 | {"gold": "936", "printed": "936", "notation": null} |
nlprog_det-setting-0057709 | <|start|><|user|>
A client paid a $5,000 retainer. The firm has billed 8 hours at $150 per hour. How much of the retainer is left?<|eot|>
<|assistant|>
```python
retainer = 5000
hours = 8
rate = 150
left = retainer - hours * rate # 3800
print(left)
```
The program outputs: 3800
$3,800 of the retainer is left.<|eot|>
... | chat | [
{
"role": "user",
"content": "A client paid a $5,000 retainer. The firm has billed 8 hours at $150 per hour. How much of the retainer is left?"
},
{
"role": "assistant",
"content": "```python\nretainer = 5000\nhours = 8\nrate = 150\nleft = retainer - hours * rate # 3800\nprint(left)\n```\nThe p... | nlprog_det | setting | original | null | deterministic | [] | [] | 105 | {"gold": "3800", "printed": "3800", "notation": null} |
nlprog_det-setting-0057710 | <|start|><|system|>
You have access to these functions:
[{"name": "code_runner", "description": "Executes Python code and returns stdout.", "parameters": {"type": "object", "properties": {"code": {"type": "string", "description": "Python source code"}}, "required": ["code"]}}]<|eot|>
<|user|>
Each storage box holds 12 ... | chat | [
{
"role": "system",
"content": "You have access to these functions:\n[{\"name\": \"code_runner\", \"description\": \"Executes Python code and returns stdout.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"code\": {\"type\": \"string\", \"description\": \"Python source code\"}}, \"required\": [... | nlprog_det | setting | original | null | deterministic | [] | [] | 214 | {"gold": "48", "printed": "48", "notation": null} |
nlprog_det-setting-0057711 | Copies cost $15 plus $0.10 for each page beyond 10. How much for 86 pages?
Code:
```python
pages = 86
base = 15
per_page = 0.1
free_pages = 10
cost = base + max(0, pages - free_pages) * per_page # 22.6
print(f"{cost:.2f}")
```
Console output — 22.60
The total is $22.60. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 122 | {"gold": "22.60", "printed": "22.60", "notation": null} |
nlprog_det-setting-0057712 | <|start|><|user|>
The landlord deducts $200 and $150 from a $2,500 deposit. What is returned to the tenant?<|eot|>
<|assistant|>
```python
deposit = 2500
deductions = [200, 150]
refund = deposit - sum(deductions)
print(refund)
```
When run, it prints: 2150
The refund is $2,150.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "The landlord deducts $200 and $150 from a $2,500 deposit. What is returned to the tenant?"
},
{
"role": "assistant",
"content": "```python\ndeposit = 2500\ndeductions = [200, 150]\nrefund = deposit - sum(deductions)\nprint(refund)\n```\nWhen run, it prints: 2150\n\n... | nlprog_det | setting | original | null | deterministic | [] | [] | 96 | {"gold": "2150", "printed": "2150", "notation": null} |
nlprog_det-setting-0057713 | Shipping costs $5 plus $1.20 per pound. What does a 9-pound parcel cost to ship?
Here is a short program for it.
```python
base = 5
per_pound = 1.2
weight = 9
cost = base + per_pound * weight # 15.799999999999999
print(f"{cost:.2f}")
```
Running this gives 15.80.
The charge is $15.80. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 121 | {"gold": "15.80", "printed": "15.80", "notation": null} |
nlprog_det-setting-0057714 | After an initial $3,000, the remainder of a $24,000 grant is paid in 12 equal parts. What is each part?
The computation:
```python
grant = 24000
up_front = 3000
installments = 12
each = (grant - up_front) / installments # 1750.0
print(f"{each:.2f}")
```
Python prints 1750.00, as expected.
$1,750.00 per installment. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 126 | {"gold": "1750.00", "printed": "1750.00", "notation": null} |
nlprog_det-setting-0057715 | <|start|><|user|>
A pack of 12 cables sells for $468. What does each cost?<|eot|>
<|assistant|>
```python
total = 468
count = 12
per_item = total // count # 39
print(per_item)
```
The script prints 39, as expected.
Each one costs $39.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A pack of 12 cables sells for $468. What does each cost?"
},
{
"role": "assistant",
"content": "```python\ntotal = 468\ncount = 12\nper_item = total // count # 39\nprint(per_item)\n```\nThe script prints 39, as expected.\n\nEach one costs $39."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 86 | {"gold": "39", "printed": "39", "notation": null} |
nlprog_det-setting-0057716 | 2 clients win $48,000. The lawyer takes 30%, and the rest is split equally. How much does each client get?
Each client gets $16,800.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 40 | {"gold": "16800.00", "printed": "16800.00", "notation": null} |
nlprog_det-setting-0057717 | A count moves from 2,500 to 2,000. By what percent did it change (use a minus sign for a drop)?
A few lines of Python do it:
```python
old = 2500
new = 2000
change = (new - old) / old * 100 # -20.0
print(round(change))
```
Out:
-20
The change is -20%. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 103 | {"gold": "-20", "printed": "-20", "notation": null} |
nlprog_det-setting-0057718 | Count 14 days forward from November 25, 2018. What date is that? That date is December 9, 2018. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 25 | {"gold": "2018-12-09", "printed": "2018-12-09", "notation": null} |
nlprog_det-setting-0057719 | <|start|><|user|>
6 friends split a $180 bill plus a 20% tip evenly. How much does each pay?<|eot|>
<|assistant|>
```python
bill = 180
tip_rate = 20 / 100 # 0.2
people = 6
each = bill * (1 + tip_rate) / people # 36.0
print(f"{each:.2f}")
```
Run result — 36.00
Each person pays $36.00.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "6 friends split a $180 bill plus a 20% tip evenly. How much does each pay?"
},
{
"role": "assistant",
"content": "```python\nbill = 180\ntip_rate = 20 / 100 # 0.2\npeople = 6\neach = bill * (1 + tip_rate) / people # 36.0\nprint(f\"{each:.2f}\")\n```\nRun result — ... | nlprog_det | setting | original | null | deterministic | [] | [] | 116 | {"gold": "36.00", "printed": "36.00", "notation": null} |
nlprog_det-setting-0057720 | <|start|><|system|>
You are a data assistant.<|eot|>
<|user|>
Starting from $25,000, the team spends $3,971, $2,676. What remains?<|eot|>
<|assistant|>
```python
budget = 25000
expenses = [3971, 2676]
left = budget - sum(expenses)
print(left)
```
What it prints — 18353
$18,353 is left.<|eot|>
<|end|> | chat | [
{
"role": "system",
"content": "You are a data assistant."
},
{
"role": "user",
"content": "Starting from $25,000, the team spends $3,971, $2,676. What remains?"
},
{
"role": "assistant",
"content": "```python\nbudget = 25000\nexpenses = [3971, 2676]\nleft = budget - sum(expenses)\np... | nlprog_det | setting | original | null | deterministic | [] | [] | 113 | {"gold": "18353", "printed": "18353", "notation": null} |
nlprog_det-setting-0057721 | At an exchange rate of 0.74 USD per GBP, how many USD is 8,716 GBP?
Python:
amount = 8716
rate = 0.74
converted = amount * rate
print(f"{converted:.2f}")
The program outputs 6449.84.
That is 6,449.84 USD. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 91 | {"gold": "6449.84", "printed": "6449.84", "notation": null} |
nlprog_det-setting-0057722 | Fixed costs are $9,000. Each unit sells for $25 and costs $21 to make. How many units must be sold to break even?
In Python:
```python
import math
fixed = 9000
price = 25
variable = 21
units = math.ceil(fixed / (price - variable)) # 2250
print(units)
```
Running this gives: 2250
2250 units are needed. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 117 | {"gold": "2250", "printed": "2250", "notation": null} |
nlprog_det-setting-0057723 | <|start|><|system|>
You check calculations for an accounting team.<|eot|>
<|user|>
How many units at $40 each (variable cost $35) cover $6,000 of fixed costs?<|eot|>
<|assistant|>
import math
fixed = 6000
price = 40
variable = 35
units = math.ceil(fixed / (price - variable)) # 1200
print(units)... | chat | [
{
"role": "system",
"content": "You check calculations for an accounting team."
},
{
"role": "user",
"content": "How many units at $40 each (variable cost $35) cover $6,000 of fixed costs?"
},
{
"role": "assistant",
"content": " import math\n fixed = 6000\n price = 40\n v... | nlprog_det | setting | original | null | deterministic | [] | [] | 107 | {"gold": "1200", "printed": "1200", "notation": null} |
nlprog_det-setting-0057724 | The rules require 3/5 of 40 members (round up) to be present. How many is that?
```python
import math
members = 40
quorum = math.ceil(members * 3 / 5)
print(quorum)
```
The program outputs 24.
That is 24 members. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 82 | {"gold": "24", "printed": "24", "notation": null} |
nlprog_det-setting-0057725 | <|start|><|system|>
The following tools are available. Call one when it helps.
{"name": "calculator", "description": "A Python interpreter. Returns standard output.", "parameters": {"type": "object", "properties": {"program": {"type": "string", "description": "Python source code"}}, "required": ["program"]}}<|eot|>
<|u... | chat | [
{
"role": "system",
"content": "The following tools are available. Call one when it helps.\n{\"name\": \"calculator\", \"description\": \"A Python interpreter. Returns standard output.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"program\": {\"type\": \"string\", \"description\": \"Python so... | nlprog_det | setting | original | null | deterministic | [] | [] | 280 | {"gold": "14", "printed": "14", "notation": null} |
nlprog_det-setting-0057726 | <|start|><|user|>
A $60,000 grant pays $0 up front and the rest in 4 equal installments. How large is each installment?<|eot|>
<|assistant|>
$15,000.00 per installment.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "A $60,000 grant pays $0 up front and the rest in 4 equal installments. How large is each installment?"
},
{
"role": "assistant",
"content": "$15,000.00 per installment."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 47 | {"gold": "15000.00", "printed": "15000.00", "notation": null} |
nlprog_det-setting-0057727 | What percentage of $2,000 is $500?
25.0% has been spent. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 21 | {"gold": "25.0", "printed": "25.0", "notation": null} |
nlprog_det-setting-0057728 | Starting from $20,000, the team spends $1,771, $456. What remains?
```python
budget = 20000
expenses = [1771, 456]
left = budget - sum(expenses) # 17773
print(left)
```
The script prints 17773.
$17,773 is left. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 96 | {"gold": "17773", "printed": "17773", "notation": null} |
nlprog_det-setting-0057729 | Straight-line depreciation: cost $12,000, salvage $0, 8 years. How much per year?
Code:
cost = 12000
salvage = 0
years = 8
per_year = (cost - salvage) / years # 1500.0
print(f"{per_year:.2f}")
# output: 1500.00
$1,500.00 a year. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 104 | {"gold": "1500.00", "printed": "1500.00", "notation": null} |
nlprog_det-setting-0057730 | A garage charges $2 an hour, never more than $15 a day. How much for 4 hours?
A few lines of Python do it:
```python
rate = 2
hours = 4
daily_max = 15
cost = min(rate * hours, daily_max) # 8
print(cost)
```
It prints: 8
Parking costs $8. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 101 | {"gold": "8", "printed": "8", "notation": null} |
nlprog_det-setting-0057731 | The firm was founded in 2015. How many years had passed by 2050?
Python version:
```python
start_year = 2015
end_year = 2050
print(end_year - start_year)
```
Output of the run: 35
That is 35 years. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 77 | {"gold": "35", "printed": "35", "notation": null} |
nlprog_det-setting-0057732 | Equal monthly payments repay $6,000 plus 6% simple yearly interest over 12 months. How large is a payment?
Here is the program.
```python
principal = 6000
annual_rate = 6 / 100 # 0.06
months = 12
interest = principal * annual_rate * months / 12 # 360.0
payment = (principal + interest) / months # 530.0
print(f"{paym... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 144 | {"gold": "530.00", "printed": "530.00", "notation": null} |
nlprog_det-setting-0057733 | <|start|><|system|>
You are a helpful assistant.<|eot|>
<|user|>
Starting with 1029 envelopes and using 5 per day, how many remain after 6 days?<|eot|>
<|assistant|>
```python
stock = 1029
per_day = 5
days = 6
left = stock - per_day * days # 999
print(left)
```
Executing it gives 999, as expected.
999 envelopes are l... | chat | [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Starting with 1029 envelopes and using 5 per day, how many remain after 6 days?"
},
{
"role": "assistant",
"content": "```python\nstock = 1029\nper_day = 5\ndays = 6\nleft = stock - per_day... | nlprog_det | setting | original | null | deterministic | [] | [] | 111 | {"gold": "999", "printed": "999", "notation": null} |
nlprog_det-setting-0057734 | <|start|><|user|>
$10,000 is invested at 5% compounded yearly. What is it worth after 4 years?<|eot|>
<|assistant|>
```python
principal = 10000
rate = 5 / 100 # 0.05
years = 4
value = principal * (1 + rate) ** years # 12155.062500000002
print(f"{value:.2f}")
```
Execution prints 12155.06.
The balance is $12,155.06.<... | chat | [
{
"role": "user",
"content": "$10,000 is invested at 5% compounded yearly. What is it worth after 4 years?"
},
{
"role": "assistant",
"content": "```python\nprincipal = 10000\nrate = 5 / 100 # 0.05\nyears = 4\nvalue = principal * (1 + rate) ** years # 12155.062500000002\nprint(f\"{value:.2f}\"... | nlprog_det | setting | original | null | deterministic | [] | [] | 128 | {"gold": "12155.06", "printed": "12155.06", "notation": null} |
nlprog_det-setting-0057735 | Goods bought on December 7, 2018 carry a 24-month warranty. When does it expire?
```python
from datetime import date
start = date(2018, 12, 7)
months = 24
years, month_index = divmod(start.month - 1 + months, 12)
end = date(start.year + years, month_index + 1, start.day)
print(end.isoformat())
```
Execution prints 202... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 141 | {"gold": "2020-12-07", "printed": "2020-12-07", "notation": null} |
nlprog_det-setting-0057736 | A meal costs $96.78. How much is a 20% tip?
Here is the program.
```python
bill = 96.78
tip_rate = 20 / 100 # 0.2
tip = bill * tip_rate # 19.356
print(f"{tip:.2f}")
```
What it prints: 19.36
The tip is $19.36. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 104 | {"gold": "19.36", "printed": "19.36", "notation": null} |
nlprog_det-setting-0057737 | <|start|><|system|>
You are a logic tutor.<|eot|>
<|user|>
Convert 55.9 km to meters.<|eot|>
<|assistant|>
```python
km = 55.9
meters = km * 1000 # 55900.0
print(round(meters))
```
The program outputs: 55900
That is 55,900 meters.<|eot|>
<|end|> | chat | [
{
"role": "system",
"content": "You are a logic tutor."
},
{
"role": "user",
"content": "Convert 55.9 km to meters."
},
{
"role": "assistant",
"content": "```python\nkm = 55.9\nmeters = km * 1000 # 55900.0\nprint(round(meters))\n```\nThe program outputs: 55900\n\nThat is 55,900 mete... | nlprog_det | setting | original | null | deterministic | [] | [] | 93 | {"gold": "55900", "printed": "55900", "notation": null} |
nlprog_det-setting-0057738 | The landlord deducts $85, $60 and $200 from a $2,500 deposit. What is returned to the tenant?
Let's compute it with Python.
deposit = 2500
deductions = [85, 60, 200]
refund = deposit - sum(deductions) # 2155
print(refund)
Console output — 2155
$2,155 is returned. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 99 | {"gold": "2155", "printed": "2155", "notation": null} |
nlprog_det-setting-0057739 | Straight-line depreciation: cost $12,000, salvage $0, 8 years. How much per year?
Python makes this quick:
```python
cost = 12000
salvage = 0
years = 8
per_year = (cost - salvage) / years # 1500.0
print(f"{per_year:.2f}")
```
Executed, it shows: 1500.00
$1,500.00 a year. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 126 | {"gold": "1500.00", "printed": "1500.00", "notation": null} |
nlprog_det-setting-0057740 | A hall has 30 rows of 10 seats, and 28 seats are empty. How many people are seated?
Programmatically:
```python
rows = 30
per_row = 10
empty = 28
seated = rows * per_row - empty # 272
print(seated)
```
The program prints 272, as expected.
272 seats are taken. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 101 | {"gold": "272", "printed": "272", "notation": null} |
nlprog_det-setting-0057741 | <|start|><|system|>
Keep explanations short.<|eot|>
<|user|>
After an initial $0, the remainder of a $12,000 grant is paid in 3 equal parts. What is each part?<|eot|>
<|assistant|>
Each installment is $4,000.00.<|eot|>
<|end|> | chat | [
{
"role": "system",
"content": "Keep explanations short."
},
{
"role": "user",
"content": "After an initial $0, the remainder of a $12,000 grant is paid in 3 equal parts. What is each part?"
},
{
"role": "assistant",
"content": "Each installment is $4,000.00."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 56 | {"gold": "4000.00", "printed": "4000.00", "notation": null} |
nlprog_det-setting-0057742 | <|start|><|user|>
Revenue is $22,500 and costs are $20,000. What is the profit margin as a percent of revenue (one decimal)?<|eot|>
<|assistant|>
```python
revenue = 22500
costs = 20000
profit = revenue - costs # 2500
margin = profit / revenue * 100 # 11.11111111111111
print(round(margin, 1))
```
(Run result: 11.1)
... | chat | [
{
"role": "user",
"content": "Revenue is $22,500 and costs are $20,000. What is the profit margin as a percent of revenue (one decimal)?"
},
{
"role": "assistant",
"content": "```python\nrevenue = 22500\ncosts = 20000\nprofit = revenue - costs # 2500\nmargin = profit / revenue * 100 # 11.11111... | nlprog_det | setting | original | null | deterministic | [] | [] | 120 | {"gold": "11.1", "printed": "11.1", "notation": null} |
nlprog_det-setting-0057743 | <|start|><|user|>
3 books come back 26 days late, at $0.25 a day each. What is the fine?<|eot|>
<|assistant|>
```python
per_day = 0.25
days_late = 26
books = 3
fine = per_day * days_late * books
print(f"{fine:.2f}")
```
# printed: 19.50
$19.50 is owed.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "3 books come back 26 days late, at $0.25 a day each. What is the fine?"
},
{
"role": "assistant",
"content": "```python\nper_day = 0.25\ndays_late = 26\nbooks = 3\nfine = per_day * days_late * books\nprint(f\"{fine:.2f}\")\n```\n# printed: 19.50\n\n$19.50 is owed."
... | nlprog_det | setting | original | null | deterministic | [] | [] | 103 | {"gold": "19.50", "printed": "19.50", "notation": null} |
nlprog_det-setting-0057744 | Counting only Monday through Friday, how many business days are there after May 26, 2022 through June 18, 2022?
There are 16 business days. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 38 | {"gold": "16", "printed": "16", "notation": null} |
nlprog_det-setting-0057745 | <|start|><|system|>
Use a tool when a calculation is needed. Tools:
[{"name": "eval_python", "description": "Run Python code in a sandbox; the result is whatever the code prints.", "parameters": {"type": "object", "properties": {"source": {"type": "string", "description": "Python source code"}}, "required": ["source"]}... | chat | [
{
"role": "system",
"content": "Use a tool when a calculation is needed. Tools:\n[{\"name\": \"eval_python\", \"description\": \"Run Python code in a sandbox; the result is whatever the code prints.\", \"parameters\": {\"type\": \"object\", \"properties\": {\"source\": {\"type\": \"string\", \"description\"... | nlprog_det | setting | original | null | deterministic | [] | [] | 262 | {"gold": "285.12", "printed": "285.12", "notation": null} |
nlprog_det-setting-0057746 | Convert 6,505 GBP to USD at 1 GBP = 0.74 USD.
In Python:
```python
amount = 6505
rate = 0.74
converted = amount * rate # 4813.7
print(f"{converted:.2f}")
```
stdout: 4813.70
That is 4,813.70 USD. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 107 | {"gold": "4813.70", "printed": "4813.70", "notation": null} |
nlprog_det-setting-0057749 | Each of Ana's bike rides burns 300 calories. How many calories over 6 bike rides?
Python version:
per_session = 300
sessions = 6
total = per_session * sessions # 1800
print(total)
This prints 1800, as expected.
That burns 1800 calories. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 87 | {"gold": "1800", "printed": "1800", "notation": null} |
nlprog_det-setting-0057750 | <|start|><|user|>
A customer buys 1 chairs at $29 each, 1 mugs at $27 each, 2 desk lamps at $29 each and pays with $150. How much change is due?<|eot|>
<|assistant|>
```python
items = [(1, 29), (1, 27), (2, 29)]
total = sum(q * p for q, p in items) # 114
paid = 150
change = paid - total # 36
print(change)
```
Console... | chat | [
{
"role": "user",
"content": "A customer buys 1 chairs at $29 each, 1 mugs at $27 each, 2 desk lamps at $29 each and pays with $150. How much change is due?"
},
{
"role": "assistant",
"content": "```python\nitems = [(1, 29), (1, 27), (2, 29)]\ntotal = sum(q * p for q, p in items) # 114\npaid = ... | nlprog_det | setting | original | null | deterministic | [] | [] | 135 | {"gold": "36", "printed": "36", "notation": null} |
nlprog_det-setting-0057751 | <|start|><|system|>
Answer in plain English.<|eot|>
<|user|>
With 40% off, what does a $300 backpack cost?<|eot|>
<|assistant|>
It costs $180.00.<|eot|>
<|end|> | chat | [
{
"role": "system",
"content": "Answer in plain English."
},
{
"role": "user",
"content": "With 40% off, what does a $300 backpack cost?"
},
{
"role": "assistant",
"content": "It costs $180.00."
}
] | nlprog_det | setting | original | null | deterministic | [] | [] | 43 | {"gold": "180.00", "printed": "180.00", "notation": null} |
nlprog_det-setting-0057752 | Counting only Monday through Friday, how many business days are there after November 20, 2028 through December 20, 2028?
The program:
```python
from datetime import date, timedelta
start = date(2028, 11, 20)
end = date(2028, 12, 20)
count = 0
for k in range(1, (end - start).days + 1):
if (start + timedelta(days=k)... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 155 | {"gold": "22", "printed": "22", "notation": null} |
nlprog_det-setting-0057753 | With 30% off, what does a $40 backpack cost?
Let the code do the arithmetic:
```python
price = 40
discount = 30 / 100 # 0.3
sale_price = price * (1 - discount) # 28.0
print(f"{sale_price:.2f}")
```
Interpreter output: 28.00
The sale price is $28.00. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 110 | {"gold": "28.00", "printed": "28.00", "notation": null} |
nlprog_det-setting-0057754 | <|start|><|user|>
Mateo and Vera share $1,036 in the ratio 1:3. How much does Mateo get?<|eot|>
<|assistant|>
```python
total = 1036
parts_a = 1
parts_b = 3
share_a = total * parts_a // (parts_a + parts_b) # 259
print(share_a)
```
The printout reads: 259
Mateo's share is $259.<|eot|>
<|end|> | chat | [
{
"role": "user",
"content": "Mateo and Vera share $1,036 in the ratio 1:3. How much does Mateo get?"
},
{
"role": "assistant",
"content": "```python\ntotal = 1036\nparts_a = 1\nparts_b = 3\nshare_a = total * parts_a // (parts_a + parts_b) # 259\nprint(share_a)\n```\nThe printout reads: 259\n\n... | nlprog_det | setting | original | null | deterministic | [] | [] | 119 | {"gold": "259", "printed": "259", "notation": null} |
nlprog_det-setting-0057755 | A clerk's office charges $45 for each filing. Ines submits 11 filings. What is the total fee?
Computing it:
fee = 45
filings = 11
total = fee * filings
print(total)
The code prints: 495
The total fee is $495. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 73 | {"gold": "495", "printed": "495", "notation": null} |
nlprog_det-setting-0057757 | After a 40% fee is taken from a $96,000 judgment, 2 plaintiffs share the remainder equally. What is each plaintiff's share?
Here is the program.
award = 96000
fee = award * 40 / 100 # 38400.0
remaining = award - fee # 57600.0
per_client = remaining / 2 # 28800.0
print(f"{per_client:.2f}")
Out = ... | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 125 | {"gold": "28800.00", "printed": "28800.00", "notation": null} |
nlprog_det-setting-0057758 | A recipe for 4 people uses 100 grams of sugar. How many grams are needed for 10 people?
Here is a short program for it.
grams = 100
serves = 4
needed_for = 10
scaled = grams * needed_for // serves # 250
print(scaled)
The script prints: 250
Use 250 g of sugar. | plain | null | nlprog_det | setting | original | null | deterministic | [] | [] | 86 | {"gold": "250", "printed": "250", "notation": null} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.