question
stringlengths
11
2.89k
code
stringlengths
20
7.24k
In the pet store, each customer buys a different number of bags of food. Each customer with one bag of dog food carries 10 pounds, each customer with two bags of cat food carries 12 pounds, and each customer with three bags of bird food carries 15 pounds. If there are 9 customers who buy one bag of dog food, 6 customer...
def solve() -> int: dog_food_weight = 10 * 9 cat_food_weight = 12 * 6 bird_food_weight = 15 * 2 total_weight = dog_food_weight + cat_food_weight + bird_food_weight result = total_weight return result
A toy store has 35 red toys and 45 blue toys. If the store wants to have an equal number of each color toy, how many red toys should they sell?
def solve() -> int: total_toys = 35 + 45 num_red_selling = (total_toys/2) - 35 result = num_red_selling return result
Mike and Sarah were running a marathon. Mike was able to run 5 miles while Sarah ran 2 more miles than Mike. After running, they took a break and removed 2 miles from their track and added 3 times as many miles as they removed. How many miles did they run now?
def solve() -> int: mike_miles = 5 sarah_miles = mike_miles + 2 total_miles = mike_miles + sarah_miles total_miles -= 2 total_miles += 3 * 2 result = total_miles return result
Oliver solves 10 math problems every day for 14 days. His sister, Ava, solves math problems that are twice as hard as Oliver's but only solves half as much problems as Oliver. How many total math problems did they solve and what was the level of difficulty for Ava's problem?
def solve() -> int: oliver_problems_per_day = 10 oliver_days = 14 oliver_total_problems = oliver_problems_per_day * oliver_days ava_problems_per_day = oliver_problems_per_day / 2 ava_total_problems = ava_problems_per_day * oliver_days total_problems = oliver_total_problems + ava_total_...
At the Wang family brunch, there were 48 eggs and one fourth as many pancakes. One third of the eggs were scrambled and one half of the pancakes were blueberry. How many eggs were not scrambled and how many pancakes were not blueberry?
def solve() -> int: eggs = 48 pancakes = 0.25 * eggs scrambled = 0.333 * eggs blueberry = 0.5 * pancakes not_scrambled = eggs - scrambled not_blueberry = pancakes - blueberry result = (not_scrambled, not_blueberry) return result
At a museum, there are 10 curators who each get to choose an exhibit to feature every week. If each curator can only choose one exhibit once every 4 weeks, how many times a year does each curator get to choose an exhibit?
def solve() -> int: num_curators = 10 num_weeks = 52 num_choices_per_year = num_weeks // 4 choices_per_curator = num_choices_per_year // num_curators result = choices_per_curator return result
A car goes 50 miles per hour. How many minutes would it take for the car to travel 30 miles?
def solve() -> int: distance = 30 speed = 50 time_in_hours = distance/speed time_in_minutes = time_in_hours*60 result = time_in_minutes return result
Jay has 8 fewer black pencils than blue pencils, and 5 more red pencils than black pencils. If Jay has a total of 48 pencils, how many blue pencils does he have?
def solve() -> int: pencils_black = 48 - 8 pencils_blue = pencils_black + 8 pencils_red = pencils_black + 5 total_pencils = pencils_black + pencils_blue + pencils_red result = pencils_blue return result
Tom can build a house in 12 months. His colleague Joe can build the same house in 8 months. If they work together, how long will it take them to build the house?
def solve() -> int: months1 = 12 months2 = 8 work1 = 1/months1 work2 = 1/months2 worktotal = work1 + work2 time = 1/worktotal result = time return result
Tom and Jerry went to a supermarket and bought groceries worth $120. Tom paid 60% of the total bill. How much did Jerry pay?
def solve() -> int: total_bill = 120 tom_share = 0.6 jerry_share = total_bill - (total_bill * tom_share) result = jerry_share return result
Student: Alice had $220 and spends $50 on clothes. How much money does she have left?
def solve() -> int: initial_amount = 220 spent_amount = 50 remaining_amount = initial_amount - spent_amount result = remaining_amount return result
James, Emily, and Sarah collect stamps. James has 58 stamps, Emily has 43 stamps, and Sarah has 29 stamps. Emily gave half of her collection to James for a bookmark, and then Sarah traded James 3 flower stamps for 1 bird stamp. How many stamps does James have in the end?
def solve() -> int: james_stamps = 58 emily_stamps = 43 sarah_stamps = 29 emily_stamps /= 2 james_stamps += emily_stamps james_stamps += 3 sarah_stamps -= 3 james_stamps -= 1 sarah_stamps += 1 result = james_stamps return result
Student: Sophia is taking a 10-hour flight. She wants to sleep for 4 hours on the plane. She also wants to watch 2 movies that are each 2.5 hours long. How many hours will she have left for other activities on the plane if the flight is not delayed?
def solve() -> int: flight_time = 10 sleep_time = 4 movie_time = 2.5 movies = 2 sleep_and_movie_time = sleep_time + movie_time * movies other_time = flight_time - sleep_and_movie_time result = other_time return result
Finn and Jack are snorkeling in the ocean. If there are a total of 40 flippers in the water, how many people are snorkeling with them? Emma wants to buy herself and her friends a slice of pizza and a can of soda. A slice of pizza costs $0.75 while a can of soda costs $0.5. If Emma has $7, how many of her friends can ha...
def solve() -> int: total_flippers = 40 flippers_per_person = 2 total_people = total_flippers // flippers_per_person pizza_cost = 0.75 soda_cost = 0.5 total_money = 7 total_items_cost = pizza_cost + soda_cost num_friends = (total_money - pizza_cost) // total_items_cost resu...
Jason is half of Alex's age. If the sum of their ages is 46, how old is Alex?
def solve() -> int: jason_age = 0 alex_age = 0 sum_age = 46 jason_age = sum_age/3 alex_age = jason_age*2 result = alex_age return result
Estela paints murals. She earns $20 per mural and paints 5 murals per hour, 8 hours a day and 6 days a week. If Estela paints for 3 weeks, how much money will she have earned?
def solve() -> int: rate = 20 murals_per_hour = 5 hours_per_day = 8 days_per_week = 6 weeks = 3 sessions_per_week = days_per_week * hours_per_day total_sessions = sessions_per_week * weeks total_murals = murals_per_hour * total_sessions pay = rate * total_murals result ...
A geologist discovered three rock formations from different periods in one mountain. The geologist dated the first rock formation as 605 years more recent than the second rock formation. The third rock formation was dated 4000 years older than the first rock formation. The fourth rock formation was half as old as the t...
def solve() -> int: first_rock_formation = 4200 - 4000 third_rock_formation = first_rock_formation + 4000 fourth_rock_formation = third_rock_formation / 2 second_rock_formation = first_rock_formation - 605 result = second_rock_formation return result
Bill is twice as old as John, and Cindy is 3 years younger than John. If Bill is 36, how old is Cindy?
def solve() -> int: bill_age = 36 john_age = bill_age/2 cindy_age = john_age-3 result = cindy_age return result
On Thursday, a certain park got 1.8 feet inches of snow. On Saturday, it got an additional 10.5 inches of snow. After which a further 0.7 inches melted away. On that same day, 6 times the amount of the snow that fell on Thursday was added. How many feet of snow is in the park now?
def solve() -> int: Thursday = 1.8 Saturday = 10.5 meltaway = 0.7 ThursPtFeet=Thursday/12 SatPtFeet=Saturday/12 MeltPtFeet=meltaway/12 sum1 = ThursPtFeet + SatPtFeet sum2 = sum1 - MeltPtFeet six = sum2 * 6 result = sum2 + six return result
A carton of juice weighs 1.5 pounds, and a can of soda weighs 12 ounces. If Jenny buys 2 cartons of juice and 8 cans of soda, how many pounds does she have to carry?
def solve() -> int: juice_weight = 1.5 soda_weight = 12 / 16 num_juices = 2 num_sodas = 8 total_weight = num_juices * juice_weight + num_sodas * soda_weight result = total_weight return result
In a park, 50 fields are available for sports activities, with each field taking up 3 spots. How many fields can still be allocated to the games if 8 fields have already been taken?
def solve() -> int: num_fields = 50 spots_per_field = 3 fields_taken = 8 available_spots = num_fields * spots_per_field spots_taken = fields_taken * spots_per_field spots_available = available_spots - spots_taken fields_available = spots_available // spots_per_field result...
Student: - After Max's art show, he sold 3 paintings and received 3 compliments from each of his 11 customers. How many compliments did Max receive?
def solve() -> int: num_paintings_sold = 3 num_customers = 11 num_compliments_per_customer = 3 total_compliments = num_customers * num_compliments_per_customer result = total_compliments return result
A pizza costs $16 and is divided equally amongst 4 people. If Liz and her two friends split the cost, how much money does Liz pay?
def solve() -> int: pizza_cost = 16 num_people = 4 share = pizza_cost / num_people liz_share = share * 2 result = liz_share return result
A school has a total of 100 bicycles, skateboards, and rollerblades in their storage room. Each bicycle has 2 wheels, each skateboard has 4 and each rollerblade has 6. What is the total number of wheels in the storage room?
def solve() -> int: bicycles = 100 skateboards = 100 rollerblades = 100 bicycle_wheels = bicycles * 2 skateboard_wheels = skateboards * 4 rollerblade_wheels = rollerblades * 6 total_wheels = bicycle_wheels + skateboard_wheels + rollerblade_wheels result = total_wheels ...
Sam decides to stop buying fuel for his car and instead siphons fuel from other people's cars. He siphons 2 gallons every day. He doesn't buy fuel for 4 weeks. If one gallon of fuel is $3, how much did he save?
def solve() -> int: siphon_rate = 2 weeks = 4 days_per_week = 7 fuel_price = 3 total_days = weeks * days_per_week total_fuel_siphoned = siphon_rate * total_days total_money_saved = total_fuel_siphoned * fuel_price result = total_money_saved return result
If a recipe requires 2 cups of flour for every 3 cups of sugar, and you need 6 cups of flour, how much sugar should you use?
def solve() -> int: flour_needed = 6 sugar_to_flour_ratio = 3/2 sugar_needed = flour_needed * sugar_to_flour_ratio result = f'{sugar_needed} cups' result = sugar_needed return result
Tom saves $5 every day, 5 days a week, for each of his 12 months of saving. How much money does Tom save in a year?
def solve() -> int: daily_savings = 5 weekly_savings = 5 months = 12 days_in_year = 365 total_days_saving = weekly_savings * days_in_year / 7 total_savings = daily_savings * total_days_saving * months result = total_savings return result
A car travels 60 miles per hour. How many minutes does it take to travel 42 miles?
def solve() -> int: speed = 60 distance = 42 time_in_hours = distance / speed time_in_minutes = time_in_hours * 60 result = time_in_minutes return result
The cost of transporting 100 sacks of rice, each weighing 10 kg, is $5000. What's the cost of transporting half as many sacks of rice, each weighing 2/5 times as many kgs?
def solve() -> int: rice_sacks = 100 rice_weight = 10 transport_cost = 5000 half_rice_sacks = rice_sacks / 2 new_rice_weight = (2/5) * rice_weight new_transport_cost = (half_rice_sacks * new_rice_weight) / rice_weight * transport_cost result = new_transport_cost return res...
A family drove 250 miles on their vacation. They drove 70 miles on the first day and the rest on the second day. How many miles did they drive on the second day?
def solve() -> int: total_miles = 250 miles_first_day = 70 miles_second_day = total_miles - miles_first_day result = miles_second_day return result
Lucas needs to buy a new lawnmower. The cost of the lawnmower is $400, but he can rent one for $60 per week for 8 weeks. He also needs to buy gasoline which costs $20 per week. If he gets a 10% discount on his purchase, what is his final cost?
def solve() -> int: cost_of_lawnmower = 400 rental_cost_per_week = 60 number_of_weeks = 8 gasoline_cost_per_week = 20 rental_cost = rental_cost_per_week * number_of_weeks gasoline_cost = gasoline_cost_per_week * number_of_weeks total_cost = rental_cost + gasoline_cost discount ...
A new washing machine costs $600. Paul can make a down payment of $100. He will have to get a loan for the rest of the amount and make 18 equal monthly payments on it. The interest is 6% per year. How much will Paul's monthly payments be?
def solve() -> int: washing_machine_cost = 600 down_payment = 100 loan_amount = washing_machine_cost - down_payment number_of_payments = 18 interest_rate = 0.06 / 12 monthly_interest = loan_amount * interest_rate monthly_payment = (loan_amount + monthly_interest) / number_of_payments res...
If Mike is half the age of his sister, and his sister is three years older than their uncle, who is fourteen years older than their cousin, then how old is Mike? The cruise ship, Pacific-1, is a luxury liner made up of five identical decks that house the cabins for the guests. The five decks are connected together by a...
def solve() -> int: cousin_age = 1 uncle_age = cousin_age + 14 sister_age = uncle_age + 3 mike_age = sister_age / 2 total_rooms = 150 total_cabins = 5 * 30 total_suites = 5 * 15 total_restaurants = total_rooms - total_cabins - total_suites result = total_restauran...
Student: There are 20 students in a math class. each student was given 8 math exercises to do. How many math exercises were completed by all students in total?
def solve() -> int: num_students = 20 num_exercises = 8 total_exercises = num_students * num_exercises result = total_exercises return result
Zoey has $1000. She gave a third of her money to charity and then bought 12 things. Each thing cost $30. What is the total amount of Zoey's money remaining if all of Zoey's money is used to buy as many things as possible?
def solve() -> int: money = 1000 money = money * (1- 1/3) items = money // 30 remaining = money - (items * 30) result = remaining return result
If a box contains 52 marbles and 15 of them are red, what is the percentage of red marbles in the box?
def solve() -> int: num_red = 15 num_total = 52 percentage_red = (num_red/num_total)*100 result = percentage_red return result
Taylor bought 3 packs of 12 pens each, and 2 packs of 20 pencils each. If she sells each pen for $1, and each pencil for $2, how much money will she make?
def solve() -> int: pens = 3 * 12 pencils = 2 * 20 total = pens*1 + pencils*2 result = total return result
A pizza parlor charges $10 for a single topping pizza and $1.50 for each additional topping. If a customer orders a pizza with 5 toppings, how much does their pizza cost?
def solve() -> int: base_price = 10 topping_price = 1.50 toppings = 5 total_price = base_price + (topping_price * toppings) result = total_price return result
Student: Louie saved up a total of $中300. He invested the money and earned a total of 10%. How much does Louie have now?
def solve() -> int: total_saved = 300 interest_rate = 0.1 interest_earned = 0 total_amount = 0 interest_earned = total_saved * interest_rate total_amount = total_saved + interest_earned result = total_amount return result
Student: There are 88 students in a class. After the weekend, 32 more students joined the class. How many students are in the class now?
def solve() -> int: students = 88 new_students = 32 total_students = students + new_students result = total_students return result
A textbook is priced at $20. However, there is a 25% discount. What is the price of the textbook after the discount?
def solve() -> int: original_price = 20 discount = 0.25 discounted_price = original_price * (1 - discount) result = f'<<<{discounted_price}>>>' result = discounted_price return result
Timmy has 12 marbles and he loses 4 of them. How many marbles does he have left?
def solve() -> int: starting_marbles = 12 lost_marbles = 4 remaining_marbles = starting_marbles - lost_marbles result = remaining_marbles return result
It takes Grace 10 minutes to sweep a room that's 15 m². If she has 4 rooms of the same size to clean, how many minutes will it take her?
def solve() -> int: rooms_to_clean = 4 room_size = 15 cleaning_time_per_square_meter = 10/room_size total_cleaning_time = cleaning_time_per_square_meter * room_size * rooms_to_clean result = total_cleaning_time return result
Student: Lily has 4 cakes that are each cut into 12 slices. A fifth of the slices are given away to her friends. A fourth of the remaining slices are given away to her cousins. If Lily eats 3 slices, how many slices of cake are left?
def solve() -> int: cakes = 4 slices_per_cake = 12 total_slices = cakes * slices_per_cake friend_slices = total_slices // 5 remaining_slices = total_slices - friend_slices cousin_slices = remaining_slices // 4 remaining_slices = remaining_slices - cousin_slices lily_slices = 3 slices...
Melanie has 15 books. She wants to give 3 books to each of her 4 friends. How many books will she have left after she gives away all of them?
def solve() -> int: total_books = 15 num_friends = 4 num_books_per_friend = 3 total_books_given_away = num_friends * num_books_per_friend result = total_books - total_books_given_away return result
A basketball player whose free-throw shooting percentage is 85% attempts 20 free throws in a game. How many free throws will he make on average in one game?
def solve() -> int: percentage = 85 attempts = 20 made = attempts * (percentage / 100) result = made return result
If a shirt costs $24 and is discounted at 30%, what is the sale price?
def solve() -> int: original_price = 24 discount_percentage = 30 discount = original_price * discount_percentage/100 sale_price = original_price - discount result = sale_price return result
A fruit vendor sells 6 watermelons for $24. How much should you pay for 10 watermelons?
def solve() -> int: cost_per_melon = 24/6 total_cost = 10*cost_per_melon result = total_cost return result
A clothing store decreases the price of a certain jacket by 15% each year. If the original price was $120, what was the price after 5 years?
def solve() -> int: original_price = 120 discount_percentage = 0.15 years = 5 price_after_discount = original_price for i in range(years): price_after_discount -= price_after_discount * discount_percentage result = price_after_discount return result
If Olivia owns 4 times as many hamsters as Jack, and Jack has 6 hamsters, how many hamsters do Jack and Olivia have together?
def solve() -> int: jack_hamsters = 6 olivia_hamsters = 4 * jack_hamsters total_hamsters = jack_hamsters + olivia_hamsters result = total_hamsters return result
Maria and her family went to an aquarium on Saturday. Adult tickets cost $14 and child tickets cost $7. They were given a $8 discount for buying more than 5 tickets. How much did they spend if they bought three adult tickets and four child tickets?
def solve() -> int: adult_ticket_price = 14 child_ticket_price = 7 adult_tickets = 3 child_tickets = 4 total_cost = (adult_ticket_price * adult_tickets) + (child_ticket_price * child_tickets) if (adult_tickets + child_tickets) > 5: total_cost -= 8 result = total_cost ...
In a class of 30 students, there are 10 boys and the rest are girls. If the average weight of the boys is 60 kg and the average weight of the girls is 50 kg, what is the average weight of the whole class?
def solve() -> int: total_weight = (10*60) + ((30-10)*50) average_weight = total_weight / 30 result = average_weight return result
Lila is baking a cake. The recipe calls for chocolate chips. To make the chocolate chips Lila is going to chop up 4 chocolate bars into smaller pieces and add them to the cake batter. First she cuts each chocolate bar in half, then cuts each half into quarters. How many pieces of chocolate will Lila add to the cake bat...
def solve() -> int: chocolate_bars = 4 halves = 2 quarters = 4 total_pieces = chocolate_bars * halves * quarters result = total_pieces return result
Student: There are 10 bags of apples, each containing 15 apples. If 5 bags are given away, how many apples are left?
def solve() -> int: bags = 10 apples_per_bag = 15 bags_given_away = 5 apples_left = (bags - bags_given_away) * apples_per_bag result = apples_left return result
Student: 5. If 72 tiles are needed to fully cover a floor, how many tiles are required to cover one-eighth of the floor?
def solve() -> int: tiles_total = 72 tiles_eighth = tiles_total / 8 result = tiles_eighth return result
Cassie has 15 crayons and her brother has 5 more crayons. Their dad gave them each 4 crayons. How many crayons do they have between them?
def solve() -> int: cassie_crayons = 15 brother_crayons = cassie_crayons + 5 cassie_crayons += 4 brother_crayons += 4 total_crayons = cassie_crayons + brother_crayons result = total_crayons return result
Jamie wants to save $400 to buy a new phone. He gets $20 allowance every week. If he doesn't spend any money, how many weeks will it take him to save enough money to buy the phone?
def solve() -> int: weekly_savings = 20 total_savings = 400 weeks_to_save = total_savings // weekly_savings result = weeks_to_save return result
A wrestler weighs 91 kg at 1 month before a tournament. He aims to lose 7 kg in total. If he loses the same amount of weight each week, what will be his weight on the day of the tournament?
def solve() -> int: weight_before_tournament = 91 total_weight_loss = 7 weeks = 4 weight_loss_per_week = total_weight_loss / weeks weight_on_tournament_day = weight_before_tournament - weight_loss_per_week result = weight_on_tournament_day return result
A store sells 2 types of pencils, one for $0.50, and one for $0.75. If Sarah buys 6 pencils of each type, how much will she pay in total?
def solve() -> int: pencil_type_1_price = 0.50 pencil_type_2_price = 0.75 num_pencils_each_type = 6 total_price = (pencil_type_1_price*num_pencils_each_type) + (pencil_type_2_price*num_pencils_each_type) result = total_price return result
Five students went out to buy a printer, a scanner, and a router. The printer costs $180, the scanner costs $130, and the router costs $50. Two of the students agreed to pay for the printer and the rest shared the cost of the scanner and the router. How much more did the two students pay compared to the rest of the stu...
def solve() -> int: printer = 180 scanner = 130 router = 50 two_students_price = printer rest_students_price = scanner + router result = two_students_price - rest_students_price return result
Sophia has $200. She spent a third of it on clothes and then gave two-fifths of the remaining money to her mom. Her mother used half of the money she received to take Sophia and her brother out for lunch. She then put the rest into a savings account. How much money did Sophia's mother put in the savings account?
def solve() -> int: money = 200 clothes = money / 3 remaining_money = money - clothes mom_money = remaining_money * 2 / 5 lunch_money = mom_money / 2 savings_account = mom_money - lunch_money result = savings_account return result
Emma bought 6 candy bars from the store. She received 2 more candy bars from her friends. After that, her mom brought home a pack of 18 candy bars from the supermarket. How many candy bars does Emma have in total?
def solve() -> int: candy_bars_bought = 6 candy_bars_from_friends = 2 candy_bars_from_mom = 18 total_candy_bars = candy_bars_bought + candy_bars_from_friends + candy_bars_from_mom result = total_candy_bars return result
After working for 6 months, Tom's monthly salary increased by 25%. If he earned a total of $24000 after 2 years, what was his initial salary?
def solve() -> int: total_earning = 24000 months_in_a_year = 12 months_worked = 2 * months_in_a_year salary_increase_percentage = 25 salary_after_increase = total_earning / months_worked initial_salary = salary_after_increase / (1 + salary_increase_percentage / 100) result = i...
A room measures 10 feet by 12 feet. What is the area of the room?
def solve() -> int: length = 12 width = 10 area = length * width result = area return result
A bus travels 150km in 3 hours. If it continues to travel at the same speed, how far will it travel in 6 hours?
def solve() -> int: distance_travelled = 150 time_taken = 3 speed = distance_travelled / time_taken time_taken_new = 6 distance_travelled_new = speed * time_taken_new result = distance_travelled_new return result
A car traveled for 5 hours at a constant speed of 60 mph. What is the total distance traveled?
def solve() -> int: time = 5 speed = 60 distance = time * speed result = distance return result
Ria and Leo took a math test with 60 questions. Ria got 15% of the questions wrong, while Leo got 18 questions wrong. How many more questions did Leo get wrong than Ria?
def solve() -> int: ria_wrong = 0.15 * 60 leo_wrong = 18 difference = leo_wrong - ria_wrong result = difference return result
An unscrupulous hair salon is charging unexpected add-ons to customers. If my total bill was $120, there is a 20% fee for extras, and I got a haircut that costed $80, how much did the salon charge me for the add-ons?
def solve() -> int: total_bill = 120 haircut_cost = 80 fee_percentage = 0.2 fee_amount = total_bill * fee_percentage total_cost = total_bill - fee_amount add_ons_cost = total_cost - haircut_cost result = add_ons_cost return result
Jonathan bought 12 boxes of crackers. If each box contains 16 crackers, how many crackers did Jonathan buy in total?
def solve() -> int: number_of_boxes = 12 number_of_crackers_in_each_box = 16 result = number_of_boxes * number_of_crackers_in_each_box return result
Melanie’s toy shop has 100 sets of blocks. Each box contains 24 blocks. How many blocks are there in total?
def solve() -> int: n_boxes = 100 n_blocks = 24 total_blocks = n_boxes * n_blocks result = total_blocks return result
A phone call lasted 10 minutes and 30 seconds. How many seconds did the phone call last in total?
def solve() -> int: minutes = 10 seconds = 30 total_seconds = minutes * 60 + seconds result = total_seconds return result
Charmaine has 24 books. If she puts 3 books on each shelf in her room, how many shelves will she need?
def solve() -> int: number_of_books = 24 books_per_shelf = 3 number_of_shelves = number_of_books // books_per_shelf result = number_of_shelves return result
Student: Adam teaches 50 students a year. How many students will Adam have taught in total in the first 15 years of his teaching career if in the first 5 years of his career he taught only 40 students every year and in the last 10 years of his career he taught 60 students every year?
def solve() -> int: num_students_first_5_years = 40 num_students_last_10_years = 60 num_years = 15 total_num_students = (num_students_first_5_years * 5) + (num_students_last_10_years * 10) result = total_num_students return result
A restaurant bill amounts to $45. If a 10% tip is added, what is the total amount to be paid?
def solve() -> int: bill = 45 tip_percentage = 10 tip = (bill * tip_percentage) / 100 total_bill = bill + tip result = total_bill return result
Alex bought 3 apples and 5 oranges. The cost of an apple is $0.50 and the cost of an orange is $0.75. How much did Alex spend in total?
def solve() -> int: costApple = 0.50 costOrange = 0.75 totalAppleCost = costApple*3 totalOrangeCost = costOrange*5 totalCost = totalAppleCost + totalOrangeCost result = totalCost return result
If it takes 15 athletes 2 months to train for a marathon, how long will it take 20 athletes to train for the same marathon working at the same rate?
def solve() -> int: athletes_1 = 15 months_1 = 2 athletes_2 = 20 rate_1 = athletes_1 / months_1 months_2 = athletes_2 / rate_1 result = months_2 return result
A recipe calls for 2 cups of flour and 1/2 cup of sugar. If there are only 1/3 cup of sugar available, how much flour is needed to keep the ratio of ingredients the same?
def solve() -> int: flour_needed = (1/2*1)/(1/3) result = flour_needed return result
Last year, Yolanda was three times the age of her cousin Sakura. Now, Yolanda is 26. How old was Sakura a year ago?
def solve() -> int: a = 26 b = 1 result = 9.333 return result
A rectangular garden has a length of 15 meters and a width of 10 meters. The gardener wants to plant flowers along the four edges of the garden, leaving a meter of space between each flower. If each flower takes up 0.25 square meters of area, how many flowers can the gardener plant?
def solve() -> int: inner_length = 15 - 2 inner_width = 10 - 2 inner_area = inner_length * inner_width total_area = 15 * 10 outer_area = total_area - inner_area flower_area = 0.25 flowers = outer_area / flower_area result = flowers return result
Ethan plans to go for a bike ride with his friend at 6 pm. He can only goSarah wants to reduce her carbon footprint and is considering buying a reusable water bottle. If producing the bottle releases 450 pounds of carbon dioxide and each plastic water bottle releases 0.02 ounces of carbon dioxide, how many plastic wate...
def solve() -> int: producing_co2 = 450 plastic_bottle_co2 = 0.02 pounds_to_ounces = 16 producing_co2_ounces = producing_co2 * pounds_to_ounces num_plastic_bottles = producing_co2_ounces / plastic_bottle_co2 result = num_plastic_bottles return result
If a bakery can make 40 cakes in 35 minutes, how many cakes can they make in 1 hour and a half?
def solve() -> int: cakes_per_minute = 40 / 35 cakes_per_hour = cakes_per_minute * 60 cakes_per_hour_and_a_half = cakes_per_hour * 1.5 result = cakes_per_hour_and_a_half return result
Rachel is cooking a stir-fry. She needs 7 carrots to complete her recipe. She likes to have a variety of sizes, so she slices each carrot into 18 pieces. Then she takes half of those slices and cuts them into 3 smaller pieces each. How many slices and pieces of carrot will Rachel use in her stir-fry?
def solve() -> int: carrots_needed = 7 slices_per_carrot = 18 total_slices = carrots_needed * slices_per_carrot slices_to_cut = total_slices / 2 smaller_slices_per_slice = 3 total_smaller_slices = slices_to_cut * smaller_slices_per_slice result = total_slices + total_smaller_slices retur...
an has 9 5-minute songs, 2 3-minute songs, and 10 2-minute songs in his playlist. How many minutes of music does he have in total?
def solve() -> int: song_length1 = 5 song_number1 = 9 song_length2 = 3 song_number2 = 2 song_length3 = 2 song_number3 = 10 total_minutes = (song_length1 * song_number1) + (song_length2 * song_number2) + (song_length3 * song_number3) result = total_minutes return result
Student: Leo eats a sixth of his cookies on Sunday. On Monday he bakes 18 more cookies. He now has a total of 54 cookies. How many cookies did he have before eating them on Sunday?
def solve() -> int: cookies_before_sunday = 0 cookies_after_sunday = 0 cookies_baked_monday = 0 total_cookies = 0 cookies_baked_monday = 18 total_cookies = 54 cookies_after_sunday = total_cookies - cookies_baked_monday cookies_before_sunday = cookies_after_sunday * 6 result = cookies...
Student: 5. In a month with 4 weeks, Marcus spends 4 hours a day, 2 days a week hiking. How much time does he have for hiking in the month?
def solve() -> int: hours_per_day = 4 days_per_week = 2 weeks_per_month = 4 total_hours = hours_per_day * days_per_week * weeks_per_month result = total_hours return result
Sara has $800 and she wants to save $300. She saves $70 every week. How many weeks will it take to save $300?
def solve() -> int: starting_amount = 800 amount_to_save = 300 amount_saved_weekly = 70 weeks_needed = (amount_to_save - (starting_amount - amount_saved_weekly)) / amount_saved_weekly result = weeks_needed return result
A carton of 30 eggs costs $7.80. If each egg would be sold separately, how much would 10 eggs cost?
def solve() -> int: egg_carton_cost = 7.80 num_eggs_carton = 30 cost_per_egg = egg_carton_cost / num_eggs_carton num_eggs_to_buy = 10 cost_for_10_eggs = cost_per_egg * num_eggs_to_buy result = cost_for_10_eggs return result
Logan is keeping track of how many pages he writes in a week. He writes for an hour every day, except for Saturday, and writes two pages each time. Additionally, he writes three pages every evening on Sunday. How many pages does he write in a week?
def solve() -> int: pages_per_hour = 2 pages_per_evening = 3 hours_per_day = 1 days_per_week = 7 pages_weekdays = (days_per_week - 1) * hours_per_day * pages_per_hour pages_sunday_evening = pages_per_evening total_pages = pages_weekdays + pages_sunday_evening result =...
Ava spent 300 dollars on a new bike. The bike cost 200 dollars and the rest of the cost was in taxes. What was the tax percentage?
def solve() -> int: cost_of_bike = 200 total_cost = 300 tax_amount = total_cost - cost_of_bike tax_percentage = (tax_amount / cost_of_bike) * 100 result = tax_percentage return result
Alex wants to solve 500 math problems this week. He has already solved 213 problems. How many more problems does he need to solve to meet his goal?
def solve() -> int: problems_goal = 500 problems_solved = 213 problems_remaining = problems_goal - problems_solved result = problems_remaining return result
A recipe for brownies requires 1/2 cup of oil, 1/4 cup of water, and 2 eggs for every 9 x 13 inch pan. How much oil, water, and eggs are needed to make 3 pans of brownies?
def solve() -> int: oil_per_pan = 0.5 water_per_pan = 0.25 eggs_per_pan = 2 pans = 3 total_oil = oil_per_pan * pans total_water = water_per_pan * pans total_eggs = eggs_per_pan * pans result = (total_oil, total_water, total_eggs) return result
Student: Devin can run around an oval track 8 times in 12 minutes. If Leah needs twice as long to finish the same task, how much time does it take both of them to finish the task?
def solve() -> int: devin_laps = 8 devin_time = 12 leah_laps = 8 leah_time = 2 * devin_time total_time = max(devin_time, leah_time) result = total_time return result
Victoria has 3 parakeets, 2 canaries, and 1 cockatiel. If she spends $6 to feed each parakeet, $5 to feed each canary, and $12 to feed each cockatiel every month, how much does she spend every year to feed all her birds?
def solve() -> int: parakeets = 3 canaries = 2 cockatiel = 1 parakeet_cost = 6 canary_cost = 5 cockatiel_cost = 12 monthly_cost = (parakeets * parakeet_cost) + (canaries * canary_cost) + (cockatiel * cockatiel_cost) yearly_cost = monthly_cost * 12 result = yearly_cost ...
Sam bought 5 bags of apples. If each bag weighs 3 pounds, how many pounds of apples did he buy?
def solve() -> int: bags_of_apples = 5 pounds_per_bag = 3 total_weight = bags_of_apples * pounds_per_bag result = total_weight return result
Sarah was given $100. She spent 20% on clothes, 10% on food, and $25 on a movie ticket. How much money does she have left?
def solve() -> int: money_received = 100 clothes_spending = money_received * 0.2 food_spending = money_received * 0.1 movie_ticket = 25 money_left = money_received - clothes_spending - food_spending - movie_ticket result = money_left return result
Susan has 4 bags of candy with 25 pieces in each bag. She gives 10 pieces of candy to her friend. How many pieces of candy does Susan have left?
def solve() -> int: candy_per_bag = 25 total_bags = 4 total_candy = candy_per_bag * total_bags pieces_given = 10 total_candy_left = total_candy - pieces_given result = total_candy_left return result
A shirt is sold for $45, which is 18% less than its original price. What was the original price of the shirt?
def solve() -> int: price_after_discount = 45 discount_percentage = 18 original_price = price_after_discount / (1 - discount_percentage / 100) result = original_price return result
James bought 3 gallons of paint for $45. If he uses 1/4 gallon per room and charges $20 per room, how many rooms must he paint to recover his capital?
def solve() -> int: paint_gallons = 3 paint_cost = 45 paint_cost_per_gallon = paint_cost / paint_gallons paint_per_room = 1/4 room_cost = 20 rooms_painted = paint_gallons / paint_per_room capital_spent = paint_cost income_earned = rooms_painted * room_cost while income_earn...
David Davis has a pizza with 8 slices. He eats 2 slices and shares the rest equally with his 2 sisters. How many slices does each sister get?
def solve() -> int: slices_left = 8 - 2 slices_per_sister = slices_left / 2 result = slices_per_sister return result
Max bought 5 apples and his friend bought 3 more than him. If both of them equally divided their apples, how many apples did each person get?
def solve() -> int: max = 5 friend = max + 3 total_apples = max + friend each_person = total_apples/2 result = each_person return result