question
stringlengths
11
2.89k
code
stringlengths
20
7.24k
Q4: Max and Lisa took a 25-item Chemistry exam with a bonus question. Max got 16 correct answers and the bonus question, while Lisa got 5 more correct answers than Max but missed the bonus question. The bonus question was worth 2 points. What is Lisa's score?
def solve() -> int: exam_items = 25 bonus_points = 2 max_correct = 16 max_score = max_correct + bonus_points lisa_score = (max_correct + 5) - bonus_points result = lisa_score return result
Alice is 6 years older than Bob, who is 10 years old. How old is Alice?
def solve() -> int: bob_age = 10 alice_age = bob_age + 6 result = alice_age return result
If Sarah solved 200 math problems, and Lisa solved six times fewer math problems than Sarah did, how many math problems did Lisa solve?
def solve() -> int: sarah_problems = 200 lisa_problems = sarah_problems / 6 result = lisa_problems return result
Jasmine and Alex went to the mall to buy clothes. Jasmine spent twice as much as Alex, and Alex spent $60. If Jasmine spent $X, what is the total amount spent by both of them?
def solve() -> int: X = 60 * 2 total = X + 60 result = total return result
If Thomas had $25 and saved $10 more than he spent, how much did he spend?
def solve() -> int: thomas_money = 25 saved_money = 10 spent_money = (thomas_money - saved_money) / 2 result = spent_money return result
A group of 15 friends went to a movie theater. The tickets cost $7.5 for adults and $5 for children. There were 9 adults and 6 children in the group. The theater also charged a 10% tax on the tickets. How much did the group pay in total for the tickets?
def solve() -> int: subtotal = 9*7.5 + 6*5 tax = subtotal*0.1 total = subtotal + tax result = total return result
Ethan works in a toy factory where he made 525 stuffed animals this month. He made 25 teddy bears for the boys and 50 unicorns for the girls. He made 12 more dogs than the bears for the boys. The CEO of the company also wanted 7 of each stuffed animal. How many cats did he make for the charity event on the last day?
def solve() -> int: teddy_bears = 25 unicorns = 50 dogs = teddy_bears + 12 total_stuffed_animals = teddy_bears + unicorns + dogs ceo_stuffed_animals = 7 * 3 cats = total_stuffed_animals - ceo_stuffed_animals result = cats return result
A company makes a revenue of $500000 per month. The company pays 15% in taxes and 30% in operational costs. The remaining amount is split equally between marketing and employee wages. Calculate the amount of money each employee is paid monthly.
def solve() -> int: taxes = 500000 * 0.15 remaining = 500000 - taxes op_costs = remaining * 0.3 employee_and_marketing = remaining - op_costs employee_wages = employee_and_marketing * 0.5 / 10 result = employee_wages return result
Michael and Sarah run a lawn mowing business. They charge $25 per hour of work. On Monday they worked for 4 hours. On Tuesday they worked for 6 hours. On Wednesday they counted their money and found they had $200 for all three days. How many hours did they work on Wednesday?
def solve() -> int: hourly_rate = 25 monday_hours = 4 tuesday_hours = 6 total_hours = monday_hours + tuesday_hours total_earnings = total_hours * hourly_rate wednesday_earnings = 200 - total_earnings wednesday_hours = wednesday_earnings / hourly_rate result = wednesday_hours ...
Student: The Mets bought 200 tickets to the game. People bought 130 tickets and the Mets gave away 32 tickets for free. How many tickets are left?
def solve() -> int: tickets_bought = 130 tickets_given_away = 32 total_tickets = 200 tickets_left = total_tickets - tickets_bought - tickets_given_away result = tickets_left return result
In a fashion show, Victoria and Denise each chose different colors for their outfits. Victoria chose 7 red dresses, 4 blue dresses, and 3 yellow dresses. Denise chose 8 red dresses, 6 blue dresses, and 7 yellow dresses. How many dresses did they choose altogether?
def solve() -> int: num_red_Victoria = 7 num_blue_Victoria = 4 num_yellow_Victoria = 3 num_red_Denise = 8 num_blue_Denise = 6 num_yellow_Denise = 7 total_dresses = num_red_Victoria + num_blue_Victoria + num_yellow_Victoria + num_red_Denise + num_blue_Denise + num_yellow_Denise ...
A marathon is 26.2 miles long. If a runner can run 7.5 miles per hour, how long will it take to finish the marathon?
def solve() -> int: marathon_distance = 26.2 speed = 7.5 time_needed = marathon_distance / speed result = time_needed return result
Lee is a music teacher and needs to record some music this week. On Monday, he records 10 songs that take him 3 hours to finish. On Tuesday, he records 4 songs that take him twice as long as on Monday, and on Wednesday he records 5 songs that take him only 1 hour to finish. Calculate the total time it takes Lee to reco...
def solve() -> int: time_mon = 3 songs_tue = 4 time_tue = 2 * time_mon songs_wed = 5 time_wed = 1 total_time = time_mon + time_tue + time_wed result = total_time return result
Student: Cornelie traded 40 cards with her friends. Each of her friends traded 30 cards with her. How many cards were traded altogether?
def solve() -> int: cards_traded_by_cornelie = 40 cards_traded_by_each_friend = 30 number_of_friends = 3 cards_traded_by_cornelie_and_friends = cards_traded_by_cornelie + number_of_friends * cards_traded_by_each_friend result = cards_traded_by_cornelie_and_friends return result
Student: Tara is baking cupcakes for a bake sale. She can bake 24 cupcakes in one batch. She needs to bake 120 cupcakes in total. How many batches of cupcakes does Tara need to bake?
def solve() -> int: total_cupcakes = 120 cupcakes_per_batch = 24 batches = total_cupcakes // cupcakes_per_batch result = batches return result
Alex lives in a town built on a grid system. He walks 5 blocks north, then six times as many blocks south. Then he turns around and walks 12 blocks east and three times as many blocks west in the direction of his home. If Alex can walk 4 blocks/minute, how long will it take him to get home?
def solve() -> int: north = 5 south = 6 * north east = 12 west = 3 * east total_distance = north + south + east + west time = total_distance / 4 result = time return result
Student: Ella has 70 cookies, but she baked some more and shared some with her classmates. She baked 3 batches of cookies, each containing 15 cookies, and gave 2 batches to her classmates. She also ate 5 cookies from the remaining batch. How many cookies did Ella have before baking and sharing?
def solve() -> int: cookies_before = 70 cookies_baked = 3 * 15 cookies_given = 2 * 15 cookies_eaten = 5 result = cookies_before + cookies_baked - cookies_given - cookies_eaten return result
Three coworkers split the cost of a gift for their manager equally. If the total cost is $90 and one coworker paid $30 in all, how much did each coworker contribute to the gift?
def solve() -> int: total_cost = 90 one_coworker_paid = 30 total_contribution = one_coworker_paid * 3 each_contribution = total_contribution / 3 result = each_contribution return result
Lucy is a gardener and has a rectangular plot of land that is 18 m by 12 m. She wants to plant roses along the perimeter of the plot and leave the rest of the area for vegetables. She has 60 rose plants and each one needs 50 cm of space. How much space does she have left for vegetables?
def solve() -> int: perimeter = (18 + 12) * 2 space_for_roses = 60 * 0.5 area = 18 * 12 space_for_vegetables = area - space_for_roses result = space_for_vegetables return result
arah recently got a new job and is making $18.20 an hour. She works 40 hours a week, and is paid weekly. How much does Sarah make in a month?
def solve() -> int: hourly_wage = 18.20 monthly_hours = 40 * 4 monthly_salary = hourly_wage * monthly_hours result = monthly_salary return result
Lila wants to make some cupcakes for her friends. She has a recipe that makes 12 cupcakes and requires 2 eggs, 1 cup of milk, and 0.5 cup of oil. She only has 3 eggs, 2 cups of milk, and 1.5 cups of oil in her pantry. How many cupcakes can she make with the ingredients she has?
def solve() -> int: recipe_cupcakes = 12 recipe_eggs = 2 recipe_milk = 1 recipe_oil = 0.5 pantry_eggs = 3 pantry_milk = 2 pantry_oil = 1.5 cupcakes_eggs = pantry_eggs // recipe_eggs * recipe_cupcakes cupcakes_milk = pantry_milk // recipe_milk * recipe_cupcakes cupcakes_oil =...
Question8: Jessica wants to buy a new smartphone. The phone itself is priced at $850 and an additional $35 for her phone case. She has $600 saved up. How much more money does Jessica need to purchase her new phone?
def solve() -> int: price_phone = 850 price_case = 35 savings = 600 total = price_phone + price_case more_money = total - savings result = more_money return result
Student: A company produces 1000 products per day and sells each product at $5. If the company produces products for 25 days, calculate the total amount of money the company earns.
def solve() -> int: products_per_day = 1000 price_per_product = 5 days = 25 total_products = products_per_day * days total_earnings = total_products * price_per_product result = total_earnings return result
Student: Marie has 10000 rubber bands. She wants to divide them into bags containing 500 rubber bands each. If she gives away 1/2 of the bags to a friend, how many rubber bands does Marie have left?
def solve() -> int: total_rubber_bands = 10000 rubber_bands_per_bag = 500 fraction_given_away = 1/2 bags = total_rubber_bands // rubber_bands_per_bag bags_given_away = bags * fraction_given_away bags_kept = bags - bags_given_away rubber_bands_left = bags_kept * rubber_bands_per_bag ...
- Anna paints 3 pictures a day for 6 days a week and 5 pictures a day for the other day. How many pictures does she paint in 3 weeks?
def solve() -> int: pictures_week = 3 * 6 + 5 pictures_3_weeks = pictures_week * 3 result = pictures_3_weeks return result
A music store sells violins for $245 each. If Tran bought 3 violins, how much did he pay?
def solve() -> int: cost = 3 * 245 result = cost return result
ophie bought 5 shirts, 4 pants and 6 pairs of shoes. Each shirt costs $20, each pant costs $35 and each pair of shoe costs $50. How much did Sophie spend in all?
def solve() -> int: shirt_cost = 20 pant_cost = 35 shoe_cost = 50 num_shirts = 5 num_pants = 4 num_shoes = 6 total_cost = (num_shirts * shirt_cost) + (num_pants * pant_cost) + (num_shoes * shoe_cost) result = total_cost return result
Lucy bought two dresses for $50 each and three pairs of shoes for $40 each. She paid with a $200 bill and gave a $20 tip to the cashier. How much change did she get back?
def solve() -> int: dress_cost = 50 number_of_dresses = 2 shoe_cost = 40 number_of_shoes = 3 total_cost = (dress_cost * number_of_dresses) + (shoe_cost * number_of_shoes) tip = 20 total_cost = total_cost + tip paid_amount = 200 change = paid_amount - total_cost result = change ...
A recipe calls for 3 cups of sugar to make 24 cookies. If Amy only wants to make 9 cookies, how many cups of sugar does she need?
def solve() -> int: cups_per_cookie = 3 / 24 sugar_needed = cups_per_cookie * 9 result = sugar_needed return result
A pen costs $1.25 and a pencil costs $0.75. If Mary wants to spend $5.25, how many pens and pencils can she buy if she buys an equal number of both?
def solve() -> int: total = 5.25 pen_price = 1.25 pencil_price = 0.75 quantity = total / (pen_price + pencil_price) / 2 result = quantity return result
Student: Tammy has 12 hats and 12 scarves. She wants to combine the hats and scarves to make sure that all the items are paired. What is the minimum number of items Tammy can pair if every item must have a partner?
def solve() -> int: hats = 12 scarves = 12 result = hats + scarves return result
Jack is baking cookies and realizes that for every cookie he bakes, he turns the oven knob 30 degrees. He wants to make sure he bakes at least 50 cookies. The knob has already turned 1620 degrees, how many more degrees does it need to turn to reach his goal?
def solve() -> int: cookies_baked = 50 degrees_per_cookie = 30 degrees_turned = 1620 total_degrees_needed = cookies_baked * degrees_per_cookie degrees_left_to_turn = total_degrees_needed - degrees_turned result = degrees_left_to_turn return result
Mr. Richards swims laps for 1 hour every other day. If he swims for five weeks, how many laps would he have swum in total if he swims in a 25-yard pool and swims at an average pace of 1 minute per lap?
def solve() -> int: laps_swum_daily = 60 / 1 days_in_week = 7 laps_swum_weekly = laps_swum_daily * 3 total_laps_swum = laps_swum_weekly * 5 lap_distance = 25 time_per_lap = 1 total_distance_swum = total_laps_swum * lap_distance total_time_swum = total_laps_swum * time_per_lap ...
At the pet store, there are 25 cats and 39 dogs. How many more dogs than cats are there?
def solve() -> int: cats = 25 dogs = 39 difference = dogs - cats result = difference return result
A jar contains 60 candy pieces - 40% are chocolate, 25% are fruity, and the rest are mint. How many mint candy pieces are in the jar?
def solve() -> int: total_candies = 60 chocolate = 0.4 * total_candies fruity = 0.25 * total_candies mint = total_candies - chocolate - fruity result = mint return result
In a school, 55% of students are boys and the rest are girls. If there are 990 students, how many are girls?
def solve() -> int: total_students = 990 boys_percent = 55 girls_percent = 100 - boys_percent girls = (girls_percent / 100) * total_students result = girls return result
A paint roller can paint 400 square feet with one dip. How many dips are needed to paint a room that is 10 feet by 15 feet?
def solve() -> int: room_area = 10 * 15 dips_required = room_area / 400 result = dips_required return result
If a shirt costs $25 and is on sale for 15% off, what is the sale price?
def solve() -> int: discount = 0.15 * 25 sale_price = 25 - discount result = sale_price return result
Lucas bought a container of water and drank half of it, then drank 4/7 of what was left. He drank a total of 80 ounces, how many ounces of water was in the container at the beginning?
def solve() -> int: total_Water = 80 half_water = 80/2 water_left = 40 - (40*4/7) result = water_left + total_Water return result
John has 3 iPhones and he sells one. How many iPhones does John now have?
def solve() -> int: amount_of_iphones = 3 iphone_sold = 1 result = amount_of_iphones - iphone_sold return result
Thomas had 5/6 of a jar of sand. If the jar had a total of 40 lbs of sand, how much sand did he have left?
def solve() -> int: total_sand = 40 remaining_sand = total_sand * (5/6) result = remaining_sand return result
Tammy has 375 stickers in total. In one album, she has 56 stickers and in the other, she has 70 stickers. If she has the same number of stickers in the other 3 albums, how many stickers does she have in each of the other 3 albums?
def solve() -> int: num_total_stickers = 375 num_album_1 = 56 num_album_2 = 70 num_stickers_other_albums = (num_total_stickers - num_album_1 - num_album_2) / 3 result = num_stickers_other_albums return result
arah wants to plant a garden in her backyard that is 30 feet long and 24 feet wide. How many square feet of area does the garden cover?
def solve() -> int: area_covered = 30 * 24 result = area_covered return result
The ratio of students who prefer tea to students who prefer coffee in a school is 2:3. If there are 150 students in the school, how many students prefer tea?
def solve() -> int: tea_ratio = 2 coffee_ratio = 3 total_students = 150 total_ratio = tea_ratio + coffee_ratio tea_fraction = tea_ratio / total_ratio tea_students = tea_fraction * total_students result = tea_students return result
Tom bought a jacket for $125, which is 20% less than what Bob bought the same jacket for. How much did Bob pay for his jacket?
def solve() -> int: jacket_price = 125 discount = 0.2 bob_price = jacket_price / (1 - discount) result = bob_price return result
The Titans played 70 games this season. They won 3/5 of their games and lost 2/7 of their games. How many games did they tie?
def solve() -> int: games_won = 70 * 3/5 games_lost = 70 * 2/7 games_tied = 70 - games_won - games_lost result = games_tied return result
Lisa is grocery shopping. She buys 15 oranges and eats 1/3 of them. She then takes home 1/2 of what's left. How many oranges does she take home?
def solve() -> int: oranges = 15 eaten = oranges * (1/3) left_at_store = oranges - eaten took_home = left_at_store * (1/2) result = took_home return result
What is the midpoint of the segment with endpoints at (1,3) and (7,-9)?
def solve() -> int: x1, y1 = 1, 3 x2, y2 = 7, -9 midpoint = ((x1 + x2)/2, (y1 + y2)/2) result = midpoint return result
Lucy has $18 in her wallet. She earns $6 for doing chores and $10 for babysitting. She spends $15 on a movie ticket and $5 on popcorn. How much money does she have left in her wallet?
def solve() -> int: wallet = 18 wallet = wallet + 6 + 10 wallet = wallet - 15 - 5 result = wallet return result
Jason has eight hats with a snapback and thirteen hats with a strapback. He buys three times as many hats with a visor as the number of snapback hats he has, then gives one strapback hat to his sister. How many hats does he have left? Sadie has 20 books to be divided equally among her 5 siblings. She realized that she ...
def solve() -> int: snapback_hats = 8 strapback_hats = 13 visor_hats = 3 * snapback_hats strapback_hats -= 1 total_hats = snapback_hats + strapback_hats + visor_hats total_books = 20 + 10 books_per_sibling = 6 num_siblings = total_books // books_per_sibling result = to...
Adam reads a book for 15 minutes every day and finishes it in 12 days. How long is the book in minutes?
def solve() -> int: reading_time = 15 days = 12 total_time = reading_time * days result = total_time return result
Samantha has 15 marbles and 9 pebbles. Samantha has thrice as many seashells as Tyler. Samantha has 2 less than double the number of rocks as Tyler. If Tyler has 5 seashells and 12 rocks, how many items does Samantha have in total?
def solve() -> int: samantha_marbles = 15 samantha_pebbles = 9 tyler_seashells = 5 tyler_rocks = 12 samantha_seashells = 3 * tyler_seashells samantha_rocks = 2 * tyler_rocks - 2 samantha_total_items = samantha_marbles + samantha_pebbles + samantha_seashells + samantha_rocks ...
A bookcase has 5 shelves and each shelf can hold 16 books. How many books can the bookcase hold in total?
def solve() -> int: result = 5 * 16 return result
Possible questions and programs are: Anna Lee sells 5 bracelets for $8 each and uses half of the money to buy a necklace. How much does the necklace cost?
def solve() -> int: total_money = 5 * 8 half_money = total_money / 2 necklace_cost = half_money result = necklace_cost return result
It takes 3 days to make a dress and 4 days to make a hat. How many days does it take to make 2 dresses and 3 hats?
def solve() -> int: dress_time = 3 hat_time = 4 dresses = 2 hats = 3 total_dress_time = dress_time*dresses total_hat_time = hat_time*hats total_time = total_dress_time + total_hat_time result = total_time return result
On a family picnic, Leo and his siblings shared some sandwiches. Leo ate three times as many sandwiches as Nina did. Nina ate two thirds as many sandwiches as Max did. If Max ate 18 sandwiches, how many did Leo eat?
def solve() -> int: Leo = 0 Nina = 0 Max = 18 Nina = Max * 2 / 3 Leo = Nina * 3 result = Leo return result
Student: Jody can make 40 cookies using 2 cups of sugar. How many cups of sugar does she need to make 80 cookies?
def solve() -> int: cookies = 80 cups_of_sugar = 2 cups_of_sugar_needed = (cookies / 40) * cups_of_sugar result = cups_of_sugar_needed return result
Student: Debbie bought 10 iced buns. Each bun cost $2.50. How much did she spend in total?
def solve() -> int: num_buns = 10 cost_per_bun = 2.50 total_cost = num_buns * cost_per_bun result = total_cost return result
Student: Alia is taking a survey and collecting data from 12 people. She has already collected data from 8 people. How many more people does she need to survey?
def solve() -> int: total_people = 12 people_surveyed = 8 people_left = total_people - people_surveyed result = people_left return result
A pizza shop sells 8-inch, 10-inch and 12-inch pizzas. The 8-inch pizza costs 5 dollars, the 10-inch pizza costs 7 dollars and the 12-inch pizza costs 9 dollars. If the shop sold 15 8-inch pizzas, 12 10-inch pizzas and 9 12-inch pizzas in one day, how much money did the shop make in total?
def solve() -> int: cost_8 = 15 * 5 cost_10 = 12 * 7 cost_12 = 9 * 9 money = cost_8 + cost_10 + cost_12 result = money return result
Student: A pack of 20 identical ice cream cones cost $10. What is the cost of 8 identical ice cream cones?
def solve() -> int: pack_size = 20 pack_cost = 10 cone_count = 8 cost_per_cone = pack_cost / pack_size total_cost = cone_count * cost_per_cone result = total_cost return result
Student: A grocery store is having a 20% off sale. If a $50 item is on sale, what is the discounted price?
def solve() -> int: price = 50 discount = 0.2 discounted_price = price * (1 - discount) result = discounted_price return result
In a bakery, there are 30 croissants, 45 bagels, and 50 donuts. If Jane takes away 6 croissants, and Lisa takes away 4 bagels and twice as many donuts as the number of bagels that she removed, then calculate the total number of pastries that remained in the bakery.
def solve() -> int: croissants = 30 bagels = 45 donuts = 50 Jane_croissants_taken = 6 Lisa_bagels_taken = 4 Lisa_donuts_taken = 2 * Lisa_bagels_taken croissants_remaining = croissants - Jane_croissants_taken bagels_remaining = bagels - Lisa_bagels_taken donuts_remaining = d...
**** A train leaves station A at 8am and reaches station B at 10.30am, travelling at a speed of 25 km/hour. How far is station B from station A?
def solve() -> int: distance = 0 distance = 2.5 * 25 result = distance return result
A car travels a distance of 100 km with a speed of 50 km/h. For the next 50 km, the car drives with a speed of 70 km/h. What is the average speed of the whole journey?
def solve() -> int: time_1 = 100 / 50 time_2 = 50 / 70 distance_total = 150 time_total = time_1 + time_2 speed_average = distance_total / time_total result = speed_average return result
Student: Sally invested $50,000 and the money doubled every 5 years. How much did Sally have after 20 years?
def solve() -> int: investment = 50000 time = 20 rate = 2 total = investment * (rate ** (time // 5)) result = total return result
A gas station charges $2.50 per gallon of gas. If a car has a 12-gallon tank, how much will it cost to fill up the tank? Hint: Multiply the price per gallon by the number of gallons.
def solve() -> int: price_per_gallon = 2.5 tank_size = 12 total_cost = price_per_gallon * tank_size result = total_cost return result
Lily bought 4 dresses at $50 each and 2 purses at $30 each. If she had a $200 bill, how much change did she get back?
def solve() -> int: cost_of_dresses = 4 * 50 cost_of_purses = 2 * 30 total_cost = cost_of_dresses + cost_of_purses change = 200 - total_cost result = change return result
Two woodcutters can cut a forest in 15 days. How many days will it take 8 tractor cutters to do the same job?
def solve() -> int: num_cutters = 2 days_2_cutters = 15 num_cutters_2 = 8 days_8_cutters = (days_2_cutters * num_cutters) / num_cutters_2 result = days_8_cutters return result
ome possible questions and programs are: # Kevin went to the park and saw 16 ducks in the pond. He then walked to the playground and counted 3 times as many kids as ducks. Next, he went to the basketball court and saw half as many people as kids. Finally, he counted 4 dogs near the picnic area. How many more kids than ...
def solve() -> int: ducks = 16 kids = 3 * ducks people = kids // 2 dogs = 4 difference = kids - dogs result = difference return result
A car travels at a speed of 50 miles per hour for the first 3 hours and then slows down to 40 miles per hour for the remaining distance of 120 miles. How long does it take to complete the journey?
def solve() -> int: time1 = 3 distance1 = 50*time1 distance2 = 120 - distance1 time2 = distance2/40 total_time = time1 + time2 result = total_time return result
David is counting the number of trees in a forest, but he double-counts 10 trees and forgets to count 2 dead trees. If David thinks there are 500 trees in the forest, how many trees are actually there?
def solve() -> int: double_counted_trees = 10 forgotten_trees = 2 total_counted_trees = 500 actual_trees = total_counted_trees - double_counted_trees + forgotten_trees result = actual_trees return result
Tyler goes to the gym 45% of the weekdays. When he goes, he forgets his water bottle 10% of the time. What percentage of the weekdays does Tyler remember to bring his water bottle to the gym?
def solve() -> int: weekdays = 5 gym_days = weekdays * 0.45 forget_water = gym_days * 0.1 remember_water = gym_days - forget_water percentage = (remember_water / weekdays) * 100 result = percentage return result
Kayla earns $600 per week but 10% of it goes to her savings account. She also spends $50 for her food expenses and 15% of her salary for transportation. How much was she able to save in a month?
def solve() -> int: weekly_salary = 600 savings_rate = 0.1 food_expenses = 50 transportation_expenses = weekly_salary * 0.15 monthly_salary = weekly_salary * 4 total_expenses = food_expenses + transportation_expenses total_savings = monthly_salary * savings_rate net_income = monthly_sala...
Riley is baking cookies for a bake sale. She has 252 chocolate chips, 168 M&M's, and 144 raisins. She makes 12 chocolate chip cookies, each with 14 chocolate chips. She makes 9 M&M cookies, each with 12 M&M's. She makes 6 oatmeal raisin cookies, each with 16 raisins. If Riley has 72 chocolate chips, 60 M&M's, and 36 ra...
def solve() -> int: chips = 252 mms = 168 raisins = 144 chip_cookies = 12 chip_per_cookie = 14 mm_cookies = 9 mm_per_cookie = 12 raisin_cookies = 6 raisin_per_cookie = 16 chips_left = 72 mms_left = 60 raisins_left = 36 chips_used = chip_cookies * chip_per_cookie ...
Student: Lisa purchases a new phone for $500. Her mobile plan includes a 12% discount. She also has a coupon that offers her an additional 20% off. What is the final amount Lisa pays in total?
def solve() -> int: phone_price = 500 discount1 = 0.12 discount2 = 0.20 price_after_discount1 = phone_price - (phone_price * discount1) price_after_discount2 = price_after_discount1 - (price_after_discount1 * discount2) result = price_after_discount2 return result
Kevin collects stickers and has a total of 36 stickers. He gives 5 stickers to his sister and 3 stickers to his brother. He then buys a new pack of 12 stickers and adds them to his collection. How many stickers does Kevin have now?
def solve() -> int: stickers = 36 stickers = stickers - (5 + 3) stickers = stickers + 12 result = stickers return result
The percentage of students who passed a math test is 80%. If there are 120 students in the class, how many of them passed the test?
def solve() -> int: total_students = 120 pass_percentage = 80 pass_count = (pass_percentage/100)*total_students result = pass_count return result
Student: David weighed 30 pounds last year, if he gained 2 pounds more than his sister who gained 5 pounds last year, how much does David weigh now?
def solve() -> int: david_weight_last_year = 30 sister_weight_gain = 5 david_weight_gain = sister_weight_gain + 2 david_weight_now = david_weight_last_year + david_weight_gain result = david_weight_now return result
There are 720 students in the school. Ann wants to paint 1/3 of the students. How many students will remain unpainted?
def solve() -> int: total_students = 720 students_to_paint = total_students * 0.33 result = total_students - students_to_paint return result
John has 80 marbles. He has blue, green and red marbles. If he has 25 green marbles and 40 red marbles, what percentage of marbles are blue?
def solve() -> int: total_marbles = 80 green_marbles = 25 red_marbles = 40 blue_marbles = total_marbles - green_marbles - red_marbles percentage_blue = (blue_marbles/total_marbles)*100 result = percentage_blue return result
The price of oranges is $2.50 per pound. If Jane buys 3 pounds of oranges, how much does she have to pay in total?
def solve() -> int: price_per_lb = 2.5 pounds = 3 total_price = price_per_lb*pounds result = total_price return result
Student: A car travels 300 miles in 5 hours. What is its average speed in miles per hour?
def solve() -> int: distance = 300 time = 5 speed = distance / time result = speed return result
Emma bought a 672-page cookbook. She has already read 240 pages. If she reads 30 pages a day for 4 weeks, how many pages does she still need to read?
def solve() -> int: total_pages = 672 pages_read = 240 pages_per_day = 30 weeks = 4 pages_left = total_pages - pages_read pages_per_week = pages_per_day * 7 pages_to_read = pages_per_week * weeks pages_left -= pages_to_read result = pages_left return result
Student: Julia walks 2 blocks north, then 3 blocks west and turns to walk 4 blocks south and three times as many blocks east. She then turns and walks 3 more blocks south and 2 more blocks west to reach her destination. If Julia walks 6 blocks/minute, how long will it take her to get there?
def solve() -> int: north = 2 west = 3 south = 4 east = 3 * west south2 = 3 west2 = 2 blocks_per_minute = 6 total_blocks = north + west + south + east + south2 + west2 time = total_blocks / blocks_per_minute result = time return result
Five painters paint a room in 10 days. If each painter earns $150 per day of work, what would be the total cost of hiring 7 painters to paint 8 rooms in 12 days each?
def solve() -> int: painters_per_room = 5 days_to_paint = 10 earnings_per_painter = 150 rooms_to_paint = 8 painters_to_hire = 7 days_per_room = 12 total_painters = painters_to_hire * rooms_to_paint total_days = days_per_room * rooms_to_paint total_cost = total_painters...
If a store has 100 shirts and each shirt costs $15, how much will it cost to buy all of the shirts?
def solve() -> int: num_shirts = 100 cost_per_shirt = 15 total_cost = num_shirts * cost_per_shirt result = total_cost return result
A rectangle has a length of 32m and a width of 18m. What is the area and perimeter of the rectangle?
def solve() -> int: length = 32 width = 18 area = length * width perimeter = 2 * (length + width) result = (area, perimeter) return result
John has an aquarium with 4 fish. The first fish needs 40 mL of food every day, the second fish needs 10 mL, the third 25 mL and the last fish needs 5 mL of food per day. In one week, how much food does John need for all his fish?
def solve() -> int: fish1_food = 40 fish2_food = 10 fish3_food = 25 fish4_food = 5 food_per_day = fish1_food + fish2_food + fish3_food + fish4_food food_per_week = food_per_day * 7 result = food_per_week return result
A baseball team has played 96 games and has a win percentage of 0.625. How many games have they won and lost?
def solve() -> int: total_games = 96 win_percentage = 0.625 num_wins = total_games * win_percentage num_losses = total_games - num_wins result = (num_wins, num_losses) return result
A rectangle has a perimeter of 60 cm. One side is 15cm. What is the length of the other side?
def solve() -> int: perimeter = 60 side1 = 15 side2 = perimeter/2 - side1 result = side2 return result
A restaurant had 60 customers on Monday and 80 customers on Tuesday. How many customers were there in total over the two days?
def solve() -> int: mon_customers = 60 tue_customers = 80 total_customers = mon_customers + tue_customers result = total_customers return result
Student: A bag has 12 red marbles, 8 blue marbles, and 10 green marbles. If a marble is chosen at random from the bag, what is the probability that it will be blue?
def solve() -> int: red_marbles = 12 blue_marbles = 8 green_marbles = 10 total_marbles = red_marbles + blue_marbles + green_marbles probability_blue = blue_marbles / total_marbles result = probability_blue return result
Mike spent 20% of his money on food and 30% of the remaining money on clothes. If he has $280 left, what was his original amount?
def solve() -> int: food = 0.2 clothes = 0.3 left = 280 rem = left / (1 - clothes) total = rem/(1 - food) result = f'<<<{total}>>>' result = total return result
Joe's class is making a giant banner. It currently stands on 6 poles of 8 feet each. How many feet tall is the banner?
def solve() -> int: pole_height = 8 total_poles = 6 banner_height = pole_height * total_poles result = banner_height ...
Miguel's mom gave him five $20 bills to spend at the sports store. Miguel has decided to buy 3 baseball gloves, 2 soccer balls, and 6 basketballs. Each baseball glove costs $30, each soccer ball costs $15, and each basketball costs $10. How much money, in dollars, will Miguel have left over after the purchase?
def solve() -> int: num_20_bills = 5 num_baseball_gloves = 3 num_soccer_balls = 2 num_basketballs = 6 cost_baseball_glove = 30 cost_soccer_ball = 15 cost_basketball = 10 total_cost = (num_baseball_gloves * cost_baseball_glove) + (num_soccer_balls * cost_soccer_ball) + (num_basketbal...
In a basket of eggs, there were 36 eggs. After a few days, only 14 eggs were left. If Nicholas took out the same amount each day, how many eggs did he take out in three days?
def solve() -> int: basket_of_eggs = 36 eggs_left = 14 eggs_taken = basket_of_eggs - eggs_left eggs_taken_per_day = eggs_taken / 3 result = eggs_taken_per_day return result
Student: Sarah can solve 6 math problems in 15 minutes and 9 math problems in 20 minutes. If she wants to solve 50 math problems, how long will it take her?
def solve() -> int: problems_solved_15min = 6 problems_solved_20min = 9 total_problems = 50 time_15min = 15 time_20min = 20 time_total = (total_problems / problems_solved_15min) * time_15min time_total += (total_problems % problems_solved_15min) * (time_20min / problems_solved_20min) res...
There are 20 pens on the desk. Taking away three would leave half as many pens as if 4 were added. How many pens were added to the desk?
def solve() -> int: pens_on_desk = 20 pens_taken_away = 3 pens_left = pens_on_desk - pens_taken_away pens_added = (pens_left * 2) - pens_on_desk result = pens_added return result
Robert was able to lift 100 pounds initially. During his training, he adds 350 pounds to his utmost capacity. If he stumbles upon a bodybuilding vitamin that amplifies his strength by 900%, how much can he lift now? Sarah walks 15 kilometers from her house to the library. After spending 2 hours at the library, she walk...
def solve() -> int: initial_capacity = 100 additional_capacity = 350 amplification_factor = 900 / 100 total_capacity = initial_capacity + additional_capacity final_capacity = total_capacity * amplification_factor distance_to_library = 15 time_at_library = 2 return_speed = 5 ...