question
stringlengths
11
2.89k
code
stringlengths
20
7.24k
Margaret gets 800 MB of data for her cell phone each month. If she spends 600 MB watching Amazon Prime and 1/4 of what's left on Instagram, how many MB of data does she have left?
def solve() -> int: data_total = 800 data_amazon = 600 data_remaining = data_total - data_amazon data_instagram = data_remaining / 4 data_left = data_remaining - data_instagram result = data_left return result
Mia has 4 bags of candy. Each bag has 12 pieces of candy. She wants to share the candy equally with her 6 friends. How many pieces of candy does each friend get?
def solve() -> int: bags = 4 pieces_per_bag = 12 friends = 6 total_pieces = bags * pieces_per_bag pieces_per_friend = total_pieces / friends result = pieces_per_friend return result
There are 154 students in a school. If the school has 7 classes with an equal number of students in each class, how many students are in each class?
def solve() -> int: students_in_each_class = 154 / 7 result = students_in_each_class return result
Possible questions and programs are: Ben has three times as many sheep as Rachel, and Rachel has 20 more sheep than Jim. If Jim has 40 sheep, how many sheep do the three have together?
def solve() -> int: rachel = 40 + 20 ben = rachel * 3 total = 40 + rachel + ben result = total return result
A rectangular box has dimensions of 3m by 4m by 5m. What is the volume of the box?
def solve() -> int: length = 3 width = 4 height = 5 volume = length * width * height result = volume return result
If Tom's legs constitute 45% of his total height, while his torso is 35% of his total height, and he is 70 inches tall, what percentage of his body is made up of his arms and head combined?
def solve() -> int: height = 70 legs_percentage = 45 torso_percentage = 35 legs_height = height * legs_percentage / 100 torso_height = height * torso_percentage / 100 arms_and_head_height = height - legs_height - torso_height body_percentage = (arms_and_head_height / height) *...
Student: Rachel had $8000 in the bank. She gave 30% of it to her brother and spent 20% of the remaining money on a car. How much money is left with Rachel now in dollars?
def solve() -> int: bank_balance = 8000 brother_share = bank_balance * 0.3 remaining_balance = bank_balance - brother_share car_expense = remaining_balance * 0.2 result = remaining_balance - car_expense return result
Emma has twelve erasers. She gives away four every year but her dad buys her one more every year. How many erasers will she have in seven years?
def solve() -> int: erasers = 12 for i in range(7): erasers -= 4 erasers += 1 result = erasers return result
Mary gets a salary of $4000 per month. She invests 10% of her salary every month. What is the total amount that Mary will invest in 1 year?
def solve() -> int: amount_per_month = 4000 * 0.1 total_amount = amount_per_month * 12 result = total_amount return result
A store sells pencils for $0.50 each. If a customer buys 10 pencils, how much will they pay in total?
def solve() -> int: pencil_cost = 0.50 num_pencils = 10 total_cost = pencil_cost * num_pencils result = total_cost return result
A car travels 380 kilometers in 6 hours. If the car travels at a constant speed, how far can it travel in 10 hours?
def solve() -> int: speed = 380/6 distance_in_10_hours = speed*10 result = distance_in_10_hours return result
If it takes Alex 2 minutes to make a sandwich, and he wants to make 6 sandwiches, how many minutes will it take him in total?
def solve() -> int: sandwich_time = 2 num_sandwiches = 6 total_time = sandwich_time * num_sandwiches result = total_time return result
A pizza is cut into 10 equal slices. If 4/5 of a pizza is eaten, how many slices are left?
def solve() -> int: total_slices = 10 eaten_slices = 4/5 * total_slices left_slices = total_slices - eaten_slices result = left_slices return result
Bob has a salary of $50,000 per year. If he gets a 4% raise, what will his new salary be?
def solve() -> int: salary = 50000 raise_percentage = 0.04 raise_amount = salary * raise_percentage new_salary = salary + raise_amount result = new_salary return result
Lily wants to make as many bracelets as possible this week. On Monday, she made 45 bracelets. She made 60% of the total bracelets on Tuesday and the rest of the bracelets on Wednesday. If she made the same number of bracelets on Tuesday and Wednesday, how many bracelets did she make on Tuesday and Wednesday combined?
def solve() -> int: monday_bracelets = 45 tuesday_bracelets = monday_bracelets * 0.6 wednesday_bracelets = tuesday_bracelets total_bracelets = monday_bracelets + tuesday_bracelets + wednesday_bracelets result = total_bracelets return result
Sam has 7 times as many toy cars as his brother. Together, they have 64 toy cars. How many car toys does Sam have?
def solve() -> int: total_number_of_cars = 64 brother_cars = total_number_of_cars / (7 + 1) sam_cars = brother_cars * 7 result = sam_cars return result
A company increased their profits by 30%. If their original profit was $20,000, what is their new profit?
def solve() -> int: original_profit = 20000 profit_percentage = 30 new_profit = original_profit * ((100 + profit_percentage) / 100) result = new_profit return result
Mike wants to ride the fastest roller coaster in the world, Formula Rossa. The minimum height to ride the roller coaster is 165 cm. Mike's sister is 155 cm, and Mike is 2/5 the height of his sister. How many more centimeters does Mike need to grow to ride Formula Rossa?
def solve() -> int: sister_height = 155 mike_height = (2/5) * sister_height minimum_height = 165 height_difference = minimum_height - mike_height result = height_difference return result
He just received $4250 salary and he has $5000 in savings already. How much money did Patrick save this month?
def solve() -> int: salary = 4250 percent_for_savings = 0.2 savings = 5000 money_saved_this_month = salary * percent_for_savings result = money_saved_this_month return result
Possible questions and programs: Maria sold 120 apples for $1.5 each and 80 oranges for $1.2 each. She spent $60 on buying the fruits and $20 on transportation. How much profit did she make?
def solve() -> int: revenue = 120 * 1.5 + 80 * 1.2 cost = 60 + 20 profit = revenue - cost result = profit return result
Monica and Patrick split a sum of money so that Monica takes 50% and Patrick takes the rest. If Patrick's share is $10,000, how much did they share?
def solve() -> int: monica_share = 50 patrick_share = 100 - monica_share patrick_amount = 10000 total_amount = (patrick_amount / patrick_share) * 100 result = total_amount return result
an and Anna are studying. Stan reads 4 books in 2 days and Anna reads 5 books in 3 days. How many days would it take them to read 9 books?
def solve() -> int: result = 0 booksStan = 4 daysStan = 2 booksAnna = 5 daysAnna = 3 booksTotal = 9 totalDaysStan = booksTotal * daysStan / booksStan totalDaysAnna = booksTotal * daysAnna / booksAnna result = totalDaysStan + totalDaysAnna return result
Molly and Rick need to make a table for their house. Molly can assemble 2 tables per hour while Rick can assemble 3 tables per hour. How many tables can they make together if they have 10 hours available?
def solve() -> int: time = 10 molly_speed = 2 rick_speed = 3 result = time*(molly_speed + rick_speed) return result
A company has to pay 2500€ to its employees. If the company deducts 8% for taxes, how much money will be left to distribute among the employees?
def solve() -> int: total_payment = 2500 tax_percentage = 8 tax_amount = (tax_percentage / 100) * total_payment money_after_taxes = total_payment - tax_amount result = money_after_taxes return result
A candy store has 700 pieces of candy. If they sell half of their candy in the morning and 1/3 of what's left in the afternoon, how many pieces of candy do they have at the end of the day?
def solve() -> int: candy_store = 700 morning_sale = candy_store / 2 remaining_candy = candy_store - morning_sale afternoon_sale = remaining_candy / 3 end_of_day_candy = remaining_candy - afternoon_sale result = end_of_day_candy return result
A train travels 120 miles in 2 hours. If it maintains the same speed, how far can it go in 5 hours?
def solve() -> int: distance = 120 time = 2 speed = distance / time new_time = 5 new_distance = speed * new_time result = new_distance return result
John has 50 apples. He gives his friend Kelly 3/4 of his apples. How many apples does he have left?
def solve() -> int: apples = 50 kelly_apples = apples * 3/4 leftover_apples = apples - kelly_apples result = leftover_apples return result
35% of the flowers in a garden are roses. 50% are tulips. If there are 600 flowers in the garden, how many flowers are neither roses nor tulips?
def solve() -> int: roses = 0.35 * 600 tulips = 0.5 * 600 complement = 600 - roses - tulips result = complement return result
Student: If a book that is 400 pages long is read in 20 days, how many pages does the reader need to read per day?
def solve() -> int: pages = 400 days = 20 pages_per_day = pages / days result = pages_per_day return result
The radius of a circle is 3cm. What is the circumference of the circle?
def solve() -> int: radius = 3 circumference = 2 * 3.14 * radius result = circumference return result
Emma baked 24 cupcakes and iced them with chocolate or vanilla. She used 9 ounces of chocolate icing and 15 ounces of vanilla icing. The chocolate icing was enough for 8 cupcakes and the vanilla icing was enough for the rest. How many ounces of icing did Emma use per cupcake?
def solve() -> int: total_icing = 9 + 15 vanilla_cupcakes = 24 - 8 icing_per_cupcake = total_icing / 24 result = icing_per_cupcake return result
A pizza has 12 slices and each slice has 300 calories. Andy ate 3 slices and burned 400 calories by exercising. Bob ate 4 slices and burned 200 calories by exercising. How many more calories did Bob consume than Andy?
def solve() -> int: andy = 3 * 300 bob = 4 * 300 andy_burn = 400 bob_burn = 200 andy_net = andy - andy_burn bob_net = bob - bob_burn diff = bob_net - andy_net result = diff return result
A recipe calls for 3 cups of flour and 1/4 cup of sugar per batch of cookies. If you want to make 4 batches of cookies, how much flour and sugar do you need in total?
def solve() -> int: flour_needed = 3 * 4 sugar_needed = 1/4 * 4 result = (flour_needed, sugar_needed) return result
4) Ben filled 4 jars with sand, then he filled 2 more than twice as many jars as he had filled with sand, then he filled 4 less than three times as many as he had filled. If he filled a total of 24 jars, how many did he originally fill?
def solve() -> int: num_jars_filled_orig = 0 num_jars_filled = 4 num_jars_filled_more = 2 * num_jars_filled num_jars_filled_less = 4 num_jars_filled_total = 24 num_jars_filled_orig = num_jars_filled_total - num_jars_filled_more - num_jars_filled_less result = n...
Student: The average GPA for the 8th graders is 4 less than the 11th graders, the 9th graders average GPA is 5 more than the 11th graders and the 10th graders average GPA is 6 less than the 9th graders. What is the average GPA of all the grades?
def solve() -> int: eleventh_grade_gpa = 0 ninth_grade_gpa = 0 tenth_grade_gpa = 0 eleventh_grade_gpa = eleventh_grade_gpa + 4 ninth_grade_gpa = eleventh_grade_gpa + 5 tenth_grade_gpa = ninth_grade_gpa - 6 result = (eleventh_grade_gpa + ninth_grade_gpa + tenth_grade_gpa) / 3 return resu...
You have 50 dollars in your pocket, and you want to buy a toy that costs 27 dollars. How much money will you have left after buying the toy?
def solve() -> int: total_money = 50 toy_price = 27 money_left = total_money - toy_price result = money_left return result
Sarah drives 20 minutes to her yoga class and back home every day. On Saturdays, she drives 1 hour to go hiking. How many minutes does Sarah spend driving in a week?
def solve() -> int: yoga_time_daily = 20 yoga_time_weekly = yoga_time_daily * 7 hiking_time_saturday = 60 total_driving_time = yoga_time_weekly + hiking_time_saturday result = total_driving_time return result
Chloe has 11 dresses, seven skirts and four pairs of pants, all black. She went shopping and bought some more clothes; each skirt she bought cost $10 more than each dress, and each pair of pants cost $20 more than each skirt. If each dress costs $50, how much more money than clothes did Chloe spend in total?
def solve() -> int: dresses = 11 skirts = 7 pants = 4 dress_cost = 50 skirt_cost = dress_cost + 10 pants_cost = skirt_cost + 20 additional_skirts = 5 additional_pants = 2 total_cost = (dresses * dress_cost) + (additional_skirts * skirt_cost) + (additional_pants * pants...
8. In a survey of a school, 40% of the students said they like mathematics, 23% like literature, 10% like history, and the rest like geography. If there are 280 students, how many students identified literature or mathematics as their favorite subject?
def solve() -> int: total_students = 280 percentage_math = 0.4 percentage_lit = 0.23 total_math = total_students * percentage_math total_lit = total_students * percentage_lit result = total_math + total_lit return result
A garbage bin is currently 4/5 full. If 50 pounds of trash were added, what is the maximum weight capacity of the bin?
def solve() -> int: bin_fullness = 4/5 trash_added = 50 bin_capacity = trash_added / (1 - bin_fullness) result = bin_capacity return result
A square has a perimeter of 16 cm. What is the length of one side of the square?
def solve() -> int: perimeter = 16 side = perimeter/4 result = side return result
A square has a side length of 9 centimeters. What is the total length of all 4 sides in centimeters?
def solve() -> int: total_length = 4 * 9 result = total_length return result
Alex spent $500 on a new phone and some accessories that cost $60. If he started with $1000, how much money does he have left?
def solve() -> int: money_spent = 500 + 60 starting_money = 1000 money_left = starting_money - money_spent result = money_left return result
Student: Rachel has $30 to spend on books. If each book costs $4, calculate the maximum number of books Rachel can buy and her total change.
def solve() -> int: money = 30 book_price = 4 num_books = money // book_price change = money % book_price result = (num_books, change) return result
A train travels at a constant speed of 120 km/h for 2 hours, then slows down to 80 km/h for 1.5 hours. How long does it take to cover a distance of 360 km?
def solve() -> int: distance_at_120 = 120 * 2 distance_at_80 = 80 * 1.5 remaining_distance = 360 - (distance_at_120 + distance_at_80) time_at_80 = remaining_distance / 80 total_time = 2 + 1.5 + time_at_80 result = total_time return result
Ella baked 24 cookies and shared them with her friends. She gave 6 cookies to Leo, 4 cookies to Maya, and 3 cookies to Sam. How many cookies did Ella have left for herself?
def solve() -> int: cookies_baked = 24 cookies_leo = 6 cookies_maya = 4 cookies_sam = 3 cookies_ella = cookies_baked - (cookies_leo + cookies_maya + cookies_sam) result = cookies_ella return result
Emily drives 150km to visit her grandparents. If she goes to see them 2 times every week, how much distance does she cover in a month?
def solve() -> int: distance_per_week = 150 * 2 distance_per_month = distance_per_week * 4 result = distance_per_month return result
Lily wants to make 175 doughnuts for her friends. She has already made 50 glazed and 40 chocolate covered. She wants to make an equal number of sprinkled and powdered sugar doughnuts for the rest. How many of each should she make?
def solve() -> int: total_doughnuts = 175 glazed_doughnuts = 50 chocolate_doughnuts = 40 remaining_doughnuts = total_doughnuts - glazed_doughnuts - chocolate_doughnuts sprinkled_doughnuts = remaining_doughnuts / 2 powdered_sugar_doughnuts = remaining_doughnuts / 2 result = f'S...
There are 100 patients and 20 doctors at a clinic. If they divide the patients into 5 wards, each ward has how many patients and doctors? Jane splits the cost of 80 muffins with 5 other people for a breakfast meeting. They buy muffins at $2 per muffin. They also buy $30 of coffee and tea for the meeting. Jane buys a ca...
def solve() -> int: num_patients = 100 num_doctors = 20 num_wards = 5 patients_per_ward = num_patients // num_wards doctors_per_ward = num_doctors // num_wards cost_per_muffin = 2 num_muffins = 80 num_people = 5 total_cost_muffins = cost_per_muffin * num_muffins sh...
Sarah started off with 10 pencils. She bought another 15 pencils and then lost 5. How many pencils does she have now?
def solve() -> int: pencils = 10 + 15 - 5 result = pencils return result
James needs his little brother and sister to help him rake the leaves in exchange for movies. He agrees to give them 2 movies for every bag of leaves they rake. James has 16 movies and each pack of movies has 4 movies and costs $10. If they rake a total of 12 bags of leaves, how many packs of movies does James need to ...
def solve() -> int: movies_per_bag = 2 total_bags = 12 total_movies = 16 cost_per_pack = 10 movies_per_pack = 4 total_movies_earned = movies_per_bag * total_bags total_movies_left = total_movies + total_movies_earned total_packs_needed = (total_movies_left // movies_per_pack) + (tot...
Emma and Skipper were collecting shells at the beach. Emma found 15 brown shells, 10 yellow shells and 8 blue shells. Skipper found 10 brown shells, 14 yellow shells and 2 blue shells. If Alex found twice as many yellow shells as Emma and Skipper combined, how many yellow shells did Alex find?
def solve() -> int: total_yellow_shells = 0 total_yellow_shells += 10 total_yellow_shells += 14 total_yellow_shells *= 2 result = total_yellow_shells return result
A school has a total of 500 students. If 30% of the students are in the choir, how many students are in the choir?
def solve() -> int: students_in_choir = 500 * 0.30 result = students_in_choir return result
In a toy store, there were 300 toys for sale. Half of the toys were plush toys, while the rest were action figures. But some customers accidentally placed the toys in the wrong section. 25 plush toys were mistakenly put with the action figures, while 10 action figures were mistakenly put with the plush toys. How many p...
def solve() -> int: total_toys = 300 plush_toys = total_toys / 2 action_figures = total_toys / 2 plush_toys_mistakenly_in_action_figures = 25 action_figures_mistakenly_in_plush_toys = 10 plush_toys_in_action_figures = plush_toys_mistakenly_in_action_figures - action_figures_mistakenly_in_pl...
Abigail had 20 apples. She ate 3 apples and gave away 4 apples. How many apples are left?
def solve() -> int: num_apples = 20 num_apples -= 3 num_apples -= 4 result = num_apples return result
Student: Michael can drive 10 miles in 15 minutes, whereas his brother, Joe, can drive the same distance in 20 minutes. How much total time will it take for both of them to drive 10 miles?
def solve() -> int: distance = 10 michael_time = 15 joe_time = 20 total_time = michael_time + joe_time result = total_time return result
Student: Anna and John have a combined amount of coins in the ratio of 8:6. If they have a total of 210 coins, how many more coins does Anna have than John?
def solve() -> int: anna_coins = 0 john_coins = 0 total_coins = 210 anna_coins = total_coins * 8 / (8 + 6) john_coins = total_coins * 6 / (8 + 6) result = anna_coins - john_coins return result
A sum of money is divided among 6 people so that each person receives $500 less than the previous person. If the first person received $4000, what was the total sum of money?
def solve() -> int: num_people = 6 first_person_amount = 4000 difference = 500 total_amount = ((2 * first_person_amount) + (difference * (num_people - 1))) * (num_people / 2) result = total_amount return result
There are 40 students in a class and the ratio of boys to girls is 5:3. How many girls are in the class?
def solve() -> int: tot = 5 + 3 girl_ratio = 3/tot boys = 40 * 5/tot girls = 40 * girl_ratio result = girls return result
There are 105 students in a school, if 8 students left, how many students does the school have now?
def solve() -> int: n_students = 105 n_left = 8 result = n_students - n_left return result
Amir wanted to buy a new laptop that cost $900. He had saved up $600, but he needed to borrow the rest from his friend. His friend agreed to lend him the money, but with a 5% interest rate. How much did Amir have to pay his friend back after one year?
def solve() -> int: borrowed = 900 - 600 interest = 0.05 payback = borrowed * (1 + interest) result = payback return result
Sophie is organizing her closet. She has 10 shirts to fold, 4 pairs of jeans to put away, and 2 pairs of shoes to organize. If it takes her 1 minute to fold a shirt, 30 seconds to put away a pair of jeans, and 1 minute to organize a pair of shoes, how many minutes will it take her to finish?
def solve() -> int: num_shirts = 10 num_jeans = 4 num_shoes = 2 time_per_shirt = 1 time_per_jeans = 0.5 time_per_shoes = 1 total_time = num_shirts * time_per_shirt + num_jeans * time_per_jeans + num_shoes * time_per_shoes result = total_time return result
Student: John and his family drove 500 miles over the weekend, and drove an additional 200 miles the following day. How many total miles did they drive over the weekend?
def solve() -> int: miles_weekend = 500 miles_following_day = 200 total_miles = miles_weekend + miles_following_day result = total_miles return result
On planet Flora, there are three types of flowers: roses, lilies, and tulips. In a garden, there are 120 roses, 80 lilies, and 40 tulips. Each rose has 5 petals, each lily has 6 petals, and each tulip has 4 petals. If a bee collects one petal from each flower in the garden, how many petals will the bee collect in total...
def solve() -> int: roses = 120 lilies = 80 tulips = 40 rose_petals = 5 lily_petals = 6 tulip_petals = 4 total_petals = roses * rose_petals + lilies * lily_petals + tulips * tulip_petals result = total_petals return result
A restaurant has a flat charge of 10 dollars for a table reservation plus 5 dollars per guest. A group of people paid 125 dollars to reserve a table. How many people were they?
def solve() -> int: cost = 125 flat_charge = 10 charge_per_person = cost - flat_charge number_of_people = charge_per_person / 5 result = number_of_people return result
A bookstore sells books for $12 each. If a customer buys 5 books, how much will they have to pay, including a 10% tax?
def solve() -> int: book_price = 12 num_books = 5 subtotal = book_price * num_books tax = subtotal * 0.1 total = subtotal + tax result = total return result
Lily is a zookeeper. Her zoo has 3 elephants, 8 tigers, and 11 giraffes. If each elephant can eat 200 pounds of hay, which is triple the amount of what each tiger can eat, and each giraffe can eat double the amount of what each elephant can eat, how many pounds of hay will the animals eat in total?
def solve() -> int: elephants = 3 tigers = 8 giraffes = 11 elephant_hay = 200 tiger_hay = elephant_hay / 3 giraffe_hay = elephant_hay * 2 total_hay = (elephants * elephant_hay) + (tigers * tiger_hay) + (giraffes * giraffe_hay) result = total_hay return result
Student: A car travels at a speed of 60 miles per hour. How long will it take for the car to travel 300 miles?
def solve() -> int: speed = 60 distance = 300 time = distance / speed result = time return result
If the perimeter of a square is 60 cm, what is the area of the square?
def solve() -> int: perimeter = 60 one_side = perimeter / 4 area = one_side ** 2 result = area return result
Student: The P.T.O. provided sweatpants for the elementary students for track and field day. Each grade was given a different style. 105 Kindergartners wore slim-fit sweatpants that cost $11.15 each. 86 first graders wore boot-cut sweatpants that cost $10.30 each. 97 second graders wore wide-leg sweatpants that cost $1...
def solve() -> int: kindergarteners = 105 first_graders = 86 second_graders = 97 third_graders = 111 kindergarteners_cost = kindergarteners * 11.15 first_graders_cost = first_graders * 10.30 second_graders_cost = second_graders * 10.60 third_graders_cost = third_graders * 10.95 total...
At the amusement park, Zoe and her three friends, Leo, Tasha, and Ben, took turns riding the Ferris wheel. Zoe was able to ride for 2 rotations before getting too dizzy to continue. Leo was able to ride for three times longer than Zoe. Tasha could only ride for half as long as Leo. And Ben, who was afraid of heights, o...
def solve() -> int: zoe_rotations = 2 leo_rotations = 3 * zoe_rotations tasha_rotations = 0.5 * leo_rotations ben_rotations = 0 total_rotations = zoe_rotations + leo_rotations + tasha_rotations + ben_rotations time_spent = total_rotations * 5 result = time_spent return result
If the cost of 4 pens and 3 pencils is $55, and the cost of 5 pens and 4 pencils is $70, what is the cost of one pen and one pencil?
def solve() -> int: pens_1 = 4 pencils_1 = 3 cost_1 = 55 pens_2 = 5 pencils_2 = 4 cost_2 = 70 pen_cost = ((pencils_2 * cost_1) - (pencils_1 * cost_2)) / ((pens_1 * pencils_2) - (pens_2 * pencils_1)) pencil_cost = (cost_1 - (pen_cost * pens_1)) / pencils_1 result = (pen_cost, pencil_c...
Wilfred wants to buy a car that cost $18,000. He has $7,500 saved and gets a loan from the bank for the remaining balance. The loan has a 3% interest rate for 18 months. What is the total cost of the car after 18 months?
def solve() -> int: rate = 0.03 principal = 18000 payment = 75000 months = 18 nom = rate/12 denom = 1-(1+nom)**(-months) monthly_payment = (payment + principal*nom)/denom total_cost = monthly_payment * months result = total_cost return result
Ava can swim 4 laps in 5 minutes. How many laps on average can she swim in 1 hour and 15 minutes?
def solve() -> int: laps_per_minute = 4 / 5 laps_per_hour = laps_per_minute * 60 laps_per_hour_and_15_minutes = laps_per_hour * 1.25 result = laps_per_hour_and_15_minutes return result
Sam, Jack, and Emma want to complete a puzzle together. Each person can put together puzzle pieces at a different rate. Sam can put together 12 puzzle pieces in 20 minutes, Jack can put together 10 puzzle pieces in 30 minutes, and Emma can put together 8 puzzle pieces in 25 minutes. How many puzzle pieces can they put ...
def solve() -> int: sam_rate = 12/20 jack_rate = 10/30 emma_rate = 8/25 total_rate = sam_rate + jack_rate + emma_rate total_pieces = total_rate * 60 result = total_pieces return result
Student: Mrs. Johnson has bought a total of 120 apples, and 3/4 of them are red. How many apples are not red?
def solve() -> int: total_apples = 120 red_fraction = 3/4 red_apples = total_apples * red_fraction not_red_apples = total_apples - red_apples result = not_red_apples return result
A recipe calls for 2 and a half cups of sugar. How many tablespoons of sugar is that?
def solve() -> int: tablespoon_in_one_cup = 16 cups_of_sugar = 2.5 tablespoons_of_sugar = cups_of_sugar * tablespoon_in_one_cup result = tablespoons_of_sugar return result
Student: Anna and Ben are saving money for a trip. Anna saves $100 every month, while Ben saves 25% more than Anna every month. They plan to spend $2000 for the trip. How many months will it take them to save enough money?
def solve() -> int: anna_saving = 100 ben_saving = anna_saving * 1.25 total_saving = anna_saving + ben_saving trip_cost = 2000 months = trip_cost // total_saving result = months return result
If 5 grams of Zestea liquid soap can make 600,000 bubbles, and Lush liquid soap can make 80% as many bubbles per gram as Zestea liquid soap, then how many grams of Zestea liquid soap are needed to make the same number of bubbles as 4 grams of Lush liquid soap?
def solve() -> int: zestea_bubbles_per_gram = 600000 / 5 lush_bubbles_per_gram = zestea_bubbles_per_gram * 0.8 lush_bubbles = lush_bubbles_per_gram * 4 result = lush_bubbles / zestea_bubbles_per_gram return result
Student: A paint can covers 250 square feet of wall. If a wall is 10 feet tall and 20 feet wide, how many cans of paint are needed to completely paint the wall?
def solve() -> int: height = 10 width = 20 area = height * width coverage = 250 cans_needed = area / coverage result = cans_needed return result
In a basket, there are 5 apples for every 3 oranges. If there are 12 oranges, how many apples are in the basket?
def solve() -> int: oranges = 12 apples = (5/3) * oranges result = apples return result
One weekend, Dan, Eva and Sam went to the movies and bought popcorn and drinks. Dan bought a small popcorn for 3 dollars and a small drink for 2 dollars. Eva bought a medium popcorn for 4 dollars and a large drink for 3 dollars. Sam bought a large popcorn for 5 dollars and a medium drink for 2.5 dollars. How much did t...
def solve() -> int: dan_popcorn = 3 dan_drink = 2 eva_popcorn = 4 eva_drink = 3 sam_popcorn = 5 sam_drink = 2.5 total = dan_popcorn + dan_drink + eva_popcorn + eva_drink + sam_popcorn + sam_drink result = total return result
A recipe to make 12 cupcakes calls for 2 eggs. How many eggs would you need to make 48 cupcakes?
def solve() -> int: x = (2/12) * 48 eggs = x result = eggs return result
A taxi driver spends $1.50 per km driven. He can travel 5 km per liter of gas. He drives at a rate of 40 km per hour. If he is paid $0.75 per km, how much money does he make if he drives for 6 hours?
def solve() -> int: rate_of_gas = 5 cost_per_km = 1.50 rate_of_driving = 40 payment_per_km = 0.75 driving_time = 6 distance = rate_of_driving * driving_time gas_consumed = distance / rate_of_gas cost_of_gas = gas_consumed * cost_per_km earnings = distance * payment_...
Sophie collects seashells from the beach every day. She needs 500 seashells to make a necklace. If she has already collected 40% of the seashells she needs, and she collects 15 seashells every day, how many days will it take Sophie to collect all the seashells she needs?
def solve() -> int: total_seashells_needed = 500 seashells_collected = total_seashells_needed * 0.4 seashells_left_to_collect = total_seashells_needed - seashells_collected seashells_collected_per_day = 15 days_needed = seashells_left_to_collect / seashells_collected_per_day result = d...
A phone battery can last for 8 hours if fully charged. If the battery is currently at 40%, how many more hours can the phone be used before the battery dies?
def solve() -> int: battery_life = 8 percent_remaining = 0.4 hours_remaining = battery_life * percent_remaining result = hours_remaining return result
In 2019, the Boston Celtics won 48 games. The Toronto Raptors won 15 more games than the Celtics. How many more games did the Raptors win than the average of the two teams?
def solve() -> int: raptors_games = 48 + 15 average_games = (48 + raptors_games) / 2 difference = raptors_games - average_games result = difference return result
Chloe has half as many apples as Emma. Emma has 5 times as many apples as Lily. Lily has twice as many apples as Jenna. If Jenna has 20 apples, how many apples does Chloe have?
def solve() -> int: jenna_apples = 20 lily_apples = 2 * jenna_apples emma_apples = 5 * lily_apples chloe_apples = emma_apples / 2 result = chloe_apples return result
Student: A company wants to distribute 50 pens among its 10 employees equally. How many pens will each employee get?
def solve() -> int: pens = 50 employees = 10 pens_per_employee = pens / employees result = pens_per_employee return result
David spent 1/4 of his money to buy a bike, and 1/3 of the remaining money to buy a watch. If he had $540 left in his wallet, how much money did he have at first?
def solve() -> int: bike_cost = 0 watch_cost = 0 remaining_money = 540 total_cost = bike_cost + watch_cost first_amount = (540 / (1/3) * (1/4)) result = first_amount return result
Sophie needs to make a pyramid of oranges that's seven levels tall. Each level of the pyramid has a square base where each side is two oranges longer than the level above it. The top level has just one orange. How many oranges does Sophie need?
def solve() -> int: level = 1 oranges = 0 while level <= 7: base = level + 1 oranges += base ** 2 - (level ** 2) level += 1 result = oranges + 1 return result
Paul read a book with one-third of the number of pages in Stan's book added by 100. How many pages are in Paul's book?
def solve() -> int: total_pages_stan = 400/2 + 400/5 - 200*2/3 mult_total_stan = 1/3 * total_pages_stan add_pages = 100 total_pages_paul = mult_total_stan + add_pages result = total_pages_paul return result
A triangle has a base of 8cm and a height of 12cm. What is the area of the triangle?
def solve() -> int: base = 8 height = 12 area = 0.5 * base * height result = area return result
``` A circular table has a diameter of 80 cm. What is its approximate circumference in meters?
def solve() -> int: pi = 3.14 diameter = 80 radius = diameter / 2 circumference = 2 * pi * radius/100 result = circumference return result
Lila buys 5 pounds of coffee every month for $10 per pound. If she receives a cash refund of $0.50 per pound from the store when she brings the coffee grounds back for composting, how many pounds of coffee can she buy every year using her refund money?
def solve() -> int: pounds_per_month = 5 cost_per_pound = 10 refund_per_pound = 0.50 pounds_per_year = pounds_per_month * 12 refund_money_per_year = pounds_per_year * refund_per_pound result = refund_money_per_year / cost_per_pound return result
A dance company hires 15 professional dancers to rehearse for a new production. Each dancer gets $200/day. They also employ two choreographers who are paid double the amount that a dancer receives. What is the total cost of labor for one day? A restaurant has twice as many tables as chairs. If there are 50 chairs, how ...
def solve() -> int: dancers = 15 dancer_wage = 200 choreographers = 2 choreographer_wage = 2 * dancer_wage total_cost = (dancers * dancer_wage) + (choreographers * choreographer_wage) chairs = 50 tables = 2 * chairs result = total_cost, tables ...
``` There are 60 kids in a field trip. They can all fit in 4 buses, but how many kids are in each bus?
def solve() -> int: kids_per_bus = 60/4 result = kids_per_bus return result
Felix spends 7 minutes washing the dishes and 2 times that amount of time writing stories. How much time does Felix spend on these activities total?
def solve() -> int: time_washing = 7 time_writing = 2 * time_washing total_time = time_washing + time_writing result = total_time return result
Laura took her van on a road trip with her friends. Her van can go 18 miles per gallon of gas, and her gas tank has a capacity of 20 gallons. If she already traveled 220 miles, how many more miles can she drive before needing to refill her tank?
def solve() -> int: miles_per_gallon = 18 gas_tank_capacity = 20 miles_traveled = 220 remaining_gas = gas_tank_capacity - (miles_traveled / miles_per_gallon) remaining_miles = remaining_gas * miles_per_gallon result = remaining_miles return result
Tara created 10 batches of cookies. Each batch had 30 cookies. If James made 3 fewer batches than Tara, but each batch had 5 more cookies, how many cookies did they bake altogether?
def solve() -> int: tara_batches = 10 tara_cookies_per_batch = 30 james_batches = tara_batches - 3 james_cookies_per_batch = tara_cookies_per_batch + 5 tara_total_cookies = tara_batches * tara_cookies_per_batch james_total_cookies = james_batches * james_cookies_per_batch total_cookies = tar...