question
stringlengths
11
2.89k
code
stringlengths
20
7.24k
A gardener waters 50 plants in 1 hour. On the second day, the gardener waters 5 more plants than on the first day and takes 10 minutes less time. On the third day, the gardener waters twice as many plants as on the second day but takes twice as long. How many plants has the gardener watered in total for the three days?
def solve() -> int: plants_day1 = 50 plants_day2 = plants_day1 + 5 time_day2 = 60 - 10 plants_day3 = plants_day2 * 2 time_day3 = time_day2 * 2 total_plants = plants_day1 + plants_day2 + plants_day3 result = total_plants return result
John ran 6 kilometers in 35 minutes. What was his average speed in kilometers per hour?
def solve() -> int: time_in_hours = 35 / 60 distance_in_kilometers = 6 speed = distance_in_kilometers / time_in_hours result = speed return result
A rectangle has an area of 81 square feet and a perimeter of 42 feet. What is the length of the shorter side of the rectangle?
def solve() -> int: area = 81 perimeter = 42 length = perimeter/4 width = area/length shortest_side = min(length, width) result = shortest_side return result
A fruit seller sells 30% of his stock of apples and 50% of his stock of oranges. If he had 200 apples and 100 oranges before selling, how many fruits are left?
def solve() -> int: apples = 200 oranges = 100 apples_sold = apples * 30 / 100 oranges_sold = oranges * 50 / 100 apples_left = apples - apples_sold oranges_left = oranges - oranges_sold fruits_left = apples_left + oranges_left result = fruits_left return result
Liam goes shopping and buys a jacket for $45, a pair of jeans for $30, and a hat for $15. If he pays with a credit card that offers 6% cashback, how much is his total rebate?
def solve() -> int: total = 45 + 30 + 15 rebate = total * 0.06 result = rebate return result
There are 100 pens to be distributed among four students. Amy got twice as many pens as Ben, and Chris got 3 less than half the number of pens Amy got. If Dan got 15 pens, how many pens did Ben get?
def solve() -> int: dan = 15 chris = (dan // 2) - 3 ben = (100 - dan - chris) // 3 amy = 2 * ben result = ben return result
A soccer team played 15 matches. They won 10 matches, lost 4 matches and drew the remaining matches. How many matches did they draw?
def solve() -> int: total = 15 wins = 10 losses = 4 draws = total - wins - losses result = draws return result
Tom has 1080 pieces of candy. He gives two-sevenths of the candy to his friend, and then takes one-sixth of the rest of the candy to a party. How many pieces of candy does Tom have left?
def solve() -> int: numberOfCandy = 1080 candyGivenToFriend = numberOfCandy * 2/7 candyRemaining = numberOfCandy - candyGivenToFriend candyTakenToParty = candyRemaining * 1/6 remainingCandy = candyRemaining - candyTakenToParty result = remainingCandy return result
Student: Darya shared her candy equally with three of her friends. She gave each friend lollipops, with the first friend having intially five less lollipops than the second, and third friend having intially three more lollipops than the second. If, in total, Darya gave 28 lollipops, how many lollipops did each friend g...
def solve() -> int: total_lollipops = 28 difference_1 = 5 difference_2 = 3 lollipops_2 = total_lollipops // 3 lollipops_1 = lollipops_2 - difference_1 lollipops_3 = lollipops_2 + difference_2 result = lollipops_1 + lollipops_2 + lollipops_3 return result
Four years ago, an amusement park had 100 rides. If the amusement park has since increased their rides by three times and 50% of their current rides are under maintenance, how many rides are currently functioning in the park?
def solve() -> int: initial_rides = 100 current_rides = initial_rides * 3 maintenance_rides = current_rides * 0.5 functioning_rides = current_rides - maintenance_rides result = functioning_rides return result
imon and Mary were going on a picnic and each bought snacks for the trip. Simon spent $14 while Mary's snacks cost her twice as much. How much money did they spend in total?
def solve() -> int: total = 0 simons_snacks = 14 marys_snacks = 2 * simons_snacks total = simons_snacks + marys_snacks result = 42 return result
Alex wants to make a cake. She will need 1 1/2 cups of baking powder and 1/2 cup of plain flour. A box of baking powder costs $6 and a bag of plain flour costs $2. How much money does Alex need to buy the ingredients?
def solve() -> int: cost_baking_powder = 6 amount_baking_powder = 1.5 cost_plain_flour = 2 amount_plain_flour = 0.5 total_cost_baking_powder = cost_baking_powder * amount_baking_powder total_cost_plain_flour = cost_plain_flour * amount_plain_flour total_cost = total_cost_baking_pow...
A train travels 180 miles in 2 hours. If it continues at the same speed, how long will it take to travel an additional 360 miles?
def solve() -> int: distance_1 = 180 time_1 = 2 speed = distance_1 / time_1 distance_2 = 360 time_2 = distance_2 / speed result = time_2 return result
Andrea is moving to a new apartment. The moving truck costs $40 per hour, and it took her 5 hours to move. She also paid $100 for gas. How much did it cost for Andrea to move?
def solve() -> int: truck_hourly_cost = 40 total_hours = 5 gas_cost = 100 total_moving_cost = (truck_hourly_cost * total_hours) + gas_cost result = total_moving_cost return result
Nicole's uncle gave her $380 for her graduation gift. She decided to share it with her two cousins, each receiving 1/6 of the amount. How much money did Nicole have left for herself?
def solve() -> int: gift_money = 380 cousin_share = gift_money * (1/6) total_cousin_share = cousin_share * 2 nicole_left = gift_money - total_cousin_share result = nicole_left return result
Mark's fishing net caught 70% of the fish in the lake, but some swam away. If there were 100 fish in the lake, how many escaped?
def solve() -> int: total_fish = 100 caught_fish = total_fish * 0.7 escaped_fish = total_fish - caught_fish result = escaped_fish return result
If a restaurant uses 50 plates each day and is open for business for 7 days a week, how many plates are they using in a month of 30 days?
def solve() -> int: num_of_days_per_week = 7 dishes_per_day = 50 num_of_days_in_a_month = 30 total_dishes_in_30days = num_of_days_per_week * dishes_per_day * num_of_days_in_a_month result = total_dishes_in_30days return result
Kim has 20 beads. She makes a necklace with 8 of them and a bracelet with 6 of them. She also buys 4 more beads every time she sells one of her creations. How many beads will she have left if she sells both the necklace and the bracelet?
def solve() -> int: beads = 20 necklace = 8 bracelet = 6 buy_per_sell = 4 beads -= necklace + bracelet beads += (necklace + bracelet) * buy_per_sell result = beads return result
Maria ate 15 slices of pizza which is 5 slices less than three times the number of slices that Sam ate. If Sam ate a total of 20 slices of pizza, how many slices of pizza did Maria eat?
def solve() -> int: sam_slices = 20 maria_slices = (3 * sam_slices) - 5 result = maria_slices - 15 return result
Tulsi ran 8 laps around a track for practice. If she can run one lap in 1 minute, how long did she take to run the 8 laps altogether?
def solve() -> int: laps = 8 time_per_lap = 1 total_time = laps * time_per_lap result = total_time return result
Juanita works for 8 hours a day in a factory and makes $13.50 an hour. When she isn't at the factory, she works as a caterer for 5 hours a week and makes $16.75 an hour. If she works for 6 days, what is the total amount she earns?
def solve() -> int: hours_per_day = 8 hourly_rate_factory = 13.50 hours_per_week_caterer = 5 hourly_rate_caterer = 16.75 days_worked = 6 total_hours_factory = hours_per_day * days_worked total_hours_caterer = hours_per_week_caterer * days_worked earnings_factory = total_hours_f...
A group of 15 friends went to a restaurant and their total bill came out to be $150. If they want to split the bill equally, how much will each person pay?
def solve() -> int: total_bill = 150 friends = 15 amount_per_person = total_bill / friends result = amount_per_person return result
Sue can normally paint a wall in 2 hours. However, today she has a sore throat and it takes her 3 hours to paint the same wall. How much longer would it take her to paint 4 walls with her sore throat?
def solve() -> int: normal_rate = 1 / 2 sore_rate = 1 / 3 normal_time = 4 / normal_rate sore_time = 4 / sore_rate extra_time = sore_time - normal_time result = extra_time return result
If 15 products weigh 300 kg, what is the weight of 9 products?
def solve() -> int: quantity_1 = 15 weight_1 = 300 quantity_2 = 9 weight_2 = (quantity_2 * weight_1) / quantity_1 result = weight_2 return result
A car travels 220km in 4 hours. What is its average speed?
def solve() -> int: distance = 220 time = 4 average_speed = distance / time result = average_speed return result
There are 40 items in a store that cost $30 each. If there is a discount of 10%, what is the final price of all the items?
def solve() -> int: initial_price = 30*40 discounted_price = initial_price*0.9 result = discounted_price return result
A pizza chain offers 15% discount if a customer orders a medium pizza and a cold drink. If the price of a medium pizza is $12 and the cold drink is $3, how much does a customer save per transaction?
def solve() -> int: total_price = 12 + 3 discounted_price = total_price * 0.85 customer_saves = total_price - discounted_price result = customer_saves return result
A rectangle has a length of 10cm and a width that is twice its length. What is the perimeter of the rectangle?
def solve() -> int: length = 10 width = length * 2 perimeter = 2 * (length + width) result = perimeter return result
Student: Harry has 15 more stickers than Ron. Ron has half of the stickers that Hermione has. If Hermione has 20 stickers, how many stickers do the three of them have in total?
def solve() -> int: harry = 0 ron = 0 hermione = 20 ron = hermione / 2 harry = ron + 15 total = harry + ron + hermione result = total return result
A store has a sale with 20% off on all items. If an item originally costs $120, how much will it cost with the discount?
def solve() -> int: item_original_price = 120 sale_discount_rate = 0.2 sale_price = item_original_price * (1 - sale_discount_rate) result = sale_price return result
A class has 24 students. If the class average is 85, what is the total sum of all the students' grades?
def solve() -> int: number_of_students = 24 class_average = 85 total_grades = number_of_students*class_average result = total_grades return result
Nina has 24 pencils in her pencil box. She lost 6 pencils and then gave another 8 pencils to her brother. How many pencils are left in the box?
def solve() -> int: pencils = 24 lost = 6 given_away = 8 left = pencils - lost - given_away result = left return result
A company has 90 employees, 3 times the number of managers. How many managers does the company have?
def solve() -> int: employees = 90 managers = employees / 3 result = managers return result
A rectangular garden is 50 meters wide and has a perimeter of 200 meters. Find the length of the garden.
def solve() -> int: w = 50 p = 200 l = p/2 - w result = l return result
Ryan's brother agreed to pay him $2.50 for every game that Ryan won. Ryan won 16 games of chess and half that amount of games of checkers. He also won 12 games of cards and three times that amount of games of dominoes. How much money did Ryan earn?
def solve() -> int: chess = 16 checkers = chess / 2 cards = 12 dominoes = 3 * cards price = 2.50 total = chess + checkers + cards + dominoes result = price * total return result
Student: 2. Mark earns $550 per week before deductions. His tax rate is 25% and his union dues are $10. How much money, in dollars, does Mark take home after deductions?
def solve() -> int: weekly_earnings = 550 tax_rate = 0.25 union_dues = 10 deductions = weekly_earnings * tax_rate + union_dues take_home_pay = weekly_earnings - deductions result = take_home_pay return result
Martha and her brother Lucas go to a shoe store to buy shoes. Martha spends twice as much as Lucas, who pays 30$ for two sneakers each, and Martha pays 60$ for two boots, buying three pairs of shoes each. How much money did they spend together in total?
def solve() -> int: lucas_sneaker_price = 30 martha_boot_price = 60 lucas_sneaker_quantity = 2 martha_boot_quantity = 2 total_shoe_pairs = 3 lucas_total_cost = lucas_sneaker_price * lucas_sneaker_quantity * total_shoe_pairs martha_total_cost = martha_boot_price * martha_boot_quanti...
Student: Emma wants to buy concert tickets that cost $80 each. If she wants to bring three friends and also pay for their tickets, how much will she spend in total?
def solve() -> int: num_tickets = 4 ticket_price = 80 total_cost = num_tickets * ticket_price result = total_cost return result
A bicycle travels at a constant speed of 20 miles per hour. If the bicycle travels for 3.5 hours, how far does it travel?
def solve() -> int: speed = 20 time_taken = 3.5 distance_travelled = speed*time_taken result = distance_travelled return result
Ryan bought a duck from the market at $300 and took it to his farm. He spent $20 every day to buy food. He also used $400 to vaccinate and deworm the duck. If he sold the duck for $650 after 50 days, calculate the profit he made from selling back the duck to the market.
def solve() -> int: cost_of_purchase = 300 daily_cost = 20 repair_cost = 400 sale_price = 650 time = 50 profit = sale_price - cost_of_purchase - repair_cost - daily_cost*time result = profit return result
Emma has a rectangular garden that measures 15 meters by 10 meters. She wants to fence the garden with a wire that costs $2 per meter. She also wants to plant flowers along the fence that cost $0.5 per meter. How much will she spend on the wire and the flowers?
def solve() -> int: perimeter = 2 * (15 + 10) wire_cost = 2 * perimeter flower_cost = 0.5 * perimeter total_cost = wire_cost + flower_cost result = total_cost return result
An electronic device takes 9 hours to charge completely. If it has been charging for 6 hours, what percent of the charging is completed?
def solve() -> int: total_charging_time = 9 time_taken = 6 percentage = (time_taken/total_charging_time) * 100 result = percentage return result
Erica has a basket with 50 apples in it. After 10 minutes she has eaten 5 apples. After another 15 minutes, she has eaten twice as many apples as before. How many apples does she have left?
def solve() -> int: apples_in_basket = 50 apples_eaten_first_time = 5 apples_eaten_second_time = 2 * apples_eaten_first_time apples_left = apples_in_basket - apples_eaten_first_time - apples_eaten_second_time result = apples_left return result
If a restaurant serves 100 customers per day and each customer spends an average of $20, how much money will the restaurant make in one month?
def solve() -> int: customers_per_day = 100 avg_spending = 20 days_in_month = 30 total_revenue = customers_per_day * avg_spending * days_in_month result = total_revenue return result
Pedro had 49 books in his collection. He bought 24 new books and sold 12 of the old ones. How many books does he have in his collection now?
def solve() -> int: total_books = 49 new_books = 24 sold_books = 12 result = total_books + new_books - sold_books return result
If David has six computers that weigh the same as three of Linda’s computers, and one of Linda’s computers weighs 20 pounds while the other one weighs 30 pounds, what is the weight of each of David's computers?
def solve() -> int: linda_computer1_weight = 20 linda_computer2_weight = 30 total_linda_computer_weight = linda_computer1_weight + linda_computer2_weight david_computer_weight = total_linda_computer_weight / 3 result = david_computer_weight return result
Amy baked 3 dozen cookies. She gave away all but 6 cookies to her friends. If she used 1.5 times as much sugar as flour, how much sugar did she use?
def solve() -> int: dozen_of_cookies = 3 total_cookies = dozen_of_cookies * 12 cookies_given_away = total_cookies - 6 flour = cookies_given_away sugar = 1.5 * flour result = sugar return result
amantha is baking donuts in her shop. She has bought enough ingredients to make 50 donuts. The ingredients are enough to make each donut with 0.2 kg of flour, 0.2 liters of milk, 0.3 kg of sugar, 0.2 liters of oil and 0.05 kg of powder. How much of each ingredient is required to make all the donuts?
def solve() -> int: flour_needed = 0.2*50 milk_needed = 0.2*50 sugar_needed = 0.3*50 oil_needed = 0.2*50 powder_needed = 0.05*50 result = (flour_needed, milk_needed, sugar_needed, oil_needed, powder_needed) return result
Alex owns a car rental business. He rents out cars for $50 per day and purchases each car for $20,000. Every month he has to pay $5000 in rent, 15% of his total profit in taxes, and $2000 each to two employees. If Alex has a fleet of 20 cars and he rents out all of them for 10 days in one month, what is his total profi...
def solve() -> int: cars = 20 rent_per_day = 50 purchase_cost = 20000 rent_days = 10 rent_income = cars * rent_per_day * rent_days rent = 5000 tax_percentage = 0.15 tax = rent_income * tax_percentage employee_payment = 2000 * 2 total_expenses = rent + tax + employe...
The ratio of the number of pencils that Gina, Hal, and Ivy have is 2:3:4. If Hal has 6 pencils, how many pencils does Gina have?
def solve() -> int: hal_pencils = 6 gina_pencils = hal_pencils * 2 / 3 ivy_pencils = hal_pencils * 4 / 3 result = gina_pencils return result
Nina is painting her room. She needs to paint 4 walls that are each 10 feet long and 8 feet high. One gallon of paint can cover 400 square feet. How many gallons of paint does she need to buy?
def solve() -> int: wall_length = 10 wall_height = 8 wall_count = 4 paint_coverage = 400 wall_area = wall_length * wall_height total_area = wall_area * wall_count paint_needed = total_area / paint_coverage result = paint_needed return result
Michael decides to send his daughter to a language school. It cost $2,000 per month. There are 6 months in a year. How much does it cost to send the kid to 10 years of language school?
def solve() -> int: cost_per_month = 2000 months_per_year = 6 years = 10 total_cost = cost_per_month * months_per_year * years result = total_cost return result
Leah and Lila want to buy some books from an online store. The store offers a 10% discount for orders over $50 and charges a flat shipping fee of $5. Leah orders 3 books that cost $12, $15, and $18 respectively. Lila orders 4 books that cost $10, $14, $16, and $20 respectively. How much will each of them pay in total a...
def solve() -> int: leah_price = 12 + 15 + 18 lila_price = 10 + 14 + 16 + 20 leah_discount = 0 lila_discount = 0 if leah_price > 50: leah_discount = 0.1 if lila_price > 50: lila_discount = 0.1 leah_discounted_price = leah_price * (1 - leah_discount) lila_disco...
Rachel wants to weigh a 5kg box of rocks, but she only has a scale that can weigh up to 3kg. Rachel can use the scale as many times as she wants. How many times would Rachel need to weigh the rocks to determine the weight of the rocks?
def solve() -> int: box_weight = 5 scale_weight = 3 num_weighs = box_weight // scale_weight if box_weight % scale_weight!= 0: num_weighs += 1 result = num_weighs return result
Student: Maria has 12 books and she sold 3/4 of the books. How much money did she make if she sold all books for $4.20 each?
def solve() -> int: books = 12 price = 4.20 sold_books = books * 3/4 total_price = sold_books * price result = total_price return result
A furniture company produces 25 tables and 45 chairs on Monday, and 40 tables and 70 chairs on Tuesday. What is the total number of tables and chairs the company has produced in total for those two days?
def solve() -> int: table_day1 = 25 chair_day1 = 45 table_day2 = 40 chair_day2 = 70 total_table = table_day1 + table_day2 total_chair = chair_day1 + chair_day2 result = (total_table, total_chair) return result
If John puts his 8 $5 bills in stacks of 4, how many stacks does he have?
def solve() -> int: total_bills = 8 bills_per_stack = 4 num_stacks = total_bills // bills_per_stack result = num_stacks return result
A company sells a product for $50 per unit. If they sell 500 units, how much money will they make?
def solve() -> int: price_per_unit = 50 num_units_sold = 500 total_revenue = price_per_unit * num_units_sold result = total_revenue return result
Ethan has 7 rectangular stickers, 6 circular stickers, and 2 triangular stickers. How many sides are there on all of the stickers combined?
def solve() -> int: rectangular_stickers = 7 circular_stickers = 6 triangular_stickers = 2 rectangular_sides = 4 * rectangular_stickers circular_sides = 0 triangular_sides = 3 * triangular_stickers total_sides = rectangular_sides + circular_sides + triangular_sides resul...
If the first year of an elephant's life equals 22 human years and every year after that equals 6 human years, how many human years has my 3-year-old elephant lived?
def solve() -> int: elephant_age = 3 first_year = 22 after_first_year = 6 if elephant_age == 1: human_years = first_year else: human_years = first_year + (elephant_age - 1) * after_first_year result = human_years return result
In John's garden, there are 25 rows of sunflowers and each row has 15 sunflowers. In Carl's garden, there are four times as many rows as John's garden, but only half the number of sunflowers per row. How many sunflowers are there altogether in the two gardens?
def solve() -> int: john_rows = 25 john_sunflowers_per_row = 15 carl_rows = john_rows * 4 carl_sunflowers_per_row = john_sunflowers_per_row / 2 john_total_sunflowers = john_rows * john_sunflowers_per_row carl_total_sunflowers = carl_rows * carl_sunflowers_per_row total_sunflowers = john_tota...
Joe and Sally are building a shed. The shed is 8 feet long and 4 feet wide. How many 2 by 4’s do they need if each one is 8 feet long?
def solve() -> int: length = 8 width = 4 perimeter = (2 * length) + (2 * width) length_of_2x4 = 8 num_2x4s = perimeter / length_of_2x4 result = num_2x4s return result
Rachel's score in a geography test was three times as much as the least score. If the highest score is 88 and the range of the scores is 65, what was Rachel's score?
def solve() -> int: highest_score = 88 range_scores = 65 least_score = highest_score - range_scores rachels_score = 3 * least_score result = rachels_score return result
Alice has 12 cookies. She gives 2 cookies to each of her 3 friends, and then she cuts the remaining cookies into 4 equal pieces each. How many pieces of cookie does she have now?
def solve() -> int: cookies_left = 12 - 2 * 3 pieces_of_cookie = cookies_left * 4 result = pieces_of_cookie return result
Terry jogged 6 kilometers in 42 minutes. What was his average speed?
def solve() -> int: distance_covered = 6 time_in_minutes = 42 time_in_hours = time_in_minutes / 60 average_speed = distance_covered / time_in_hours result = average_speed return result
Lisa has a jar of mixed candies that contains 40% chocolates, 30% gummies and 30% candies. There are 120 candies in total in the jar. She takes out 20 chocolates and 10 gummies and gives them to her friends. What percentage of the remaining candies are chocolates?
def solve() -> int: chocolates = 120 * 0.4 gummies = 120 * 0.3 candies = 120 * 0.3 chocolates = chocolates - 20 gummies = gummies - 10 candies = candies total = chocolates + gummies + candies percentage = (chocolates / total) * 100 result = percentage return result
``` If a restaurant's revenue is $10,000 per month, and the expenses are $5,000 per month, what is the profit?
def solve() -> int: revenue = 10000 expenses = 5000 profit = revenue - expenses result = profit return result
Student: John has 10 apples and 15 pears. If he wants to sell all his fruits at a farmer's market, and sell each apple for $0.50 and each pear for $0.75, how much money will John make in total?
def solve() -> int: apples = 10 pears = 15 apple_price = 0.50 pear_price = 0.75 apple_revenue = apples * apple_price pear_revenue = pears * pear_price total_revenue = apple_revenue + pear_revenue result = total_revenue return result
Ava has twice as many books as Noah. Owen has 72 books and only a third of what Ava has. How many books do the three of them have altogether?
def solve() -> int: noah_books = 0 ava_books = 0 owen_books = 72 ava_books = 3 * owen_books noah_books = ava_books / 2 total_books = noah_books + ava_books + owen_books result = total_books return result
A bakery sells cupcakes for 2 dollars each and cookies for 1 dollar each. If Kara buys 5 cupcakes and 3 cookies, how much did she spend?
def solve() -> int: total_cost = (5 * 2) + (3 * 1) result = total_cost return result
A surveyor believes that 2 out of every 7 people have a deficiency of vitamin D. If his sample size is 500, how many people are likely to have the deficiency?
def solve() -> int: total_people = 500 deficiency_ratio = 2/7 people_with_deficiency = total_people * deficiency_ratio people_with_deficiency = round(people_with_deficiency) result = people_with_deficiency return result
A school has 500 students enrolled. If 50 students enroll each month, in how many months will the school have 1500 students enrolled?
def solve() -> int: students_enrolled = 500 students_per_month = 50 target_students = 1500 months = (target_students - students_enrolled) / students_per_month result = int(months) return result
An electronics shop sells televisions for $500 each and DVD players for $150 each. If you buy 2 televisions and 3 DVD players, how much money in total will you spend?
def solve() -> int: num_of_televisions = 2 num_of_DVD_players = 3 total_cost = num_of_televisions * 500 + num_of_DVD_players * 150 result = total_cost return result
A zoo has 50 animals in total, some rabbits, some birds and some snakes. There are 4 more birds than snakes and 8 fewer rabbits than birds. If there are 15 snakes in the zoo, how many birds are there?
def solve() -> int: snakes = 15 birds = snakes + 4 rabbits = birds - 8 animals = snakes + birds + rabbits result = birds return result
There are 720 marbles in one bag. If a fifth of the bag has 8 jars, and each jar has 30 marbles, how many marbles are in a jar?
def solve() -> int: marbles_in_bag = 720 jars_in_fifth = 8 marbles_in_jar = marbles_in_bag / (jars_in_fifth * 30) result = marbles_in_jar return result
Raj has two $5 bills, six $1 bills, and $3.45 in loose coins in his wallet. If he buys a book that costs $12.99, how much money will be left in his wallet?
def solve() -> int: dollars = 2*5 + 6*1 cents = 345 total_money = dollars + cents/100 book_cost = 12.99 money_left = total_money - book_cost result = money_left return result
Student: Rico works as a delivery driver. He gets a base salary of $100 per week plus $0.25 for each mile he drives. On Monday, Rico drove 120 miles and earned $40. How much did Rico earn on Friday, if he drove 150 miles?
def solve() -> int: base_salary = 100 rate_per_mile = 0.25 miles_monday = 120 miles_friday = 150 earnings_monday = base_salary + rate_per_mile * miles_monday earnings_friday = base_salary + rate_per_mile * miles_friday difference = earnings_friday - earnings_monday result = 40 + differen...
Student: If Ann can complete 10 math problems in 20 minutes, how many problems can she complete in 90 minutes?
def solve() -> int: problems_per_20_min = 10 time_in_min = 90 result = problems_per_20_min * (time_in_min / 20) return result
Student: Jaden wants to buy a dozen cookies to bring to school tomorrow. He's baking 16 cookies at the moment. He already gave away 4 of them and plans to give away an additional 2. How many cookies will Jaden have left?
def solve() -> int: cookies_baked = 16 cookies_given = 4 cookies_to_give = 2 cookies_to_buy = 12 cookies_left = cookies_baked - cookies_given - cookies_to_give cookies_needed = cookies_to_buy - cookies_left cookies_final = cookies_left + cookies_needed - cookies_to_buy result = cooki...
There are 36 students in a class. 20 of them are male and the rest are female. What percentage of the class are males?
def solve() -> int: number_of_males = 20 number_of_students = 36 percentage_males = (number_of_males / number_of_students) * 100 result = percentage_males return result
There were 80 birds in a cage, but Emily released 25 of them. If she kept 40% of the birds she released and set the rest free, how many birds did she set free?
def solve() -> int: birds_in_cage = 80 birds_released = 25 birds_kept = birds_released * 0.4 birds_set_free = birds_released - birds_kept result = birds_set_free return result
The circumference of a circle is 33 cm. What is the radius of the circle?
def solve() -> int: circumference = 33 radius = circumference / (2 * 3.14) result = 5.24 return result
A pyramid has a square base with a side of 10 feet and a height of 15 feet. What is its volume?
def solve() -> int: base_side = 10 height = 15 volume = 1/3 * base_side**2 * height result = volume return result
Jason rides a roller coaster that lasts for 1 minute. He rides a ferris wheel that lasts 2 minutes longer than he rides the roller coaster, he rides a spinning ride for 3 minutes longer than he rides the ferris wheel, and he rides a bumper car ride for 2 minutes less than he rides the spinning ride. What is the total t...
def solve() -> int: roller_coaster = 1 ferris_wheel = roller_coaster + 2 spinning_ride = ferris_wheel + 3 bumper_car_ride = spinning_ride - 2 total_time = roller_coaster + ferris_wheel + spinning_ride + bumper_car_ride result = total_time return result
John invested $2000 into a mutual fund. The fund promised a yearly interest rate of 7%. If he deposits an additional $100 every month into the account to add to his initial investment of $2000, how much money will he have in the fund after four years?
def solve() -> int: initial_investment = 2000 monthly_deposit = 100 interest_rate = 0.07 years = 4 total_investment = initial_investment for month in range(1, years*12 + 1): total_investment += monthly_deposit total_investment *= (1 + interest_rate/12) result = tota...
A company has 350 employees. 40 percent of the employees are women and 60 percent of the women have a bachelor's degree. How many female employees have a bachelor's degree?
def solve() -> int: total_employees = 350 women_employees = 0.4 * total_employees female_bachelors = 0.6 * women_employees result = female_bachelors return result
At a movie theater, there are three screens showing different films labeled P, Q, and R. At 8:00 pm, Screen Q had three times as many viewers as Screen R, which had two more viewers than Screen P. If there were four viewers on Screen P, how many viewers were there in total?
def solve() -> int: p_viewers = 4 r_viewers = p_viewers + 2 q_viewers = 3 * r_viewers total_viewers = p_viewers + r_viewers + q_viewers result = total_viewers return result
The students in Vic's class want to sell apples and oranges to raise money for supplies. There are 17 students in the class, and they only have 10 oranges to sell. If they sell all 10 oranges, how many apples would they need to have the same amount of money from selling both combined?
def solve() -> int: oranges = 10 students = 17 money_oranges = oranges money_apples = money_oranges total = money_apples + money_oranges apples = (total - oranges) / students result = apples return result
In a bag of 30 marbles, 10 of them were green. How many marbles in the bag were not green?
def solve() -> int: total_marbles = 30 green_marbles = 10 not_green_marbles = total_marbles - green_marbles result = not_green_marbles return result
If John has $6, and wants to buy 4 cookies that cost $0.75 each, how much money will he have left?
def solve() -> int: money = 6 cookies = 4 price_per_cookie = 0.75 total_cost = cookies * price_per_cookie remaining_money = money - total_cost result = round(remaining_money, 2) return result
David has a stack of papers to organize. It takes him 2 hours to organize the whole stack. He can organize each section in 5 minutes. How many sections are in the stack of papers?
def solve() -> int: total_time = 2 * 60 time_per_section = 5 num_sections = total_time // time_per_section result = num_sections return result
If a recipe calls for 2 eggs to make 6 pancakes, how many eggs would you need to make 24 pancakes?
def solve() -> int: eggs_per_pancake = 2/6 pancakes = 24 eggs = eggs_per_pancake * pancakes result = eggs return result
A triangle has a base of length 8cm and a height of length 6cm. What is its area?
def solve() -> int: base = 8 height = 6 area = 0.5 * base * height result = area return result
Richard wants to purchase a computer for $1500. The store offers a 10% discount on all electronics over $1000. However, they add a $40 setup fee. Should Richard buy the computer from the store or from another store which sells the same computer for $1400 without any discount?
def solve() -> int: computer_price = 1500 discounted_price = computer_price * 0.9 total_price = discounted_price + 40 if total_price < 1400: result = 'Buy from store' else: result = 'Buy from another store' return result
How many branches are there in a tree if its trunk has 8 main branches that each split into 2 more branches?
def solve() -> int: main_branch = 8 branch_splits = 2 total_branches = main_branch * branch_splits result = total_branches return result
A basket has 64 strawberries and blueberries. If there are twice as many strawberries as blueberries, how many blueberries are in the basket?
def solve() -> int: b = 64/3 result = b return result
Student: A TV was originally priced at $400. It was then discounted by 25%. After that, it was discounted again by 15%. What is the final price after both discounts?
def solve() -> int: original_price = 400 discount_1 = original_price * 0.75 discount_2 = discount_1 * 0.85 result = discount_2 return result
Rachel can load 6 boxes in 15 minutes. How many boxes can she load in 45 minutes?
def solve() -> int: boxes = 6 minutes = 45 result = boxes * (minutes/15) return result
Amy is cleaning out her closet. She wants to donate the clothes that don't fit, throw away the ones with holes, and keep the new clothes for special occasions. She has 75 items of clothing, and one sixth of them has holes and 24 less than half of them are new. If she donates half of the clothes that don't fit, how many...
def solve() -> int: total_clothes = 75 clothes_with_holes = total_clothes / 6 new_clothes = (total_clothes / 2) - 24 dont_fit = total_clothes - (clothes_with_holes + new_clothes) to_donate = dont_fit / 2 left_for_special = total_clothes - (clothes_with_holes + new_clothes + to_donate) ...
Qin buys 500 apples, 400 oranges, and 300 pears. Approximately how many fruits did she buy in total?
def solve() -> int: apples = 500 oranges = 400 pears = 300 result = apples + oranges + pears return result