question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Anthony and Matthew are running a marathon. Anthony finishes the first 13 miles in 1 hour and 12 minutes. He finishes the marathon 9 minutes before Matthew does. If Matthew finishes the marathon in 2 hours and 31 minutes, how long did it take Anthony to run the second 13 miles? | def solve() -> int:
anthony_first_13_miles_time = 1 * 60 + 12
matthew_marathon_time = 2 * 60 + 31
anthony_total_time = anthony_first_13_miles_time + 9
anthony_second_13_miles_time = anthony_total_time - anthony_first_13_miles_time
result = anthony_second_13_miles_time
return result
|
A museum has twice as many sculptures as they do paintings plus 5. If they have a total of 63 pieces of art, how many are paintings? | def solve() -> int:
paintings = (63 - 5) / 3
result = paintings
return result
|
Student: A classroom has 30 students. If 25% of them brought a pen to class, how many students have pens? | def solve() -> int:
total_students = 30
percentage_with_pens = 0.25
students_with_pens = total_students * percentage_with_pens
result = round(students_with_pens)
return result
|
Mark is ordering a pizza with pepperoni, mushrooms, and onions. There are four times as many mushrooms as onions and two less than three times as many pepperoni as mushrooms. If there are 7 onions, how many toppings are on the pizza total? | def solve() -> int:
onions = 7
mushrooms = 4 * onions
pepperoni = 3 * mushrooms - 2
total_toppings = onions + mushrooms + pepperoni
result = total_toppings
return result
|
Result: 160 A triangle has a base length of 25 and a height of 10. What is the area of the triangle? | def solve() -> int:
base = 25
height = 10
area = base * height / 2
result = area
return result
|
Mark has 120 marbles in his collection. He gave 30 marbles to his friend and sold 25 at a garage sale. How many marbles does Mark have in his collection now? It’s David’s turn to pick up his team's lunch order. He needs 3 turkey sandwiches that are $6.00 each, 2 pastrami sandwiches that are $7.50 each and a salad for $... | def solve() -> int:
marbles_in_collection = 120
marbles_given_away = 30
marbles_sold = 25
marbles_now = marbles_in_collection - marbles_given_away - marbles_sold
total_turkey_sandwiches = 3
turkey_sandwich_price = 6.00
total_pastrami_sandwiches = 2
pastrami_sandwich_price = 7.5... |
Emma prepared a pot of soup and a dozen garlic bread slices for her family dinner. Each pot of soup takes the same amount of salt to make as a dozen garlic bread slices. Emma used 360 grams of salt to cook everything. How many grams of salt are in one garlic bread slice? | def solve() -> int:
soup = 1
garlic_bread = 12
total_salt = 360
soup_salt = total_salt / (soup + garlic_bread)
garlic_bread_salt = soup_salt / garlic_bread
result = garlic_bread_salt
return result
|
Mindy read 34 books, Marco read 22 books, and Nadia read 17 books. Mindy and Nadia read 7 of the same books and all three of them read the same 2 books. How many different books have Mindy, Marco, and Nadia read? | def solve() -> int:
mindy_books = 34
marco_books = 22
nadia_books = 17
same_books = 7
all_books = 2
mindy_unique_books = mindy_books - same_books - all_books
marco_unique_books = marco_books - all_books
nadia_unique_books = nadia_books - same_books - all_books
total_un... |
A pool is 30 feet long, 20 feet wide, and 10 feet deep. How many cubic feet of water can the pool hold? | def solve() -> int:
length = 30
width = 20
depth = 10
volume = length * width * depth
result = volume
return result
|
san has $50. She spent $12.50 on a shirt, $5.25 on a pair of earrings, and $7.75 on a necklace. How much money does Susan have left? | def solve() -> int:
money_start = 50
shirt_cost = 12.5
earring_cost = 5.25
necklace_cost = 7.75
total_spent = shirt_cost + earring_cost + necklace_cost
money_left = money_start - total_spent
result = money_left
return result
|
Grace has a box of 50 pens. She has twice as many black pens as blue pens and 14 red pens. Considering that she has only a tenth of the number of blue pens as pink pens, how many pens does she have that are neither black, blue nor red? | def solve() -> int:
blue_pens = 50 / 6
black_pens = 2 * blue_pens
red_pens = 14
total_bbr_pens = blue_pens + black_pens + red_pens
other_pens = 50 - total_bbr_pens
result = other_pens
return result
|
Samantha has twice as many pencils as Rachel. Rachel has three less than one-third as many pencils as Tanya has green pencils. If Tanya has 18 green pencils, how many pencils does Samantha have? | def solve() -> int:
samantha=0
rachel=0
tanya=18
rachel=((1/3)*tanya)-3
samantha=rachel*2
result=samantha
return result
|
Abby has $3,500 on her gift card. She spent one-third of it on Wednesday and two-fifths of the remainder on Thursday. How much was left on her gift card? | def solve() -> int:
remainder = 3500
remainder = remainder - remainder/3
remainder = remainder - remainder*2/5
result = remainder
return result
|
Possible new questions and programs are: Alex has a rectangular garden that is 12 meters long and 8 meters wide. He wants to fence the garden with wooden boards that are 2 meters long and cost $4 each. How much money does he need to fence the entire garden? | def solve() -> int:
perimeter = (12 + 8) * 2
boards = perimeter / 2
cost = boards * 4
result = cost
return result
|
If Tom worked for 6 hours and then Peter worked twice as long as Tom, and Jennifer worked half the total time of Tom and Peter, how many hours did the three people work together? | def solve() -> int:
tom_time = 6
peter_time = tom_time * 2
jennifer_time = (tom_time + peter_time) / 2
total_time = tom_time + peter_time + jennifer_time
result = total_time
return result
|
Student: 2. A farmer has 30 eggs. He sells a third of them plus 5 eggs. How many eggs does he have left? | def solve() -> int:
eggs = 30
sold = eggs // 3 + 5
left = eggs - sold
result = left
return result
|
Rachel goes running five times as often as her roommate. If her roommate runs for a total of 18 miles per week, and each mile takes 10 minutes to run, how many minutes does Rachel spend running per week? | def solve() -> int:
roommate_runs_per_week = 18
rachel_runs_per_week = 5 * roommate_runs_per_week
minutes_per_mile = 10
total_minutes_rachel_runs = rachel_runs_per_week * minutes_per_mile
result = total_minutes_rachel_runs
return result
|
A store sold 6 shirts for $120. If they want to make a total of $3000 in sales from shirts, how many shirts do they need to sell? | def solve() -> int:
price_per_shirt = 120/6
shirts_needed = 3000/price_per_shirt
result = shirts_needed
return result
|
Hugo has 4 dogs each weighing 12 lbs, 2 cats each weighing 9 lbs, and a parrot weighing 1 lb. What is the total weight of Hugo's pets? | def solve() -> int:
total_weight = (4*12) + (2*9) + 1
result = total_weight
return result
|
After drinking 40% of the juice he had, Billy was left with three times as many apples as pears. If he has 15 apples now, how many fruits did Billy have originally? | def solve() -> int:
apples_now = 15
pears_now = apples_now / 3
juice_drunk = 0.4
juice_left = 1 - juice_drunk
apples_left = apples_now / juice_left
pears_left = pears_now / juice_left
apples_original = apples_left + apples_now
pears_original = pears_left + pears_now
... |
Alice cycles 12 km to school every day. She burns 24 calories per km. How many calories does she burn in a week (5 days) of cycling to school and back? | def solve() -> int:
km_per_day = 12
cal_per_km = 24
days_per_week = 5
total_km = km_per_day * 2 * days_per_week
total_cal = total_km * cal_per_km
result = total_cal
return result
|
Lucy is wondering how many minutes she can watch TV per batter charge. Her TV can operate for 4 hours on one charged batter. She has watched for 3/5 of the batter's life after watching movies at home, which took 1 hour. How many minutes per charge does she get? | def solve() -> int:
batter_life = 4 * 60
watched_time = 1
remaining_life = batter_life - watched_time
watched_percentage = 3 / 5
remaining_percentage = 1 - watched_percentage
remaining_time = remaining_life * remaining_percentage
minutes_per_charge = remaining_time
result = minutes_per... |
A car travels at a speed of 60 km/hour. If the car travels for 2.5 hours, how far does it travel? | def solve() -> int:
speed = 60
time = 2.5
distance = speed * time
result = distance
return result
|
There are 600 tickets sold for a concert, 40% of which are VIP tickets. How many tickets are not VIP tickets? | def solve() -> int:
vip_tickets = 600 * 0.4
non_vip_tickets = 600 - vip_tickets
result = non_vip_tickets
return result
|
Student: A farmer bought 20 bales of hay for $200. He spent half of the money to buy 10 sheep, and then sold the sheep for $30 each. How much money did the farmer have left? | def solve() -> int:
bales_of_hay = 20
cost_of_hay = 200
cost_of_sheep = cost_of_hay / 2
number_of_sheep = 10
price_of_sheep = 30
result = cost_of_hay - cost_of_sheep + (number_of_sheep * price_of_sheep)
return result
|
A car travels 60 miles in 1 hour. How many miles will it travel in 4.5 hours? | def solve() -> int:
distance_per_hour = 60
distance_in_4_5_hours = distance_per_hour * 4.5
result = distance_in_4_5_hours
return result
|
Yesterday, Lisa and I made 200 paper cranes for our art project. Today, we plan to make 25% more. If we want to make a total of 450 paper cranes, how many paper cranes are we planning to make today? | def solve() -> int:
yesterday = 200
increase = 25
total = 450
percent_increase = increase / 100
today = (total - yesterday) / (1 + percent_increase)
result = today
return result
|
Jessica earns $45,000 a year and has $10,000 in deductions. The first $5,000 of taxable income is taxed at 3%. The next $10,000 is taxed at 6% and the next $20,000 is taxed at 12%. Remaining taxable income is taxed at 22%. Calculate how much money Jessica will have to pay in taxes. | def solve() -> int:
income = 45000
deductions = 10000
taxable_income = income - deductions
taxes = 0
if taxable_income > 0:
if taxable_income <= 5000:
taxes = taxable_income * 0.03
elif taxable_income <= 15000:
taxes = 150 + (taxable_income - 5000) * 0.06... |
The sum of two consecutive odd numbers is 56. What are the two numbers? | def solve() -> int:
n1 = 1
n2 = n1+2
while n1+n2!= 56:
n1 += 2
n2 = n1+2
result = (n1, n2)
return result
|
If the base of a triangle is 8 units and its height is 6 units, what is its area? | def solve() -> int:
base = 8
height = 6
area = 0.5 * base * height
result = area
return result
|
ally purchased 7 shirts at $15 each. How much money did Sally spend on the shirts? | def solve() -> int:
shirt_cost = 15
num_shirts = 7
total_cost = shirt_cost * num_shirts
result = total_cost
return result
|
Angela drinks 2 large cups of green tea each containing 60 milligrams of caffeine. She then has a 12-ounce bottle of Pepsi with 36 milligrams of caffeine. Calculate the total caffeine consumed. | def solve() -> int:
green_tea_cups = 2
green_tea_caffeine = 60
pepsi_ounce = 12
pepsi_caffeine = 36
total_caffeine = (green_tea_cups * green_tea_caffeine) + pepsi_caffeine
result = total_caffeine
return result
|
Jim has a rectangular garden that is 10 feet wide and 20 feet long. What is the perimeter of his garden in feet? | def solve() -> int:
width = 10
length = 20
perimeter = 2 * (width + length)
result = perimeter
return result
|
In a small village, the population is 250. If the children under the age of 15 are 1/5 of the population, calculate the number of children in that village. | def solve() -> int:
total_population = 250
percentage_of_children = 1/5
number_of_children = total_population * percentage_of_children
result = number_of_children
return result
|
am is saving money for a trip. He has $1000 in his bank account and earns $200 per week from his part-time job. He spends 10% of his income on food and 15% on rent each week. How much money will he have in his bank account after 4 weeks? | def solve() -> int:
bank = 1000
income = 200
food = income * 0.1
rent = income * 0.15
save = income - food - rent
bank = bank + save * 4
result = bank
return result
|
A book has 300 pages. If Sarah reads 25 pages per day, how many days will it take her to read the whole book? | def solve() -> int:
pages = 300
pages_per_day = 25
days_to_finish = pages // pages_per_day + 1
result = days_to_finish
return result
|
A bag of apples weighs 5 kg and costs $4. When Anna bought 3 bags of apples, she was charged an extra $1 for delivery. How much did Anna pay per kg of apples? | def solve() -> int:
bag_weight = 5
bag_price = 4
bag_quantity = 3
delivery_fee = 1
total_weight = bag_weight * bag_quantity
total_price = (bag_price * bag_quantity) + delivery_fee
price_per_kg = total_price / total_weight
result = price_per_kg
return result
|
Mike won the lucky draw. He was given $150 as a cash reward and $120 worth of vouchers. He gave $90 to his sister. How much did he get in total, in dollars? | def solve() -> int:
cash_reward = 150
vouchers_value = 120
given_to_sister = 90
total_gained = cash_reward + vouchers_value - given_to_sister
result = total_gained
return result
|
A sum of $10,000 is invested in an account for 10 years with an annual interest rate of 3%. How much money will be in the account after 10 years? | def solve() -> int:
initial_amount = 10000
years = 10
interest_rate = 0.03
final_amount = initial_amount*(1+interest_rate)**years
result = final_amount
return result
|
Jennifer acquires 1200 T-shirts at $3 each for her store. She sells 90% of them at a price three times as much. How much revenue does she get? | def solve() -> int:
num_tshirts = 1200
cost_per_tshirt = 3
total_cost = num_tshirts * cost_per_tshirt
num_sold = num_tshirts * 0.9
selling_price = cost_per_tshirt * 3
total_revenue = num_sold * selling_price
result = total_revenue
return result
|
The population of a city is 400,000. In one year, the population increased by 2%. What is the new population of the city? | def solve() -> int:
population = 400000
annual_increase_rate = 0.02
population_increase = population * annual_increase_rate
new_population = population + population_increase
result = new_population
return result
|
If a car travels 50 kilometers per hour but only travels for 4 hours each day, how far does it travel in a week in kilometers? | def solve() -> int:
speed = 50
hours_per_day = 4
days_per_week = 7
distance_per_day = speed * hours_per_day
distance_per_week = distance_per_day * days_per_week
result = distance_per_week
return result
|
A pizza recipe requires 1lb of dough and makes 8 slices. How many pizzas can you make with 5lb of dough if each pizza has 6 slices? | def solve() -> int:
slices_per_pizza = 6
dough_per_pizza = 1
dough_per_slice = dough_per_pizza/slices_per_pizza
dough_available = 5
pizzas_possible = (dough_available/dough_per_slice)//6
result = pizzas_possible
return result
|
Jane went shopping and spent $48 on 3 shirts and 2 pairs of pants. If each pair of pants costs $10, how much did each shirt cost? | def solve() -> int:
pant_cost = 10
num_pants = 2
total_cost = 48
num_shirts = 3
shirt_cost = (total_cost - (pant_cost * num_pants)) / num_shirts
result = shirt_cost
return result
|
There are 35 children in Bill's class. On Monday, 20 children stayed for lunch and the other 15 children went home for lunch. How many children went home for lunch? | def solve() -> int:
total_children = 35
lunch_num = 20
home_num = total_children - lunch_num
result = home_num
return result
|
On Friday, Kayla sold 80 bracelets at a craft fair for $1,200. She later discovered that she had accidentally charged $5 more per bracelet than she intended. If the original price of a bracelet is $10, how much money will Kayla refund to her customers? | def solve() -> int:
charged_price = 1200 / 80
difference = charged_price - 10
result = difference * 80
return result
|
10. Maverick bought a box of 30 bolts, each bolt weighing 2 ounces. How much did Maverick’s box of bolts weigh in total? | def solve() -> int:
total_weight = 0
for bolt in range(30):
total_weight = total_weight + 2
result = total_weight
return result
|
7. Spencer and Jack went to the park and collected 53 leaves in total. They collected 3 times as many leaves as Jack. How many leaves did Spencer collect? | def solve() -> int:
total_leaves = 53
jack_leaves = total_leaves/3
spencer_leaves = total_leaves - jack_leaves
result = spencer_leaves
return result
|
Student: A school has 600 students. If 1/4 of the students are absent, how many students are present? | def solve() -> int:
total_students = 600
absent_students = total_students / 4
present_students = total_students - absent_students
result = present_students
return result
|
An electrician has to fix 3 apartment buildings with 10 units each. It takes him 6 hours to fix the wiring of one unit. If he earns $35 per hour, how much money does he make from fixing the wiring of all the units? | def solve() -> int:
buildings = 3
units_per_building = 10
hours_per_unit = 6
rate_per_hour = 35
total_units = buildings * units_per_building
total_hours = total_units * hours_per_unit
amount = total_hours * rate_per_hour
result = amount
result
return result
|
Emma likes to bake cookies. She used 200 grams of flour, which had 364 calories per 100 grams, 100 grams of butter, which had 717 calories per 100 grams, and 50 grams of chocolate chips, which had 530 calories per 100 grams. She made 20 cookies from the dough. How many calories were in each cookie? | def solve() -> int:
calories_flour = 200 * 364 / 100
calories_butter = 100 * 717 / 100
calories_chocolate = 50 * 530 / 100
total_calories = calories_flour + calories_butter + calories_chocolate
calories_per_cookie = total_calories / 20
result = calories_per_cookie
return... |
Amanda had a garden with 72 flowers. On the first day, she picked 10 flowers. On the second day, she picked twice as many flowers as she picked on the first day plus 2. On the third day, she picked three less than theJacob needs to paint his room. It takes him 20 minutes to paint one wall and 30 minutes to paint the ce... | def solve() -> int:
flowers_in_garden = 72
flowers_picked_first_day = 10
flowers_picked_second_day = (flowers_picked_first_day * 2) + 2
flowers_picked_third_day = flowers_picked_second_day - 3
total_flowers_picked = flowers_picked_first_day + flowers_picked_second_day + flowers_picked_third_day... |
Student: Kelly has 35 crayons. She wants to share them equally between her 5 siblings. How many crayons will each sibling get? | def solve() -> int:
crayons = 35
siblings = 5
crayons_per_sibling = crayons // siblings
remaining_crayons = crayons % siblings
result = crayons_per_sibling
return result
|
Noah has a collection of 20 stamps from different countries. He wants to arrange them in a rectangular grid on a poster. He can fit 4 stamps in a row, but he wants to leave some space between them. He decides to leave 2 centimeters between each stamp and 3 centimeters from the edges of the poster. What is the area of t... | def solve() -> int:
stamps = 20
stamps_per_row = 4
gap = 2
margin = 3
rows = stamps // stamps_per_row
if stamps % stamps_per_row!= 0:
rows += 1
poster_length = stamps_per_row * (4 + gap) + 2 * margin
poster_width = rows * (6 + gap) + 2 * margin
poster_area = poster_leng... |
Sophia bought 12 strawberries for $1.50 each. Each strawberry could be cut into 4 pieces. She sold 5 strawberry pieces for $3 each. How much profit did Sophia make? | def solve() -> int:
strawberries_bought = 12
price_per_strawberry = 1.50
pieces_per_strawberry = 4
pieces_sold = 5
price_per_piece = 3
total_cost = strawberries_bought * price_per_strawberry
total_pieces = strawberries_bought * pieces_per_strawberry
total_income = pieces_sold * pric... |
am had $2.30. His dad gave him an extra $0.85. He went to the store and bought a snack that cost $0.60. How much money does Sam have left in cents? | def solve() -> int:
amount_sam_had = 230
amount_dad_gave = 85
amount_snack_cost = 60
result = amount_sam_had + amount_dad_gave - amount_snack_cost
return result
|
If a lobster has 10 legs, and one lobster egg clutch can contain 200 lobsters, how many baby lobster legs would be in one less than 10 clutches? | def solve() -> int:
lobster_legs = 10
egg_clutch = 200
clutches = 10 - 1
baby_lobster_legs = lobster_legs * egg_clutch * clutches
result = baby_lobster_legs
return result
|
A bus can seat 45 passengers. If there are 32 passengers on the bus, how many more passengers can the bus carry? | def solve() -> int:
bus_capacity = 45
passengers_on_bus = 32
remaining_capacity = bus_capacity - passengers_on_bus
result = remaining_capacity
return result
|
A delivery truck can hold 300 packages. If the company needs to deliver 1800 packages, how many trips will it take the truck to deliver them all? | def solve() -> int:
packages = 1800
trips = packages // 300 + 1
result = trips
return result
|
John recycles paper, cans, and glass. He has 8 bags full of paper, 6 bags full of cans, and 4 bags full of glass. If each bag of paper and each bag of cans both weigh 16 kgs and each bag of glass weighs 8 kgs, how much total weight does John have to recycle? | def solve() -> int:
p = 8
c = 6
g = 4
wp = 16
wc = 16
wg = 8
paper_weight = p * wp
can_weight = c * wc
glass_weight = g * wg
total_weight = paper_weight + can_weight + glass_weight
result = total_weight
return result
|
Jackson weighs 4 times as much as what William weighs. William weighs 20 lbs less than twice the weight of Samantha. If Samantha weighs 120 lbs, what is the combined weight of Jackson, William, and Samantha? | def solve() -> int:
sam_weight = 120
will_weight = 2 * sam_weight - 20
jack_weight = 4 * will_weight
total_weight = sam_weight + will_weight + jack_weight
result = total_weight
return result
|
``` You have $80. You spend $25 on a book, then 1/3 of what's left on a magazine. You also buy a drink for $3. How much money is left? | def solve() -> int:
money = 80
book = 25
money_left = money - book
magazine = money_left / 3
money_left -= magazine + 3
result = money_left
return result
|
A company had a profit of $500,000 last year. If the company's expenses were $350,000 last year, what percentage of the company's profit is spent on expenses? | def solve() -> int:
percentage_of_profit = (350000/500000)*100
result = percentage_of_profit
return result
|
A recipe calls for 2 cups of flour for every 3 cups of sugar. If you want to use 6 cups of sugar, how many cups of flour do you need? | def solve() -> int:
sugar = 6
flour = (2/3) * sugar
result = flour
return result
|
Student: Max has a bonfire every month and has 5 bundles of wood left each time. Each bundle of wood takes 1 hour to burn completely. How many hours of bonfire does Max have left for the next 4 months? | def solve() -> int:
bundles = 5
burn_time = 1
total_hours = bundles * burn_time * 4
result = total_hours
return result
|
Student: Q7: Sarah is making a cake for a birthday party. The recipe requires 1 ½ cup of butter for one cake. She has 3 cups of butter. How many cakes can she make with the butter she has? | def solve() -> int:
butter_per_cake = 1.5
total_butter = 3
cakes = total_butter / butter_per_cake
result = cakes
return result
|
Nate is a DIY guy. He wants to brush paint his walls. It takes him 5 hours to paint each wall, and he wants to paint all 4 of his walls. The cupboard takes 50% longer than each wall, while the shelves take twice as long as each wall. How long in total will it take for Nate to finish painting? | def solve() -> int:
wall_time = 5
cupboard_time = wall_time * 1.5
shelves_time = wall_time * 2
total_time = (wall_time * 4) + cupboard_time + shelves_time
result = total_time
return result
|
In a set of golf clubs, there are four times as many putters as wedges and five more wedges as drivers. If there are nine drivers, how many golf clubs are there in total? | def solve() -> int:
drivers = 9
wedges = drivers + 5
putters = wedges * 4
totalClubs = drivers + wedges + putters
result = totalClubs
return result
|
A grocery store sells 40 apples and 50 bananas in one day. If the apples cost $1 each and the bananas cost $0.50 each, what is the total revenue from fruit sales? | def solve() -> int:
apples = 40
bananas = 50
apple_price = 1
banana_price = 0.50
apple_revenue = apples * apple_price
banana_revenue = bananas * banana_price
total_revenue = apple_revenue + banana_revenue
result = total_revenue
return result
|
Student: James has a jar of 120 jelly beans. He knows that 25% of them are red, 20% are green, 15% are yellow, and the rest are blue. How many blue jelly beans are in the jar? | def solve() -> int:
total = 120
red = total * 0.25
green = total * 0.20
yellow = total * 0.15
blue = total - red - green - yellow
result = blue
return result
|
9. Bill bought 5 dozen eggs for $17.50. If each dozen eggs cost the same, how much did Bill pay for each dozen? | def solve() -> int:
num_eggs = 5 * 12
cost_all_eggs = 17.50
cost_per_dozen = cost_all_eggs / 5
result = cost_per_dozen
return result
|
John has a limit of eating no more than 1500 calories a day. If he ate 600 calories for breakfast, 400 calories for lunch, and 700 calories for dinner, how many more calories did he eat than his limit? | def solve() -> int:
limit = 1500
breakfast = 600
lunch = 400
dinner = 700
total_calories = breakfast + lunch + dinner
extra_calories = total_calories - limit
result = extra_calories
return result
|
Mariana was setting up her garden and bought 10 packets of flower seeds, 1/7 of which were sunflower seeds. The rest were daisy seeds. How many daisy seeds did Mariana buy? | def solve() -> int:
number_of_seed_packets = 10
number_of_sunflower_seeds = number_of_seed_packets * (1/7)
number_of_daisy_seeds = number_of_seed_packets - number_of_sunflower_seeds
result = int(round(number_of_daisy_seeds))
return result
|
4. Mia, Noah, and Ollie are making cupcakes. Mia can make 18 cupcakes in an hour, Noah can make 12 cupcakes in an hour, and Ollie can make 30 cupcakes in 2 hours. Who can make the most cupcakes in one hour? | def solve() -> int:
mia_cupcakes = 18
noah_cupcakes = 12
ollie_cupcakes = 15
final_cupcakes = max(mia_cupcakes, noah_cupcakes, ollie_cupcakes)
result = final_cupcakes
return result
|
Student: John recently went shopping and spent $120 on clothes. He bought 2 shirts and 3 pairs of pants. The pants cost $20 each and the shirts cost $30 each. How much did John spend on each shirt? | def solve() -> int:
total = 120
pants = 3
shirts = 2
pants_price = 20
shirts_price = 30
pants_total = pants * pants_price
shirts_total = shirts * shirts_price
shirt_cost = shirts_total / shirts
result = shirt_cost
return result
|
On Monday, John worked 7 hours and earned $10 per hour. On Tuesday, he worked 9 hours and earned $12 per hour. How much did John earn in total for the two days? | def solve() -> int:
hours_worked_monday = 7
hourly_wage_monday = 10
hours_worked_tuesday = 9
hourly_wage_tuesday = 12
total_earnings = (hours_worked_monday * hourly_wage_monday) + (hours_worked_tuesday * hourly_wage_tuesday)
result = total_earnings
return result
|
The pond was 15 feet wide and each jump covered 3 feet. How many feet did the frogs travel in total? | def solve() -> int:
jumps_per_pond = 15 // 3
jumps_per_frog = jumps_per_pond * 12
feet_per_frog = jumps_per_frog * 3
feet_total = feet_per_frog * 5
result = feet_total
return result
|
sie is going on a road trip that is 800 miles long. Her car gets 30 miles to the gallon and gas is $3.50 per gallon. How much will she spend on gas? | def solve() -> int:
trip_distance = 800
mpg = 30
gas_price = 3.50
gallons_needed = trip_distance / mpg
total_cost = gallons_needed * gas_price
result = total_cost
return result
|
Jack has 18 chocolates. He eats 2 chocolates every day. He also gets 5 more chocolates every Sunday. After 21 days, how many chocolates does he have left? | def solve() -> int:
chocolates = 18
for day in range(1, 22):
chocolates = chocolates - 2
if day % 7 == 0:
chocolates = chocolates + 5
result = chocolates
return result
|
A library has 12 bookshelves. It takes 20 seconds to walk up to the bookshelves with even numbers and 15 seconds to reach the odd-numbered bookshelves. This includes starting at the first bookshelf. How many minutes does it take to reach the 12th bookshelf? | def solve() -> int:
num_bookshelves = 12
even_time = 20
odd_time = 15
total_time = 0
for i in range(1, num_bookshelves+1):
if i % 2 == 0:
total_time += even_time
else:
total_time += odd_time
total_time_in_minutes = total_time / 60
result... |
Olivia went on a road trip from Denver to Seattle. She left at 6:00 AM and arrived at 9:00 PM. She had 5 stops of 15, 20, 25, 30, and 10 minutes respectively during the journey. How many hours did she spend on the road? | def solve() -> int:
start_time = 6 * 60
end_time = 21 * 60
total_stops = 5
stop_times = [15, 20, 25, 30, 10]
total_stop_time = sum(stop_times)
total_time = end_time - start_time - total_stop_time
total_hours = total_time / 60
result = total_hours
return res... |
A store offers a 20% discount on all items during a sale. If you buy a shirt that costs $25 before the sale, how much would you save and how much would you pay? | def solve() -> int:
original_price = 25
discount_percent = 0.2
discount_amount = original_price*discount_percent
final_price = original_price-discount_amount
savings = original_price-final_price
result = (savings, final_price)
return result
|
Apples have 95 calories and cost $0.75 each. If Bob has $6 and wants to buy as many apples as he can, how many calories will he get and how much money will he have left? | def solve() -> int:
apples_bought = 6 // 0.75
money_left = 6 % 0.75
calories_gained = apples_bought * 95
result = (apples_bought, calories_gained, money_left)
return result
|
Maria has $100. She buys 3 shirts for $15 each and a dress for $35. How much money does she have left? | def solve() -> int:
money = 100
shirts_count = 3
shirt_price = 15
dress_price = 35
money -= shirts_count * shirt_price
money -= dress_price
result = money
return result
|
Kaitlyn wants to break her personal record for most books read in a month. Her goal is to read an average of 2 books per day, given that there are 31 days in the month. Liam's muffin recipe makes 12 dozen muffins and requires 3 pounds of sugar. He only wants to bake 2 dozen muffins. How many pounds of sugar will he nee... | def solve() -> int:
kaitlyn_goal = 2 * 31
liam_muffins = 2 / 12
liam_sugar = liam_muffins * 3
result = liam_sugar
return result
|
A café purchased a bag of coffee beans for $50.00. The bag contains 2.5 lbs of coffee beans, and the café sells a cup of coffee for $2.00. If the café uses 0.17 lbs of coffee beans to make one cup of coffee, how many cups of coffee can the café make from one bag of coffee beans? How much profit does the café make from ... | def solve() -> int:
grams_per_lb = 453.592
cost_per_gram = 50 / (2.5*grams_per_lb)
coffee_per_cup = 0.17
cups_per_bag = 2.5 / coffee_per_cup
profit_per_cup = 2 - (coffee_per_cup * cost_per_gram)
profit_per_bag = cups_per_bag * profit_per_cup
result = profit_per_bag
... |
Student: If the average temperature of a four-day period is 81 degrees, and the temperatures on the first day and the fourth day were 86 and 75, respectively, what was the average temperature of the two middle days? | def solve() -> int:
avg_temp = 81
temp_1 = 86
temp_4 = 75
total_temp = avg_temp * 4 - temp_1 - temp_4
middle_days_avg_temp = total_temp / 2
result = middle_days_avg_temp
return result
|
A rectangular garden is 12 meters long and 8 meters wide. If a square flower bed with a side length of 2 meters is placed in the center of the garden, what is the area of the remaining garden? | def solve() -> int:
garden_area = 12*8
flowerbed_area = 2*2
remaining_area = garden_area - flowerbed_area
result = remaining_area
return result
|
Student: Sally bought a dress for $50 and sold it for 20% profit. How much money did Sally earn from the sale? | def solve() -> int:
cost = 50
profit_percent = 0.2
selling_price = cost + cost * profit_percent
profit = selling_price - cost
result = profit
return result
|
A right triangle has base of length 3 and height of length 4. What is the length of the hypotenuse? | def solve() -> int:
base = 3
height = 4
result = "The hypotenuse of the triangle is " + str((base**2 + height**2)**0.5)
return result
|
A train is 480 meters long and it can cross a bridge in 90 seconds. If the speed of the train is 54 km/hr, how long is the bridge? | def solve() -> int:
speed_of_train = 54/3.6
distance_of_train = 480
time_taken = 90
total_distance = speed_of_train*time_taken
length_of_bridge = total_distance - distance_of_train
result = length_of_bridge
return result
|
A room is 12 feet long and 8 feet wide. If the room is to be tiled with 1-foot tiles, how many tiles are needed to cover the floor of the room? | def solve() -> int:
room_length = 12
room_width = 8
tile_side_length = 1
area_of_room = room_length * room_width
num_tiles = area_of_room / (tile_side_length**2)
result = num_tiles
return result
|
A farmer has 1350 chickens and 450 ducks on his farm. He sells eggs to a local market every week. Each chicken lays 5 eggs per week and each duck lays 3 eggs per week. The market pays him 0.2 dollars for each chicken egg and 0.3 dollars for each duck egg. How much money does the farmer earn from selling eggs in a week? | def solve() -> int:
chickens = 1350
ducks = 450
chicken_eggs = 5
duck_eggs = 3
total_eggs = chickens * chicken_eggs + ducks * duck_eggs
money = chickens * chicken_eggs * 0.2 + ducks * duck_eggs * 0.3
result = money
return result
|
arah bought 9 bottles of shampoo and 8 bottles of conditioner. Each bottle of shampoo cost $4.50, and each bottle of conditioner cost $3.50. Calculate the total cost of the purchases in dollars. | def solve() -> int:
num_shampoo = 9
num_conditioner = 8
cost_shampoo = 4.50 * num_shampoo
cost_conditioner = 3.50 * num_conditioner
total_cost = cost_shampoo + cost_conditioner
result = total_cost
return result
|
Jennette scored 7 points in the basketball game while Cassidy scored 17 points. How many more points did Cassidy score than Jennette? | def solve() -> int:
jennette_points = 7
cassidy_points = 17
difference = cassidy_points - jennette_points
result = difference
return result
|
Mike wants to build a model rocket with his friends. He has $200 to spend. He buys an engine for $80, fins for $30, and a launch pad for $40. He plans to use the rest of the money to buy helium for the balloon attached to the rocket. The helium costs $1.10 per ounce. For every ounce he buys, the balloon can rise 100 me... | def solve() -> int:
money = 200
engine_cost = 80
fins_cost = 30
launch_pad_cost = 40
remaining_money = money - engine_cost - fins_cost - launch_pad_cost
helium_cost_per_ounce = 1.10
helium_ounces = remaining_money / helium_cost_per_ounce
balloon_height = helium_ounces * 100
... |
If Dan can run a mile in 8 minutes, and today he ran for 30 minutes straight, but then took a 5-minute break and continued running for another 20 minutes before being asked to redo the last 2 minutes of his run. After that, he ran for another 15 minutes. How many miles did he start running with if he completed 5 miles ... | def solve() -> int:
time_without_breaks = 30 + 20 + 15 + 2
distance_without_breaks = time_without_breaks / 8
distance_during_break = 0
total_distance = distance_without_breaks + distance_during_break
distance_started_with = 5 - total_distance
result = distance_started_wi... |
Jake and Olivia were counting stars. On the first night, Jake counted eight stars, which was four more than Olivia. On the second night, Jake counted six stars less than Olivia who counted twelve stars. How many stars did Jake and Olivia count during these two nights? | def solve() -> int:
jake_night1 = 8
olivia_night1 = 8 - 4
olivia_night2 = 12
jake_night2 = 12 - 6
jake_total = jake_night1 + jake_night2
olivia_total = olivia_night1 + olivia_night2
result = 'Jake counted'+ str(jake_total) +'stars and Olivia counted'+ str(olivia_total) +'stars... |
Samantha is 6 years old, and her sister is 12 years old. How long ago was Samantha half her sister's age? | def solve() -> int:
samantha_age = 6
sister_age = 12
years_ago = sister_age - samantha_age
half_sister_age = sister_age / 2
result = years_ago - half_sister_age
return result
|
The average age of a family of 5 is 30 years. If the father's age is 50, what is the average age of the rest of the family? | def solve() -> int:
total_family_members = 5
father_age = 50
total_age = total_family_members * 30
remaining_age = total_age - father_age
remaining_members = total_family_members - 1
average_age = remaining_age / remaining_members
result = average_age
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.