question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Peter has 5 more stickers than his friend Ethan. Together they have 17 stickers. How many stickers does Ethan have? | def solve() -> int:
ethan_stickers = (17 - 5) / 2
result = ethan_stickers
return result
|
If 30% of the students in the prom arrived in limousines, and there were 2 limousines in total, how many students were there in total? | def solve() -> int:
limo_count = 2
limo_ratio = 0.3
total_students = limo_count / limo_ratio
result = total_students
return result
|
The Adventure Tours company organized 20 trips and scored a total of 6000 points. In the championship competition, they scored 1 point less than a fifteenth of their total points in the previous trips. Their opponent won by a margin of 12 points. How many points did the opposing company score? | def solve() -> int:
trips = 20
total_points = 6000
points_per_trip = total_points / trips
opponent_points = (points_per_trip / 15) - 1
opponent_total_points = total_points + 12 + opponent_points
result = opponent_total_points
return result
|
A baker made some cupcakes that cost $2, $3, and $4 per dozen. He had $5 left from his last sale and earned $50 from selling some bread. How much money remains in his earnings after making the cupcakes? | def solve() -> int:
dozen1 = 2
dozen2 = 3
dozen3 = 4
last_sale = 5
bread_sale = 50
total_cost = dozen1 + dozen2 + dozen3
remaining = bread_sale + last_sale - total_cost
result = remaining
return result
|
A rectangle has a length of 12 cm and a width of 8 cm. What is the perimeter of the rectangle? | def solve() -> int:
length = 12
width = 8
perimeter = 2*(length + width)
result = perimeter
return result
|
A science experiment requires 16 test subjects and 4 liters of solution. How much solution would each test subject require? | def solve() -> int:
test_subjects = 16
solution_liters = 4
solution_per_subject = solution_liters / test_subjects
result = solution_per_subject
return result
|
A singer performed a concert and received $500 in tips. She kept 1/3 of the tips and divided the rest equally between her 4 bandmates. The drummer received $40 while the bassist received half as much. How much money did the second guitarist receive? | def solve() -> int:
tips = 500
singer_tips = tips / 3
band_tips = tips - singer_tips
each_bandmate_tips = band_tips / 4
drummer_tips = 40
bassist_tips = drummer_tips / 2
second_guitarist_tips = each_bandmate_tips - drummer_tips - bassist_tips
result = s... |
He estimates that each guest will consume 2 bags of chips and 3 cans of soda. He has 15 guests and a budget of $50. The chips cost $1.50 per bag and the soda costs $0.80 per can. How much money will he have left after buying the snacks and drinks? | def solve() -> int:
guests = 15
budget = 50
cost_of_chips = 1.50
cost_of_soda = 0.80
total_cost_of_chips = guests * 2 * cost_of_chips
total_cost_of_soda = guests * 3 * cost_of_soda
total_cost_of_snacks_and_drinks = total_cost_of_chips + total_cost_of_soda
money_left =... |
ve has 20 apples in his bag. He gave away 3 apples and now has one third of the remaining apples. How many apples does Steve have left? | def solve() -> int:
total_apples = 20
apples_given = 3
p1 = total_apples - apples_given
p2 = p1/3
apples_left = p1 - p2
result = apples_left
return result
|
Taylor has 17 baseball cards and she wants to divide them evenly among 5 of her friends. How many cards will each person receive? | def solve() -> int:
baseball_cards = 17
friends = 5
cards_per_person = baseball_cards / friends
result = 3.4
return result
|
A recipe calls for 1/2 pound of chocolate chips. You only have a 10-ounce bag of chocolate chips, how many ounces should you use? | def solve() -> int:
required_chips = 0.5
bag_size = 10
use_amount = required_chips * 16
bag_percent = use_amount / bag_size * 100
use_ounces = bag_percent / 100 * bag_size
result = use_ounces
return result
|
A box of cookies has 24 cookies divided equally among 8 people. How many cookies does each person receive? | def solve() -> int:
num_cookies = 24
num_people = 8
cookies_per_person = num_cookies // num_people
result = cookies_per_person
return result
|
The bakery sells banana and blueberry muffins. They sell 30 banana muffins that each weigh 200g and 45 blueberry muffins that each weigh 150g. What is the total weight of muffins sold by the bakery? | def solve() -> int:
total_banana_weight = 30 * 200
total_blueberry_weight = 45 * 150
total_weight = total_banana_weight + total_blueberry_weight
result = total_weight
return result
|
John's family has six members. On average, they eat a total of 60 apples a week. The first member eats an average of 5 apples a day. How many apples a day does the other five members eat on average? | def solve() -> int:
member_1_apples_per_day = 5
total_apples_per_week = 60
member_2_apple_per_day = total_apples_per_week - (7*member_1_apples_per_day)
member_2_literal_average_per_day = member_2_apple_per_day / 5
result = member_2_literal_average_per_day
return result
|
In a class of 30 students, there were twice as many girls as boys. Each student was given 2 pencils and a box of pencils containing 20 pencils is priced at $3 per box. How much money was spent on pencils for the class? | def solve() -> int:
total_students = 30
num_boys = total_students / 3
num_girls = 2 * num_boys
total_pencils = total_students * 2
num_boxes = total_pencils / 20
cost_per_box = 3
total_cost = num_boxes * cost_per_box
result = total_cost
return result... |
Mike is running a bakery and he has to bake 400 cookies. After 2 hours, he has baked 1/5 of the cookies. After another 2 hours, he has baked 70 percent of the remaining cookies. How many more cookies does he need to bake? | def solve() -> int:
cookies_total = 400
cookies_baked_first = cookies_total * 1/5
cookies_remaining_first = cookies_total - cookies_baked_first
cookies_baked_second = cookies_remaining_first * 0.7
cookies_remaining_second = cookies_remaining_first - cookies_baked_second
cookies_needed = cookies_... |
A piece of land costs $2,800 per acre. If John wants to purchase 5 acres, how much will he have to pay? | def solve() -> int:
cost_per_acre = 2800
num_acres = 5
total_cost = cost_per_acre * num_acres
result = total_cost
return result
|
Tina wants to buy a new dress that costs $120. She has a coupon that gives her 15% off the original price. How much does she have to pay for the dress after applying the coupon? | def solve() -> int:
original_price = 120
discount = 15
final_price = original_price * (1 - discount/100)
result = round(final_price, 2)
return result
|
A rectangle has a length of 8 and a width of 6. What is the perimeter of the rectangle? | def solve() -> int:
length = 8
width = 6
perimeter = 2 * (length + width)
result = perimeter
return result
|
A movie theater has 200 seats. If the seats are divided into 5 sections and each section has the same number of seats, how many seats are in each section? | def solve() -> int:
num_seats = 200
num_sections = 5
seats_per_section = num_seats/num_sections
result = seats_per_section
return result
|
Jennifer is ordering pizza for a party. The pizza costs $12 and she wants to order six pizzas. However, there is also a delivery fee of $5. What is the total cost of the pizza party? | def solve() -> int:
pizza_price = 12
number_of_pizzas = 6
delivery_fee = 5
subtotal = pizza_price * number_of_pizzas
total_price = subtotal + delivery_fee
result = total_price
return result
|
Sarah is driving to visit her family, which is 300 miles away. Her car can go 18 miles per gallon, and she has a 20-gallon gas tank. How many miles can she drive after reaching her family’s place without filling up her tank again? | def solve() -> int:
distance = 300
miles_per_gallon = 18
gas_tank_capacity = 20
miles_driven = gas_tank_capacity * miles_per_gallon
remaining_miles = distance - miles_driven
result = remaining_miles
return result
|
Emma's cell phone plan charges a $10 monthly fee, plus $0.05 for each text message and $0.10 for each minute of talk time. If her bill for the month was $25 and she sent 200 texts, how many minutes of talk time did she use? | def solve() -> int:
monthly_fee = 10
text_fee = 0.05
talk_fee = 0.1
total_bill = 25
total_text_fee = 200 * text_fee
remaining_money = total_bill - monthly_fee - total_text_fee
result = remaining_money // talk_fee
return result
|
Student: Q10: A group of 8 people are going to a restaurant. The total bill comes to 211.50 dollars. They decide to split the cost evenly but two of them can not pay, how much money should each person pay now? | def solve() -> int:
total_bill = 211.50
num_people = 8
num_people_paying = 6
amount_each_person_should_pay = total_bill / num_people
amount_each_person_should_pay_now = amount_each_person_should_pay * num_people_paying
result = amount_each_person_should_pay_now
return result
|
Mike can drive a car at an average speed of 60 miles per hour. How far will Mike travel during a 3-hour drive? | def solve() -> int:
speed_mike = 60
time_mike = 3
distance_mike = speed_mike*time_mike
result = distance_mike
return result
|
The city park has 50 benches and each bench needs 6 new planks. The supplier brought 200 planks less than the required amount. If they only installed the planks up to where they'd be finished, how many benches have new planks? | def solve() -> int:
benches = 50
planks_per_bench = 6
total_planks_needed = benches * planks_per_bench
planks_supplied = total_planks_needed - 200
benches_with_new_planks = planks_supplied // planks_per_bench
result = benches_with_new_planks
return result
|
Jenna had 20 donuts. Samantha gave her 50% of her 40 donuts. How many donuts does Jenna have now? | def solve() -> int:
jenna_donuts = 20
samantha_donuts = 40
samantha_donuts_given = samantha_donuts * 0.5
jenna_donuts += samantha_donuts_given
result = jenna_donuts
return result
|
During a sale, a store offers a 10% discount on all items. If a customer bought 3 items with original prices of $25, $35, and $40, what was their total bill, including tax at 7%? | def solve() -> int:
original_prices = [25, 35, 40]
total = sum(original_prices)
discounted_total = total * 0.9
taxed_total = discounted_total * 1.07
result = round(taxed_total, 2)
return result
|
A triangle has a base of 10 cm and a height of 8 cm. What is the area of the triangle? | def solve() -> int:
base = 10
height = 8
area = 0.5 * base * height
result = area
return result
|
When she was younger, Mia could hold her breath for 1 minute. Now, as an adult, she can hold her breath for 1 and a half minutes. How many more seconds can she hold her breath? | def solve() -> int:
young_mia = 60
adult_mia = 90
difference = adult_mia - young_mia
difference_seconds = difference * 60
result = difference_seconds
return result
|
John has 5 apples and 3 oranges. If he gives 2 apples to Mark and 1 orange to Lisa, how many fruits does John have left? | def solve() -> int:
apple = 5
orange = 3
apple_given = 2
orange_given = 1
total_fruit = apple + orange
total_fruit_after_giving = total_fruit - apple_given - orange_given
result = total_fruit_after_giving
return result
|
Student: A car traveled 240 miles in 4 hours. It traveled the first 80 miles at a speed of 40 miles per hour. What was its average speed for the remaining part of the trip? | def solve() -> int:
distance = 240
time = 4
speed1 = 40
distance_remaining = distance - 80
time_remaining = time - (80/speed1)
speed2 = distance_remaining / time_remaining
result = speed2
return result
|
Tom needs to paint a fence that is 10 feet long. He needs to paint every other fence post and he has only 4 hours to do it. If he takes 15 seconds to paint each post, how much of the fence will Tom be able to finish painting within the 4 hour time limit? | def solve() -> int:
total_time = 4*60*60
time_for_each_post = 15
fence_length = 10
total_posts = fence_length*2
posts_able_to_finish = total_time//time_for_each_post
fence_able_to_finish = posts_able_to_finish //2
result = fence_able_to_finish
return result
|
A wire of length 220 inches is cut into two pieces, one piece is twice as long as the other. What is the length of the shorter piece? | def solve() -> int:
total_length = 220
ratio = 2
longer_piece_length = total_length / (1 + ratio)
shorter_piece_length = total_length - longer_piece_length
result = shorter_piece_length
return result
|
At Blooming Blueberry Farm, visitors pay $5 to enter the blueberry fields and pick as many blueberries as they want. The standard price of a pound of blueberries is $12. Emma, Liam, and Olivia paid $54 for their harvest. How many pounds of blueberries did they pick? | def solve() -> int:
entrance_fee = 5
price_per_pound = 12
total_paid = 54
pounds_picked = total_paid - entrance_fee
pounds_picked /= price_per_pound
result = pounds_picked
return result
|
A car's gas tank can hold 12 gallons of gas and gets an average of 25 miles per gallon. If the car drives 300 miles, how many gallons of gas will it use? | def solve() -> int:
used_gas = 300 / 25
result = used_gas
return result
|
A recipe calls for 2 cups of sugar to make 24 cookies. How much sugar is needed to make 60 cookies? | def solve() -> int:
cookies_needed = 60
ratio = cookies_needed / 24
sugar_needed = ratio * 2
result = sugar_needed
return result
|
A pizza restaurant offers a pizza slice for $2 or a medium pizza for $12. Each medium pizza comes with 8 slices. If Isabel and her friends want to order 16 pizza slices, which option is cheaper for them? | def solve() -> int:
number_of_slices_needed = 16
slice_cost = 2
medium_pizza_cost = 12
slices_per_medium_pizza = 8
cost_of_slices = number_of_slices_needed * slice_cost
number_of_medium_pizzas_needed = (number_of_slices_needed // slices_per_medium_pizza) + 1
cost_of_medium_pizzas = number_... |
Student: A basketball team won 4 out of their last 6 games. What percentage of their games did they win? | def solve() -> int:
games_won = 4
games_total = 6
ratio = games_won / games_total
percentage = round(ratio * 100, 2)
result = percentage
return result
|
A bookstore is having a sale where everything is 25% off. A book originally costs $20 but after the discount it becomes Out of Stock. What is the new price? | def solve() -> int:
original_price = 20
discount = original_price*0.25
new_price = original_price-discount
result = new_price
return result
|
Ryan drives to the beach every weekend, which is 120 miles from his house. He averages 60 miles per hour on the highway and drives 20 miles per hour on the local roads. How long does his trip take? | def solve() -> int:
beach_distance = 120
highway_speed = 60
local_speed = 20
highway_time = beach_distance / highway_speed
local_time = beach_distance / local_speed - highway_time
total_time = highway_time + local_time
result = total_time
return result
|
Sophia is preparing a marinade and adds 1/2 cup of soy sauce instead of 1/2 tablespoon. Every day, she takes out 1/4 cup of the salty mixture and replaces it with 1/4 cup of oil and vinegar dressing. The original mixture was 4 cups. After 3 days, what is the percentage of the mixture that is still soy sauce? | def solve() -> int:
original_mixture = 4
soy_sauce = 0.5
days = 3
for day in range(days):
soy_sauce = soy_sauce - (soy_sauce * 0.25) + (0.25 * 0.5)
percentage_soy_sauce = (soy_sauce / original_mixture) * 100
result = percentage_soy_sauce
return result
|
There are 40 employees in a company, and they are sharing a box of pens. If each employee takes 4 pens, there will still be a fifth of the original amount left. What is the initial number of pens in the box? | def solve() -> int:
employees = 40
pens_per_employee = 4
leftover_fraction = 1/5
total_pens = employees * pens_per_employee
initial_pens = total_pens / (1 - leftover_fraction)
result = initial_pens
return result
|
If a family of 5 went to a zoo and admission was $12 per adult and $8 per child, and 2 adults and 3 children went, how much did they spend on admission? | def solve() -> int:
cost_of_adults = 2*12
cost_of_children = 3*8
total_cost = cost_of_adults + cost_of_children
result = total_cost
return result
|
If Sarah makes $6500 a month and her rent is $2000, her car payment is $900, her utilities cost 1/4 of her car payment, and she spends $350 on groceries, how much money will she have left over? If she wants to put aside 30% of what is left into savings, how much money will be left for her other expenses? | def solve() -> int:
monthly_income = 6500
rent = 2000
car_payment = 900
utilities = car_payment / 4
groceries = 350
total_expenses = rent + car_payment + utilities + groceries
money_left = monthly_income - total_expenses
savings = money_left * 0.3
remaining_money = money_left - ... |
A train travels at a speed of 60 mph. How long will it take for the train to travel 420 miles? | def solve() -> int:
speed = 60
distance = 420
time = distance / speed
result = time
return result
|
Student: Grace has 36 stickers. She puts them into 6 envelopes. She puts the same number in each envelope. She then mails three envelopes to her friends. How many stickers does Grace have left? | def solve() -> int:
stickers = 36
envelopes = 6
stickers_per_envelope = stickers // envelopes
envelopes_sent = 3
stickers_left = stickers - (envelopes_sent * stickers_per_envelope)
result = stickers_left
return result
|
Ryan is planning for a trip and needs to buy 3 plane tickets. Each ticket costs $200 before tax. If the tax rate is 10.5%, how much will the tickets cost in total? | def solve() -> int:
tax_rate = 10.5
cost = 200
n_tickets = 3
tax = cost * n_tickets * tax_rate/100
total = cost * n_tickets + tax
result = total
return result
|
Robert wants to exercise for a total of 15 hours this week. As of Thursday, he has exercised for 9 hours. How many hours per day does Robert need to exercise for the rest of the week to meet his weekly goal? A zoo charges $15 for admission. Lisa buys 4 souvenirs for her 3 siblings. She also buys 8 snacks for herself. S... | def solve() -> int:
total_hours = 15
hours_exercised = 9
hours_left = total_hours - hours_exercised
days_left = 7 - 4
hours_per_day = hours_left / days_left
result = hours_per_day
admission_cost = 15
num_siblings = 3
num_souvenirs = 4
souvenir_cost = admission_cost / num_si... |
Emma can fill a bucket with water using 8 scoops from a jug. She has 40 scoops of water in her jug. If she fills 3 buckets, how many scoops of water does she have left in her jug? | def solve() -> int:
scoops_used = 3 * 8
scoops_left = 40 - scoops_used
result = scoops_left
return result
|
In a sports event, 2/7 of the total athletes are runners. If there are 126 swimmers, and the event has 504 athletes, calculate the number of athletes who are runners. | def solve() -> int:
total_athletes = 504
swimmers = 126
runners = (2/7) * total_athletes
result = runners - swimmers
return result
|
Emily sells sandwiches for $4.50 each. If a slice of bread costs $0.25, a slice of turkey costs $0.75, and a slice of cheese costs $0.50, how many cents does a sandwich cost Emily to make? | def solve() -> int:
bread_cost = 25
turkey_cost = 75
cheese_cost = 50
sandwich_cost = bread_cost + turkey_cost + cheese_cost
sandwich_cost_in_cents = sandwich_cost / 100
price_per_sandwich = 4.50
cost_per_sandwich = sandwich_cost_in_cents * price_per_sandwich
result = int(cost_per_sandwi... |
Oliver, Sophia and Ava picked some flowers for their mom. Oliver picked 20, Sophia picked 14. If they gathered 55 flowers in total and Ava gave a tenth of her collection to her sister, how many flowers do they have left now? | def solve() -> int:
oliver = 20
sophia = 14
total = 55
ava = total - oliver - sophia
ava_gave = ava / 10
flowers_left = total - ava_gave
result = flowers_left
return result
|
Student: Sarah works 20 hours on Monday, 25 hours on Tuesday and 30 hours on Wednesday. With 25 hours left to work in the week, how much money does Sarah make if she is paid $17 per hour? | def solve() -> int:
hours_monday = 20
hours_tuesday = 25
hours_wednesday = 30
hours_left = 25
pay_rate = 17
total_hours = hours_monday + hours_tuesday + hours_wednesday + hours_left
total_money = total_hours * pay_rate
result = total_money
return result
|
Bob is collecting coins. He has 8 quarters, 12 dimes, 16 nickels, and 20 pennies. He wants to exchange his coins for bills at a bank. The bank gives him $1 for every 4 quarters, $1 for every 10 dimes, $1 for every 20 nickels, and $1 for every 100 pennies. How much money does Bob get from the bank? | def solve() -> int:
quarters = 8
dimes = 12
nickels = 16
pennies = 20
quarters_per_dollar = 4
dimes_per_dollar = 10
nickels_per_dollar = 20
pennies_per_dollar = 100
dollars_from_quarters = quarters // quarters_per_dollar
dollars_from_dimes = dimes // dimes_per_dollar
dol... |
John put $10 in his piggy bank every week for 4 weeks. If he had $40 afterwards, how much did he have before he started putting in the money? | def solve() -> int:
total_saved = 4*10
john_started = total_saved + 40
result = john_started
return result
|
Janet has collected 36 stones. She needs to divide them into 4 equal piles. How many stones in each pile? | def solve() -> int:
result = 0
num_of_stones = 36
num_of_piles = 4
stones_per_pile = num_of_stones / num_of_piles
result = stones_per_pile
return result
|
Josh bought 8 books and 12 magazines at a bookstore. Each book cost $12.99 and each magazine cost $4.99. He used a 10% off coupon for the books and a 20% off coupon for the magazines. How much did he save by using the coupons? | def solve() -> int:
books = 8
book_price = 12.99
magazines = 12
magazine_price = 4.99
book_discount = 0.1
magazine_discount = 0.2
book_cost = books * book_price
magazine_cost = magazines * magazine_price
total_cost = book_cost + magazine_cost
book_cost_discounted =... |
Sam is a runner and he wants to run a 10k race. He can run 5k in 20 minutes. If he keeps up the same pace, how long will it take him to run the 10k race? | def solve() -> int:
current_k = 5
current_minutes = 20
new_k = 10
new_minutes = (current_minutes/current_k)*new_k
result = new_minutes
return result
|
The profit of a company increased by 25%. If the profit was previously $10,000. What is the new profit of the company? | def solve() -> int:
previous_profit = 10000
percent_increase = 0.25
new_profit = previous_profit*(1+percent_increase)
result = new_profit
return result
|
Tyler has a basketball with 4 flat spots and 6 lumps. After pumping it up, there are 2 flat spots and 10 lumps. How many spots and lumps were added? | def solve() -> int:
initial_flat_spots = 4
initial_lumps = 6
final_flat_spots = 2
final_lumps = 10
spots_added = final_flat_spots - initial_flat_spots
lumps_added = final_lumps - initial_lumps
result = spots_added, lumps_added
return result
|
A marathon is 26.2 miles long. If a runner has completed 18.7 miles, how many more miles do they have left? | def solve() -> int:
marathon_distance = 26.2
completed_distance = 18.7
remaining_distance = marathon_distance - completed_distance
result = remaining_distance
return result
|
If a shipping company can deliver a package to a nearby state in 2 days and a private courier can deliver the same package in 5 fewer hours than the shipping company, how long does it take the courier to deliver the package? | def solve() -> int:
shipping_time = 2 * 24
courier_time = shipping_time - 5
result = courier_time
return result
|
Mary and John start baking cupcakes at the same time. Mary can bake 12 cupcakes in 30 minutes while John can bake 18 cupcakes in 45 minutes. If they both have to make 120 cupcakes, how many minutes later will John finish compared to Mary? | def solve() -> int:
mary_cupcakes = 120
john_cupcakes = 120
mary_time = 30
john_time = 45
mary_rate = mary_cupcakes / mary_time
john_rate = john_cupcakes / john_time
time_difference = john_time - mary_time
john_finish_time = mary_time + time_difference
result... |
Student: Hilda was looking through a list of tools and came across some vintage tools. She found that the number of screwdrivers was 10 fewer than the number of drill bits. If she counted 18 screwdrivers, how many drill bits were there? | def solve() -> int:
screwdrivers = 18
drill_bits = None
drill_bits = screwdrivers + 10
result = drill_bits
return result
|
A store sells 5 apples for every 3 oranges. If the store sold 80 pieces of fruit, how many apples were sold? | def solve() -> int:
total_fruits_sold = 80
apple_ratio = 5/8
apples_sold = apple_ratio * total_fruits_sold
result = apples_sold
return result
|
A hardware store sold 600 nails in a month. In the first week, 10 bags of nails were sold. In the second week, four times as many nails were sold in each bag. There was an equal number of nails sold in the third and fourth week. How many nails were sold in each bag in the third and fourth week? | def solve() -> int:
nails_sold = 600
week1 = 10
week2 = week1 * 4
week3 = (nails_sold - week1 - week2) / 2
week4 = week3
result = week3
return result
|
Eight years ago, Max was only one third as old as Ava. If Ava is currently four times 14 years old, how old is Max? | def solve() -> int:
ava_current_age = 4 * 14
max_current_age = ava_current_age + 8 * 3
result = max_current_age
return result
|
There are 4 banks in a city. To open an account in each bank, Paul has set up a budget of $65. Each account has a setup fee of 25%. How much did Paul budget towards the setup fee of each account? | def solve() -> int:
number_of_banks = 4
total_budget = 65
setup_fee = 0.25
setup_fee_tot = number_of_banks * total_budget * setup_fee
result = setup_fee_tot
return result
|
A yoga class costs $15 for a single session, while a package of 10 sessions is priced at $120. How much will you save, in dollars, if you purchase the package instead of buying 10 individual classes? | def solve() -> int:
single_session_cost = 15
package_cost = 120
sessions_in_package = 10
total_cost_of_individual_sessions = single_session_cost * sessions_in_package
cost_difference = total_cost_of_individual_sessions - package_cost
result = cost_difference
return result
|
If Daniel's daughters are quadruplets who are currently 8 years old, and four years ago, the sum of their ages equaled Daniel's age, what is Daniel's age now? | def solve() -> int:
daughters_age = 8
total_age_four_years_ago = daughters_age * 4
daniels_age_four_years_ago = total_age_four_years_ago
daniels_age = daniels_age_four_years_ago + 4
result = daniels_age
return result
|
Danny has a rectangular pool with length 30 feet, width 20 feet and depth 6 feet. One gallon of chlorine can treat 10,000 gallons of water. How many gallons of chlorine does Danny need to treat his pool? | def solve() -> int:
length = 30
width = 20
depth = 6
pool_volume = length * width * depth
chlorine_coverage = 10000
gallons_needed = pool_volume / chlorine_coverage
result = gallons_needed
return result
|
John went to a coffee shop with $20 and bought 2 cups of coffee. Then his colleague called him and asked him to buy six times as many cups as he already bought. Each cup cost $4. Finally, he also bought a donut for $3. How much money does John have remaining? | def solve() -> int:
money = 20
cups_bought = 2
cup_cost = 4
donut_cost = 3
total_cups_bought = cups_bought + (cups_bought * 6)
total_cost = (total_cups_bought * cup_cost) + donut_cost
remaining_money = money - total_cost
result = remaining_money
return result
|
``` Adam wants to buy a chair which costs $300. The shopkeeper offers him a 10% discount. How much does the chair cost after the discount? | def solve() -> int:
cost_chair = 300
discount_rate = 0.1
final_cost = cost_chair - (cost_chair * discount_rate)
result = final_cost
return result
|
Justin received 121 dollars as his summer bonus. He wants to buy a game that cost 99 dollars and a book that cost 15 dollars. How much money does Justin have left after buying the game and the book? | def solve() -> int:
justin_bonus = 121
game_price = 99
book_price = 15
justin_balance = justin_bonus - (game_price + book_price)
result = justin_balance
return result
|
Student: John needs an overall average of 85 in his Applied Mathematics course to receive a scholarship. He scored 90, 81 and 80 in three tests so far. What mark must he earn on the fourth and last test to qualify for the scholarship? | def solve() -> int:
test1 = 90
test2 = 81
test3 = 80
overall_average = 85
sum_of_marks = test1 + test2 + test3
number_of_tests = 3
current_average = sum_of_marks / number_of_tests
fourth_test_mark = overall_average * (number_of_tests + 1) - sum_of_marks
result = fourth_test_mark
... |
Lily decided to sell her fairy figurine collection she's had since she was little. She sold her Tinker Bell figurine for $10. She got $5 for her Silvermist figurine and agreed to sell her $25 Fawn figurine at 15% off. She also sold her Rosetta figurine for $7. How much money did Lily make? | def solve() -> int:
tinker_bell_price = 10
silvermist_price = 5
fawn_price = 25
fawn_discount = 0.15
rosetta_price = 7
fawn_discount_amount = fawn_price * fawn_discount
fawn_sale_price = fawn_price - fawn_discount_amount
total_money = tinker_bell_price + silvermist_price + fawn... |
A rectangle has a length of 8 cm and a width of 4 cm. What is its area in square centimeters? | def solve() -> int:
length = 8
width = 4
area = length * width
result = area
return result
|
A store has a sale where everything is 40% off. If they normally sell a shirt for $25, how much is it during the sale? | def solve() -> int:
original_price = 25
percent_off = 40
discount = original_price * percent_off / 100
sale_price = original_price - discount
result = sale_price
return result
|
In a soccer game, 2/3 of the players are from the home team and the rest from the visiting team. If there are 27 visiting players, how many players are there in total? | def solve() -> int:
visiting_players = 27
home_players_ratio = 2/3
visiting_players_ratio = 1 - home_players_ratio
total_players = visiting_players / visiting_players_ratio
result = total_players
return result
|
Marla wants to buy some candy to put in her party bags. She has $36 to spend and each bag costs $3. How many party bags can she buy? | def solve() -> int:
total_money = 36
bag_cost = 3
number_of_bags = total_money//bag_cost
result = number_of_bags
return result
|
Student: There are six bags containing different numbers of candies. The average number of candies per bag is 21. If bag A has 12 candies, bag B has 25 candies, bag C has 19 candies, bag D has 24 candies, and bag E has 28 candies, how many candies are in bag F? | def solve() -> int:
bagA = 12
bagB = 25
bagC = 19
bagD = 24
bagE = 28
total_candies = bagA + bagB + bagC + bagD + bagE
average_candies = total_candies / 6
bagF = average_candies * 6 - total_candies
result = bagF
return result
|
Student: A kitchen floor needs to be painted. The kitchen is 20 meters long and 12 meters wide. How much paint will be needed to paint the floor if 1 liter of paint covers 10 square meters? | def solve() -> int:
length = 20
width = 12
area = length * width
paint_coverage = 10
amount_of_paint = area / paint_coverage
result = amount_of_paint
return result
|
-Some possible math topics are: addition, subtraction, multiplication, division, fractions, decimals, percentages, ratios, proportions, etc. -Example: Kim has six jars with seven marbles in each jar. She bought five more jars and put eight marbles in each of them. If she gives 52 marbles to her friends, how many marble... | def solve() -> int:
marbles_before = 6 * 7 + 5 * 8
marbles_after = marbles_before - 52
result = marbles_after
return result
|
Student: Alex wants to save $10,000 for a trip. He earns $400 per week. If he saves $200 every week, how many weeks will it take him to save enough money for the trip? | def solve() -> int:
target = 10000
income = 400
saving = 200
left = income - saving
weeks = target / saving
result = weeks
return result
|
Tyler is planning for his upcoming vacation. Each day of the vacation, he wants to budget $50 for food and drinks. Tyler is planning for a 5-day vacation. How much money does Tyler plan to budget for food in total for his vacation? | def solve() -> int:
totalcost = 5*50
result = totalcost
return result
|
Alex, Zoey, and Ben were swimming laps. Alex swam 12 more laps than Zoey. Zoey swam 30 laps. Ben swam 8 fewer laps than Alex. How many laps did they swim in total? | def solve() -> int:
zoey_laps = 30
alex_laps = zoey_laps + 12
ben_laps = alex_laps - 8
total_laps = zoey_laps + alex_laps + ben_laps
result = total_laps
return result
|
The teacher buys 50 tickets for the bus, which cost $5 each. She also buys 25 tickets for the zoo, which cost $12 each. How much money does the teacher spend in total? | def solve() -> int:
students = 25
bus_tickets = 50
zoo_tickets = 25
cost_of_bus_tickets = bus_tickets * 5
cost_of_zoo_tickets = zoo_tickets * 12
total_cost = cost_of_bus_tickets + cost_of_zoo_tickets
result = total_cost
return result
|
A group of 8 friends want to order pizzas for their movie night. They decide to get 4 large pizzas and 2 medium pizzas. A large pizza has 10 slices and costs $15. A medium pizza has 8 slices and costs $12. They also need to pay a 10% tip and a $5 delivery fee. How much will each person pay if they split the bill evenly... | def solve() -> int:
large_cost = 4 * 15
medium_cost = 2 * 12
pizza_cost = large_cost + medium_cost
tip = pizza_cost * 0.1
delivery = 5
extra_cost = tip + delivery
bill = pizza_cost + extra_cost
pay = bill / 8
result = pay
return result
|
A baker makes 120 muffins every day. He sells 80% of them at his shop and gives the remaining 20% to a charity. How many muffins does he give to the charity every day? | def solve() -> int:
muffins_made = 120
muffins_sold = 0.8
muffins_given = 0.2
muffins_given = muffins_made * muffins_given
result = round(muffins_given)
return result
|
``` Tim has 500 collectible cards. He receives 50 more cards on his birthday. Tim then decides to give 10 cards to each of his 25 friends. How many cards does Tim have left? | def solve() -> int:
cards = 500
birthday_gift = 50
friends = 25
cards_given = friends * 10
remaining = cards + birthday_gift - cards_given
result = remaining
return result
|
If a farm has 960 bales of hay and the farmer has 10 horses, how many bales of hay left will the farmer have by the end of October if he feeds 5 horses per day using 2 bales of hay for each horse? | def solve() -> int:
bales_of_hay = 960
horses = 10
horses_per_day = 5
hay_per_horse_per_day = 2
days_in_Oct = 31
hay_needed_per_day = horses_per_day * hay_per_horse_per_day
total_hay_needed = hay_needed_per_day * days_in_Oct
left_hay_bales = bales_of_hay - total_hay_needed... |
Chloe runs 30% faster than her brother Jack. If Jack can run a mile in 10 minutes, how long will it take Chloe to run a mile? | def solve() -> int:
jack_speed = 1/10
chloe_speed = jack_speed * 1.3
chloe_time = 1/chloe_speed * 60
result = chloe_time
return result
|
Tim sells shirts for $20 each and hats for $10 each. If he sells 5 shirts and 3 hats, how much money did he make? | def solve() -> int:
num_shirts = 5
num_hats = 3
price_per_shirt = 20
price_per_hat = 10
total_sales = (num_shirts * price_per_shirt) + (num_hats * price_per_hat)
result = total_sales
return result
|
John bought 5 bottles of juice and each bottle contained 1 liter of juice. How many liters of juice did John bought in total? | def solve() -> int:
bottles = 5
amount_per_bottle = 1
total_amount = bottles * amount_per_bottle
result = total_amount
return result
|
Bob is a baker who sells cupcakes. He makes 100 cupcakes every day and sells them for $2 each. His ingredients cost him $0.5 per cupcake and his electricity bill is $20 per day. How much profit does he make in a month (assume 30 days)? | def solve() -> int:
cost_per_cupcake = 0.5
electricity_bill = 20
revenue_per_cupcake = 2
cupcakes_per_day = 100
days_per_month = 30
total_cost = (cost_per_cupcake * cupcakes_per_day + electricity_bill) * days_per_month
total_revenue = revenue_per_cupcake * cupcakes_per_day * days_per_mo... |
A bag of apples weighs 3 pounds and costs $3.00. A bag of oranges weighs 2 pounds and costs $2.00. If Alice wants to buy at least 12 pounds of fruit and spend at most $10.00, how many bags of each fruit can she buy at most? | def solve() -> int:
apple_weight = 3
apple_price = 3.00
orange_weight = 2
orange_price = 2.00
min_weight = 12
max_money = 10.00
max_apples = 0
max_oranges = 0
for i in range(0, 21):
for j in range(0, 31):
if i * apple_weight + j * orange_weight >= min_weight and i... |
A company estimates that they will sell 10000 units of a product at $30 per unit. If the company sets the selling price of $25 per unit, they will be selling 2000 units more. What will be the revenue of the company with the selling price of $25 per unit? | def solve() -> int:
original_selling_price = 30
number_of_units_sold = 10000
new_selling_price = 25
new_units_sold = 12000
original_revenue = original_selling_price*number_of_units_sold
new_revenue = new_selling_price*new_units_sold
result = new_revenue
return result
|
Mike spent $10 on 2 pizzas with a diameter of 12 inches each and $6 on a family size bag of chips. If the pizza price per square inch is $0.10 and he also has to pay a delivery fee of $3, how much did he spend in total? | def solve() -> int:
pizza_diameter = 12
pizza_quantity = 2
pizza_price = 0.10
chips_price = 6
delivery_fee = 3
pizza_radius = pizza_diameter / 2
pizza_area = pizza_radius ** 2 * 3.14
pizza_total_area = pizza_area * pizza_quantity
pizza_total_price = pizza_total_area * pizza_pric... |
Student: Lucas solves puzzles. He solved 5 puzzles on Thursday, 2.5 times more on Friday, and 40% less on Saturday than on Friday. How many puzzles did Lucas solve during these three days? | def solve() -> int:
thursday = 5
friday = 2.5 * thursday
saturday = friday * 0.6
total = thursday + friday + saturday
result = total
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.