id
stringlengths
12
26
prompt
stringlengths
24
3.12k
expected_domain
stringclasses
1 value
ground_truth_answer
stringlengths
94
5.44k
⌀
hybrid_synthetic_gsm8k_101
Write a script projecting how many more weeks Jane needs to save a total of $60, continuing at her current rate of saving $4 weekly which she has done for the past 8 weeks.
hybrid
def weeks_needed(): target = 60 rate = 4 weeks_past = 8 saved = rate * weeks_past remaining = target - saved return int(remaining / rate) print(weeks_needed())
hybrid_synthetic_gsm8k_102
Create a simple interest calculator in code to evaluate the future value of Brenda's $300 investment over a 3-year period, applying an annual interest rate that is equal to three-quarters of the original principal amount.
hybrid
def future_value(): principal = 300 # Three-quarters of the principal gives the percentage rate rate_percentage = principal * 0.75 rate = rate_percentage / 100 years = 3 interest = principal * rate * years return int(principal + interest) print(future_value())
hybrid_synthetic_gsm8k_103
Develop a speed comparison script that mathematically extracts the velocity of a whirligig by deriving a thingamabob's speed from a whatchamacallit's known 121 meters per second (given it is 11 times faster) and then multiplying that output by 5.
hybrid
def whirligig_speed(): whatchamacallit_speed = 121 thingamabob_speed = whatchamacallit_speed / 11 whirligig = thingamabob_speed * 5 return int(whirligig) print(whirligig_speed())
hybrid_synthetic_gsm8k_104
Write a seating logistics algorithm for Mia's restaurant. Based on an attendance of 42 adults and 15 babies, and a starting inventory of 8 high chairs and a regular chair count 5 times that amount, output the deficit of regular and high chairs needed.
hybrid
def chair_deficit(): adults = 42 babies = 15 high_chairs_inventory = 8 regular_chairs_inventory = high_chairs_inventory * 5 deficit_regular = max(0, adults - regular_chairs_inventory) deficit_high = max(0, babies - high_chairs_inventory) total_deficit = deficit_regular + deficit_hi...
hybrid_synthetic_gsm8k_105
Write an algebraic script to isolate and solve for Harald's record sales, given that his sales combined with Marilyn's, who sold 10 times as many, equal a total of 88,000 copies.
hybrid
def harald_sales(): total_sales = 88000 # harald + 10 * harald = total_sales # 11 * harald = total_sales harald = total_sales / 11 return int(harald) print(harald_sales())
hybrid_synthetic_gsm8k_106
Ninety people are split into 9-person groups. If 3/5 of these groups have their members bring back 2 seashells each, write a collection script to calculate the total number of seashells retrieved.
hybrid
def total_seashells(): total_people = 90 group_size = 9 total_groups = total_people / group_size collecting_groups = total_groups * (3 / 5) collectors = collecting_groups * group_size seashells_per_collector = 2 total = collectors * seashells_per_collector return int(total) print(total_...
hybrid_synthetic_gsm8k_107
Create an algorithm computing the time difference for Ray to swim 3 miles in warm versus cold water, using his cold pace of 16 minutes per mile and his warm pace of 2 minutes more than twice the cold pace.
hybrid
def time_difference(): distance = 3 cold_pace = 16 warm_pace = (2 * cold_pace) + 2 time_cold = distance * cold_pace time_warm = distance * warm_pace return time_warm - time_cold print(time_difference())
hybrid_synthetic_gsm8k_108
Code a distance evaluator to find out how many feet outside the dragon's 1000-foot fire radius Polly can stand and still hit it. She throws a javelin 400 feet normally, but holding the sapphire gemstone multiplies this range by three.
hybrid
def safe_distance(): dragon_radius = 1000 normal_throw = 400 gemstone_multiplier = 3 enhanced_throw = normal_throw * gemstone_multiplier outside_distance = enhanced_throw - dragon_radius return outside_distance print(safe_distance())
hybrid_synthetic_gsm8k_109
Construct an observation counter that sums Jerry's disparate bird sightings—specifically 6 in the bushes, two-thirds of that amount flying overhead, and exactly 3 discrete groups of 8 feeding—to output the grand total.
hybrid
def total_birds(): bushes = 6 overhead = bushes * (2 / 3) feeding = 3 * 8 total = bushes + overhead + feeding return int(total) print(total_birds())
hybrid_synthetic_gsm8k_110
Code a simple calculator that outputs Alex's earnings for 2 weeks of tutoring, given a standard 7-day week and a daily charging rate of $12.
hybrid
def total_earnings(): weeks = 2 days_per_week = 7 daily_rate = 12 total_days = weeks * days_per_week return total_days * daily_rate print(total_earnings())
hybrid_synthetic_gsm8k_111
Create a function that calculates Jim's cumulative TV and reading time over 4 weeks. He completes a routine of 2 hours of TV and 1 hour of reading exactly 3 times a week.
hybrid
def cumulative_time(): tv_hours = 2 reading_hours = 1 sessions_per_week = 3 weeks = 4 hours_per_week = (tv_hours + reading_hours) * sessions_per_week total_hours = hours_per_week * weeks return total_hours print(cumulative_time())
hybrid_synthetic_gsm8k_112
Winston picks 6 pounds of peaches at $2.00/lb, 8 pounds of plums at $1.00/lb, and 6 pounds of apricots at $3.00/lb. Create a point-of-sale script to output his total fruit expenditure.
hybrid
def fruit_expenditure(): peaches_cost = 6 * 2.00 plums_cost = 8 * 1.00 apricots_cost = 6 * 3.00 total_cost = peaches_cost + plums_cost + apricots_cost return total_cost print(fruit_expenditure())
hybrid_synthetic_gsm8k_113
Develop a program to track Jennifer's orange inventory by initiating a starting count of 12 from the market, subsequently subtracting 2 oranges for each of her three daughters and 3 oranges for her boy, to output the final remaining quantity.
hybrid
def remaining_oranges(): starting = 12 daughters = 3 boy = 1 given_to_daughters = daughters * 2 given_to_boy = boy * 3 remaining = starting - given_to_daughters - given_to_boy return remaining print(remaining_oranges())
hybrid_synthetic_gsm8k_114
Draft a function to compute the hours required to charge a phone from 60 percent to 100 percent, given a charge rate of 1 percentage point per 3 minutes.
hybrid
def charging_hours(): start_pct = 60 end_pct = 100 pct_needed = end_pct - start_pct mins_per_pct = 3 total_mins = pct_needed * mins_per_pct hours = total_mins / 60 return int(hours) print(charging_hours())
hybrid_synthetic_gsm8k_115
Andrew plans a road trip from New Jersey to Rochester. It takes 6 days to travel by bus and half as many days to travel by car from New Jersey to Rochester. Draft a software routine detailing how many days he will travel if he plans to go to Rochester by bus and return from Rochester by car.
hybrid
def road_trip_days(): bus_days = 6 car_days = bus_days / 2 total_days = bus_days + car_days return int(total_days) print(road_trip_days())
hybrid_synthetic_gsm8k_116
Formulate a script to calculate the exact probability that Marcus will have to turn in his homework tomorrow. The parameters are: a 50% chance of a substitute who won't collect it; if the normal teacher is there, a 40% chance of a class-wide extension; and if there's no class extension, a 20% chance of a personal exten...
hybrid
def homework_probability(): p_normal_teacher = 0.50 p_no_class_extension = 1 - 0.40 p_no_personal_extension = 1 - 0.20 p_turn_in = p_normal_teacher * p_no_class_extension * p_no_personal_extension return int(p_turn_in * 100) print(homework_probability())
hybrid_synthetic_gsm8k_117
Code a straightforward arithmetic block that updates Mulan's financial balance by adding her father's $100 gift to her initial $40, then sequentially deducting the cost of two $30 pairs of jeans and a single $20 bag.
hybrid
def mulan_balance(): balance = 40 gift = 100 balance += gift jeans_cost = 2 * 30 bag_cost = 20 balance -= jeans_cost balance -= bag_cost return balance print(mulan_balance())
hybrid_synthetic_gsm8k_118
An ice cream parlor offers a 'buy 2 scoops, get 1 free' deal with scoops priced at $1.50. Create a conditional loop to find the maximum number of scoops Erin can obtain with $6.00.
hybrid
def max_scoops(): money = 6.00 price_per_scoop = 1.50 scoops_bought = money // price_per_scoop free_scoops = scoops_bought // 2 total_scoops = scoops_bought + free_scoops return int(total_scoops) print(max_scoops())
hybrid_synthetic_gsm8k_119
Implement a simple mathematical script simulating James's table assembly to output the remaining inventory of screws, given a starting count of 40 screws, 4 tables, 4 legs per table, and a requirement of 2 screws per leg.
hybrid
def remaining_screws(): total_screws = 40 tables = 4 legs_per_table = 4 screws_per_leg = 2 screws_used = tables * legs_per_table * screws_per_leg return total_screws - screws_used print(remaining_screws())
hybrid_synthetic_gsm8k_120
Code a physics calculation to find how many hours it takes Tom, traveling at 70 mph, to close a 75-mile gap and catch up to Bob, who is driving at 55 mph.
hybrid
def catch_up_hours(): gap = 75 tom_speed = 70 bob_speed = 55 closing_speed = tom_speed - bob_speed hours = gap / closing_speed return int(hours) print(catch_up_hours())
hybrid_synthetic_gsm8k_121
Construct a program to total the number of times Greg's alarm rang today. It should sum the first sequence of 4 rings, the second sequence of triple the first, and the third sequence of half the second.
hybrid
def alarm_rings(): seq1 = 4 seq2 = seq1 * 3 seq3 = seq2 / 2 total = seq1 + seq2 + seq3 return int(total) print(alarm_rings())
hybrid_synthetic_gsm8k_122
Ashley ordered pizza delivery costing $15. Design a script to determine the total amount she should hand the delivery man to include a 1/5 tip.
hybrid
def total_payment(): pizza_cost = 15 tip_fraction = 1 / 5 tip = pizza_cost * tip_fraction total = pizza_cost + tip return int(total) print(total_payment())
hybrid_synthetic_gsm8k_123
Develop a relational height algorithm to compute the length of Carl's cane in feet. Isabel is 7 feet tall, Ned is two feet shorter than Isabel, Carl is one foot taller than his brother Ned, and Carl's cane is half as long as his own height.
hybrid
def cane_length(): isabel = 7 ned = isabel - 2 carl = ned + 1 cane = carl / 2 return int(cane) print(cane_length())
hybrid_synthetic_gsm8k_124
Create an algorithm to find the average ticket price Deepa paid, given she spent $216 to see all 9 Fast and the Furious movies 3 times each.
hybrid
def average_ticket_price(): movies = 9 times_each = 3 total_tickets = movies * times_each total_spent = 216 avg_price = total_spent / total_tickets return int(avg_price) print(average_ticket_price())
hybrid_synthetic_gsm8k_125
Implement an elevator weight safety script. Multiply the 80 kg average weight by 9 adults (Jack plus 8 others), and compute how much that exceeds the elevator's 700 kg maximum load limit.
hybrid
def elevator_exceed(): avg_weight = 80 adults = 9 total_load = avg_weight * adults max_limit = 700 exceed = total_load - max_limit return exceed print(elevator_exceed())
hybrid_synthetic_gsm8k_126
Formulate a script to determine the aggregate number of sofas and chairs owned by Ophelia and Jenna, using the facts that Ophelia has 20 sofas, each woman has 2 fewer sofas than chairs, and Jenna has 3 times as many chairs as Ophelia.
hybrid
def total_furniture(): ophelia_sofas = 20 ophelia_chairs = ophelia_sofas + 2 jenna_chairs = ophelia_chairs * 3 jenna_sofas = jenna_chairs - 2 total = ophelia_sofas + ophelia_chairs + jenna_sofas + jenna_chairs return total print(total_furniture())
hybrid_synthetic_gsm8k_127
Betsy and Donovan prepared a meal in 98 total minutes. Betsy's part took 18 minutes longer than Donovan's. Code an equation solver to find the exact duration of Betsy's contribution.
hybrid
def betsy_duration(): total_time = 98 difference = 18 # b + (b - 18) = 98 # 2b - 18 = 98 b = (total_time + difference) / 2 return int(b) print(betsy_duration())
hybrid_synthetic_gsm8k_128
Marcy's candles are 99% guaranteed not to explode, while 5% of the dangerous ones have a defect making them smell like wet dog. Formulate an expression in code to find how many out of 50,000 candles will both explode and smell like wet dog.
hybrid
def defective_candles(): total = 50000 explode_rate = 1 - 0.99 smell_rate = 0.05 explode = total * explode_rate explode_and_smell = explode * smell_rate return int(explode_and_smell) print(defective_candles())
hybrid_synthetic_gsm8k_129
Write a script that compares girl scout badge accumulation over a 12-month period by calculating Wendy's yearly total (earned at three times Claire's rate of 1 per month) against Amber's yearly total (earned at half of Claire's rate) and returning the difference.
hybrid
def badge_difference(): months = 12 claire_rate = 1 wendy_rate = claire_rate * 3 amber_rate = claire_rate * 0.5 wendy_yearly = wendy_rate * months amber_yearly = amber_rate * months return int(wendy_yearly - amber_yearly) print(badge_difference())
hybrid_synthetic_gsm8k_130
Hannah smashes 1/4 of the 64 student cars (4 windows each) and 3/4 of the 32 teacher cars (2 windows each). Write a quick loop or script that aggregates the total number of smashed windows.
hybrid
def smashed_windows(): student_cars = 64 teacher_cars = 32 smashed_student_cars = student_cars * (1 / 4) smashed_teacher_cars = teacher_cars * (3 / 4) student_windows = smashed_student_cars * 4 teacher_windows = smashed_teacher_cars * 2 total = student_windows + teacher_windows return in...
hybrid_synthetic_gsm8k_131
Design a cash-register script for a florist. Jenny buys 15 roses (pricing: $15 for a dozen, $2 for individual roses) using five $5 bills. If the change is returned purely in quarters, output the number of quarters she receives.
hybrid
def quarters_change(): dozens = 1 individuals = 3 cost = (dozens * 15) + (individuals * 2) payment = 5 * 5 change = payment - cost quarters = change / 0.25 return int(quarters) print(quarters_change())
hybrid_synthetic_gsm8k_132
Chad ordered a build-your-own burrito for lunch. The base burrito is $6.50. He adds extra meat for $2.00, extra cheese for $1.00, avocado for $1.00 and 2 sauces for $0.25 each. He decides to upgrade his meal for an extra $3.00 which will add chips and a drink. He has a gift card for $5.00 that he uses at check out. Con...
hybrid
def amount_owed(): base = 6.50 meat = 2.00 cheese = 1.00 avocado = 1.00 sauces = 2 * 0.25 upgrade = 3.00 total = base + meat + cheese + avocado + sauces + upgrade gift_card = 5.00 owed = total - gift_card return owed print(amount_owed())
hybrid_synthetic_gsm8k_133
Code a ratio distribution solver to find how many more popsicles Sam has than Betty, given their 5:6 ratio out of 165 total popsicles.
hybrid
def popsicle_difference(): total = 165 ratio_sam = 5 ratio_betty = 6 total_parts = ratio_sam + ratio_betty per_part = total / total_parts diff_parts = abs(ratio_betty - ratio_sam) diff = per_part * diff_parts return int(diff) print(popsicle_difference())
hybrid_synthetic_gsm8k_134
James reads 3 pages every 10 minutes. If he reads 18 pages before going to sleep, write an algorithm that outputs the total minutes he spends reading.
hybrid
def reading_minutes(): pages = 18 pages_per_unit = 3 mins_per_unit = 10 units = pages / pages_per_unit total_mins = units * mins_per_unit return int(total_mins) print(reading_minutes())
hybrid_synthetic_gsm8k_135
A tour consists of 3 groups of 200 employees, with each group assigned 7 tour guides. Code an expression yielding the total number of people on this tour.
hybrid
def tour_people(): groups = 3 employees_per_group = 200 guides_per_group = 7 people_per_group = employees_per_group + guides_per_group total_people = groups * people_per_group return total_people print(tour_people())
hybrid_synthetic_gsm8k_136
Create a codebase to calculate the combined weight of Elijah and Kory's dogs. Kory's dog weighs 60 pounds, while Elijah has one dog that is one-fourth that weight and another that is half that weight.
hybrid
def total_dog_weight(): kory_dog = 60 elijah_dog1 = kory_dog / 4 elijah_dog2 = kory_dog / 2 total = kory_dog + elijah_dog1 + elijah_dog2 return int(total) print(total_dog_weight())
hybrid_synthetic_gsm8k_137
Construct a script that solves for the number of bouncy balls in Sophie's tube by subtracting her 31 blocks, 8 stuffed animals, and 9 stacking rings from her 62 total toys.
hybrid
def bouncy_balls(): total_toys = 62 blocks = 31 stuffed_animals = 8 stacking_rings = 9 bouncy = total_toys - blocks - stuffed_animals - stacking_rings return bouncy print(bouncy_balls())
hybrid_synthetic_gsm8k_138
Design a recursive expense calculator for Iris's spa trip that computes the cost of her manicure as 1/4 of her $400 hair expense, and her pedicure as 3/4 of the manicure cost, ultimately returning the grand total spent.
hybrid
def spa_trip_total(): hair = 400 manicure = hair * (1 / 4) pedicure = manicure * (3 / 4) total = hair + manicure + pedicure return int(total) print(spa_trip_total())
hybrid_synthetic_gsm8k_139
Implement a quick multiplication script to calculate the total number of table legs in a restaurant with 40 four-legged tables and 50 three-legged tables.
hybrid
def table_legs(): four_legged = 40 three_legged = 50 total = (four_legged * 4) + (three_legged * 3) return total print(table_legs())
hybrid_synthetic_gsm8k_140
Implement a logic script to solve Sandra's missing flower order. Use the 200 pink calla lilies to find the number of white carnations, noting lilies are 5 times the carnations, and then multiply the carnations by 4 to determine the required red roses.
hybrid
def red_roses(): lilies = 200 carnations = lilies / 5 roses = carnations * 4 return int(roses) print(red_roses())
hybrid_synthetic_gsm8k_141
Gunther's banana pile fluctuates: it starts at 48, loses half, gains 25, loses 12, and finally gains 6. Write an inventory-tracking program to print the final count of bananas.
hybrid
def final_bananas(): bananas = 48 bananas /= 2 bananas += 25 bananas -= 12 bananas += 6 return int(bananas) print(final_bananas())
hybrid_synthetic_gsm8k_142
Write a code snippet to figure out Wilfred's age, knowing the group's total age is 20, Helene's age is twice the group's average, Akbar is 3, and Alessandro is 4.
hybrid
def wilfred_age(): total_age = 20 people = 4 avg_age = total_age / people helene = avg_age * 2 akbar = 3 alessandro = 4 wilfred = total_age - helene - akbar - alessandro return int(wilfred) print(wilfred_age())
hybrid_synthetic_gsm8k_143
Formulate code that determines the individual unit prices of soda based on a $21.00 pack of 7, and water based on an $8.00 pack of 4, utilizing these rates to calculate the final cost of David's custom order of 3 sodas and 2 waters.
hybrid
def order_cost(): soda_pack_price = 21.00 soda_pack_size = 7 soda_price = soda_pack_price / soda_pack_size water_pack_price = 8.00 water_pack_size = 4 water_price = water_pack_price / water_pack_size cost = (3 * soda_price) + (2 * water_price) return cost print(order_cost())
hybrid_synthetic_gsm8k_144
Write an application to project the lifespan of Jeremy's car tires in years. Program the calculation based on 725 rotations per 2 miles, a driving habit of 400 miles per month, and a maximum tire threshold of 10,440,000 rotations.
hybrid
def tire_lifespan_years(): max_rotations = 10440000 rotations_per_2_miles = 725 rotations_per_mile = rotations_per_2_miles / 2 total_miles = max_rotations / rotations_per_mile miles_per_month = 400 months = total_miles / miles_per_month years = months / 12 return int(years) print(tire_l...
hybrid_synthetic_gsm8k_145
Write a time-conversion function summing the total duration in minutes of Max's two movies, running 1 hour 30 minutes and 2 hours 5 minutes respectively.
hybrid
def total_movie_minutes(): movie1_mins = (1 * 60) + 30 movie2_mins = (2 * 60) + 5 return movie1_mins + movie2_mins print(total_movie_minutes())
hybrid_synthetic_gsm8k_146
Create a program that evaluates how many more laps Bethany can run compared to Quinn, given that Bethany runs 10 laps in an hour, Trey runs 4 more than Bethany, Shaelyn runs half as many as Trey, and Quinn runs 2 fewer than Shaelyn.
hybrid
def lap_difference(): bethany = 10 trey = bethany + 4 shaelyn = trey / 2 quinn = shaelyn - 2 diff = bethany - quinn return int(diff) print(lap_difference())
hybrid_synthetic_gsm8k_147
Produce a small program to determine John's total banana count if he picks 4 on Wednesday, 6 on Thursday, and triple his Wednesday amount on Friday.
hybrid
def total_bananas(): wednesday = 4 thursday = 6 friday = wednesday * 3 total = wednesday + thursday + friday return total print(total_bananas())
hybrid_synthetic_gsm8k_148
Construct an algorithm that determines the number of insects Lily found, given that she, David, and Bodhi collected 43 insects in total, with Lily finding 7 more than David, and David finding half of what Bodhi found.
hybrid
def lily_insects(): total = 43 # L = D + 7 # B = 2D # (D + 7) + D + 2D = 43 # 4D + 7 = 43 D = (total - 7) / 4 L = D + 7 return int(L) print(lily_insects())
hybrid_synthetic_gsm8k_149
Code a distance-tracking algorithm that evaluates a joint rowing trip by accepting Dijana's 50 miles, calculating Anis's distance utilizing a modifier 1/5 times greater than Dijana's base, and summing both metrics for the total mileage.
hybrid
def total_mileage(): dijana = 50 anis = dijana + (dijana * (1 / 5)) total = dijana + anis return int(total) print(total_mileage())
hybrid_synthetic_gsm8k_150
Write a script to calculate the revenue of a chocolate factory over two weeks (14 days), given a daily production rate of 5000 bars and a sales price of $2 per bar.
hybrid
def factory_revenue(): days = 14 daily_production = 5000 price_per_bar = 2 total_bars = days * daily_production revenue = total_bars * price_per_bar return revenue print(factory_revenue())
hybrid_synthetic_gsm8k_151
Program a ratio-based scaling function to project hash brown production. Calculate the yield per potato based on a known 36 hash browns from 6 potatoes, then apply that multiplier to an inventory of 96 potatoes.
hybrid
def hash_brown_projection(): hash_browns_known = 36 potatoes_known = 6 yield_per_potato = hash_browns_known / potatoes_known inventory = 96 projected_hash_browns = inventory * yield_per_potato return int(projected_hash_browns) print(hash_brown_projection())
hybrid_synthetic_gsm8k_152
Design a payroll calculator that automatically updates Mark's baseline $10 hourly wage with a $2 raise and subsequently calculates his total weekly gross income based on a steady schedule of 8 hours a day for 5 days a week.
hybrid
def weekly_gross_income(): baseline_wage = 10 raise_amount = 2 new_wage = baseline_wage + raise_amount hours_per_day = 8 days_per_week = 5 weekly_hours = hours_per_day * days_per_week gross_income = new_wage * weekly_hours return gross_income print(weekly_gross_income())
hybrid_synthetic_gsm8k_153
Draft a script that calculates how many years ago Raymond's son was born, using the variables that Samantha is currently 31, Raymond is 6 years older than her, and he became a father at age 23.
hybrid
def years_ago_son_born(): samantha_age = 31 raymond_age = samantha_age + 6 father_age = 23 years_ago = raymond_age - father_age return years_ago print(years_ago_son_born())
hybrid_synthetic_gsm8k_154
Write a financial loop for Marisa over 5 days, taking her 5 dollar daily pocket money, subtracting four 25 cent lollipops daily, and outputting total savings.
hybrid
def total_savings(): daily_pocket_money = 5.0 lollipop_cost = 0.25 lollipops_per_day = 4 days = 5 savings = 0 for _ in range(days): daily_expense = lollipops_per_day * lollipop_cost daily_saving = daily_pocket_money - daily_expense savings += daily_saving return int(s...
hybrid_synthetic_gsm8k_155
Write an algorithm to calculate the volume of bags a wheat trader sold. Use a profit target of $400, a buying price of $20 per bag, a transport cost of $2 per bag, and a selling price of $30 per bag to find the final quantity.
hybrid
def bags_sold(): profit_target = 400 buying_price = 20 transport_cost = 2 selling_price = 30 total_cost_per_bag = buying_price + transport_cost profit_per_bag = selling_price - total_cost_per_bag quantity = profit_target / profit_per_bag return int(quantity) print(bags_sold())
hybrid_synthetic_gsm8k_156
Programmatically determine the total savings when purchasing 2 tubs of ice cream and 4 packets of milk, if ice cream drops from 13 dollars to 11 dollars and milk has a 50 cent discount.
hybrid
def total_savings(): ice_cream_qty = 2 ice_cream_original = 13 ice_cream_new = 11 ice_cream_saving_per_tub = ice_cream_original - ice_cream_new ice_cream_total_savings = ice_cream_qty * ice_cream_saving_per_tub milk_qty = 4 milk_discount = 0.50 milk_total_savings = milk_qty * milk_d...
hybrid_synthetic_gsm8k_157
Implement a financial calculation script to find Stephen's twelfth-month payment on a $300 loan. The program must apply a 2% interest fee to the total, subtract his eleven monthly payments of $25, and output the final balance due.
hybrid
def final_balance_due(): loan_amount = 300 interest_rate = 0.02 total_due = loan_amount + (loan_amount * interest_rate) payments_made = 11 payment_amount = 25 total_paid = payments_made * payment_amount final_balance = total_due - total_paid return int(final_balance) print(fin...
hybrid_synthetic_gsm8k_158
Formulate code determining Jonathan's current toy count by using the premise that adding 2 toys would give him a collection five times the size of James's 80-toy set.
hybrid
def jonathan_toys(): james_toys = 80 target_size = james_toys * 5 current_toys = target_size - 2 return current_toys print(jonathan_toys())
hybrid_synthetic_gsm8k_159
Write a program to model Elly's bookcase capacities. Define the middle shelves (10 books each), the bottom shelf (twice the middle), and the top shelf (5 fewer than the bottom), sum their capacities per bookcase, and divide 110 books by this total to find the required number of cases.
hybrid
def required_bookcases(): middle_shelf = 10 # Assuming 1 middle shelf per the prompt wording "middle shelves" which is ambiguous, # but typically implies 2 if not specified, let's look at the wording "middle shelves (10 books each)". # Wait, usually a bookcase has 1 top, 1 bottom, and maybe some middle...
hybrid_synthetic_gsm8k_160
Formulate a time-tracking script that calculates Charisma's 4-week meditation and yoga total by summing 30 minutes of daily meditation and 5 hours of weekly yoga, outputting the answer in hours or minutes.
hybrid
def total_time_hours(): weeks = 4 meditation_daily_mins = 30 days_in_week = 7 meditation_weekly_mins = meditation_daily_mins * days_in_week meditation_weekly_hours = meditation_weekly_mins / 60 yoga_weekly_hours = 5 total_weekly_hours = meditation_weekly_hours + yoga_weekly_hours ...
hybrid_synthetic_gsm8k_161
Write a computational script to determine the number of teachers at Dr. Wertz's school, using the known metrics of 60 girls, a boys' population twice that size, and a strict 5-to-1 student-to-teacher ratio.
hybrid
def number_of_teachers(): girls = 60 boys = girls * 2 total_students = girls + boys ratio = 5 teachers = total_students / ratio return int(teachers) print(number_of_teachers())
hybrid_synthetic_gsm8k_162
Code a sequence of operations to track Joe's car inventory by evaluating his starting total as twice that of Robert's 20 cars, calculating a 20% sale of his stock, and deducting a gift to his mother equal to twice the amount he sold, to output Joe's final count.
hybrid
def joes_cars(): robert_cars = 20 joe_start = robert_cars * 2 sold = joe_start * 0.20 gift = sold * 2 joe_final = joe_start - sold - gift return int(joe_final) print(joes_cars())
hybrid_synthetic_gsm8k_163
Implement an optimization script to find the maximum number of popsicle sticks Frederick can make for $24, choosing the cheapest wood between a $4 2x4 yielding 200 sticks and a $6 2x8 yielding 400 sticks.
hybrid
def max_popsicle_sticks(): budget = 24 wood1_cost = 4 wood1_yield = 200 wood2_cost = 6 wood2_yield = 400 yield_per_dollar_1 = wood1_yield / wood1_cost yield_per_dollar_2 = wood2_yield / wood2_cost if yield_per_dollar_1 > yield_per_dollar_2: max_sticks = (budget / wood1_...
hybrid_synthetic_gsm8k_164
Draft a computational solution to find the total letters Craig and his brother spelled over ten rounds, knowing Craig spelled twenty 15-letter words and his brother spelled 50 more letters than Craig.
hybrid
def total_letters_spelled(): craig_words = 20 craig_letters_per_word = 15 craig_total = craig_words * craig_letters_per_word brother_total = craig_total + 50 combined_total = craig_total + brother_total return combined_total print(total_letters_spelled())
hybrid_synthetic_gsm8k_165
Develop a budgeting program for Elvira that subtracts her computer purchases, which include a €1090 machine, €157 scanner, €74 CD burner, and €102 printer, from her €1500 family gift to reveal her remaining clothing budget.
hybrid
def clothing_budget(): gift = 1500 machine = 1090 scanner = 157 burner = 74 printer = 102 spent = machine + scanner + burner + printer remaining = gift - spent return remaining print(clothing_budget())
hybrid_synthetic_gsm8k_166
Write a state-tracking algorithm logging the number of apples Newton brought home for a pie. He starts with 2 apples falling out of the tree (pocketing 1, throwing 1). The throw knocks down 5 more apples (pocketing all but one, throwing the remaining one). The final throw knocks down another 6 apples, all of which he p...
hybrid
def apples_pocketed(): pocketed = 0 # First event fallen_1 = 2 pocketed += 1 # thrown = 1 # Second event fallen_2 = 5 pocketed += (fallen_2 - 1) # thrown = 1 # Third event fallen_3 = 6 pocketed += fallen_3 return pocketed print(apples_pocketed())
hybrid_synthetic_gsm8k_167
Create a race simulation program to output the waiting time of the winner. The logic must convert Steve's 3-mile bike ride at 440 feet per minute and Tim's 2-mile skateboard trip at 264 feet per minute into time values, then find the difference.
hybrid
def waiting_time(): feet_per_mile = 5280 steve_distance = 3 * feet_per_mile steve_speed = 440 steve_time = steve_distance / steve_speed tim_distance = 2 * feet_per_mile tim_speed = 264 tim_time = tim_distance / tim_speed diff = abs(steve_time - tim_time) return int(diff) p...
hybrid_synthetic_gsm8k_168
Write a logic script to find the price of a pen, given a book is 4 dollars, a magazine costs half the book's price, and a pen is 1 dollar less than the magazine.
hybrid
def pen_price(): book = 4 magazine = book / 2 pen = magazine - 1 return int(pen) print(pen_price())
hybrid_synthetic_gsm8k_169
Construct a monthly paper consumption tracker in code for Miguel, assuming he uses 2 pads a week, each pad has 30 sheets, and a month is calculated as exactly 4 weeks.
hybrid
def monthly_sheets(): pads_per_week = 2 sheets_per_pad = 30 weeks = 4 total_sheets = pads_per_week * sheets_per_pad * weeks return total_sheets print(monthly_sheets())
hybrid_synthetic_gsm8k_170
James pays a $20 entry fee plus $1.50 per pound to pick 30 pounds of blueberries. Write a comparison block in code to determine his total savings versus buying 30 pounds at the store for $2.50 a pound.
hybrid
def calculate_savings(): pounds = 30 entry_fee = 20 pick_price = 1.50 store_price = 2.50 pick_cost = entry_fee + (pounds * pick_price) store_cost = pounds * store_price savings = store_cost - pick_cost return int(savings) print(calculate_savings())
hybrid_synthetic_gsm8k_171
Draft a routine to calculate the daily calorie deficit Andy needs from December 31st to July 19th to burn 3500 calories per pound and achieve a 30 lbs weight loss for his birthday.
hybrid
def daily_calorie_deficit(): # Jan (31) + Feb (28) + Mar (31) + Apr (30) + May (31) + Jun (30) + Jul (19) days = 31 + 28 + 31 + 30 + 31 + 30 + 19 lbs_to_lose = 30 cals_per_lb = 3500 total_cals = lbs_to_lose * cals_per_lb daily_deficit = total_cals / days return int(daily_deficit) print(dail...
hybrid_synthetic_gsm8k_172
Write code to find out how many years it will take Jim to recoup his financial losses and student loans. College took 4 years with $50,000/year in loans. He gave up a $25,000/year job to attend, but his new degree triples that old income.
hybrid
def years_to_recoup(): years_college = 4 loan_per_year = 50000 old_income = 25000 total_loans = loan_per_year * years_college lost_income = old_income * years_college total_debt_and_loss = total_loans + lost_income new_income = old_income * 3 extra_income_per_year = new_income ...
hybrid_synthetic_gsm8k_173
Write a program that manages the shifting populations of Mr. Smith's two farms by initializing Farm X with 55 goats and Farm Y with 45 goats, systematically subtracting 10 from X and twice that amount from Y, and outputting the total surviving flock.
hybrid
def surviving_flock(): farm_x = 55 farm_y = 45 sub_x = 10 sub_y = sub_x * 2 farm_x -= sub_x farm_y -= sub_y total = farm_x + farm_y return total print(surviving_flock())
hybrid_synthetic_gsm8k_174
Design a piece of code that calculates John's running speed in miles per hour. The script should divide his 60-mile weekly total by his total hours run, which consists of a 3-hour run on day one and two subsequent runs that are each half as long.
hybrid
def running_speed(): miles = 60 run1 = 3 run2 = run1 / 2 run3 = run1 / 2 total_hours = run1 + run2 + run3 speed = miles / total_hours return int(speed) print(running_speed())
hybrid_synthetic_gsm8k_175
Write a program that accurately divides lemonade stand sales among three children by subtracting Julie's 14 glasses from the 32 total to find the boys' combined sales, halving that to find Micah's specific contribution, and outputting the numeric difference between Julie and Micah.
hybrid
def sales_difference(): total = 32 julie = 14 boys_combined = total - julie micah = boys_combined / 2 difference = julie - micah return int(difference) print(sales_difference())
hybrid_synthetic_gsm8k_176
Formulate a script to determine Jackson's age based on his siblings' ages: James is 10 and 1 year younger than Corey, Corey is 2 years older than Amy, and Amy is 5 years older than Jackson.
hybrid
def jacksons_age(): james = 10 corey = james + 1 amy = corey - 2 jackson = amy - 5 return jackson print(jacksons_age())
hybrid_synthetic_gsm8k_177
Griffin had 24 french fries, but Kyle took 5 of them. Billy took twice as many as Kyle. Ginger gave Griffin a handful of her fries, and then Colby took from Griffin 3 less than the number of fries that Kyle had taken. If in the end Griffin had 27 fries, construct a mathematical script evaluating how many fries Ginger g...
hybrid
def ginger_fries(): initial = 24 kyle = 5 billy = kyle * 2 colby = kyle - 3 final = 27 # initial - kyle - billy + ginger - colby = final # 24 - 5 - 10 + ginger - 2 = 27 # 7 + ginger = 27 ginger = final - initial + kyle + billy + colby return ginger print(ginger_fries())
hybrid_synthetic_gsm8k_178
Write a financial projection program for Jessica that calculates her annual debt payments. Her monthly base is $300 for student loans, $200 for credit cards, and $500 for a mortgage, but the script must increase her total monthly payment by 50 percent before scaling it to 12 months.
hybrid
def annual_debt_payments(): loans = 300 credit_cards = 200 mortgage = 500 monthly_base = loans + credit_cards + mortgage increased_monthly = monthly_base * 1.50 annual = increased_monthly * 12 return int(annual) print(annual_debt_payments())
hybrid_synthetic_gsm8k_179
Model John's dog-walking schedule in code to find his weekly hours spent taking care of 10 dogs, given each dog requires 0.5 hours of care daily.
hybrid
def weekly_dog_care_hours(): dogs = 10 hours_per_dog_daily = 0.5 daily_hours = dogs * hours_per_dog_daily days_per_week = 7 weekly_hours = daily_hours * days_per_week return int(weekly_hours) print(weekly_dog_care_hours())
hybrid_synthetic_gsm8k_180
Three homes require a total of 250 cases of shingles. House 1 needs half the amount of House 2, and House 3 needs double the amount of House 1. Code a script to resolve these ratios and find the exact number of cases House 3 requires.
hybrid
def house3_shingles(): total = 250 # h1 = 0.5 * h2 => h2 = 2 * h1 # h3 = 2 * h1 # h1 + h2 + h3 = 250 # h1 + 2*h1 + 2*h1 = 250 # 5 * h1 = 250 h1 = total / 5 h3 = 2 * h1 return int(h3) print(house3_shingles())
hybrid_synthetic_gsm8k_181
Rozanne makes eggnog using 4 dozen cased eggs and 2 loose eggs, needing 5 eggs per glass and 5 glasses per tray. Formulate a script to compute how many trays she can put out.
hybrid
def eggnog_trays(): cased_dozens = 4 loose_eggs = 2 total_eggs = (cased_dozens * 12) + loose_eggs eggs_per_glass = 5 glasses_per_tray = 5 eggs_per_tray = eggs_per_glass * glasses_per_tray trays = total_eggs // eggs_per_tray return trays print(eggnog_trays())
hybrid_synthetic_gsm8k_182
Sean is practicing for his role in a theater production. He has to memorize his lines for two scenes and the lyrics to one solo song. His solo song has 54 lines in the lyrics. The first scene has twice the number of lines, but only a third of them are his lines. The second scene has six more lines than the song, and fo...
hybrid
def lines_to_memorize(): song_lines = 54 sean_song = song_lines scene1_total = song_lines * 2 sean_scene1 = scene1_total / 3 scene2_total = song_lines + 6 sean_scene2 = scene2_total * (4 / 5) total_sean = sean_song + sean_scene1 + sean_scene2 return int(total_sean) print(...
hybrid_synthetic_gsm8k_183
Code a solution to determine the total time needed for everyone to try the escape room. Calculate the number of eligible students (10 from each of the 4 grades, 4-7), divide them into groups of 8, and multiply the number of groups by 45 minutes.
hybrid
def escape_room_time(): students_per_grade = 10 grades = 4 total_students = students_per_grade * grades group_size = 8 groups = total_students / group_size time_per_group = 45 total_time = groups * time_per_group return int(total_time) print(escape_room_time())
hybrid_synthetic_gsm8k_184
Produce a script that sequentially computes the weight of Daisy's groceries by determining the sweet potatoes are twice the weight of the 5-pound potatoes, and the carrots are 3 pounds lighter than the sweet potatoes, ultimately outputting the carrot weight.
hybrid
def carrot_weight(): potatoes = 5 sweet_potatoes = potatoes * 2 carrots = sweet_potatoes - 3 return carrots print(carrot_weight())
hybrid_synthetic_gsm8k_185
Implement a snowball production loop computing how long it takes Jay to amass 60 snowballs. Assume he builds 20 snowballs an hour but 2 melt every 15 minutes.
hybrid
def snowball_time(): target = 60 built_per_hour = 20 melt_per_15_min = 2 melt_per_hour = melt_per_15_min * 4 net_per_hour = built_per_hour - melt_per_hour hours = target / net_per_hour return int(hours) print(snowball_time())
hybrid_synthetic_gsm8k_186
Develop an algorithm to find the total minutes John spends watching his new show, utilizing the fact that each episode is 20 minutes long and the total episode count is half the minutes per episode.
hybrid
def total_watch_minutes(): mins_per_episode = 20 episode_count = mins_per_episode / 2 total_mins = episode_count * mins_per_episode return int(total_mins) print(total_watch_minutes())
hybrid_synthetic_gsm8k_187
Write a savings projection app computing Rong and Neil's piggy bank coins after 10 years. Program Rong's monthly 20-coin rate and Neil's augmented rate (2/5 times more than Rong), multiplying by 120 months to output their combined total.
hybrid
def total_coins(): months = 120 rong_rate = 20 neil_rate = rong_rate + (rong_rate * (2 / 5)) combined_rate = rong_rate + neil_rate total = combined_rate * months return int(total) print(total_coins())
hybrid_synthetic_gsm8k_188
Code a distance calculator for Rosie's run that multiplies her initial speed of 10 miles per hour by 3 hours, then adds the distance she covers running at 5 miles per hour for the remaining 4 hours of her 7-hour workout.
hybrid
def run_distance(): speed1 = 10 time1 = 3 dist1 = speed1 * time1 speed2 = 5 time2 = 4 dist2 = speed2 * time2 total_dist = dist1 + dist2 return total_dist print(run_distance())
hybrid_synthetic_gsm8k_189
Write a script to compute Jonathan's remaining utensils after he starts with 24 measuring cups, calculates his measuring spoons as 2/3 of that amount, and gives 6 spoons to Pedro.
hybrid
def remaining_utensils(): cups = 24 spoons = cups * (2 / 3) spoons_given = 6 remaining_spoons = spoons - spoons_given total_remaining = cups + remaining_spoons return int(total_remaining) print(remaining_utensils())
hybrid_synthetic_gsm8k_190
Code an application to calculate the number of non-Girl Scout girls in a class of 200 fifth graders. The script should subtract the boys representing 2/5 of the total to find the girls, then isolate the 1/3 of girls not enrolled in the scouts.
hybrid
def non_girl_scouts(): total = 200 boys_fraction = 2 / 5 boys = total * boys_fraction girls = total - boys non_scout_fraction = 1 / 3 non_scouts = girls * non_scout_fraction return int(non_scouts) print(non_girl_scouts())
hybrid_synthetic_gsm8k_191
Jana has 27 puppies, two thirds of which are Pomeranians, and one third of the Pomeranians are girls. Create a routine evaluating how many girl Pomeranians Jana has.
hybrid
def girl_pomeranians(): total_puppies = 27 pomeranians = total_puppies * (2 / 3) girl_poms = pomeranians * (1 / 3) return int(girl_poms) print(girl_pomeranians())
hybrid_synthetic_gsm8k_192
Create an algorithm to deduce the number of old records brought in by 5 people who traded them at a 2-for-1 rate to leave with 7 new records between them.
hybrid
def old_records_traded(): new_records = 7 trade_rate = 2 old_records = new_records * trade_rate return old_records print(old_records_traded())
hybrid_synthetic_gsm8k_193
Draft a Python function that takes 60 daily loaves as input, deducts the two-thirds sold in the morning, and returns the afternoon sales given that half of the remainder is sold equally between the afternoon and evening.
hybrid
def afternoon_sales(): loaves = 60 morning_sold = loaves * (2 / 3) remainder = loaves - morning_sold # "half of the remainder is sold equally between the afternoon and evening." # Wait, does it mean (remainder * 0.5) is split equally, so afternoon gets (remainder * 0.5)/2? # "half of the remaind...
hybrid_synthetic_gsm8k_194
Write an algorithm that takes Paul's required target of 63 cupcakes, subtracts his current inventory of 8 chocolate and 40 toffee cupcakes, and returns the exact deficit he still needs to buy.
hybrid
def cupcakes_needed(): target = 63 chocolate = 8 toffee = 40 inventory = chocolate + toffee deficit = target - inventory return deficit print(cupcakes_needed())
hybrid_synthetic_gsm8k_195
Create a computational model to figure out the number of yellow balloons. Benny targeted 20 red balloons with 2 slices of bologna each, and threw 3 slices at each yellow balloon, using 58 slices in total.
hybrid
def yellow_balloons(): total_slices = 58 red_balloons = 20 slices_per_red = 2 red_slices = red_balloons * slices_per_red yellow_slices = total_slices - red_slices slices_per_yellow = 3 yellows = yellow_slices / slices_per_yellow return int(yellows) print(yellow_balloons())
hybrid_synthetic_gsm8k_196
Code a relational age calculator to find Jeff's age, knowing he is 10 years older than his sister Martha, who is 4 years younger than her 24-year-old boyfriend Mike.
hybrid
def jeffs_age(): mike = 24 martha = mike - 4 jeff = martha + 10 return jeff print(jeffs_age())
hybrid_synthetic_gsm8k_197
If Ann is 9 years old and her brother is twice her age, format a quick codebase check resolving how old her brother will be in 3 years.
hybrid
def brother_age_future(): ann_age = 9 brother_current = ann_age * 2 brother_future = brother_current + 3 return brother_future print(brother_age_future())
hybrid_synthetic_gsm8k_198
Write an age-calculation function to find Vince's current age, given that Liam is now 16 and was twice Vince's age two years ago.
hybrid
def vinces_age(): liam_current = 16 liam_past = liam_current - 2 vince_past = liam_past / 2 vince_current = vince_past + 2 return int(vince_current) print(vinces_age())
hybrid_synthetic_gsm8k_199
Design a profit-calculating algorithm for a hospital that processes 500 patients a day for 24 minutes each. The system needs to subtract the doctors' hourly rate of $150 from the hospital's billed hourly rate of $200 to find the net daily profit.
hybrid
def hospital_profit(): patients = 500 mins_per_patient = 24 total_mins = patients * mins_per_patient total_hours = total_mins / 60 billed_rate = 200 doctor_rate = 150 net_rate = billed_rate - doctor_rate daily_profit = total_hours * net_rate return int(daily_profit) print(...
hybrid_synthetic_gsm8k_200
Write a program that arrays Rose's flower collection—specifically 3 flowers with 5 petals, 4 with 6 petals, 5 with 4 petals, and 6 with 7 petals—then deducts one of each type of flower due to wind loss, and ultimately sums the total petals remaining for her vase.
hybrid
def remaining_petals(): # collections as tuples of (quantity, petals_per_flower) collections = [(3, 5), (4, 6), (5, 4), (6, 7)] total_petals = 0 for qty, petals in collections: remaining_qty = qty - 1 total_petals += remaining_qty * petals return total_petals print(remaining_petals(...