question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A food truck needs to buy 5 dozen cucumbers that cost $1.25 each, 7 gallons of vegetable oil that cost $2.50 per gallon, and 3 lbs of parsley that cost $3 per pound. How much money will they need to pay for all the items? | def solve() -> int:
cucumber_cost = 1.25
oil_cost = 2.50
parsley_cost = 3
cucumber_amt = 5 * 12
oil_amt = 7
parsley_amt = 3
total_cost = (cucumber_cost * cucumber_amt) + (oil_cost * oil_amt) + (parsley_cost * parsley_amt)
result = total_cost
return result
|
Alex had $25 in his piggy bank. He saved $10 more from his allowance and spent $12 on a toy. How much money did he have left in his piggy bank? | def solve() -> int:
after = 25 + 10 - 12
result = after
return result
|
Student: A rectangle has a width of 10 cm and a perimeter of 36 cm. What is the length of the rectangle? | def solve() -> int:
width = 10
perimeter = 36
length = (perimeter - 2 * width) / 2
result = length
return result
|
Lila has a collection of 24 coins. She has 8 quarters, 6 dimes, and the rest are nickels. How much money does she have in total in cents? | def solve() -> int:
nickels = 24 - 8 - 6
quarters_value = 8 * 25
dimes_value = 6 * 10
nickels_value = nickels * 5
total_value = quarters_value + dimes_value + nickels_value
result = total_value
return result
|
Chloe and Mia each have a garden, with two different types of flowers. Chloe has 60 roses and 40 lilies. Mia has three times as many roses as Chloe, but only half as many lilies. How many more flowers does Mia have in her garden than Chloe? | def solve() -> int:
chloe_roses = 60
chloe_lilies = 40
mia_roses = 3 * chloe_roses
mia_lilies = 0.5 * chloe_lilies
mia_flowers = mia_roses + mia_lilies
chloe_flowers = chloe_roses + chloe_lilies
difference = mia_flowers - chloe_flowers
result = difference
return r... |
A pond is being drained through a drainage system and filled by an underground source. The drainage system can empty the pond in 8 hours and the underground source can fill the pond in 2 hours. If the pond starts filled with 2,000 liters of water, how much water will be left after 6 hours? | def solve() -> int:
drainage_rate = 1/8
filling_rate = 1/2
initial_water = 2000
time = 6
drained_water = drainage_rate * time
filled_water = filling_rate * time
remaining_water = initial_water - drained_water + filled_water
result = remaining_water
return ... |
A company has $20000 to spend on office supplies. If they use 1/5 of the budget on stationary and 15% of the remaining budget on printers, how much money do they spend on other office supplies? | def solve() -> int:
office_budget = 20000
stationary = office_budget * 1/5
remaining_budget1 = office_budget - stationary
printers = remaining_budget1 * 0.15
remaining_budget2 = remaining_budget1 - printers
other_supplies = remaining_budget2
result = other_supplies
return result
|
Ethan needs to water his plants. He fills up a small watering can with 2 cups of water, then pours that water into a larger watering can. He repeats this process 5 more times. How much water did Ethan transfer into the larger watering can? | def solve() -> int:
small_watering_can = 2
number_of_times = 5
water_transferred = small_watering_can * number_of_times
result = water_transferred
return result
|
Tom runs the first 2 km of a race in 10 minutes, but he gets tired and slows down. He runs the next 5 km in 35 minutes. What is his average speed for the whole race in km/h? | def solve() -> int:
distance1 = 2
time1 = 10 / 60
distance2 = 5
time2 = 35 / 60
total_distance = distance1 + distance2
total_time = time1 + time2
speed = total_distance / total_time
result = speed
return result
|
Possible additional questions and programs are: Maya loves to collect stickers. She had 35 stickers in her album. She got 10 stickers from her aunt and 12 stickers from her friend Zoe. She traded 8 stickers with her brother and gave away 6 stickers to her classmate Lily. How many stickers does Maya have in her album no... | def solve() -> int:
stickers_maya = 35
stickers_aunt = 10
stickers_zoe = 12
stickers_traded = 8
stickers_given = 6
stickers_gained = stickers_aunt + stickers_zoe
stickers_lost = stickers_traded + stickers_given
stickers_maya = stickers_maya + stickers_gained - stickers_lost
result = ... |
In order to save up enough money to buy a car, Hugh decided to save 420 dollars each month for 3 years. How much money will Hugh have saved up in total after these 3 years? | def solve() -> int:
saving_per_month = 420
num_months = 3 * 12
total_saved = saving_per_month * num_months
result = total_saved
return result
|
Jackson collects recyclable cans. He needs 10 less than 25 cans to fill a bag. If Jackson has 100 cans, how many bags can he fill? | def solve() -> int:
cans_per_bag = 25 - 10
bags = 100 // cans_per_bag
result = bags
return result
|
Student: Jacob has 570$. He spends 1/5 of it on concert tickets, and 1/3 of what he had left on some snacks. How much money does he have now? | def solve() -> int:
money = 570
concert_tickets = money * 1/5
left_money = money - concert_tickets
snacks = left_money * 1/3
result = money - concert_tickets - snacks
return result
|
Kim just bought a dress from her favorite shop with 24 buttons on it. She misplaced 6 buttons while cleaning. How many buttons does Kim have to buy for a complete set? | def solve() -> int:
buttons_required = (24 - 6)
result = buttons_required
return result
|
In a kindergarten, there are 12 tables and each table contains 8 chairs. How many chairs are there in the kindergarten in total? | def solve() -> int:
tables = 12
chairs_per_table = 8
total_chairs = tables * chairs_per_table
result = total_chairs
return result
|
Tom was planning a music festival and wanted to distribute earplugs to the audience to protect their ears. He needed to distribute 100 earplugs, but 20 audience members would bring their own earplugs. If each bag of earplugs had 12 earplugs, how many bags of earplugs did Tom need to buy? | def solve() -> int:
total_earplugs = 100
own_earplugs = 20
needed_earplugs = total_earplugs - own_earplugs
earplugs_per_bag = 12
bags_needed = needed_earplugs // earplugs_per_bag
result = bags_needed
return result
|
The sum of three consecutive odd numbers is 69. What is the smallest of the three numbers? | def solve() -> int:
total = 69
third = (total + 2) / 3
first = third - 4
result = int(first)
return result
|
A store is having a sale where all items are discounted by 25%. If a customer wants to buy an item for $80.00, how much will they pay after the discount? | def solve() -> int:
original_price = 80.0
discount = 0.25
discount_amount = original_price * discount
sale_price = original_price - discount_amount
result = sale_price
return result
|
ven and Kate went to the store. Steven bought two shirts at $14 each and 5 pencils at $0.50 each. Kate bought 4 books at $10 each and 3 notebooks at $2 each. How much did they spend in total? | def solve() -> int:
price_shirts = 14
price_pencils = 0.5
num_shirts = 2
num_pencils = 5
price_books = 10
price_notebooks = 2
num_books = 4
num_notebooks = 3
total_cost_steven = price_shirts * num_shirts + price_pencils * num_pencils
total_cost_kate = price_books * num_books + pr... |
Student: Sarah and John are splitting a pizza. If the pizza has 8 slices and Sarah eats 3 slices and John eats 2 slices, what percentage of the pizza is left? | def solve() -> int:
slices_total = 8
slices_sarah = 3
slices_john = 2
slices_left = slices_total - (slices_sarah + slices_john)
percentage_left = (slices_left / slices_total) * 100
result = percentage_left
return result
|
A restaurant sells 50 pizzas in one day. They then sell 20 more on the next day. On the third day they sell 70% of the total pizzas they made during the first two days. How many pizzas did the restaurant sell in total? | def solve() -> int:
total = 50
total += 20
total += int(0.7 * (total))
result = total
return result
|
A storage container is 10 feet long, 8 feet wide and 6 feet high. What is the volume of the container? | def solve() -> int:
length = 10
width = 8
height = 6
volume_of_container = length * width * height
result = volume_of_container
return result
|
Liz had a box of 384 crayons of two different colors. The box contained 88 green crayons and 296 purple crayons. What percentage of the total crayons were purple? | def solve() -> int:
total_crayons = 384
num_green = 88
num_purple = 296
percent_purple = num_purple * 100 / total_crayons
result = percent_purple
return result
|
A man climbs up a flight of stairs containing n steps. Each step costs a cents. If the man climbs p stairs at a time without paying, calculate the number of cents he will pay. | def solve() -> int:
n = 10
a = 2
p = 3
numStairGroups = n // p
remainingStairs = n % p
totalCost = numStairGroups * ((p * (p - 1) / 2) * a) + (remainingStairs * (remainingStairs + 1) / 2) * a
result = totalCost
return result
|
Amy has 24 apples and Bob has 18 apples. They want to divide the apples equally among themselves and their three friends. How many apples will each person get? | def solve() -> int:
total_apples = 24 + 18
number_of_people = 2 + 3
apples_per_person = total_apples / number_of_people
apples_per_person = round(apples_per_person)
result = apples_per_person
return result
|
Bruce aims to drink 4 liters of water in a day. He takes 600 milliliters of water every 2 hours and 15 minutes. After how many hours will Bruce be able to drink a total of 4 liters of water? | def solve() -> int:
water_per_interval = 600 / 1000
total_water = 4
time_elapsed = 0
while total_water > 0:
total_water -= water_per_interval
time_elapsed += 2.25
result = time_elapsed
return result
|
John drove his car for 120 miles. His car gets 24 miles per gallon. How many gallons of gas did John use? | def solve() -> int:
miles_driven = 120
miles_per_gallon = 24
gallons_used = miles_driven / miles_per_gallon
result = gallons_used
return result
|
Eva is practicing for her math test. If she can solve 15 math problems in 45 minutes, how long will it take her to solve 100 problems? | def solve() -> int:
problems_solved = 15
time_taken = 45
time_per_problem = time_taken // problems_solved
time_for_100_problems = time_per_problem * 100
result = time_for_100_problems
return result
|
A map scale indicates that 1 inch represents 5 miles. If two cities are 12 inches apart on the map, how many miles apart are they? | def solve() -> int:
inch_distance = 12
miles_per_inch = 5
total_miles = inch_distance*miles_per_inch
result = total_miles
return result
|
If you have $500 in a savings account that offers 1.5% annual interest rate and you didn't make any additions or withdrawals during the year, how much money do you have at the end of the year? | def solve() -> int:
interest_rate = 0.015
yearly_interest = 500 * interest_rate
ending_balance = 500 + yearly_interest
result = ending_balance
return result
|
Eva has a pyramid of brass that has a square base with a side length of 4 inches and a height of 9 inches. A cubic inch of brass weighs 8 ounces. Each ounce of brass sells for $12. She sells it for 95% of its brass value. How much does she sell it for? | def solve() -> int:
base_area = 4 * 4
volume = 1/3 * base_area * 9
weight = volume * 8
value = weight * 12
selling_price = value * 0.95
result = selling_price
return result
|
A circular table has a 6-foot diameter. How far can a chair be pulled from the table and still have the chair seat clear the edge? | def solve() -> int:
diameter = 6
radius = diameter / 2
distance = (radius ** 2 - (3 ** 2)) ** 0.5
result = distance
return result
|
A bakery sells cakes for $20 each. Last month, they sold 105 cakes and made a profit of $840. How much did it cost the bakery to make one cake? | def solve() -> int:
n_cakes = 105
profit = 840
price = 20
cost_per_cake = (price*n_cakes - profit)/n_cakes
result = cost_per_cake
return result
|
Ethan had 10 quarters and 15 dimes in his piggy bank. He took out 4 quarters and 6 dimes to buy a toy car. How much money did he have left in his piggy bank? | def solve() -> int:
quarters = 10
dimes = 15
quarter_value = 0.25
dime_value = 0.10
total_money = quarters * quarter_value + dimes * dime_value
money_taken = 4 * quarter_value + 6 * dime_value
money_left = total_money - money_taken
result = money_left
return resu... |
Amir collected 360 stamps in his album. He gave 1/8 of them to his friend Sara, and then bought 48 more stamps from a shop. He decided to organize his album by categories, and found that 1/6 of his stamps were animals, 2/9 were plants, and the rest were landmarks. How many landmark stamps did he have in his album? | def solve() -> int:
album = 360
give = album / 8
album = album - give
album = album + 48
animals = album / 6
plants = album / 9 * 2
landmarks = album - animals - plants
result = landmarks
return result
|
If a triangle has a base of 12 meters and a height of 8 meters, what is the area of the triangle in square meters? | def solve() -> int:
base = 12
height = 8
area = (1/2) * base * height
result = area
return result
|
A bakery bakes 200 loaves of bread each day, and each loaf has 20 slices. If each customer buys 2 slices of bread, how many customers can the bakery serve each day? | def solve() -> int:
loaves_per_day = 200
slices_per_loaf = 20
slices_per_customer = 2
total_slices = loaves_per_day * slices_per_loaf
customers_per_day = total_slices // slices_per_customer
result = customers_per_day
return result
|
Olivia spent 4 hours watching TV on Monday. On Tuesday she spent 2 times that quantity. On Wednesday she spent 3 times the quantity she spent on Tuesday. How many hours Olivia spent watching TV during these three days? | def solve() -> int:
tv_monday = 4
tv_tuesday = tv_monday * 2
tv_wednesday = tv_tuesday * 3
result = tv_monday + tv_tuesday + tv_wednesday
return result
|
At a pizza restaurant, a large pizza costs $12, a side salad costs $5, and a soda costs $3. You can buy all three items in a bundle pack for $18. If you want to buy 2 large pizzas, 2 side salads, and 4 sodas, how much money will you save if you buy all items separately? | def solve() -> int:
pizza = 12
salad = 5
soda = 3
bundle_price = 18
bundle_savings = ((pizza * 2) + (salad * 2) + (soda * 4)) - (bundle_price * 2)
total_price = ((pizza * 2) + (salad * 2) + (soda * 4))
result = total_price - bundle_savings
return result
|
A car travels 120 miles in 90 minutes. What is the average speed of the car in miles per hour? | def solve() -> int:
distance = 120
time = 90
time_hours = time / 60
average_speed = distance / time_hours
result = average_speed
return result
|
Janet is training for a marathon. She spends 1.5 hours running each day, and 25% of that time is spent resting. How many minutes per day does Janet spend running without resting? | def solve() -> int:
total_hours_running = 1.5
resting_hours = total_hours_running * 0.25
running_hours = total_hours_running - resting_hours
minutes_in_hour = 60
total_running_minutes = running_hours * minutes_in_hour
result = total_running_minutes
return result
|
Student: Zoe has 65 books in her bookshelf, which is split into 3 parts. The first part contains twice as many books as the second and the third part has 15 more books than the second. How many books are in each part? | def solve() -> int:
total_books = 65
second_part = 0
second_part = total_books // 3
first_part = second_part * 2
third_part = second_part + 15
result = first_part + second_part + third_part
return result
|
Karen wants to make 10 candies. If the recipe requires 1/2 cup of sugar for 2 candies, how many cups of sugar does Karen need? | def solve() -> int:
candies_wanted = 10
candies_recipe = 2
sugar_recipe = 1/2
sugar_required = (sugar_recipe * candies_wanted) / candies_recipe
result = sugar_required
return result
|
If 9 boxes each contain 4 kg of apples, how many total kg of apples do the boxes contain? | def solve() -> int:
number_of_boxes = 9
weight_per_box = 4
total_weight = number_of_boxes*weight_per_box
result = total_weight
return result
|
``` A train is running at a speed of 60 km/h and it runs for 2 hours. If a car is running at 80 km/h and it started following the train after an hour, then how long will it take for the car to catch up with the train? | def solve() -> int:
train_speed = 60
car_speed = 80
train_time = 2
car_time = 1
distance_travelled_by_train = train_speed * train_time
distance_to_be_travelled_by_car = distance_travelled_by_train
time_taken_by_car_to_cover_distance = distance_to_be_travelled_by_car / (car_speed - train_spee... |
A bakery sells 300 loaves of bread each week for $5 each. The bakery pays $2 for each loaf of bread. How much profit does the bakery make each week? | def solve() -> int:
weekly_profit = (300 * 5) - (300 * 2)
result = weekly_profit
return result
|
Q1: Two running programs cost $6 for a total of 45 minutes. One program costs $4 for 30 minutes. How much does the other program cost for 15 minutes? | def solve() -> int:
minutes1 = 30
minutes2 = 15
total_cost = 6
cost1 = 4
cost2 = total_cost - cost1
cost2_for_15_minutes = cost2 * minutes2 / minutes1
result = cost2_for_15_minutes
return result
|
Possible questions and programs are: A jar contains 60 marbles of different colors. Forty percent of the marbles are red, twenty-five percent are blue, and the rest are green. How many green marbles are there in the jar? | def solve() -> int:
red = 0.4 * 60
blue = 0.25 * 60
green = 60 - (red + blue)
result = green
return result
|
Student: In three years, Andrea will be 25 years old. Andrea's father is four times as old as Andrea is today. In seven years, her brother will be twice as old as she is today. Currently, how many years old is Andrea's father? | def solve() -> int:
current_age = 22
age_in_three_years = current_age + 3
father_age = age_in_three_years * 4
brother_age_in_seven_years = current_age + 7 * 2
father_age_in_seven_years = father_age + 7
result = father_age_in_seven_years
return result
|
A swimmer bought 2 swimsuits for $100. She wore one of the swimsuits for practice and sold the other for $75. What was the swimmer's profit? | def solve() -> int:
swimsuit_cost = 100
num_swimsuits_bought = 2
price_per_swimsuit_sold_1 = 75
swimsuit_profit_1 = price_per_swimsuit_sold_1
total_profit = swimsuit_profit_1 - swimsuit_cost
result = total_profit
return result
|
am and Mia are making lemonade for a school fair. They buy 10 lemons for $5, 4 cups of sugar for $2, and 12 bottles of water for $6. They use one lemon, one cup of sugar, and one bottle of water to make one gallon of lemonade. They sell each cup of lemonade for 50 cents. How much profit do they make if they sell all th... | def solve() -> int:
lemon_cost = 5
sugar_cost = 2
water_cost = 6
total_cost = lemon_cost + sugar_cost + water_cost
lemons_per_gallon = 1
sugar_per_gallon = 1
water_per_gallon = 1
gallons = min(10 / lemons_per_gallon, 4 / sugar_per_gallon, 12 / water_per_gallon)
cups_per_gallo... |
In a garage, the number of bicycles is four times the number of motorcycles. If there are 10 motorcycles in the garage, calculate the total number of bicycles and motorcycles in the garage. | def solve() -> int:
motorcycles = 10
bicycles = 4 * motorcycles
total = motorcycles + bicycles
result = total
return result
|
Student: Miss Johnson teaches math in four levels of classes in her school. The number of students in her first-level math class is double the number of her fourth-level math class, and the number of student in her third-level math class is five times that of her second-level math class. If Miss Johnson's fourth-level ... | def solve() -> int:
fourth_level = 25
first_level = 2 * fourth_level
second_level = 1/5 * first_level
third_level = 5 * second_level
total_students = first_level + second_level + third_level + fourth_level
result = total_students
return result
|
A math teacher wants to divide 45 students into groups of 5. How many groups will there be? | def solve() -> int:
num_students = 45
students_per_group = 5
num_groups = num_students // students_per_group
result = num_groups
return result
|
Tyler's company uses 100,000 gallons of water every month for their manufacturing processes. They installed a water recycling system that allows them to reuse 70% of the water. How much water will Tyler's company save in a year? Amy goes to the pool for 8 hours a week. She goes Monday through Friday. She spends two hou... | def solve() -> int:
monthly_water_usage = 100000
recycling_rate = 0.7
saved_water_per_month = monthly_water_usage * recycling_rate
saved_water_per_year = saved_water_per_month * 12
hours_per_day_MWF = 2
hours_per_weekday_TTh = (8 - 3 * hours_per_day_MWF) / 2
hours_on_Thursday = hours_pe... |
A supermarket sold 20 bags of potatoes for $5 each, 15 bags of carrots for $3 each and 10 watermelons for $10 each. How much money did they make? | def solve() -> int:
potatoes_price = 20*5
carrots_price = 15*3
watermelon_price = 10*10
total_earning = potatoes_price+carrots_price+watermelon_price
result = total_earning
return result
|
There are 24 candies in a jar. If there are 12 children, how many candies should each child get? | def solve() -> int:
candies_in_jar = 24
number_of_children = 12
candies_per_child = candies_in_jar / number_of_children
result = candies_per_child
return result
|
Tom wants to buy a new gaming console that costs $400. He has saved up $150 and plans to sell his old console to make up the difference. If he sells his old console for $100, how much more does he need to save? | def solve() -> int:
new_console_cost = 400
tom_savings = 150
old_console_sale_price = 100
total_amount = tom_savings + old_console_sale_price
amount_to_save = new_console_cost - total_amount
result = amount_to_save
return result
|
If a car can travel 60 miles on 2 gallons of gas, how far can it travel with 5 gallons of gas? | def solve() -> int:
miles_per_gallon = 60 / 2
total_miles_with_5_gallons = miles_per_gallon * 5
result = total_miles_with_5_gallons
return result
|
Student: There are a total of 40 people on a plane, 10 of whom are in first class, 19 in business class and the rest in economy class. How many passengers are in economy class if the plane is 1/2 full? | def solve() -> int:
first_class = 10
business_class = 19
plane_capacity = 40
economy_class = plane_capacity - first_class - business_class
result = economy_class / 2
return result
|
Paul goes to the cinema on 6 different days. On three randomly chosen days, he watches action movies, and on the other 3 days, he watches comedies. On one randomly chosen day, he buys popcorn, and on the other 5 days, he doesn't buy anything. What is the probability, expressed as a percentage, that Paul watches comedie... | def solve() -> int:
total_days = 6
action_days = 3
comedy_days = total_days - action_days
popcorn_days = 1
no_purchase_days = total_days - popcorn_days
probability = (comedy_days / total_days) * (popcorn_days / total_days) * 100
result = probability
return result
|
If a truck traveled at an average speed of 70 miles per hour for 3 hours, how far did it travel in miles? | def solve() -> int:
average_speed = 70
time_in_hours = 3
distance_in_miles = average_speed * time_in_hours
result = distance_in_miles
return result
|
There are 6 jars of cookies in a jar. If Julie and Martha divided them equally, how many cookies did each of them get? | def solve() -> int:
number_of_jars = 6
cookies_per_jar = 2
cookies_each = number_of_jars / 2 * cookies_per_jar
result = cookies_each
return result
|
Jae wants to buy an expensive new computer. He knows that the total price of the computer is $3000, but he also knows that the taxes are 20%. What is the total amount of money he will need to pay for the computer? | def solve() -> int:
price = 3000
tax_rate = 0.2
tax_amount = price * tax_rate
total_amount = price + tax_amount
result = total_amount
return result
|
Ali has 12 notebooks and 20 pens. The notebooks cost $2 each and the pens cost $1 each. Calculate the total value of Ali's stationery. | def solve() -> int:
notebook_count = 12
pen_count = 20
notebook_cost = 2
pen_cost = 1
total_cost = (notebook_count * notebook_cost) + (pen_count * pen_cost)
result = total_cost
return result
|
A sports stadium has a capacity of 50,000 people. If a game is attended by 38,000 people, what percentage of the stadium's capacity is used? | def solve() -> int:
capacity = 50000
attending = 38000
percent = attending/capacity * 100
result = percent
return result
|
arah is packing gift bags for a birthday party with 90 guests. The party has 30 children, the number of teenagers is thrice the number of children, and the rest are adults. If she adds 15 more adult gift bags to accommodate late RSVPs, how many adult gift bags will there be at the party? | def solve() -> int:
teenagers = 3 * 30
adults = 90 - (30 + teenagers)
adults_after_adding = adults + 15
result = adults_after_adding
return result
|
Student: - Dora has a box of chocolates. There are 8 rows and 6 columns of chocolates in the box. Each chocolate has a different flavor. She ate 3 chocolates from the first row, 2 from the second row, and 1 from the third row. How many chocolates are left in the box? | def solve() -> int:
rows = 8
columns = 6
chocolates_eaten = 3 + 2 + 1
result = rows * columns - chocolates_eaten
return result
|
Maria traveled a total distance of 550 km on a road trip. If she drove an average speed of 65 km/hr for the first 4 hours, what was her average speed for the remaining hours of the trip? | def solve() -> int:
total_distance = 550
first_leg_distance = 65 * 4
remaining_distance = total_distance - first_leg_distance
remaining_time = (remaining_distance) / (total_distance / 4)
average_speed = remaining_distance / remaining_time
result = average_speed
return result
|
A recipe calls for 2 cups of flour for every 3 cups of sugar. If you have 6 cups of flour, how many cups of sugar do you need? | def solve() -> int:
flour_needed = 2
sugar_needed = 3
flour_available = 6
sugar_needed = (flour_available / flour_needed) * sugar_needed
result = sugar_needed
return result
|
If a company's profit margin is 20% and their revenue is $1000, how much profit did they make? | def solve() -> int:
revenue = 1000
profit_margin = 0.2
profit = revenue * profit_margin
result = profit
return result
|
Student: 64 birds were spotted in a garden. If the gardeners want to get food for them, how many kilograms of bird food do they need to get? | def solve() -> int:
birds = 64
food_per_bird = 0.25
total_food = birds * food_per_bird
result = total_food
return result
|
Student: Bob runs 5 km every day for 3 weeks. He wants to train for a marathon that is 42 km long. He increases his daily distance by 10% every week. How many more weeks does he need to run until he can cover the marathon distance in one day? | def solve() -> int:
distance_marathon = 42
distance_day = 5
increase_percent = 0.1
weeks_ran = 3
distance_ran = distance_day * 7 * weeks_ran
distance_remaining = distance_marathon - distance_ran
distance_increase = distance_day * increase_percent
weeks_remaining = distance_remainin... |
A store sells apples for 50 cents each and oranges for 75 cents each. If Sarah buys 2 apples and 3 oranges, how much does she pay? | def solve() -> int:
apple_price = 0.50
orange_price = 0.75
apples_bought = 2
oranges_bought = 3
total_cost = apple_price * apples_bought + orange_price * oranges_bought
result = total_cost
return result
|
Lilly bakes cakes for her bakery. She spends half the time preparing the batter and the rest of the time decorating the cakes. If she decorates cakes for 2 hours, how much time does she spend preparing the batter? | def solve() -> int:
decorating_time = 2
total_time = decorating_time * 2
preparing_time = total_time / 2
result = preparing_time
return result
|
ome possible new questions and programs are: Lila makes 150 bracelets in a week. She sells them for $10 each and uses 2/3 of the sales to buy beads and strings to make more bracelets. How much money does Lila remain with after setting aside the money for buying materials? | def solve() -> int:
bracelets = 150
price = 10
fraction = 2/3
sales = bracelets * price
materials = sales * fraction
remaining = sales - materials
result = remaining
return result
|
An athlete burned 500 calories during a 30-minute workout. What is his average calorie burn per minute during the workout? | def solve() -> int:
calories_burned = 500
workout_length = 30
calories_burned_per_minute = calories_burned / workout_length
result = calories_burned_per_minute
return result
|
A class of 36 students spend 4 hours per day studying math, 2 hours studying English, and the rest studying history. How long a day do they spend studying history? | def solve() -> int:
history_hours = 0
total_hours = 36
math_hours = 4
english_hours = 2
history_hours = total_hours - math_hours - english_hours
result = history_hours
return result
|
A car is traveling at 60 mph. How far will it go in 2.5 hours? | def solve() -> int:
distance_per_hour = 60
total_distance = distance_per_hour * 2.5
result = total_distance
return result
|
John gathered 80 tomatoes from his garden and 4 times as many cucumbers from his greenhouse. How many more cucumbers did he gather than tomatoes? | def solve() -> int:
tomatoes = 80
cucumbers = 4 * tomatoes
difference = cucumbers - tomatoes
result = difference
return result
|
Student: Jade went ice-skating with her friends and the cost was $24 in total. If Jade paid for 2 of her friends, how much money did Jade pay in total? | def solve() -> int:
total_cost = 24
num_friends = 2
jade_paid = total_cost / (num_friends + 1)
result = jade_paid
return result
|
A car travels 180 kilometers in 3 hours. What is the average speed of the car in kilometers per hour? | def solve() -> int:
distance = 180
time = 3
speed = distance / time
result = speed
return result
|
A store sells t-shirts for $15.00 with a 25% discount. How much will the t-shirts cost after the discount? | def solve() -> int:
original_price = 15.00
discount_percentage = 0.25
discount_amount = original_price * discount_percentage
discounted_price = original_price - discount_amount
result = discounted_price
return result
|
Mark runs 4 times a week for 20 minutes and walks his dogs twice a day for 10 minutes. If he doubles his running time on weekends, how much time does he spend on these activities each week? | def solve() -> int:
running_time = 20
running_frequency = 4
walking_time = 10
walking_frequency = 2
weekend_running_time = running_time * 2
total_running_time = running_time * running_frequency + weekend_running_time * 2
total_walking_time = walking_time * walking_frequency * 7
... |
Jill sends her daughter to boarding school, it costs $45,000 per year. How much does it cost to send her daughter to 8 years of school? | def solve() -> int:
total_cost = 0
for year in range(8):
total_cost += 45000
result = total_cost
return result
|
Q1: In a retail store, the ratio of men to women customers is 3:2. If 35 customers at the store in total, how many women customers are there? | def solve() -> int:
total_customers = 35
ratio_men_to_women = 3/2
women_customers = total_customers * (2/3)
result = women_customers
return result
|
Liz has 27 sheets of paper and needs to divide them equally among 9 of her friends. How many sheets should each one get? | def solve() -> int:
n = 9
sheets = 27
result = sheets/n
return result
|
Sarah bought 10, 1-gallon containers of ice cream for a party. If she divides the ice cream equally among 20 guests, how many cups of ice cream will each guest get assuming 1 cup is 0.25 gallons? | def solve() -> int:
containers = 10
gallons_per_container = 1
total_gallons = containers * gallons_per_container
guests = 20
cups_per_gallon = 4
cups_per_guest = total_gallons * cups_per_gallon / guests
result = cups_per_guest
return result
|
Jackson has climbed 9 out of 15 peaks on his mountain climbing list. What percentage of peaks has he completed? | def solve() -> int:
peaks_completed = 9
total_peaks = 15
percentage_completed = (peaks_completed / total_peaks) * 100
result = percentage_completed
return result
|
Student: At the beach, Lynn, Ben, and Jake were playing with a frisbee. Lynn threw the frisbee 1/2 of the total 50 meters distance, then Ben threw 3/7 of the total distance, and finally Jake threw 5/8 of the total distance. How many meters did Jake throw the frisbee? | def solve() -> int:
total_distance = 50
lynn_distance = total_distance * 1/2
ben_distance = total_distance * 3/7
jake_distance = total_distance * 5/8
total_distance_thrown = lynn_distance + ben_distance + jake_distance
jake_distance_thrown = total_distance_thrown - lynn_distance - ben_distance
... |
Student: Ben and his two friends decided to share the cost of 5 books. Ben's brother went to the bookstore and bought the 5 books, a magazine that costs $5, and a pen that costs $1. If Ben's brother paid a total of $65 for the bookstore, how much should Ben and his friends pay each for the books? | def solve() -> int:
books = 5
magazine_cost = 5
pen_cost = 1
total_cost = 65
extra_cost = magazine_cost + pen_cost
books_cost = total_cost - extra_cost
cost_per_person = books_cost / 3 / books
result = cost_per_person
return result
|
A factory produces 200 items per hour. How many items are produced in a 10-hour shift? | def solve() -> int:
items_per_hour = 200
hours_worked = 10
total_items_produced = items_per_hour * hours_worked
result = total_items_produced
return result
|
Emily went to the clothing store to buy some clothes. She bought 2 blouses, 4 dresses, and 8 pairs of pants which were all placed in a single bag. Unfortunately, the bag that the clothes had been placed in had developed a hole. Therefore, as Emily walked home, half of the clothes fell out of the bag. When she later cou... | def solve() -> int:
blouses = 2
dresses = 4
pants = 8
total_clothes = blouses + dresses + pants
clothes_left = 7
clothes_lost = total_clothes - clothes_left
clothes_lost /= 2
result = blouses - clothes_lost
return result
|
A tank can hold 50 liters of water. If it is already filled with 30 liters of water, how many more liters of water can it hold? | def solve() -> int:
tank_capacity = 50
current_water = 30
remaining_capacity = tank_capacity - current_water
result = remaining_capacity
return result
|
Paul runs a furniture shop. He needs to buy different lengths of wood. He needs 10 pieces of 2 meters, 8 pieces of 4 meters and 6 pieces of 3 meters. How many meters of wood does Paul need to buy in total? | def solve() -> int:
lengths = 10 * 2 + 8 * 4 + 6 * 3
result = lengths
return result
|
- Sam orders a pizza that costs $12.99 and a salad that costs $5.99. He pays with a $50 bill and wants to leave a 15% tip. How much does he get in change? | def solve() -> int:
total_cost = 12.99 + 5.99
tip = total_cost * 0.15
paid = total_cost + tip
change = 50 - paid
result = change
return result
|
A store is having a sale, where all items are 20% off. If an item originally costs $60, what is the sale price? | def solve() -> int:
discount = 0.2
original_price = 60
sale_price = original_price - (discount * original_price)
result = sale_price
return result
|
Student: During a picnic, Brian raised funds by selling 18 games at $5 each. What is the total money he raised from game sales, in dollars? | def solve() -> int:
games_sold = 18
price_per_game = 5
total_money_raised = games_sold * price_per_game
result = total_money_raised
return result
|
Ryan and Tyler are playing cards. Tyler has 60 cards. Every game, they bet 2 cards and the winner keeps all the cards. After 15 games, Ryan has 30 cards. How many games has he lost? | def solve() -> int:
tyler_cards = 60
bet_per_game = 2
total_games = 15
ryan_cards = 30
total_bets = total_games * bet_per_game
total_cards_won = tyler_cards - ryan_cards
games_lost = total_cards_won / bet_per_game
result = games_lost
return result
|
Alex went to the gas station to fill up his car. He put in 10 gallons of gas at $3.00 per gallon. He also bought a bag of chips for $1.50 and a drink for $1.00. He paid with a $20 bill and got $5.50 in change. How much did he spend? | def solve() -> int:
gas_price = 3.00
gas_amount = 10
chips_price = 1.50
drink_price = 1.00
total_gas_cost = gas_price * gas_amount
total_snack_cost = chips_price + drink_price
total_cost = total_gas_cost + total_snack_cost
amount_paid = 20
change = 5.50
amount_spent = total_cost ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.