question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A baker makes 48 loaves of bread every morning and sells them for $3.50 each. He also makes 36 muffins and sells them for $1.25 each. How much money does he make from selling bread and muffins in one week? | def solve() -> int:
bread_revenue = 48 * 3.50
muffin_revenue = 36 * 1.25
total_revenue = bread_revenue + muffin_revenue
weekly_revenue = total_revenue * 7
result = weekly_revenue
return result
|
Tanya and Mike are organizing a school event. Tanya has 50 tickets from her own stash and Mike has 250 tickets he ordered. Each attendee needs 2 tickets and they have sold 300 tickets in total. How many tickets did Tanya have to order to have enough? | def solve() -> int:
tanya_tickets = 50
mike_tickets = 250
sold_tickets = 300
num_attendees = sold_tickets / 2
tanya_order = num_attendees - tanya_tickets
result = tanya_order
return result
|
Sarah's new camera set cost $2,500 and comes with 3 lenses. What is the cost of the set per lens? | def solve() -> int:
cost_of_set = 2500
number_of_lenses = 3
cost_per_lens = cost_of_set / number_of_lenses
result = cost_per_lens
return result
|
Jennifer has 200 stamps. She puts them each into packages of 4. How many packages of stamps did she make? | def solve() -> int:
totalNumOfStamps = 200
numOfStampsPerPack = 4
totalNumOfPackages = totalNumOfStamps / numOfStampsPerPack
result = 200/4
return result
|
Melissa ran a marathon of 26 miles in 2 hours and 32 minutes. What was her average time per mile? | def solve() -> int:
miles = 26
time_total = (2 * 60) + 32
avg_time_mile = time_total / miles
result = avg_time_mile
return result
|
If a store has a 25% sale on all items and a shirt is reduced to 16 dollars, what was the original price of the shirt? | def solve() -> int:
discount_percent = 25
new_price = 16
original_price = new_price / (1 - (discount_percent / 100))
result = original_price
return result
|
Amy has a rectangular garden that is 12 feet long and 8 feet wide. She wants to plant flowers along the perimeter of the garden. Each flower needs 1 foot of space. How many flowers can Amy plant? | def solve() -> int:
length = 12
width = 8
perimeter = 2 * (length + width)
flowers = perimeter
result = flowers
return result
|
A bakery bakes 1000 loaves of bread every day. If 10% of the bread goes stale and must be thrown away every day, how much bread will be left at the end of 4 days if there were initially 5000 loaves of bread? | def solve() -> int:
bread_baked_per_day = 1000
initial_bread = 5000
stale_percentage = 0.1
stale_bread_per_day = bread_baked_per_day * stale_percentage
fresh_bread_per_day = bread_baked_per_day - stale_bread_per_day
remaining_bread = initial_bread
for i in range(4):
stale_b... |
At an aquarium, there are 12 pairs of dolphins. Only 20% of the dolphin pairs give birth to calves. If each dolphin pair has one calf, how many calves are born? | def solve() -> int:
dolphin_pairs = 12
birth_rate = 0.2
calves_born = dolphin_pairs * birth_rate
result = calves_born
return result
|
Student: After paying $34.2 for 4 items, Rachel has $43.2 left. How much money did she have to start with? | def solve() -> int:
items = 4
paid = 34.2
left = 43.2
start = paid + left
result = start
return result
|
There were 50 marbles on the shelf. Mia took two-fifths of all the marbles and 12 more marbles. Then, Ethan came and picked up the remaining 18 marbles. How many marbles were on the shelf at first? | def solve() -> int:
marbles_on_shelf = 50
mia_marbles = (2/5) * marbles_on_shelf + 12
remaining_marbles = marbles_on_shelf - mia_marbles
marbles_on_shelf_at_first = remaining_marbles + 18
result = marbles_on_shelf_at_first
return result
|
Sarah wants to bake 50 cupcakes for a party. She decides to bake 5 cupcakes every day. After 9 days, how many more days does Sarah need to continue baking to have 50 cupcakes for the party? | def solve() -> int:
total_cupcakes = 50
daily_bake = 5
days_baked = 9
cupcakes_baked = days_baked * daily_bake
cupcakes_left = total_cupcakes - cupcakes_baked
days_left = cupcakes_left / daily_bake
result = days_left
return result
|
A toy store has 36 puzzles in total, twice as many cars as puzzles, and 3 times as many dolls as puzzles. How many cars does the store have? | def solve() -> int:
total_puzzles = 36
total_dolls = total_puzzles * 3
total_cars = total_puzzles * 2
result = total_cars
return result
|
Liam is seven years older than Ava. When Ava is five dozen years old, how old will Liam be in years? | def solve() -> int:
ava_age = 5 * 12
liam_age = ava_age + 7
result = liam_age
return result
|
Possible math questions and programs: Anna and Ben want to go to the movies together. A movie ticket costs $12, and they also want to buy popcorn and soda for $8 each. They have a coupon that gives them 20% off the total price. How much money will they need to pay for their movie date? | def solve() -> int:
tickets = 2 * 12
snacks = 2 * 8
original_price = tickets + snacks
discount = 0.2
discounted_price = original_price * (1 - discount)
final_price = round(discounted_price, 2)
result = final_price
return result
|
A store has 140 pencils. They sell 1/5 of them and then buy 25 more. How many pencils do they have now? | def solve() -> int:
pencils_sold = 140 * 1/5
pencils_left = 140 - pencils_sold
pencils_now = pencils_left + 25
result = pencils_now
return result
|
Tom is investing in a stock. He originally spent $2000 on 100 shares at $20 per share. His stock has gone up by 10%. If he sells all of his shares, how much money will he have in total? | def solve() -> int:
shares = 100
price_per_share = 20
original_cost = shares * price_per_share
increase_percent = 0.1
new_price_per_share = price_per_share + (price_per_share * increase_percent)
new_cost = shares * new_price_per_share
total = new_cost
result = total
return result
|
A factory produces 5,000 boxes of pens per day. Each box contains 20 pens. How many pens does the factory produce per month with 30 days? | def solve() -> int:
pens_per_day = 5000*20
pens_per_month = pens_per_day*30
result = pens_per_month
return result
|
If Jordan has 7 pencils and Raina has 6, how many pencils do they have in total? | def solve() -> int:
jordan_pencils = 7
raina_pencils = 6
total_pencils = jordan_pencils + raina_pencils
result = total_pencils
return result
|
If Alexander spent a total of $780 on 3 items, and the items had different prices. What was the average price of the items? | def solve() -> int:
total_cost = 780
item_number = 3
ave_cost = total_cost / item_number
result = ave_cost
return result
|
Jonathan has two dogs. The first dog is twice the size of the second dog. The first dog weighs 75 pounds. If he feeds both dogs 1 pound of food each, how much more food does the first dog eat than the second dog? | def solve() -> int:
size_second_dog = 1
size_first_dog = 2 * size_second_dog
weight_first_dog = 75
weight_second_dog = weight_first_dog / size_first_dog
food_first_dog = size_first_dog + 1
food_second_dog = size_second_dog + 1
food_difference = food_first_dog - food_second_dog... |
In a class of 30 students, 60% are girls and the rest are boys. How many boys are in the class? | def solve() -> int:
students = 30
girls = students * 0.6
boys = students - girls
result = boys
return result
|
A class of 25 students was given 500 pencils. Each student got 5 pencils. How many pencils were left unused? Ella wants to tile her shower floor. Each tile is 4 square inches. If her shower is 36 inches by 36 inches, how many tiles does Ella need to buy? | def solve() -> int:
students = 25
total_pencils = 500
pencils_per_student = 5
unused_pencils = total_pencils - (students * pencils_per_student)
shower_length = 36
shower_width = 36
tile_area = 4
total_tiles = (shower_length * shower_width) / tile_area
result = unu... |
A rectangle has a length of 12 cm and a width of 8 cm. What is the area of the rectangle? | def solve() -> int:
length = 12
width = 8
area = length * width
result = area
return result
|
If 24 pencils cost $3.60, how much would 50 pencils cost? | def solve() -> int:
num_pencils = 50
cost_per_pencil = 3.60 / 24
total_cost = num_pencils * cost_per_pencil
result = total_cost
return result
|
Jack purchased 8 books for €4 each, 3 markers for €2 each, and €30 in other items. How much did he spend in total? | def solve() -> int:
books = 8
price_books = 4
markers = 3
price_markers = 2
other_items_price = 30
total = (books * price_books) + (markers * price_markers)
result = total + other_items_price
return result
|
John filled 3/10 of his water bottle and left the rest for tomorrow. If the water bottle holds 1.5 liters of water, how much water did John leave for tomorrow? | def solve() -> int:
bottle_capacity = 1.5
filled_ratio = 3/10
filled_amount = bottle_capacity * filled_ratio
left_amount = bottle_capacity - filled_amount
result = left_amount
return result
|
There are 78 students in Mrs. Shipman's class. She recently took 18 students on a field trip and then 4 new students joined the class. How many students are in her class now? | def solve() -> int:
students = 78
fieldtrip = 18
addition = 4
result = students - fieldtrip + addition
return result
|
A chemist has a 15% solution of a chemical compound and a 25% solution of the same compound. If the chemist needs 200 milliliters of a 20% solution, how much of each solution should be combined? | def solve() -> int:
from sympy import symbols, solve
x, y = symbols('x y')
eq1 = x + y - 200
eq2 = 0.15*x + 0.25*y - 0.2*200
sol = solve((eq1, eq2), (x, y))
result = (sol[x], sol[y])
return result
|
Student: 9. Lucy invested $30000 in a stock 10 years ago and now earns 6% return annually. How much money has she earned in total from the stock? | def solve() -> int:
initial_investment = 30000
annual_return = 0.06
years = 10
final_amount = initial_investment * (1 + annual_return) ** years
total_earned = final_amount - initial_investment
result = total_earned
return result
|
A factory uses 50 gallons of oil for a heavy production run, 30 gallons of oil for a normal production run, and 20 gallons of oil for a light production run. If a maintenance check is done, there is an extra light production cycle added to flush the machinery thoroughly. If there are six heavy production runs, nine nor... | def solve() -> int:
heavy_production_runs = 6
normal_production_runs = 9
light_production_runs = 4
oil_per_heavy_production_run = 50
oil_per_normal_production_run = 30
oil_per_light_production_run = 20
total_oil_needed = (heavy_production_runs * oil_per_heavy_production_run) + (nor... |
Sarah wants to make a cake. If the recipe calls for 2/3 cup of flour, but she wants to make half the recipe, how many tablespoons of flour will she need? Note: 1 cup = 16 tablespoons. | def solve() -> int:
amount_flour = 2/3
reduced_recipe = 1/2
total_tablespoons = amount_flour * reduced_recipe * 16
result = total_tablespoons
return result
|
In 9 years, Brandon will be 2 times the age that Ava is currently. If Ava is currently 11 years old, how old is Brandon now? | def solve() -> int:
ava_age = 11
years_passed = 9
brandon_age = (2 * ava_age) - years_passed
result = brandon_age
return result
|
If one unit of a particular item is sold for $35 and 15 units of the same item were sold, how much was earned? | def solve() -> int:
price_per_unit = 35
num_units_sold = 15
total_earned = price_per_unit * num_units_sold
result = total_earned
return result
|
If a recipe calls for 2 cups of flour and 1 cup of sugar, and you want to triple the recipe, how much of each ingredient do you need? | def solve() -> int:
flour_per_recipe = 2
sugar_per_recipe = 1
multiplier = 3
total_flour = flour_per_recipe * multiplier
total_sugar = sugar_per_recipe * multiplier
result = (total_flour, total_sugar)
return result
|
Ben mows lawns for his neighbors. He charges $15 for a small lawn, $20 for a medium lawn, and $25 for a large lawn. Last week, he mowed 3 small lawns, 2 medium lawns, and 1 large lawn. How much money did he earn in total? | def solve() -> int:
small_price = 15
medium_price = 20
large_price = 25
small_lawns = 3
medium_lawns = 2
large_lawns = 1
income = small_price * small_lawns + medium_price * medium_lawns + large_price * large_lawns
result = income
return result
|
Tom has been fishing in a pond for 3 hours. He caught 5 fish in first 1 hour and 7 fish in the remaining 2 hours. Find the total number of fish that he caught in 3 hours. | def solve() -> int:
hour_1 = 5
hour_2_3 = 7
total_fish = hour_1 + hour_2_3
result = total_fish
return result
|
If 12 people paint a bridge in 8 hours and each paint takes 6 minutes, how much time would 6 people take? | def solve() -> int:
people_num = 6
num_of_people_painting = 12
paint_time = 6/60
total_time = 8
time_per_person = total_time / num_of_people_painting
result = people_num * time_per_person
return result
|
If the area of a circle is 78.5 square meters, what is the radius of the circle in meters? | def solve() -> int:
area = 78.5
radius = (area/3.14)**(1/2)
result = radius
return result
|
A marathon is 26.2 miles long. If a runner can maintain a pace of 8 minutes per mile, how long will it take the runner to finish the marathon in hours and minutes? | def solve() -> int:
marathon_distance = 26.2
pace = 8
total_time_in_minutes = marathon_distance * pace
hours = int(total_time_in_minutes // 60)
minutes = int(total_time_in_minutes % 60)
result = hours, minutes
return result
|
Student: 8. Kim runs a lemonade stand with her sister. They buy a carton of lemons that is equal to 18 lemons. Lemonade costs $2 per cup, and they have an offer where they give 2 cups of lemonade for each lemon. How much does each cup of lemonade earn them? | def solve() -> int:
lemons = 18
cost_per_cup = 2
cups_per_lemon = 2
total_cups = lemons * cups_per_lemon
total_earnings = total_cups * cost_per_cup
earnings_per_cup = total_earnings / total_cups
result = earnings_per_cup
return result
|
Jane has 70 pens in her collection. She used 12 for a project, gave away 8 to her friends, and then purchased 7 more from a shop. How many pens does she have in her collection now? | def solve() -> int:
pen = 70
pen -= 12
pen -= 8
pen += 7
result = pen
return result
|
There are 24 apples divided equally among 4 people. How many apples will each person get? | def solve() -> int:
apples_per_person = 24 / 4
result = apples_per_person
return result
|
Sarah wants to stay fit and joins two gyms. The first gym she joins costs $16 per month and has a registration fee of $40. The second gym is six times more expensive than the first one and requires a sign-up fee of 2 months' membership. How much will Sarah pay for both gym memberships in the first year? | def solve() -> int:
first_gym_monthly_cost = 16
first_gym_registration_fee = 40
second_gym_monthly_cost = 6 * first_gym_monthly_cost
second_gym_registration_fee = 2 * second_gym_monthly_cost
total_cost_first_gym = 12 * first_gym_monthly_cost + first_gym_registration_fee
total_cost_seco... |
A nurse administers an antibiotic infusion to a patient at a rate of 15 ml per hour. The infusion bag contains 250 ml of solution with a concentration of 50 mg of antibiotic per ml. How much antibiotic will the patient receive in 3 hours? | def solve() -> int:
solution = 15 * 3
antibiotic = solution * 50
result = antibiotic
return result
|
Student: Tim has 9 marbles, Mary has 5 more than twice the number of marbles Tim has. How many marbles does Mary have? | def solve() -> int:
tim_marbles = 9
mary_marbles = 5 + 2 * tim_marbles
result = mary_marbles
return result
|
A box of chocolates costs $6. If you buy 7 boxes, you get 3 boxes free. What is the cost of 14 boxes? | def solve() -> int:
cost_per_box = 6
boxes_bought = 7
boxes_free = 3
total_boxes = boxes_bought + boxes_free
total_cost = (total_boxes/boxes_bought) * cost_per_box * 14
result = total_cost
return result
|
Zoe has 18 flowers more than Lily does. Kate has two fifths as many flowers as Zoe has. If Lily has 12 flowers, how many flowers does Kate have? | def solve() -> int:
lily = 12
zoe = lily + 18
kate = zoe * 2 / 5
result = kate
return result
|
A father is 4 times as old as his son. In 10 years, the father will be 2 times older than his son. How old are they now? | def solve() -> int:
add_years = 10
father_son_ratio = 4
father_time_ratio = 2
son_age = (father_son_ratio*add_years)/(father_son_ratio*father_time_ratio-1)
father_age = father_son_ratio*son_age
result = son_age
result = father_age
return result
|
Tony has 9 paper cups. He uses 3 of them. How many paper cups does Tony have left? | def solve() -> int:
num_cups = 9
num_used = 3
result = num_cups - num_used
return result
|
Peter has a vegetable garden that produced 72 cucumbers this season. He gave 12 cucumbers to his grandmother and 6 cucumbers to his friend Jerry. He then used 24 cucumbers to make pickles. If each jar of pickles requires 3 cucumbers, how many cucumbers does Peter have left? | def solve() -> int:
cucumbers_produced = 72
cucumbers_given_to_grandmother = 12
cucumbers_given_to_friend = 6
cucumbers_used_for_pickles = 24
cucumbers_per_jar = 3
cucumbers_left = cucumbers_produced - cucumbers_given_to_grandmother - cucumbers_given_to_friend - cucumbers_used_for_pickles
... |
Mark works 8 hours every day at a rate of $9 per hour. He used 1/6 of his earnings last week to buy a new phone and then spent 1/3 of what was left on headphones. How much money does he have left from his earnings last week? | def solve() -> int:
hours_per_day = 8
rate_per_hour = 9
earnings_per_day = hours_per_day * rate_per_hour
earnings_last_week = earnings_per_day * 7
fraction_spent_on_phone = 1/6
fraction_spent_on_headphones = 1/3
amount_spent_on_phone = earnings_last_week * fraction_spent_on_ph... |
A music store has 500 CDs in stock. If the store sells 50 CDs per day, how many days will it take to sell out all the CDs? | def solve() -> int:
cds_in_stock = 500
cds_sold_per_day = 50
days_to_sell_out = cds_in_stock / cds_sold_per_day
result = days_to_sell_out
return result
|
Here are some possible questions and programs: Laura bought some groceries at the supermarket. She bought 3 kg of apples at $5 per kg, 2 kg of bananas at $3 per kg, and a dozen eggs at $4. She also used a coupon that gave her 10% off her total purchase. How much did she pay for her groceries? | def solve() -> int:
total_price = 3 * 5 + 2 * 3 + 4
discounted_price = total_price * 0.9
result = discounted_price
return result
|
Student: A car travels at a uniform speed of 80km/h. What is the distance it covers in 3 hours? | def solve() -> int:
speed = 80
time = 3
distance = speed * time
result = distance
return result
|
Tom and Jerry have a total of 48 marbles. If Jerry has 12 marbles less than Tom, how many marbles does Jerry have? | def solve() -> int:
marbles_tom = 24
marbles_jerry = marbles_tom - 12
result = marbles_jerry
return result
|
The perimeter of a rectangle is 28 cm. If one side is twice the length of the other, what are the dimensions of the rectangle? | def solve() -> int:
perimeter = 28
side1 = perimeter / 6
side2 = side1 * 2
result = (side1, side2)
return result
|
The flower shop sold 3 bunches of lilies at $4 each, 2 bunches of roses at $5 each, and 4 bunches of daisies at $2 each. If they received a total of $38, how much money did they make from the daisies? | def solve() -> int:
lilies = 3
roses = 2
daisies = 4
total = 38
cost_lilies = lilies * 4
cost_roses = roses * 5
cost_daisies = daisies * 2
total_costs = cost_lilies + cost_roses + cost_daisies
if total!= total_costs:
result = None
else:
r... |
A recipe for pancakes requires 1 egg for every 2 cups of flour. If you want to make 3 cups of flour worth of pancakes, how many eggs do you need? | def solve() -> int:
flour = 3
eggs_per_2cups = 1
eggs = eggs_per_2cups * (flour/2)
result = eggs
return result
|
Kim has 20 apples in a basket. She ate 4 apples and gave 3 apples to her mom. She then bought 10 more apples from the market and shared 6 apples with her friends. How many apples does Kim have in her basket now? | def solve() -> int:
kim_apples = 20
kim_apples = kim_apples - 4
kim_apples = kim_apples - 3
kim_apples = kim_apples + 10
kim_apples = kim_apples - 6
result = kim_apples
return result
|
Student: John is organizing a trip for his friends. Each person paid him 10 dollars for the trip. He has collected money from 28 people. How much money did he collect for the trip? | def solve() -> int:
money_per_person = 10
people = 28
total_money = money_per_person * people
result = total_money
return result
|
Ava makes $8.00 per hour. If she works for 6 hours and earns $48.00, how long will it take her to earn $200? | def solve() -> int:
hourly_rate = 8.00
money_needed = 200
hours_needed = money_needed / hourly_rate
result = hours_needed
return result
|
An employee gets paid $17.50 per hour and works for 8 hours a day, 5 days a week. If the employee also gets a bonus of $200 per month, how much does the employee make in a year? | def solve() -> int:
hourly_pay = 17.50
hours_worked_per_day = 8
days_worked_per_week = 5
weeks_in_a_year = 52
bonus_per_month = 200
total_hours_worked_in_a_week = hours_worked_per_day*days_worked_per_week
total_hours_worked_in_a_year = total_hours_worked_in_a_week*weeks_in_a_year
total_p... |
Tom has a rectangular garden that is 15 meters long and 10 meters wide. He wants to plant roses along the perimeter of the garden. He can plant one rose every 0.5 meters. How many roses does he need to buy? | def solve() -> int:
perimeter = 2 * (15 + 10)
spacing = 0.5
roses = perimeter / spacing
result = roses
return result
|
A car travels 320 miles on 20 gallons of gasoline. How far can the car travel on 30 gallons of gasoline? | def solve() -> int:
avg_mpg = 320 / 20
distance = avg_mpg * 30
result = distance
return result
|
A car needs 6 liters of gas for every 100 kilometers it drives. If a car drives 1200 kilometers, how many liters of gas will it need? | def solve() -> int:
liters_of_gas = 6*(1200/100)
result = f'<<<{liters_of_gas}>>>'
result = liters_of_gas
return result
|
When he was born, Zeke's elder sister Isabelle was 8 years old, and now he is 19 years old. His elder brother Luke is 10 years older than Isabelle. How old will Luke be in 5 more years? Samantha walks 2 kilometers to the library. After borrowing her books, she walks home. To get home, she walks for 45 minutes at a spee... | def solve() -> int:
isabelle_age = 8
zeke_age = 19
luke_age = isabelle_age + 10
luke_age_in_5_years = luke_age + 5
samantha_distance_to_library = 2
samantha_time_to_walk_home = 45 / 60
samantha_speed = 4
samantha_distance_walked_home = samantha_time_to_walk_home * samantha... |
A recipe calls for 2 cups of flour for every 1 cup of sugar. If the recipe requires 6 cups of sugar, how much flour is needed? | def solve() -> int:
sugar_to_flour_ratio = 1/2
num_sugar_cups = 6
num_flour_cups = sugar_to_flour_ratio * num_sugar_cups
result = num_flour_cups
return result
|
John has been driving for 2 hours and has traveled 120 miles. If he can travel at a constant speed, how long will it take John to travel 300 miles? | def solve() -> int:
distance_per_hour = 120/2
distance_left = 300-120
time_left = distance_left/distance_per_hour
result = time_left
return result
|
Tim has 20 quarters, 15 dimes, and 10 nickels in his piggy bank. He wants to buy a toy that costs $12. How many more dollars does he need to save? | def solve() -> int:
value = 20 * 0.25 + 15 * 0.1 + 10 * 0.05
difference = 12 - value
result = difference
return result
|
Iris bought a bicycle for 180 dollars. She also bought a helmet for 18 dollars. She gave the seller a 200 dollar bill. How much money did Iris receive in change? | def solve() -> int:
price_of_bicycle = 180
price_of_helmet = 18
total_payment = 200
total_price = price_of_bicycle + price_of_helmet
change = total_payment - total_price
result = change
return result
|
A group of friends went to a restaurant and shared a bill of $150. If there were 5 friends in the group, how much did each person pay? | def solve() -> int:
bill_total = 150
num_friends = 5
amount_per_person = bill_total / num_friends
result = amount_per_person
return result
|
Ali runs 5 miles to his gym every day from Monday to Saturday. He runs back home over the same distance. On Monday, he needed to pick up something from the bookstore which was 1.5 miles closer to his home. How many miles did Ali run that week? | def solve() -> int:
monday_extra_distance = 1.5
daily_distance = 5
total_distance = (daily_distance * 2) * 6 - (monday_extra_distance * 2)
result = total_distance
return result
|
A bus can take a maximum of 50 passengers. If the bus is already carrying 30 passengers, how many more passengers can it take? | def solve() -> int:
maximum_passengers = 50
passengers_onboard = 30
total_spaces = maximum_passengers - passengers_onboard
result = total_spaces
return result
|
Sophia is a member of the relay team. There are four other members on the team who run 4 km to complete their part of the race. Sophia runs three times as much as any member on her team to complete her part of the race. How long is the race? Maggie gets paid $1800.00 a month. She spends $550 on rent, $200 on groceries,... | def solve() -> int:
team_distance = 4 * 4
sophia_distance = 3 * 4
race_distance = team_distance + sophia_distance
result = race_distance
return result
|
A butter company needs to make 12 batches of butter. They already have 6 liters of cream left. For each batch, they need 4 liters of cream. How many extra liters of cream do they need to buy to make all 12 batches of butter? | def solve() -> int:
total_batches = 12
left_liters = 6
liters_per_batch = 4
needed_liters = total_batches * liters_per_batch - left_liters
result = needed_liters
return result
|
Jill invested $8000 in a stock. If the stock value increased by 20%, what is the new value of her investment? | def solve() -> int:
new_value = 8000 + 0.20*8000
result = new_value
return result
|
A train travels 120 miles in 2 hours and 30 minutes. What is the speed of the train in miles per hour? | def solve() -> int:
distance = 120
hours = 2
minutes = 30
total_hours = hours + (minutes / 60)
speed = distance / total_hours
result = speed
return result
|
Lilly is having a book signing. She anticipates 75 attendees and hopes that 25 more will show up. She has created exclusive goodie bags for the first 6 guests. She has made standard bags for 18 guests but needs to have enough bags for everyone who attends. How many additional bags should she make? | def solve() -> int:
anticipated_attendees = 75
hoped_attendees = 25
total_attendees = anticipated_attendees + hoped_attendees
exclusive_bags = 6
standard_bags = 18
total_bags = total_attendees
additional_bags = total_bags - exclusive_bags - standard_bags
... |
A zoo had 300 visitors on Tuesday and 25% fewer visitors on Wednesday than on Tuesday. If 50 more visitors came on Wednesday than on Thursday, calculate the total number of visitors in the zoo over the three days. | def solve() -> int:
visitors_on_tuesday = 300
visitors_on_wednesday = int(0.75*visitors_on_tuesday)
visitors_on_thursday = visitors_on_wednesday - 50
total_visitors = visitors_on_tuesday + visitors_on_wednesday + visitors_on_thursday
result = total_visitors
return result
|
The bakery made 10 more than twice the number of cakes as it did of pies. If the bakery made 15 pies, how many cakes did it make? | def solve() -> int:
pies = 15
cakes = 0
cakes = 10 + 2 * pies
result = cakes
return result
|
Ryan has a total of $12.45 in quarters and dimes. If he has 69 coins in total and 25 more quarters than dimes, how many nickels does he have? | def solve() -> int:
total = 12.45
nickel_value = 0.05
dime_value = 0.1
quarter_value = 0.25
total_coins = 69
quarters = int((total_coins + 25) / 2)
dimes = total_coins - quarters
total_value = quarters * quarter_value + dimes * dime_value
total_nickels = total - total_value
numbe... |
Lily traveled by bus from San Francisco to Las Vegas and then caught a flight to Bangkok. She arrived in Bangkok 20 hours later at 11:00 pm Indochina Time. If she then flew to Sydney and arrived at 8:00 am Australian Eastern Daylight Time the next day, how many hours was she in transit from Las Vegas to Sydney? | def solve() -> int:
SF_LV = 1
BK_IND = 1
SYD_AEDT = 1
SF_BK = 20 - SYD_AEDT + 11 + BK_IND
LV_SYD = SF_BK + SF_LV
result = LV_SYD
return result
|
There are 14 students in a class and the teacher has 2 times as many pencils as students. How many pencils does the teacher have altogether? | def solve() -> int:
students = 14
multiplier_pencils = 2
total_pencils = multiplier_pencils * students
result = total_pencils
return result
|
4. Joanne drove 510 kilometers in 5 hours. How much farther did she drive in the same amount of time if she drives 70 kilometers faster? | def solve() -> int:
distance_had = 510
hour = 5
faster_perhour = 70
distance_need = distance_had + (hour*faster_perhour)
result = distance_need
return result
|
A dress is on sale for $60, which is 30% off the regular price. What is the regular price? | def solve() -> int:
sale_price = 60
discount = 0.3
regular_price = sale_price / (1 - discount)
result = regular_price
return result
|
Jen was baking some cookies. She used 2/5 cups of sugar in the cookie batter. If she used 3/4 cups of butter, how many cups were used in the cookie batter total? | def solve() -> int:
sugar = 2/5
butter = 3/4
total = sugar + butter
result = total
return result
|
Mario has a rectangular garden that measures 8 meters by 12 meters. He wants to plant some flowers along the perimeter of the garden. If each flower needs 0.5 meters of space, how many flowers can he plant? | def solve() -> int:
perimeter = (8 + 12) * 2
result = perimeter // 0.5
return result
|
A hardware store adds 15 new tools to its stock every month. After 4 months, it had sold 75 tools but still had 105 tools in stock. How many tools did it originally have? | def solve() -> int:
m = 4
n = 15
s = 75
stock = 105
x = stock - n*m + s
result = x
return result
|
At Pizza Parlor, pizzas cost $15 each with a 2-pizza minimum. If Isabella spent $45 on pizzas, how many pizzas over the minimum did she purchase? | def solve() -> int:
cost_per_pizza = 15
minimum_pizzas = 2
total_cost = 45
minimum_cost = cost_per_pizza * minimum_pizzas
additional_cost = total_cost - minimum_cost
additional_pizzas = additional_cost // cost_per_pizza
result = additional_pizzas
return result
|
Student: A coffee maker needs 6 tablespoons of coffee grounds for 8 cups of coffee. How many cups of coffee can the coffee maker make with 24 tablespoons of coffee grounds? | def solve() -> int:
tablespoons_coffee_grounds = 24
tablespoons_per_cup = 6
cups_of_coffee = tablespoons_coffee_grounds // tablespoons_per_cup
result = cups_of_coffee
return result
|
A restaurant has a total of 90 seats. Twenty of them are for two persons while the number of four-person tables is four times the number of two-person tables. The number of six-person tables is equal to the number of four-person tables minus 2 and the number of eight-person tables is half the number of six-person table... | def solve() -> int:
total_seats = 90
two_person_tables = 20
four_person_tables = 4 * two_person_tables
six_person_tables = four_person_tables - 2
eight_person_tables = six_person_tables / 2
private_rooms = 5
private_room_capacity = 10
customers_in_private_rooms = private_rooms * private_... |
In a classroom, the ratio of boys to girls is 3 to 5. If there are 28 boys, how many girls are in the classroom? | def solve() -> int:
def girls_number(boys_number, total_number):
ratio_girls = total_number/8
girls_number = boys_number * ratio_girls
return girls_number
boys_number = 28
total_number = 33
result = girls_number(boys_number, total_number)
return result
|
Debbie purchased a set of pencils for 9 dollars. She bought 3 times as many individual pencils at 10 cents each than pens at 25 cents each. How many individual pencils did she purchase? | def solve() -> int:
individual_pencil_cost = 0.10
individual_pen_cost = 0.25
total_cost = 9
number_of_pens = total_cost / individual_pen_cost
number_of_pencils = 3 * number_of_pens
result = number_of_pencils
return result
|
Jack went on a camping trip with his friends. From their starting point, they traveled 128 miles to get to their campsite. The next day, they traveled 65 miles for a hike and then returned back to their campsite. On the third day, they traveled 210 miles on the way back to their starting point. What was the total dista... | def solve() -> int:
distance1 = 128
distance2 = 130
distance3 = 210
total_distance = distance1 + distance2 + distance3
result = total_distance
return result
|
A school is organizing a talent show. There are 5 performers in each group and 12 groups in total. Each performer gets a certificate and a ribbon. A certificate costs $0.5 and a ribbon costs $0.2. How much money does the school need to spend on the prizes? | def solve() -> int:
total_performers = 5 * 12
certificate_cost = 0.5 * total_performers
ribbon_cost = 0.2 * total_performers
total_cost = certificate_cost + ribbon_cost
result = total_cost
return result
|
Tom has been traveling by train for 2 hours, and his journey will take another 1 hour and 15 minutes. The time it will take him to get to his final destination from the station will be a quarter of the time he spent on the train. How much time will Tom spend on the whole trip? In a class of 25 students, the number of b... | def solve() -> int:
train_journey_time = 2 + 1.25
final_destination_time = train_journey_time / 4
total_trip_time = train_journey_time + final_destination_time
num_teachers = 2
num_girls = 2 * num_teachers + 7
total_students = num_girls + num_teachers
result = t... |
Student: Alice has 24 beads. She used 6 beads to make a bracelet and 9 beads to make a necklace. She then put the remaining beads into 3 jars, with the same number of beads in each jar. She took out 2 beads from the first jar, 3 beads from the second jar, and 4 beads from the third jar. She used these beads to make ano... | def solve() -> int:
beads = 24
beads = beads - 6 - 9
beads_per_jar = beads // 3
jar_1 = beads_per_jar
jar_2 = beads_per_jar
jar_3 = beads_per_jar
jar_1 = jar_1 - 2
jar_2 = jar_2 - 3
jar_3 = jar_3 - 4
difference = jar_1 - jar_2
result = difference
return result
|
8 children are sharing a pizza that has 12 slices. Each child gets the same number of slices and the remaining slices are given to the teacher. How many slices does the teacher get? | def solve() -> int:
slices_per_child = 12 // 8
slices_left = 12 % 8
result = slices_left
return result
|
Joe has 100 dollars. He spends 1/3 of it on food and gives $20 to his friend. How much money does he have left? | def solve() -> int:
money1 = 100
food = money1 / 3
remaining = money1 - food - 20
result = remaining
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.