question
stringlengths
11
2.89k
code
stringlengths
20
7.24k
A concert hall has a seating capacity of 500. If the hall reaches 80% of its seating capacity during a sold-out event, how many people attended the event?
def solve() -> int: num_people_attended = 500 * 0.8 result = num_people_attended return result
A company pays its employees $15 per hour for the first 10 hours and $20 per hour for each additional hour. If an employee worked for 15 hours, what is their total pay?
def solve() -> int: hours = 15 hourly_rate1 = 15 hourly_rate2 = 20 pay = 10 * hourly_rate1 + (hours - 10) * hourly_rate2 result = pay return result
Rachel owns a makeup company that employs makeup artists and salespeople in varying roles. If there are 5 more salespeople than makeup artists and a total of 50 people work for Rachel, how many makeup artists does she employ?
def solve() -> int: makeup_artists = (50 - 5) / 2 result = makeup_artists return result
Henry drinks 3 cups of water every morning for a month except for Sundays. How many cups of water does he drink?
def solve() -> int: days = 27 water_per_day = 3 result = days * water_per_day return result
A park has 3 types of rides. The first type costs $3, the second costs $5, and the third costs $8. John rode the first ride 3 times, the second ride 2 times and the third ride 1 time. How much money did he spend?
def solve() -> int: cost_ride1 = 3 cost_ride2 = 5 cost_ride3 = 8 num_ride1 = 3 num_ride2 = 2 num_ride3 = 1 total_cost = (num_ride1*cost_ride1)+(num_ride2*cost_ride2)+(num_ride3*cost_ride3) result = total_cost return result
Emma has a water bottle with a hole at the bottom. The bottle contains 50 ounces of water initially, and loses 3 ounces of water every hour. For two hours, Emma forgets to refill the bottle. In the third hour, she adds 1 ounce of water. In the fourth hour, she adds 4 ounces of water. At the end of the fourth hour, how ...
def solve() -> int: initial_water = 50 water_loss = 3 water_added_3 = 1 water_added_4 = 4 water_remaining_2 = initial_water - (water_loss * 2) water_remaining_3 = water_remaining_2 + water_added_3 water_remaining_4 = water_remaining_3 + water_added_4 re...
3. A toy store sells 18 dolls and 21 toy cars every day on average. How many toys were sold in total on that day?
def solve() -> int: dolls = 18 cars = 21 total_sold = dolls + cars result = total_sold return result
Leo sells 4 used textbooks online for $25 each, but he has to pay a 15% commission to the website and a $5 shipping fee for each book. How much profit does he make from the sale?
def solve() -> int: selling_price = 25 commission_rate = 0.15 shipping_fee = 5 quantity = 4 total_revenue = selling_price * quantity total_cost = commission_rate * total_revenue + shipping_fee * quantity profit = total_revenue - total_cost result = profit ...
Taylor is setting up an art exhibit. She frames two-thirds of her paintings, mats one-fourth of the rest, and hangs the remaining paintings without a frame or mat. If she has 20 paintings, how many did she frame?
def solve() -> int: total_paintings = 20 framed_paintings = total_paintings * (2/3) unframed_paintings = total_paintings - framed_paintings matted_paintings = unframed_paintings * (1/4) result = framed_paintings return result
Florence and her family went to the lake 6 times in 3 weeks. Each time, they stayed for 4 hours. How much total time did they spend at the lake?
def solve() -> int: total_time = 0 for visit in range(6): total_time += 4 result = total_time return result
Mary goes to the movies 3 times a week. She spends an extra hour each time she goes on Monday and Wednesday. How many hours does she spend in total at the movies on Monday?
def solve() -> int: hours = 3 extra_hours = 1 total_hours_monday = hours + extra_hours total_hours_wednesday = hours + extra_hours result = total_hours_monday return result
Ami has collected 45 tennis balls, 10 soccer balls, and 30 basketballs. How much did he pay for all of these balls if each tennis ball cost him $4, each soccer ball cost him $7, and each basketball cost him $9?
def solve() -> int: cost_all_balls = (4 * 45) + (7 * 10) + (9 * 30) result = cost_all_balls return result
A triangle has a base that is twice its height. If the area of the triangle is 16 sq cm, what is the length of the base?
def solve() -> int: area = 16 ratio = 2 height = (2 * area) ** 0.5 base = height * ratio result = base return result
The perimeter of a square is 16 meters. What is the length of each side in centimeters?
def solve() -> int: sides = 16/4 length = sides*100 result = f'{length} centimeters' result = length return result
A car traveled 330 miles in 5 hours. What was the average speed of the car in miles per hour?
def solve() -> int: distance = 330 time = 5 speed = distance/time result = speed return result
In a day, Sarah spends 1/4 of her time knitting and 1/3 of the time left on reading. How many minutes does she spend reading if she spends 2 hours knitting?
def solve() -> int: hours_knitting = 2 minutes_knitting = hours_knitting * 60 time_left = 24 * 60 - minutes_knitting minutes_reading = time_left * (1/3) result = minutes_reading return result
Student: Sara has some stickers which are in packs of 4 or 6. If she has a total of 23 stickers, how many packs of 4 and 6 did she have?
def solve() -> int: total_stickers = 23 pack_4 = 4 pack_6 = 6 num_packs_4 = total_stickers // pack_4 num_packs_6 = total_stickers // pack_6 result = (num_packs_4, num_packs_6) return result
Josh is scheduled to work at a bakery for 8 hours each day. In 1 week, how many hours will he work?
def solve() -> int: hours_per_day = 8 number_of_days = 7 total_hours = hours_per_day * number_of_days result = total_hours return result
An amusement park has a total of 800 visitors in a day. If 25% of the visitors are kids and the rest are adults, how many adult visitors are there?
def solve() -> int: total_visitors = 800 kids = total_visitors * 0.25 adults = total_visitors - kids result = adults return result
Tom is trying to solve a math puzzle where he has to guess a number. The puzzle states that the number, when divided by 3, is two less than twice 27. What is the number?
def solve() -> int: divisor = 3 constant = 27 multiplier = 2 subtraction = 2 result = (multiplier * constant) + subtraction return result
Student: Angie's piggy bank contains 25 coins in which she has 6 quarters, 4 dimes and 5 times as many nickels as dimes. How many nickels does she have?
def solve() -> int: quarters = 6 dimes = 4 nickels = 5 * dimes total_coins = quarters + dimes + nickels result = nickels return result
John runs 8 miles every day for the first 5 days of the week. On the 6th day, he ran twice as much as he ran for the first five days combined. If John gets paid $1 for every mile ran, how much did he make that week?
def solve() -> int: miles_per_day = 8 days_per_week = 6 total_miles = miles_per_day * (days_per_week - 1) extra_miles = total_miles * 2 total_earned = total_miles + extra_miles result = total_earned return result
A school had 500 students. They graduated 150 and 50 students transferred to a different school. Then, 100 new students enrolled. How many students are there in the school now?
def solve() -> int: students = 500 students -= 150 students -= 50 students += 100 result = students return result
Lisa has a set of 6 postcards that she wants to mail to her friends. It costs 35 cents to mail each postcard. How much money does she need to pay to mail all the postcards?
def solve() -> int: postcards = 6 postcard_cost = 0.35 total_cost = postcards * postcard_cost result = total_cost return result
Jack noticed 10 apples and five times as many pears as apples while picking fruits in an orchard. He also spotted 2 more than thrice as many peaches as apples and half as many cherries as apples. How many fruits did Jack pick in total?
def solve() -> int: apples = 10 pears = 5 * apples peaches = 3 * apples + 2 cherries = apples / 2 total_fruits = apples + pears + peaches + cherries result = total_fruits return result
Rafael has twice as many balloons as Paula who has 4 fewer balloons than Clarissa. After Rafael gave 5 balloons to Paula, Clarissa had 13 balloons left. How many balloons did Rafael have at the beginning?
def solve() -> int: clarissa = 13 paula = clarissa + 4 rafael = 2 * paula rafael -= 5 result = rafael return result
A jar contains 80 red candies and 120 green candies. What percent of the candies are green?
def solve() -> int: total_candies = 80 + 120 green_candies = 120 green_percent = green_candies / total_candies * 100 result = green_percent return result
A grade 6 class has 35 students. The ratio of boys to girls is 2:3. How many boys are in the class, and how many girls are in the class?
def solve() -> int: total_students = 35 ratio = 2/3 boys = total_students / (1+ratio) girls = total_students - boys result = (boys,girls) return result
Tony is stocking the market. He adds 99 packages of pretzels at $3.50 each, 70 packages of crackers at $2.00 each and 80 boxes of cornflakes at $4.00 each. How much did all the snacks cost in total?
def solve() -> int: snack_cost = 0 pretzels_per_package = 3.50 pretzels_package_total = 99 pretzels_total_cost = pretzels_per_package * pretzels_package_total snack_cost += pretzels_total_cost crackers_per_package = 2.00 crackers_package_total = 70 crackers_total_cost = cracker...
A train's speed is 85 km/h and can travel 17 km on a litre of fuel. What is the cost of the fuel required to travel 595 km, if the fuel costs $0.80 per litre?
def solve() -> int: fuel_liters = 595/17 fuel_cost = fuel_liters*0.80 result = fuel_cost return result
Student: A designer handbag that was originally priced at $650 was sold after the store applied a 20% discount and a 10% tax on the new price. How much money was saved in total?
def solve() -> int: original_price = 650 discount_percentage = 0.2 tax_percentage = 0.1 discounted_price = original_price * (1 - discount_percentage) total_amount_paid = discounted_price * (1 + tax_percentage) total_amount_saved = original_price - total_amount_paid result = total_amount_save...
A fig tree has twice as many figs as a peach tree has peaches. When Sophia picks 2/7 of the fruits from both trees, there are 72 peaches left on the peach tree. How many figs are left on the fig tree?
def solve() -> int: p = 72 total_fruits = p + 2/5 * p + 2/5 * 2 * p picked_figs = 2/5 * 2 * p remaining_figs = 2 * p - picked_figs result = remaining_figs return result
A car travels at 60 miles per hour for 3 hours. How many miles did the car travel?
def solve() -> int: distance_traveled = 0 speed = 60 time = 3 distance_traveled = speed * time result = distance_traveled return result
Student: Dana has 8 toys and she gives 3 away. What is the number of toys Dana still has?
def solve() -> int: toys = 8 gives = 3 still = toys - gives result = still return result
Emma is tiling the walls of her shower. Each tile is 9 square inches. If the shower walls are 72 inches by 120 inches, how many tiles does Emma need to buy?
def solve() -> int: wall_width = 72 wall_height = 120 tile_area = 9 total_area = wall_width * wall_height num_tiles = total_area / tile_area result = num_tiles return result
James can run 4 times faster than Paul. If Paul completes a race in 40 minutes, how long will James take to complete the same race?
def solve() -> int: time_taken = 40/4 result = time_taken return result
A recipe calls for 2 cups of flour to make 12 cookies. If you want to make 36 cookies, how many cups of flour will you need?
def solve() -> int: flour_for_12 = 2 cookies_for_12 = 12 cookies_needed = 36 flour_needed = (cookies_needed * flour_for_12) / cookies_for_12 result = flour_needed return result
A single bottle of shampoo has 250ml. A pack of 6 bottles costs $18. How much shampoo is in the whole pack?
def solve() -> int: bottle_capacity = 250 pack_size = 6 pack_cost = 18 shampoo_in_pack = bottle_capacity * pack_size result = shampoo_in_pack return result
In a zoo, 70% of visitors like to see the elephants and 60% like to see the lions. If 50% of visitors like both animals, what percentage of visitors will see animals other than elephants and lions?
def solve() -> int: total = 100 elephants = total*0.7 lions = total*0.6 both = total*0.5 others = total - elephants - lions + both percent = (others/total)*100 result = percent return result
A car travels at 120 km/h from city A to city B. The distance between them is 360 km. Calculate the time the car takes to complete the journey.
def solve() -> int: speed = 120 distance = 360 time = distance / speed result = time return result
A farmer has five times as many chickens as cows in his farm. If he has 60 cows, how many legs do all his animals have in total?
def solve() -> int: chickens = 5 * 60 legs = chickens * 2 + 60 * 4 result = legs return result
A pizza has 10 slices. If 4 people each eat 2 slices, how many slices are left?
def solve() -> int: slices = 10 slices = slices - (4 * 2) result = slices return result
A bag has 200 marbles. 10% of the marbles are black. How many black marbles are there in the bag?
def solve() -> int: total_marbles = 200 percent_black = 10 black_marbles = total_marbles * percent_black / 100 result = black_marbles return result
Student: Ben is 10 years younger than Sam, who is 40. Ben wins a lottery and travels around the world for 7 years. How old will Sam be when Ben returns from his trip?
def solve() -> int: ben_age = 40 - 10 sam_age = 40 ben_age = ben_age + 7 sam_age = sam_age + 7 result = sam_age return result
A car manufacturer produces 300 cars per day. If the cost of producing one car is $6000 and they sell each car for $12000, how much profit do they make in a year?
def solve() -> int: cars_per_day = 300 cost_per_car = 6000 sell_price_per_car = 12000 days_per_year = 365 profit_per_car = sell_price_per_car - cost_per_car profit_per_year = cars_per_day * profit_per_car * days_per_year result = profit_per_year return result
Rachel bought a set of candles, with the tallest candle being 80 cm in height. Each candle is 2/3 the size of the previous one. What is the height of the 6th shortest candle?
def solve() -> int: tallest_candle = 80 previous_candle = tallest_candle for i in range(1, 6): current_candle = previous_candle * 2/3 previous_candle = current_candle sixth_shortest_candle = previous_candle result = sixth_shortest_candle return result
zie has 25 toy cars. She gives 5 to her sister and then buys 20 more. She then realizes she doesn't like 4 of them and throws them away. How many toy cars does she have now?
def solve() -> int: cars = 25 cars -= 5 cars += 20 cars -= 4 result = cars return result
10. Greg sold 192 cookies on Monday. He sold 24 more cookies each day after that. How many cookies did he sell on Friday?
def solve() -> int: monday = 192 tuesday = monday + 24 wednesday = tuesday + 24 thursday = wednesday + 24 friday = thursday + 24 result = friday return result
Hannah was gifted $12000 by her parents and wanted to be smart with her money. She used 30% of the amount to pay off her credit card debts and donated a sixth of the remaining amount to a charity. If she then transferred $1000 to her emergency fund and invested one-fifth of that amount in stocks, how much money does sh...
def solve() -> int: gifted_money = 12000 credit_card_debts = gifted_money * 0.3 remaining_money = gifted_money - credit_card_debts donated_money = remaining_money / 6 remaining_money = remaining_money - donated_money emergency_fund = 1000 remaining_money = remaining_money - emergency_fund ...
Student: Alex has a family of 17 people on his father's side. His mother's side is 13% larger. How many people are there in total?
def solve() -> int: father_side = 17 mother_side = father_side * 1.13 result = father_side + mother_side return result
Jane went shopping and bought clothes for $35 and jewelry for $18. She had a $50 bill. How much change did she get back?
def solve() -> int: clothes_price = 35 jewelry_price = 18 money_paid = clothes_price + jewelry_price money_given = 50 change = money_given - money_paid result = change return result
Rachel is a window washer. She needs to clean a 25-foot tall window of a building. The last time she cleaned a 10-foot tall window, she had to climb 6 rungs of her ladder. How many rungs does she need to climb to clean the 25-foot tall window?
def solve() -> int: height_small_window = 10 height_large_window = 25 rungs_small_window = 6 rungs_per_foot = rungs_small_window / height_small_window rungs_large_window = rungs_per_foot * height_large_window result = rungs_large_window return result
The sum of three consecutive numbers is 72. What is the product of the smallest and the largest numbers?
def solve() -> int: sum = 72 third_number = sum/3 first_number = third_number - 1 second_number = first_number + 1 product = first_number*third_number result = product return result
Student: A rectangle has a length of 10 cm and a width of 4 cm. What is the perimeter of the rectangle?
def solve() -> int: length = 10 width = 4 perimeter = 2 * (length + width) result = perimeter return result
Possible questions and programs are: Bella and her sister Ella each earned $50 doing chores. They spent half of their money on movie tickets and popcorn. Then they bought some books at a discount of 20%. If each book costs $12 before the discount and they bought the same number of books, how much money did they have le...
def solve() -> int: money = 50 movie = 15 popcorn = 5 book = 12 discount = 0.2 movie_popcorn = (movie + popcorn) * 2 book_discount = book * (1 - discount) book_number = 2 book_total = book_discount * book_number * 2 money_left = money * 2 - movie_popcorn - book_to...
Harper is saving up for a new drone. She is selling tickets to a carnival for $7.50 each. It cost Harper $5 per ticket, and she already sold 25 tickets. If Harper wants to make $150, how much does the drone cost?
def solve() -> int: sold_tickets = 25 ticket_price = 7.50 ticket_cost = 5 target_profit = 150 needed_tickets = (target_profit + (sold_tickets * (ticket_cost - ticket_price))) / (ticket_price - ticket_cost) drone_cost = needed_tickets * ticket_cost result = drone...
A kid can solve 10 math problems in 20 minutes. How many minutes will the kid take to solve 82 math problems?
def solve() -> int: problems_per_cycle = 10 time_per_cycle = 20 total_time = (82 / problems_per_cycle) * time_per_cycle result = int(total_time) return result
A company produces three types of machines: A, B, and C. It produces 100 machines per day, and the ratio of A:B:C machines is 2:3:5. How many machines will the company produce per day for each type?
def solve() -> int: total_machines = 100 machine_ratio = [2,3,5] total_ratio = sum(machine_ratio) machine_counts = [total_machines*(i/total_ratio) for i in machine_ratio] result = machine_counts return result
If the sum of two numbers is 15 and their difference is 3, what is the product of the two numbers?
def solve() -> int: sum_numbers = 15 difference = 3 x = (sum_numbers + difference) / 2 y = (sum_numbers - difference) / 2 product = x * y result = product return result
Ben needs to take 7 pills a day. One pill costs $2.00. The insurance covers 55% of the cost. How much does he pay in a 40-day month?
def solve() -> int: pills_per_day = 7 cost_per_pill = 2.00 days_in_month = 40 insurance_coverage = 0.55 total_pills = pills_per_day * days_in_month total_cost = total_pills * cost_per_pill insurance_amount = total_cost * insurance_coverage out_of_pocket = total_cost - insurance_amount ...
A pizza can be cut into 8 slices. If a group of 4 people want to eat pizza and have two slices each, how many pizzas do they need to order?
def solve() -> int: total_slices_needed = 4 * 2 pizzas_needed = total_slices_needed / 8 result = pizzas_needed return result
A square field has a perimeter of 80 meters. If the field is split into two sections with a straight fence, what is the maximum possible area for one of the fields?
def solve() -> int: perimeter = 80 side_length = perimeter / 4 max_area = (side_length / 2) ** 2 result = max_area return result
An office has 2 printers. One printer can print 10 pages per minute and the other can print 8 pages per minute. If both printers are used, how long will it take to print 100 pages?
def solve() -> int: printer_1_speed = 10 printer_2_speed = 8 total_pages = 100 combined_speed = printer_1_speed + printer_2_speed time = total_pages / combined_speed result = time return result
In his biology class, Leo learned that there are 2 more chromosomes for every pair of chromosomes in a human cell. If there are 23 pairs of chromosomes in a human cell, how many chromosomes and pairs are there altogether?
def solve() -> int: pairs = 23 chromosomes = 2 * pairs units = chromosomes * 2 result = units return result
Student: John and Olivia went to the store to buy a new phone. John agreed to buy the phone for $450 and Olivia has to pay 3/4 of the cost. How much does Olivia need to pay?
def solve() -> int: cost = 450 fraction = 3/4 amount_owed = cost * fraction result = amount_owed return result
Olivia received $200 from a gift card. She spent $60 on a dress, $10 on earrings, and $25 on shoes. If she also bought a purse for $40 and spent $20 on gas, how much money does Olivia have left?
def solve() -> int: gift_card = 200 dress = 60 earrings = 10 shoes = 25 purse = 40 gas = 20 total_spent = dress + earrings + shoes + purse + gas money_left = gift_card - total_spent result = money_left return result
James buys 5 pizzas for his friends for a sleepover. There are 10 people at the sleepover. Half of the people have 2 slices each, 3 people have 3 slices each, and 1 person has 4 slices. How many pizza slices are left over after the sleepover?
def solve() -> int: pizzas = 5 people = 10 slices_per_person = 0.5 * 2 + 3 * 3 + 4 total_slices = pizzas * 8 leftover_slices = total_slices - slices_per_person result = leftover_slices return result
Ryan is a painter who makes art pieces for customers. He charges $50 per hour for his work. He spent 8 hours on a painting for Alice, 6 hours on a painting for Bob, and 4 hours on a painting for Carl. However, Carl was unhappy with his painting and asked for a 25% discount. How much money did Ryan make from his three p...
def solve() -> int: price_alice = 8 * 50 price_bob = 6 * 50 price_carl = 4 * 50 price_carl_discounted = price_carl - price_carl * (25 / 100) revenue = price_alice + price_bob + price_carl_discounted result = revenue return result
She has saved $40 from her birthday money and decides to earn the rest by selling lemonade and cookies. She spends $15 on ingredients and sells each cup of lemonade for $0.5 and each cookie for $0.25. She sells 80 cups of lemonade and 60 cookies in total. How much money does she have left after buying the bicycle?
def solve() -> int: revenue = 0.5 * 80 + 0.25 * 60 profit = revenue - 15 total = profit + 40 left = total - 120 result = left return result
Ben had 36 cupcakes and decided to share them equally with his 4 friends. However, before he could do so, he ate 6 of them. How many cupcakes did each person get in the end?
def solve() -> int: total_cupcakes = 36 eaten_cupcakes = 6 friends = 4 cupcakes_left = total_cupcakes - eaten_cupcakes cupcakes_each = cupcakes_left // (friends + 1) result = cupcakes_each return result
Mark and Sarah have a combined weight of 120 kg. Mark weighs twice as much as Sarah did when Mark was the weight that Sarah is now. If Sarah weighs 40 kg, how much did Mark weigh when Sarah weighed 20 kg?
def solve() -> int: sarah_weight = 40 mark_weight_now = 120 - sarah_weight mark_weight_then = 2 * (sarah_weight - 20) mark_weight_difference = mark_weight_now - mark_weight_then mark_weight_20kg = sarah_weight + mark_weight_difference result = mark_weight_20kg return result
A baker has 8 kg of flour, 4 kg of sugar, and 2 kg of butter. He wants to make as many cakes as possible, each cake requiring 250 g of flour, 150 g of sugar, and 100 g of butter. How many cakes can he make and how much of each ingredient will he have left over?
def solve() -> int: flour = 8 * 1000 sugar = 4 * 1000 butter = 2 * 1000 flour_per_cake = 250 sugar_per_cake = 150 butter_per_cake = 100 cakes = min(flour // flour_per_cake, sugar // sugar_per_cake, butter // butter_per_cake) flour_left = flour % flour_per_cake sugar_left = suga...
A company buys 1000 pens for 100 dollars and sells them for 5 dollars each. The company also spends 800 dollars on advertising. What is the profit the company makes?
def solve() -> int: pens = 1000 cost = 100 sell = 5 revenue = pens*sell expense = cost*pens + 800 profit = revenue - expense result = profit return result
Lisa wants to paint her room. She can paint 25 square feet per hour. Her room is 12 feet wide, 15 feet long, and 9 feet high. If the walls and ceiling need to be painted, how many hours will it take her to complete the painting?
def solve() -> int: width = 12 length = 15 height = 9 area_of_walls = 2 * (width * height + length * height) area_of_ceiling = width * length total_area = area_of_walls + area_of_ceiling painting_speed = 25 hours_needed = total_area / painting_speed result = ...
Michael buys 7 pairs of pants, the first 5 pairs costing $50 each and the last 2 pairs costing $30 each. His brother agrees to pay for 80% of the total cost. If Michael had $1600 in the bank, how much money does he have left after buying the pants? Jessica is trying to save money for a trip to Europe. She saves 5% of h...
def solve() -> int: num_pants = 7 cost_first_five = 50 cost_last_two = 30 total_cost = (cost_first_five * 5) + (cost_last_two * 2) brother_pays = total_cost * 0.8 michael_pays = total_cost - brother_pays michael_left = 1600 - michael_pays salary = 60000 savings_rate = 0.05 t...
A company increased its sales by 25% in the first quarter of the year. If they made $80,000 in sales in the first quarter, how much did they make in the same quarter last year?
def solve() -> int: last_year_sales = 80000 / (1 + 25/100) result = last_year_sales return result
Emily wants to buy 10 packs of pencils with each pack containing 20 pencils. If she has already bought 2 packs, how many more pencils does she need to purchase?
def solve() -> int: total_pencils = 10 * 20 pencils_bought = 2 * 20 pencils_needed = total_pencils - pencils_bought result = pencils_needed return result
Brightside Zoo has 50 tigers. From this, it may be inferred that there are 5 more than 2 times as many tigers in Brightside Zoo as in Darkside Zoo. How many tigers are in Darkside Zoo?
def solve() -> int: brightside_tigers = 50 darkside_tigers = (brightside_tigers - 5) / 2 result = darkside_tigers return result
A train travels 800 miles in 10 hours. What is the train's average speed in miles per hour?
def solve() -> int: miles = 800 hours = 10 speed = miles / hours result = speed return result
A jar holds 1 liter of water. Mr. Johnson drinks 200 ml of water every day. How long will the water in the jar last?
def solve() -> int: water_in_jar = 1000 water_drunk_daily = 200 days = water_in_jar / water_drunk_daily result = days return result
During a survey on fruit preferences, a nutritionist asks 50 people whether they prefer bananas or apples and whether they prefer smoothies or juices. 80% of the people choose bananas and smoothies, while 20% choose apples and juices. How many people prefer apples over bananas?
def solve() -> int: total_people = 50 bananas_smoothies = 0.8 * total_people apples_juices = 0.2 * total_people bananas = bananas_smoothies apples = apples_juices apples_over_bananas = apples - bananas result = apples_over_bananas return result
There are 9 dogs in a kennel with 27 bones in total. If the owner wanted to divide the bones evenly between the dogs, how many bones would each dog get?
def solve() -> int: total_dogs = 9 total_bones = 27 bones_each_dog = total_bones / total_dogs result = bones_each_dog return result
A bakery sells 60 pastries in a day. If the bakery closes for 2 days each month, how many pastries can they sell in 1 year (365 days)?
def solve() -> int: pastries_per_day = 60 days_per_month = 30 closed_days_per_month = 2 total_days_per_year = 365 pastries_per_year = (pastries_per_day * (total_days_per_year - (days_per_month * closed_days_per_month * 12))) + (pastries_per_day * (days_per_month * (12 - closed_days_per_month))) ...
Johnny wants to buy 3 comic books which cost $5 each and a toy for $12. How much will he spend in total?
def solve() -> int: num_of_comic_books = 3 cost_of_comic_book = 5 cost_of_toy = 12 total_cost = (num_of_comic_books * cost_of_comic_book) + cost_of_toy result = total_cost return result
Student: A group of friends are splitting the bill at a restaurant. If the total bill came out to $68.25 and there are 5 people in the group, how much does each person owe after a 15% tip is added to the bill?
def solve() -> int: total_bill = 68.25 num_people = 5 tip_percentage = 0.15 tip = total_bill * tip_percentage total_bill_with_tip = total_bill + tip amount_owed_per_person = total_bill_with_tip / num_people result = amount_owed_per_person return result
A laptop costs $1050 and is on sale for 15% off the regular price. How much will a customer save by purchasing the laptop on sale?
def solve() -> int: regular_price = 1050 discount_amount = 157.5 result = discount_amount return result
Each sparrow eats 5 seeds per day, each parrot eats 3 sparrows per day, and each dove eats 4 parrots per day. If there are 5 doves in a forest, how many seeds are eaten each day?
def solve() -> int: sparrows = 5 parrots = 3 doves = 4 numDoves = 5 seeds_per_sparrow = 5 seeds_per_parrot = seeds_per_sparrow * sparrows seeds_per_dove = seeds_per_parrot * parrots total_seeds = seeds_per_dove * numDoves result = total_seeds return result
Lisa deposited $5000 in an account that pays an interest rate of 2% per year. What will be the total amount in the account after three years?
def solve() -> int: total_interest = ((2/100) * 5000) * 3 total_amount = 5000 + total_interest result = total_amount return result
Abby has 5 rabbits, the first rabbit weighs 2 kg, the second rabbit weighs 0.5 kg more than the first one, the third rabbit weighs 10% more than the second one, the fourth rabbit weighs 0.2 kg less than the third one, and the fifth rabbit weighs twice as much as the fourth one. How many kilograms do all the rabbits wei...
def solve() -> int: r1 = 2 r2 = r1 + 0.5 r3 = r2 * 1.1 r4 = r3 - 0.2 r5 = r4 * 2 result = r1 + r2 + r3 + r4 + r5 return result
Noah is collecting stamps from different countries. He knows that 30% of his stamps are from France, 20% are from Japan, and the rest are from Brazil. He has a total of 120 stamps. How many stamps does he have from Brazil?
def solve() -> int: brazil_percent = 100 - 30 - 20 brazil_stamps = brazil_percent * 120 / 100 result = brazil_stamps return result
Mike went to buy 1 kilogram of rice for €50. If he needs 10 kilograms of rice for an event, what will be the total cost?
def solve() -> int: rice_price = 50 rice_weight = 1 total_rice_weight = 10 total_cost = rice_price * (total_rice_weight / rice_weight) result = total_cost return result
John has 80 apples, he ate 25% of them and gave away 20. If each person got 5 apples, how many people received apples?
def solve() -> int: apples = 80 ate = 0.25*apples left = apples - ate - 20 people = left//5 result = people return result
John has 30 marbles. He gives away 2/5 of them and loses 1/4 of the remaining marbles. How many marbles does he have left?
def solve() -> int: marbles = 30 giveaway = marbles * (2/5) remaining = marbles - giveaway lost = remaining * (1/4) result = remaining - lost return result
James wants to renovate his home office. The contractor charges him $50 per hour, and the supplies cost him $350. James gets a 10% discount on the total cost. If the contractor worked for 30 hours, how much does James pay in all?
def solve() -> int: hourly_rate = 50 hours_worked = 30 supply_cost = 350 discount = 0.1 total_cost = (hourly_rate * hours_worked) + supply_cost discount_amt = total_cost * discount final_cost = total_cost - discount_amt result = final_cost return result
The perimeter of a rectangle is 32 cm. If the length is 4 cm longer than the width, what are the dimensions of the rectangle?
def solve() -> int: perimeter = 32 length = (perimeter / 2) + 2 width = perimeter / 2 - 2 result = (length, width) return result
Student: A toy store buys toys in boxes of 15. If every 6th customer buys a box of toys, how many boxes of toys will the store need to order for their 300 predicted customers?
def solve() -> int: customers = 300 boxes_per_customer = 15 frequency = 6 customers_with_boxes = customers // frequency total_boxes = customers_with_boxes * boxes_per_customer result = total_boxes return result
Anna baked 12 muffins and ate 3 of them. What percentage of the muffins did she eat?
def solve() -> int: fraction = 3 / 12 percentage = fraction * 100 result = percentage return result
A recipe calls for 2/3 cup of flour and 1/4 cup of sugar. If you want to double the recipe, how much flour and sugar will you need in total?
def solve() -> int: flour = 2/3 sugar = 1/4 double_flour = 2 * flour double_sugar = 2 * sugar result = double_flour + double_sugar return result
Jacob is a painter and has to climb a ladder frequently. He climbs his full ladder, which has 12 steps, 20 times today. He also climbs a smaller ladder, which has 7 steps, 16 times today. He did not climb any steps otherwise. In total, how many times has Jacob climbed a step today?
def solve() -> int: full_ladder_steps = 12 full_ladder_climbs = 20 small_ladder_steps = 7 small_ladder_climbs = 16 total_steps = full_ladder_steps * full_ladder_climbs + small_ladder_steps * small_ladder_climbs result = total_steps return result
Student: The sum of three consecutive even numbers is 150. What is the largest of the three numbers?
def solve() -> int: sum = 150 smallest = sum // 3 * 2 largest = smallest + 4 result = largest return result