question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Elizabeth bought 25 loaves of bread. each loaf costs $4.50. How much money did she spend? | def solve() -> int:
result = 0
loaf_quantity = 25
loaf_price = 4.50
total_price = loaf_quantity * loaf_price
result = total_price
return result
|
Student: Maria reads a book for 3 hours on the first day and 2/3 of that time the second day. How much time did Maria spend reading the book in total? | def solve() -> int:
first_day = 3
second_day = 2/3
total_time = first_day + second_day
result = total_time
return result
|
A square has a side length of 5 meters. A smaller square is drawn within the larger square by connecting the midpoints of each side. What is the area of the smaller square? | def solve() -> int:
s = 5
a = 6.25
result = a
return result
|
A recipe calls for 2 cups of flour to make 12 cookies. If you want to make 36 cookies instead, how many cups of flour do you need? | def solve() -> int:
flour_for_12_cookies = 2
flour_for_1_cookie = flour_for_12_cookies / 12
flour_for_36_cookies = flour_for_1_cookie * 36
result = flour_for_36_cookies
return result
|
Ethan is making necklaces using beads and crystals. For every necklace, he uses 15 beads, three-quarters as many crystals as beads, and twice as many charms as crystals. If Ethan wants to make 8 sets of necklaces, how many charms will he need? | def solve() -> int:
beads = 15
crystals = beads * (3/4)
charms = crystals * 2
sets_of_necklaces = 8
total_charms = charms * sets_of_necklaces
result = total_charms
return result
|
Mary rotated a hexagon 12 times, each time it spins by 60 degrees. What is the total number of degrees that the hexagon had been rotated after the 12 rotations? | def solve() -> int:
num_of_rotations = 12
degrees_per_rotation = 60
total_degrees = num_of_rotations * degrees_per_rotation
result = total_degrees
return result
|
Sam collected 36 coins in his piggy bank. He has 9 quarters, 12 dimes, 9 nickels, and 6 pennies. How much money does he have in his piggy bank in dollars? | def solve() -> int:
quarter = 0.25
dime = 0.10
nickel = 0.05
penny = 0.01
quarters = 9
dimes = 12
nickels = 9
pennies = 6
value_quarters = quarter * quarters
value_dimes = dime * dimes
value_nickels = nickel * nickels
value_pennies = penny * pennies
total_... |
A boat traveled 60 kilometers upstream and 70 kilometers downstream in a total time of 10 hours. If the speed of the boat in still water is 15 kilometers per hour, what is the speed of the current? | def solve() -> int:
boat_speed = 15
distance_upstream = 60
distance_downstream = 70
total_time = 10
current_speed = (distance_downstream - distance_upstream) / (2 * total_time) - boat_speed / 2
result = current_speed
return result
|
If Olivia has half as much money as what Aiden has minus $20, and Olivia spends a sixth of it on lunch, how much money does Aiden have if Olivia has $26 left? | def solve() -> int:
aiden_money = (26 * 6) + 20
result = aiden_money
return result
|
Joseph is preparing for a painting project and wants to buy only smaller brushes. He buys 8 round brushes, half as many flat brushes, and 6 angled brushes. If he still needs to buy 3 smaller brushes, how many bigger brushes does Joseph have originally? | def solve() -> int:
round_brushes = 8
flat_brushes = round_brushes / 2
angled_brushes = 6
total_small_brushes = round_brushes + flat_brushes + angled_brushes
remaining_small_brushes = 3
bigger_brushes = (total_small_brushes + remaining_small_brushes) * 2
result = bigger_brushes
... |
Every day, a store receives 300 new products but sells 400. The initial stock is 5000. After 6 months they merge with another store with 2000 products. How many products are in the combined store? | def solve() -> int:
new_products_per_day = 300
sold_products_per_day = 400
initial_stock = 5000
months = 6
products_from_merge = 2000
total_new_products = new_products_per_day * 30 * months
total_sold_products = sold_products_per_day * 30 * months
final_stock = initial_stock + ... |
When Brian checked his pockets, he found 4 quarters, 8 dimes, 1 nickel, and 3 pennies. How much money did Brian find? | def solve() -> int:
quarters = 4
dimes = 8
nickels = 1
pennies = 3
total_quarters = quarters * 0.25
total_dimes = dimes * 0.10
total_nickels = nickels * 0.05
total_pennies = pennies * 0.01
total_money = total_quarters + total_dimes + total_nickels + total_pennies
r... |
Rhea drives 400 miles each weekend for 12 weeks. How many miles has she driven in total during these 12 weeks? | def solve() -> int:
week = 1
miles = 0
while week <= 12:
miles += 400
week += 1
result = miles
return result
|
Student: The interior angle sum of a triangle is 180 degrees. If one angle measures 75 degrees, what is the measure of the other two angles? | def solve() -> int:
angle1 = 75
angle2 = 180 - angle1
angle3 = angle2 / 2
result = angle3
return result
|
The distance between two cities is 300 miles. If a car travels 50 miles per hour, how many hours will it take to get from one city to the other? | def solve() -> int:
distance = 300
speed = 50
time = distance/speed
result = time
return result
|
A contractor installs 100 feet of fencing in 30 minutes. How long will it take him to install 500 feet of fencing? | def solve() -> int:
time = 500/100 * 30
result = time
return result
|
A basket contains 4 apples and 5 oranges. Three fruits are picked at random. What is the probability that all three are apples? | def solve() -> int:
total_fruits = 9
apples = 4
prob_apples_1 = apples / total_fruits
prob_apples_2 = (apples - 1) / (total_fruits - 1)
prob_apples_3 = (apples - 2) / (total_fruits - 2)
prob_all_apples = prob_apples_1 * prob_apples_2 * prob_apples_3
result = prob_all_apples
return result... |
If a car is traveling at a speed of 100 km/hour and needs to travel a total distance of 500 km, how long will it take to reach its destination if it stops for 30 minutes every 2 hours? | def solve() -> int:
result = None
speed = 100
distance = 500
time_without_stop = distance/speed
number_of_stops = ((distance/speed)//2)-1
total_time_stopped = number_of_stops*0.5
total_time = time_without_stop+total_time_stopped
result = total_time
return result
|
There are 24 students in a class. If 3 students are randomly chosen, how many possible combinations are there? | def solve() -> int:
students = 24
chosen_students = 3
combinations = students * (students - 1) * (students - 2) // (chosen_students * (chosen_students - 1) * (chosen_students - 2))
result = combinations
return result
|
Sarah had 15 apples. She gave 3 to her friend and ate 4. How many apples does she have left? | def solve() -> int:
apples = 15
apples = apples - 3
apples = apples - 4
result = apples
return result
|
At the post office, letters cost 27 cents to mail. Celine had 28 letters to mail. How much did it cost her to mail all of these letters? | def solve() -> int:
num_letters = 28
cost_per_letter= 27
total_cost = num_letters*cost_per_letter
result = total_cost
return result
|
You and your friend ordered a pizza for $12 and a salad for $8. You ate 3 slices of pizza and your friend ate 4. The pizza had 8 slices in total. You also split the salad equally. How much do you owe your friend if you pay for your share of the food? | def solve() -> int:
cost_per_slice = 12 / 8
cost_per_salad = 8 / 2
cost_of_your_food = cost_per_slice * 3 + cost_per_salad
cost_of_friend_food = cost_per_slice * 4 + cost_per_salad
owe_to_friend = cost_of_friend_food - cost_of_your_food
result = owe_to_friend
r... |
Here are some possible questions and programs: A school cafeteria serves 200 meals a day for the first 3 days of the week and 150 meals a day for the next 2 days. If the cafeteria spends $2.5 per meal, how much does it spend on meals in a week? | def solve() -> int:
total_meals = 200 * 3 + 150 * 2
total_cost = total_meals * 2.5
result = total_cost
return result
|
Pete and his family decide to go to a restaurant, they split the bill evenly. The bill turns out to be $120, Pete and his family have 3 kids each paying $10, how much did Pete and his spouse need to pay? | def solve() -> int:
total_per_duo = 0
total_bill = 120
total_kids = 3
each_kid_bill = 10
total_paid_by_kids = total_kids * each_kid_bill
total_per_duo = total_bill - total_paid_by_kids
result = total_per_duo
return result
|
A business entrepreneur has expended capital to launch his business. He has made payments to two different vendors, each 50% of the total cost. How much did each vendor receive? | def solve() -> int:
total_cost = 1000
payment1_percent = 50
payment2_percent = 50
payment1 = total_cost * (payment1_percent / 100)
payment2 = total_cost * (payment2_percent / 100)
result = (payment1, payment2)
return result
|
Mark has 75 posters that he wants to hang on a wall. If there are 4 posters on each row, how many total rows of posters will he need? | def solve() -> int:
posters = 75
posters_per_row = 4
rows = posters // posters_per_row
result = rows
return result
|
A pizza place charges $12 for a medium pizza and $15 for a large pizza. If you buy 3 medium pizzas and 2 large pizzas, what is the total cost including tax if the sales tax is 9%? | def solve() -> int:
medium_cost = 12
large_cost = 15
num_medium = 3
num_large = 2
subtotal = medium_cost * num_medium + large_cost * num_large
total_cost = subtotal * 1.09
result = total_cost
return result
|
Cynthia bought 5.5 kg of oranges. How much did she pay for the oranges if a kilo costed $2.90? | def solve() -> int:
weight = 5.5
cost_per_kilo = 2.90
total_cost = weight * cost_per_kilo
result = total_cost
return result
|
Student: Question10: Amber bought 40 lollipops for $24. What is the unit price of each lollipop? | def solve() -> int:
lollipops = 40
price = 24
unit_price = price / lollipops
result = unit_price
return result
|
The perimeter of a square is 20 centimeters. What is the length of one side of the square? | def solve() -> int:
perimeter = 20
side_length = perimeter / 4
result = side_length
return result
|
A pizza parlor has a circular pizza with a diameter of 14 inches. What is the area of the pizza? Use 3.14 as the value of pi. | def solve() -> int:
diameter = 14
radius = diameter / 2
pi = 3.14
area = pi * (radius ** 2)
result = area
return result
|
A train travels 500 kilometers in 4 hours. What is its speed in kilometers per hour? | def solve() -> int:
distance = 500
time = 4
speed = distance / time
result = speed
return result
|
A farmer planted 7 beds of onions with 6 rows in each bed. Each row contains 16 onions. How many onions can the farmer get from all his planted onions? | def solve() -> int:
number_of_beds = 7
result = number_of_beds * 6 * 16
return result
|
A stand sells oranges, bananas and apples. There are 120 oranges, 140 bananas and 90 apples. How many fruit are there in total? | def solve() -> int:
oranges = 120
bananas = 140
apples = 90
total = oranges + bananas + apples
result = total
return result
|
John bikes to work at a speed of 12 miles per hour. If he goes to work and comes back home without stopping, and the round trip takes him 1 hour and 40 minutes, what is the total distance he bikes? | def solve() -> int:
time_in_hours = 1 + 40/60
distance_travelled = 12*time_in_hours
result = distance_travelled
return result
|
Simon wants to go on a vacation and needs to save $5000 in 6 months. He can save $2000 from his salary each month, but also needs to pay rent for $1000 every month. How much money will Simon be able to save in total after 6 months? | def solve() -> int:
goal_savings = 5000
num_months = 6
salary = 2000
rent = 1000
savings_per_month = salary - rent
total_savings = savings_per_month * num_months
result = total_savings
return result
|
Tom has 6 sandwiches and wants to share them equally with his 5 friends. How many sandwiches will each one have? | def solve() -> int:
total_sandwiches = 6
total_friends = 5
sandwiches_per_friend = total_sandwiches/total_friends
result = sandwiches_per_friend
return result
|
John runs a moving company and he charges $60 per hour. He charges an additional $20 for each flight of stairs he has to climb. If he needs to move a family of 4 to a new home, and their new home is on the fourth floor, how much will he charge them? | def solve() -> int:
hours = 2
stairs = 3
hourly_rate = 60
stairs_fee = 20
total_hours = hours
total_stairs_fee = stairs * stairs_fee
total_charge = total_hours * hourly_rate + total_stairs_fee
result = total_charge
return result
|
A rectangular box has a length of 12 cm, a width of 8 cm, and a height of 6 cm. If 5 cubic cm of the box is carved out from the center of the box, what is the volume of the remaining space? | def solve() -> int:
length = 12
width = 8
height = 6
carved_out_volume = 5
total_volume = length * width * height
remaining_volume = total_volume - carved_out_volume
result = remaining_volume
return result
|
20% of the coins in a jar are quarters. 40% are dimes. If there are 100 coins in the jar, how many more coins are dimes than quarters? | def solve() -> int:
total_coins = 100
quarter_percent = 0.2
dime_percent = 0.4
quarter_coins = total_coins * quarter_percent
dime_coins = total_coins * dime_percent
difference = dime_coins - quarter_coins
result = difference
return result
|
John wants to buy a phone that costs $750. He already has $325. How much more does he need to save to buy the phone? | def solve() -> int:
price = 750
savings = 325
remaining = price - savings
result = remaining
return result
|
Kate needs to lay hay in her farm that measures 30 meters by 20 meters. She has a barn that measures 6 meters by 7 meters. How many square meters of hay will Kate need for her farm? | def solve() -> int:
barn_Area = 6 * 7
area_without_barn = 30 * 20
result = area_without_barn - barn_Area
return result
|
Student: There are 24 pens in a case. One-eighth of the case contains black pens. There are six times as many blue pens as black pens and two times as many green pens as blue pens. How many green pens are in the case? | def solve() -> int:
total_pens = 24
black_pens = total_pens / 8
blue_pens = 6 * black_pens
green_pens = 2 * blue_pens
result = green_pens
return result
|
If it takes 6 people 8 hours to complete a project, how long would it take 4 people to complete the same project (assuming each person works at the same rate)? | def solve() -> int:
people_1 = 6
time_1 = 8
people_2 = 4
time_2 = (people_1 * time_1) / people_2
result = time_2
return result
|
Student: There are 50 cupcakes and 20 students in a class. If the cupcakes are to be distributed equally among all the students, how many cupcakes would each student get? | def solve() -> int:
cupcakes = 50
students = 20
cupcakes_per_student = cupcakes // students
remaining_cupcakes = cupcakes % students
result = cupcakes_per_student
return result
|
Emma and Matthew work at the same place and earn equal amount daily. If Emma works 5 days and earns $225, and Matthew works 6 days, how much does he earn? | def solve() -> int:
days_worked_emma = 5
daily_income_emma = 225 / days_worked_emma
days_worked_matthew = 6
weekly_income_matthew = daily_income_emma * days_worked_matthew
result = weekly_income_matthew
return result
|
If three people split a bill of $60 equally, how much does each person pay? | def solve() -> int:
total_bill = 60
people = 3
each_pay = total_bill/people
result = each_pay
return result
|
Ben has 36 marbles and he wants to arrange them in rows of 6. How many rows of marbles can he make? How many marbles will he have left over? | def solve() -> int:
rows = 36 // 6
leftover = 36 % 6
result = "Ben can make " + str(rows) + " rows of marbles. He will have " + str(leftover) + " marbles left over."
return result
|
A company has 50 employees. If 15% of the employees take a sick day, how many employees are taking a sick day? | def solve() -> int:
total_employees = 50
sick_day_percentage = 0.15
sick_day_employees = total_employees * sick_day_percentage
result = sick_day_employees
return result
|
A small bottle of juice contains 250ml of juice. If a large bottle contains 3 times as much juice as a small bottle, how many ml of juice does the large bottle contain? | def solve() -> int:
small_bottle = 250
large_bottle = 3 * small_bottle
result = large_bottle
return result
|
Emma is hosting a party and wants to serve punch to her guests. Each gallon of punch serves 16 cups. If she expects 40 guests, how many gallons of punch will she need to make? | def solve() -> int:
num_guests = 40
cups_per_gallon = 16
total_cups = num_guests * cups_per_gallon
gallons_needed = total_cups / cups_per_gallon
result = gallons_needed
return result
|
Student: To make a orange sand mixture, Lila has to combine yellow and red sand in the ratio of 3:5. If she used 120 grams of yellow sand, what's 1/6 of the difference between the mass of red and yellow sand she used? | def solve() -> int:
yellow_sand = 120
red_sand = 0
red_sand = yellow_sand * 5/3
difference = red_sand - yellow_sand
result = difference/6
return result
|
A cafeteria sold 120 waffles in the morning. If they wanted to sell a total of 250 for the day, how many more waffles did they need to sell in the afternoon? | def solve() -> int:
morning_waffles = 120
total_waffles = 250
afternoon_waffles = total_waffles - morning_waffles
result = afternoon_waffles
return result
|
Sarah wants to bake a cake that is 150 grams lighter than three times the weight of the cake that her friend baked. Her friend baked a cake at a rate of 2 grams per minute. If her friend took 75 minutes to bake the cake, how many minutes will it take for Sarah to bake a cake that is 150 grams lighter than three times t... | def solve() -> int:
friend_cake_weight = 2 * 75
sarah_cake_weight = 3 * friend_cake_weight - 150
sarah_cake_time = sarah_cake_weight / 2
result = sarah_cake_time
return result
|
am can run at an average speed of 10 km/h. How long will it take for him to run 75 km? | def solve() -> int:
speed = 10
distance = 75
result = distance / speed
return result
|
Q3: Hilary has 8 books. She received 5 more books from her uncle. She borrowed 2 books from the library. How many books does Hilary have now? | def solve() -> int:
num_books_hilary_has = 8
num_books_from_uncle = 5
num_books_borrowed = 2
total_num_books = num_books_hilary_has + num_books_from_uncle - num_books_borrowed
result = total_num_books
return result
|
A recipe requires 2 and 1/2 cups of flour, 3/4 cups of sugar, and 1/4 cup of oil. If every ingredient is tripled, how many cups of flour, sugar, and oil will be required in total? | def solve() -> int:
flour = 2.5
sugar = 0.75
oil = 0.25
new_flour = flour * 3
new_sugar = sugar * 3
new_oil = oil * 3
total_ingredients = new_flour + new_sugar + new_oil
result = total_ingredients
return result
|
The farmer has 500 bales of hay for his livestock. If each cow needs 5 bales of hay, how many cows can the farmer feed with the available hay? | def solve() -> int:
num_bales = 500
bales_per_cow = 5
num_cows = num_bales // bales_per_cow
result = num_cows
return result
|
Student: John makes $150,000 annually. He receives a 12% raise and then has 20% deducted for taxes and an additional $20,000 deducted for investments. What is his new after-tax and after-investment salary? | def solve() -> int:
salary = 150000
raise_percent = 0.12
tax_percent = 0.2
investment = 20000
raise_amount = salary * raise_percent
new_salary = salary + raise_amount
taxes_deducted = new_salary * tax_percent
salary_after_taxes = new_salary - taxes_deducted
salary_after_investments =... |
Edward needs to build a fence in his garden. The garden is 60 feet long and each rail needs 3 feet of wood. How many rails of wood does Edward need? | def solve() -> int:
length = 60
wood_per_rail = 3
result = int(length/wood_per_rail)
return result
|
A rectangular box measures 6 inches by 15 inches by 12 inches. How many cubic inches of space are in the box? | def solve() -> int:
length = 6
width = 15
height = 12
volume = length * width * height
result = volume
return result
|
Sarah makes a sports drink that is 3 parts water, 2 parts orange juice, and 1 part lemonade. If the drink contains 24 ounces of water, how many ounces is the drink? | def solve() -> int:
water = 24
orange_juice = (2/3) * water
lemonade = (1/3) * water
total = water + orange_juice + lemonade
result = total
return result
|
san has 25 apples and she wants to distribute them equally among her 5 friends. How many apples will each friend receive? | def solve() -> int:
total_apples = 25
num_friends = 5
apples_per_friend = total_apples / num_friends
result = apples_per_friend
return result
|
A grocery store purchased 100 pounds of apples for $200. If they sell them for $2 per pound, how much profit do they make? | def solve() -> int:
cost_per_pound = 200/100
revenue_per_pound = 2
profit_per_pound = revenue_per_pound - cost_per_pound
total_profit = profit_per_pound * 100
result = total_profit
return result
|
Kevin collected 48 cans of soda for a recycling project. He sorted them into 4 equal groups according to their flavors. Then, he traded 2 cans from each group for a candy bar. How many cans of soda did he have left after the trade? | def solve() -> int:
cans_per_group = 48 / 4
cans_traded = 2 * 4
cans_left = 48 - cans_traded
result = cans_left
return result
|
Student: Lisa has 20 more marbles than Mike, and Nora has three fifths as many marbles as Mike. If Lisa has 50 marbles, how many marbles does Nora have? | def solve() -> int:
mike = 50 - 20
lisa = 50
nora = mike * 3/5
result = nora
return result
|
Sophia wants to buy a new computer that costs $1100. If she has saved $700, and earns $50 dollars per week, how many weeks will it take her to save enough to buy the computer? | def solve() -> int:
computer_cost = 1100
savings = 700
weekly_earnings = 50
weeks_to_save = (computer_cost - savings) / weekly_earnings
result = weeks_to_save
return result
|
If the price of a kilogram of apples is $4 when the price of a kilogram of pears is $6, how much would Alice pay for buying 30 kilograms of each fruit and a 15% discount? | def solve() -> int:
total_apples = 4 * 30
total_pears = 6 * 30
original_total = total_apples + total_pears
discount = 0.15 * original_total
final_total = original_total - discount
result = round(final_total, 2)
return result
|
Clara went grocery shopping and bought a carton of juice that cost $2.59 and a box of cereal that cost $3.29. How much money did she spend in total? | def solve() -> int:
juice_cost = 2.59
cereal_cost = 3.29
total_cost = juice_cost + cereal_cost
result = total_cost
return result
|
Jesse went to the store to buy milk and eggs. She bought a carton of milk for $4.99 and 6 eggs for $1.60 each. She also received a 15% off coupon when she checked out. How much did Jesse spend after the coupon was applied? | def solve() -> int:
cost_milk = 4.99
num_eggs = 6
cost_eggs = 1.60
coupon = 0.15
total_before_discount = (cost_milk + (num_eggs * cost_eggs))
discount = (total_before_discount * coupon)
result = (total_before_discount - discount)
return result
|
Robert has 6 more toy trucks than Mike, and Chris has twice as many toy trucks as Mike. If Mike has 15 toy trucks, how many toy trucks does Chris have? | def solve() -> int:
mike = 15
robert = mike + 6
chris = mike * 2
result = chris
return result
|
Student: Jessica can read 80 pages of a book in 2 hours. If the book has 240 pages, how long will it take her to read the entire book? | def solve() -> int:
pages_per_hour = 80/2
total_time = 240/pages_per_hour
result = total_time
return result
|
David has 30 oranges. Jason has 10 fewer oranges than David. Jessie has twice the sum of David and Jason's oranges. How many oranges does Jessie have? | def solve() -> int:
natalie_books = 35
olivia_books = natalie_books+10
justine_books = (natalie_books+olivia_books)/2*3
result = justine_books
return result
|
A rectangular tank has a length of 5 meters, a width of 3 meters and a height of 2 meters. If the tank has water in it up to a depth of 1.5 meters, what is the volume of water in the tank, in liters? | def solve() -> int:
length = 5
width = 3
height = 2
depth = 1.5
water_volume = length*width*depth*1000
result = water_volume
return result
|
Alex has 6 books. He gives half of his books away, and gives 3 times as many to a friend. How many books did Alex give to the friend? | def solve() -> int:
books = int(6)
half = books / 2
result = half * 3
return result
|
Sarah wants to make some cookies for her friends. She has a recipe that makes 24 cookies and requires 2 cups of flour, 1 cup of sugar, and 0.5 cups of butter. She only has 3 cups of flour, 2 cups of sugar, and 1 cup of butter in her pantry. How many cookies can she make with the ingredients she has? | def solve() -> int:
recipe_cookies = 24
recipe_flour = 2
recipe_sugar = 1
recipe_butter = 0.5
pantry_flour = 3
pantry_sugar = 2
pantry_butter = 1
flour_cookies = recipe_cookies * pantry_flour / recipe_flour
sugar_cookies = recipe_cookies * pantry_sugar / recipe_sugar
but... |
A marathon runner runs from the start line to the finish line, which is a distance of 26 miles. The following week, the runner does a half marathon, running a distance of 13 miles. What is the total distance the runner has covered in the two races? | def solve() -> int:
start_line_to_finish_line = 26
half_marathon = 13
total_distance = start_line_to_finish_line + half_marathon
result = total_distance
return result
|
A backyard is being enclosed with a fence. The perimeter of the backyard is 400 feet and a fence pole is placed every 12 feet. There is a 60-foot opening where a gate is left. How many fence poles are required to surround the backyard? | def solve() -> int:
perimeter = 400
pole_spacing = 12
gate_width = 60
fence_length = perimeter - gate_width
num_poles = fence_length / pole_spacing
result = num_poles
return result
|
If it costs $20 for 6 slices of pizza, how much would 12 slices of pizza cost? | def solve() -> int:
cost_of_six_slices = 20
slices_wanted = 12
cost_of_twelve_slices = cost_of_six_slices / 6 * slices_wanted
result = cost_of_twelve_slices
return result
|
Student: Henry walked 2 kilometers more than Anna. If Anna walked 5 kilometers, how many meters did they walk altogether? | def solve() -> int:
anna_km = 5
henry_km = anna_km + 2
anna_m = anna_km * 1000
henry_m = henry_km * 1000
total_m = anna_m + henry_m
result = total_m
return result
|
Jackson wants to buy a new gaming system for $400, and a game for an additional $60. He saw that every Monday, he could get a 15% discount on all gaming systems and 20% off on games. How much could Jackson save by buying these items on a Monday? | def solve() -> int:
system_price = 400
game_price = 60
system_discount = 0.15
game_discount = 0.2
system_discounted_price = system_price * (1 - system_discount)
game_discounted_price = game_price * (1 - game_discount)
total_discounted_price = system_discounted_price + game_dis... |
A factory produces 250 units per hour. How many units will be produced in 6 hours? | def solve() -> int:
units_per_hour = 250
hours = 6
total_units = units_per_hour * hours
result = total_units
return result
|
Tom and his siblings went fishing and caught 180 fish, if they evenly divided the fish between 5 of them, how many fish did each of them get? | def solve() -> int:
a = 180
b = 5
c = a/b
result = c
return result
|
If Alice bought a jeans for $26 and used a $5 discount coupon, what was the final cost? | def solve() -> int:
Regular_price = 26
Discount_value = 5
Total_price = Regular_price - Discount_value
result = Total_price
return result
|
Ben is saving money for a new bike that costs $120. He already has $40 in his piggy bank, and he earns $10 every week from doing chores. He also spends $2 every week on candy. How many weeks will it take him to save enough money for the bike? | def solve() -> int:
target = 120 - 40
net = 10 - 2
weeks = target / net
result = weeks
return result
|
There are 30 students in a class. If 2/3 of the students are girls and the rest are boys, how many boys are in the class? | def solve() -> int:
girls = 30 * (2/3)
boys = 30 - girls
result = boys
return result
|
A bakery makes muffins from 4 cups of flour, 1 cup of sugar, and 8 eggs. The bakery sells the muffins for $2 each and earned $280 in total this week. How many muffins did the bakery sell? | def solve() -> int:
total_income = 280
muffin_price = 2
flour_amount = 4
sugar_amount = 1
egg_amount = 8
total_muffins = total_income // muffin_price
flour_amount = total_muffins * flour_amount
sugar_amount = total_muffins * sugar_amount
egg_amount = total_muffins * egg_amo... |
David invested $1000 in the stock market. He spent one-fourth of the amount on stock J, one-third on stock K, and the remainder on stock L. After one year, stock J increased by 10%, stock K lost one-fifth of its value, while stock L doubled in value. What was the value of his stocks at the end of the year, in dollars? | def solve() -> int:
investment = 1000
stock_J = investment * (1/4)
stock_K = investment * (1/3)
stock_L = investment - stock_J - stock_K
stock_J = stock_J * 1.10
stock_K = stock_K * (1 - 1/5)
stock_L = stock_L * 2
total_value = stock_J + stock_K + stock_L
result = tota... |
A family went out to eat and ordered 3 entrees, 4 drinks, and 2 desserts. The entrees cost $12.50 each, the drinks cost $2.25 each, and the desserts cost $5.75 each. How much did the meal cost in total, including tax of 8%? | def solve() -> int:
entree_cost = 12.5
drink_cost = 2.25
dessert_cost = 5.75
num_entrees = 3
num_drinks = 4
num_desserts = 2
subtotal = (entree_cost*num_entrees) + (drink_cost*num_drinks) + (dessert_cost*num_desserts)
tax_rate = 0.08
total_cost = subtotal * (1 + tax_rate)
result ... |
Student: A family of 4 went out for dinner and spent a total of $102.25. If the family also left a $20 tip, what was the original cost of the dinner? | def solve() -> int:
total_cost = 102.25
tip = 20
original_cost = total_cost - tip
result = original_cost
return result
|
The toy company spent 1 million dollars on R&D for their new product and sold it for 20 dollars. If it earned a profit that was twice what the Barbie doll made and the Barbie doll cost 5 dollars to make, how many dollars did Barbie earn? | def solve() -> int:
rd_spent = 1000000
product_price = 20
barbie_cost = 5
profit_ratio = 2
profit = product_price - (rd_spent/product_price) - barbie_cost
barbie_earnings = profit/profit_ratio
result = barbie_earnings
return result
|
Hannah has $750 and she has 6 times more than what Henry has. If Henry has $45 less than Grant, how much money does Grant have? | def solve() -> int:
hannahs_money = 750
henrys_money = hannahs_money/6
difference_money = 45
grants_money = henrys_money + difference_money
result = grants_money
return result
|
In a classroom, there are pencils and erasers. Each pencil is 10 centimeters long and each eraser is 5 centimeters long. There are 50 pencils in the classroom. Altogether all stationery items are 375 centimeters long. How many erasers are in the classroom? | def solve() -> int:
pencil_length = 10
eraser_length = 5
total_length = 375
num_pencils = 50
total_pencil_length = pencil_length * num_pencils
total_eraser_length = total_length - total_pencil_length
num_erasers = total_eraser_length / eraser_length
result = num_erasers
ret... |
Mr. Brown has 500 pens in his store. There were 15 customers who bought 25 pens each on a particular day. How many pens are remaining in the store? | def solve() -> int:
pens_in_store = 500
num_customers = 15
pens_per_customer = 25
total_pens_sold = num_customers * pens_per_customer
pens_remaining = pens_in_store - total_pens_sold
result = pens_remaining
return result
|
If Brad drives at a speed of 50 mi/h and takes five stops of 15 minutes, how far will he drive in 11 hours? | def solve() -> int:
time_driving = 11 * 3600 - (15 * 60 * 5)
distance_traveled = 50 * time_driving/3600
result = distance_traveled
return result
|
James and Mary each have 5 fish tanks. Mary has 2 tanks with 30 fish each and 3 tanks with 10 fish each. James has 3 tanks with 30 fish each and 2 tanks with 20 fish each. How many fish do James and Mary have combined? | def solve() -> int:
tanks_james = 5
fish_james_30 = 3
fish_james_20 = 2
total_fish_james = fish_james_30*30 + fish_james_20*20
tanks_mary = 5
fish_mary_30 = 2
fish_mary_10 = 3
total_fish_mary = fish_mary_30*30 + fish_mary_10*10
total_fish = total_fish_james + total_fish_mar... |
In a survey conducted among high school students, 40% responded that their favorite subject was mathematics while 30% responded that their favorite subject was physics. If there are 850 students in the high school, how many students responded that their favorite subject was neither math nor physics? | def solve() -> int:
students_who_liked_math = 0.4*850
students_who_liked_physics = 0.3*850
students_who_didnt_like_math_or_physics = 850 - students_who_liked_math - students_who_liked_physics
result = students_who_didnt_like_math_or_physics
return result
|
Student: A school has 60 students. If 15 students are absent, what percentage of students showed up? | def solve() -> int:
total_students = 60
absent_students = 15
present_students = total_students - absent_students
percentage = (present_students / total_students) * 100
result = percentage
return result
|
A rectangle has a length of 10 cm and a width of 6 cm. What is the perimeter of the rectangle? | def solve() -> int:
length = 10
width = 6
perimeter = 2 * (length + width)
result = perimeter
return result
|
Jake and Lily are mowing a lawn. Jake can mow the entire lawn in 30 minutes. Lily can mow half of the lawn in 25 minutes and then needs to take a break. Assuming she kept up the same pace, what would've been the average time in seconds for the lawn mowers? | def solve() -> int:
jake_time = 30 * 60
lily_time = (25 * 60) + (30 * 60)
total_time = jake_time + lily_time
average_time = total_time / 2
result = average_time
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.