question
stringlengths
11
2.89k
code
stringlengths
20
7.24k
A car travels 145 miles in 2.5 hours. What was the average speed in miles per hour?
def solve() -> int: avg_speed = 145/2.5 result = avg_speed return result
A box of tissue costs $1 and a box of wipes costs $2, which is twice the cost of a box of tissues. If Amanda buys 3 boxes of tissues and 2 boxes of wipes, how much will it cost?
def solve() -> int: num_tissues = 3 num_wipes = 2 price_tissue = 1 price_wipe = 2 total_cost = (num_tissues * price_tissue) + (num_wipes * price_wipe) result = total_cost return result
David, Sarah, and their pet cat, Muffin, order a large pizza for dinner every Friday night. If the pizza has 10 slices and Muffin eats one slice, how many slices of pizza will each of them have?
def solve() -> int: total_slices = 10 muffin_slices = 1 david_sarah_slices = total_slices - muffin_slices each_slices = david_sarah_slices / 2 result = each_slices return result
Anne has $3000 and wants to renovate her house. She spent 40% of her money on paint and 30% on new furniture. She also bought decorations for $300 and donated 5% of her remaining money to charity. How much money does she have left?
def solve() -> int: money = 3000 paint_cost = money * 40 / 100 furniture_cost = money * 30 / 100 remaining_money_1 = money - paint_cost - furniture_cost decorations_cost = 300 remaining_money_2 = remaining_money_1 - decorations_cost donation = remaining_money_2 * 5 / 100 money_left = rem...
If the price of ice cream is $2.50 per scoop, how much will it cost to buy 8 scoops?
def solve() -> int: total_cost = 2.50*8 result = f'<<<{total_cost}>>>' result = total_cost return result
Lucas works as a carpenter and charges $50 per hour of labor plus 10% of the material cost. He works on a project that requires 25 hours of labor and $800 worth of materials. How much does he earn from this project?
def solve() -> int: material_cost = 800 + 0.1 * 800 labor_cost = 50 * 25 earnings = material_cost + labor_cost result = earnings return result
Ethan, Ava, and Olivia are painting a room. Ethan can paint 15 square feet per hour, Ava can paint 10 square feet per hour, and Olivia can only paint 6 square feet per hour. If they have 4 hours to paint, what is the total area they can paint?
def solve() -> int: ethan_speed = 15 ava_speed = 10 olivia_speed = 6 total_hours = 4 ethan_area = ethan_speed * total_hours ava_area = ava_speed * total_hours olivia_area = olivia_speed * total_hours total_area = ethan_area + ava_area + olivia_area result = total_...
A group of 6 friends want to buy a pizza that costs $20. They plan to split the cost equally. How much will each friend pay?
def solve() -> int: num_people = 6 cost_of_pizza = 20 result = cost_of_pizza / num_people return result
Jack bought 5 books. Each book costs $15. If he pays with a credit card, he will get a 5% discount. How much will he pay in total?
def solve() -> int: book_price = 15 total_price = 5 * book_price discounted_price = total_price * 0.95 result = discounted_price return result
A farmer has 24 chickens and 12 ducks. He decides to sell some of his poultry at the market. He sells 6 chickens and 4 ducks for $10 each. He then sells another 4 chickens and 2 ducks for $12 each. How much money does he make in total from selling his poultry?
def solve() -> int: group_one = 6 * 10 + 4 * 10 group_two = 4 * 12 + 2 * 12 total_money = group_one + group_two result = total_money return result
Possible questions and programs are: Brian has 120 stickers. He wants to put them in a sticker book with 25 pages. He can put 4 stickers each on the first 5 pages. Then he can put 5 stickers each on the next 5 pages. If he wants to put an equal number of stickers on each of the remaining pages of the book, how many sti...
def solve() -> int: first_10 = (4 * 5) + (5 * 5) remaining = 120 - first_10 pages = 25 - 10 stickers_per_page = remaining // pages result = stickers_per_page return result
In a week, Elsa practices her singing for one-sixth the number of hours that Anna practices her singing. Kristoff, their friend, practices his singing for three times the combined total number of hours both Elsa and Anna take practicing their singing. If Anna practices for 12 hours in a week, calculate the number of ho...
def solve() -> int: anna_hours = 12 elsa_hours = anna_hours / 6 total_hours = anna_hours + elsa_hours kristoff_hours = 3 * total_hours result = kristoff_hours return result
Student: A recipe requires 2/3 cups of flour to make 12 cookies. How much flour is needed to make 30 cookies?
def solve() -> int: flour_per_cookie = 2/3 / 12 flour_needed = flour_per_cookie * 30 result = flour_needed return result
Daniel is building a bed frame with slats that are 1 foot apart. Each slat needs to be 2 inches wide. If the bed frame needs to be 5 feet wide, how many feet of wood will he need for the slats?
def solve() -> int: distance_between_slats = 1 width_of_slat = 2 width_of_bed_frame = 5 width_of_slat_feet = width_of_slat / 12 number_of_slats = width_of_bed_frame / distance_between_slats total_width_of_slats = number_of_slats * width_of_slat_feet result = total_w...
If a box of candy bars costs $10.50 and there are 12 candy bars in the box, how much does each candy bar cost?
def solve() -> int: cost = 10.50 num_of_candy_bars = 12 price_per_candy_bar = cost/num_of_candy_bars result = price_per_candy_bar return result
Sophie is a librarian and has to climb stairs in the library multiple times a day. She climbs up a full staircase, which has 18 steps, 6 times today. She also climbs up a shorter staircase, which has 9 steps, 11 times today. How many steps has Sophie climbed in total today?
def solve() -> int: full_staircase_steps = 18 short_staircase_steps = 9 full_staircase_count = 6 short_staircase_count = 11 total_steps = (full_staircase_steps * full_staircase_count) + (short_staircase_steps * short_staircase_count) result = total_steps return result
Student: John went to the store and bought a pack of cookies for £2.50, a loaf of bread for £1.75 and bananas for £2.15. If he also paid £1 for a shopping bag, what was the total cost of his purchase?
def solve() -> int: cookies = 2.50 bread = 1.75 bananas = 2.15 bag = 1 total = cookies + bread + bananas + bag result = total return result
A jar contains 100 marbles, some are green and some are red. If the probability of picking a green marble is 0.3, how many green marbles are in the jar?
def solve() -> int: green_prob = 0.3 green_marbles = green_prob * 100 result = green_marbles return result
A pizza shop is offering a discount. If you order 2 pizzas at the regular price, you can get the next 3 pizzas for 50% off. A customer ordered 5 pizzas for $64. What's the regular price of one pizza in dollars?
def solve() -> int: price = 64 discount_rate = 0.5 num_after_discount = 3 num_regular_price = 2 total_after_discount = price / (1 - discount_rate) regular_price_items_total = total_after_discount - (num_after_discount * discount_rate) regular_price_each = round(regular_price_items_...
Leo has 8 stickers on each page of his album. He has filled 12 pages and has 5 stickers left over. How many stickers does he have in total?
def solve() -> int: result = 8 * 12 + 5 return result
A storage unit has a length of 10 feet, a width of 5 feet, and a height of 8 feet. Write a program to calculate the volume of the storage unit in cubic feet.
def solve() -> int: length = 10 width = 5 height = 8 volume = length * width * height result = volume return result
A cell phone company charges a flat fee of $30 per month for service, plus an additional $0.05 for each text message sent. If a customer sends 250 texts in one month, how much will their bill be?
def solve() -> int: tf = 30 nt = 250 costpt = 0.05 totalcost = tf + nt*costpt result = totalcost return result
It takes 8 minutes for a worker to assemble 3 pieces of furniture. How much time is needed to assemble 18 pieces of furniture?
def solve() -> int: def time_needed(piece_num, time_per_piece): total_minutes = piece_num * time_per_piece return total_minutes piece_num = 18 time_per_piece = 8 result = time_needed(piece_num, time_per_piece) return result
8. For an office picnic, a group of 20 people ate 38 sandwiches and 6 people brought their own food. How many sandwiches were there for the picnic?
def solve() -> int: picnic_people = 20 people_with_own_food = 6 total_sandwiches = picnic_people - people_with_own_food + 38 result = total_sandwiches return result
Student: Michal bought a piece of fabric that measure 5m x 3m and wants to make pillow cases for her entire family. Each pillow case needs 0.2 m² of fabric and her family has 15 members. How much additional fabric does Michal need to buy?
def solve() -> int: fabric_length = 5 fabric_width = 3 fabric_area = fabric_length * fabric_width pillow_case_area = 0.2 family_members = 15 total_area_needed = pillow_case_area * family_members additional_fabric_needed = total_area_needed - fabric_area result = additional_fabric_n...
Mia and Mason gathered 450 rocks altogether. Mia picked 2/9 of the rocks that Mason did. How many rocks did Mia pick?
def solve() -> int: mason_rocks = 450 mia_rocks = (2/9) * mason_rocks result = mia_rocks return result
A school has 800 students, of which 60% are girls. If there are 5 spots available on the girls basketball team and all girls have an equal chance of being selected, what is the probability that a randomly selected girl will be on the team?
def solve() -> int: num_girls = 0.6*800 prob = 5/num_girls result = prob return result
A gym membership costs $23 per month plus a one-time $50 initiation fee. If Tim signs up for the gym, how much does he spend in one year?
def solve() -> int: monthly_cost = 23 initiation_fee = 50 num_months = 12 total_cost = (monthly_cost * num_months) + initiation_fee result = total_cost return result
A pizza has 8 slices. 3 of the slices are pepperoni, 2 have mushrooms, and the rest have cheese. What percentage of the pizza has cheese?
def solve() -> int: total_slices = 8 pep_slices = 3 mush_slices = 2 cheese_slices = total_slices - pep_slices - mush_slices cheese_perc = (cheese_slices / total_slices) * 100 result = cheese_perc return result
A toddler's height decreases to 2/3 of his current height after a growth spurt. If he currently stands at 3 feet tall, how tall was he before the growth spurt?
def solve() -> int: current_height = 3 previous_height = current_height * (3/2) result = previous_height return result
In a certain school, 80% of the students live in the campus dormitory and the rest live at nearby apartments. If the total student population is 200, how many are living in the dormitories?
def solve() -> int: total_students = 200 dorm_students = total_students * 0.8 result = dorm_students return result
If the product of four numbers is the same as the number of snacks that Mike takes to school every week, and each number is equal to 25, what is the total number of snacks Mike takes to school?
def solve() -> int: num1 = 25 num2 = 25 num3 = 25 num4 = 25 product = num1 * num2 * num3 * num4 result = product return result
Student: Zoe has some candies and eats 10 in the morning, 8 in the afternoon, and 6 in the evening. If she had 40 candies, how many does she have left?
def solve() -> int: candies_initial = 40 candies_eaten_morning = 10 candies_eaten_afternoon = 8 candies_eaten_evening = 6 candies_left = candies_initial - (candies_eaten_morning + candies_eaten_afternoon + candies_eaten_evening) result = candies_left return result
Olivia's windshield wipers clear 70% of rain while driving, and of the remaining 30%, 25% is intermittent drizzle. What percentage of rain isn't drizzle or cleared by the wipers?
def solve() -> int: wipers_clear = 0.7 remaining_rain = 1 - wipers_clear intermittent_drizzle = 0.25 * remaining_rain not_drizzle_or_cleared = remaining_rain - intermittent_drizzle result = not_drizzle_or_cleared * 100 return result
There are 12 packages of marbles. Each package has 9 marbles. How many marbles are in total?
def solve() -> int: packages = 12 marbles_in_each_package = 9 total_marbles = packages * marbles_in_each_package result = 108 return result
In a survey of 600 people, it was found that 47% of them had a brother and 36% of them had a sister. If 10% of them had both a brother and sister, how many did not have either brother or sister?
def solve() -> int: num_people = 600 perc_brother = 47 perc_sister = 36 perc_both_brother_and_sister = 10 num_people_with_brother = (perc_brother / 100)*num_people num_people_with_sister = (perc_sister / 100)*num_people num_people_with_both = (perc_both_brother_and_sister / 100)*num_peo...
In a store, there are a total of 154 items. If 25% of them are food, and the remainder are clothes. How many clothes are there in the store?
def solve() -> int: def get_num_clothes(num_items, perc_food): num_food = (num_items * perc_food)/100 num_clothes = num_items - num_food return num_clothes result = get_num_clothes(154,25) return result
Calvin's pest control service charges $80 per month. Calvin is thinking of switching to a new pest control service that charges $60 per month but also charges $3 per mouse caught. If Calvin typically has 5 mice caught per month, how much less will the new pest control service cost?
def solve() -> int: current_cost = 80 new_cost = 60 + 3 * 5 cost_difference = current_cost - new_cost result = cost_difference return result
Ava is a nurse. While taking care of her patient, she gets tangled up in the IV lines of another nurse and their 4 patients. There are 44 limbs tangled up in IV lines. How many patients is Ava taking care of?
def solve() -> int: limbs_per_patient = 4 total_limbs = 44 ava_patients = total_limbs // limbs_per_patient result = ava_patients return result
Richard and Mary are brother and sister. Combined, their age is 37 years. Richard is 9 years older than Mary. How old is Mary?
def solve() -> int: total_age = 37 age_difference = 9 result = total_age - age_difference return result
A group of students earned a total of 500 points in a math quiz. If each correct answer is worth 10 points and each incorrect answer is worth -5 points, how many correct answers did the group get if there were 45 questions in total?
def solve() -> int: total_points = 500 num_questions = 45 correct_points = 10 incorrect_points = -5 correct_answers = (total_points - num_questions * incorrect_points) / correct_points result = correct_answers return result
A car travels 180 miles in 3 hours, then stops for a 30-minute break. After the break, the car travels another 120 miles in 2 hours. What is the average speed, in miles per hour, of the car for the whole trip?
def solve() -> int: total_distance = 180 + 120 total_time = 3 + 0.5 + 2 average_speed = total_distance / total_time result = average_speed return result
A pizza costs $12. If you want to give a 20% tip on the pizza, how much would you spend in total?
def solve() -> int: pizza_cost = 12 tip_percent = 0.20 tip_amount = pizza_cost * tip_percent total_cost = pizza_cost + tip_amount result = total_cost return result
A CD costs $15.25 and Angela has a $20 bill. If Angela needs to pay with the smallest number of bills and coins possible, how much change will she receive?
def solve() -> int: amount_paid = 20 cost_of_cd = 15.25 change = amount_paid - cost_of_cd result = change return result
A hospital receives 5 patients every hour for 16 hours a day. How many patients does the hospital receive in 4 days?
def solve() -> int: hourly_patients = 5 hours_per_day = 16 days = 4 daily_patients = hourly_patients * hours_per_day total_patients = daily_patients * days result = total_patients return result
Bryan got 600 pieces of candy for his birthday and he gives 6/10 of them away to his friends. How many pieces of candy does Bryan have left?
def solve() -> int: pieces_candy_Bryan = 600 portion_given = 6/10 portion_Bryan_left = 1 - portion_given pieces_candy_Bryan_left = pieces_candy_Bryan * portion_Bryan_left result = pieces_candy_Bryan_left return result
A bookshelf has 7 shelves. Each shelf can hold 15 books. If the bookshelf is already holding 54 books, how many more books can it hold?
def solve() -> int: num_shelves = 7 books_per_shelf = 15 books_on_shelf = 54 total_books = num_shelves * books_per_shelf remaining_books = total_books - books_on_shelf result = remaining_books return result
Ryan drinks 4 cups of water per day. He buys them by the gallon at a local grocery store. They are currently on sale for $1.99 per gallon. If Ryan wants to buy enough water to last him for 60 days, how much will he spend? Lucas is trying to cut down on the amount of chocolate he eats. Right now, he eats 24 chocolates a...
def solve() -> int: cups_per_day = 4 price_per_gallon = 1.99 days = 60 gallons_needed = cups_per_day * days / 16 total_cost = gallons_needed * price_per_gallon result = total_cost chocolates_per_day = 24 target_chocolates_per_day = 3 days_to_reach_target = 0 ...
A baker sells 100 loaves of bread every day. If their sales increase by 20% each day, how many loaves of bread will they sell after a week?
def solve() -> int: loaves_per_day = 100 increase_percentage = 20 days = 7 total_loaves_sold = loaves_per_day for day in range(1, days+1): loaves_sold = total_loaves_sold * (1 + increase_percentage/100) total_loaves_sold += loaves_sold result = total_loaves_sold ...
Tyler ran 2.5 miles out of his goal to run 4 miles. What percentage of his goal has he completed?
def solve() -> int: goal = 4 completed = 2.5 percentage_completed = (completed / goal) * 100 result = percentage_completed return result
A store is having a sale, and all items are 20% off. If a shirt originally costs $25, what will be the sale price of the shirt?
def solve() -> int: original_price = 25 discount_percent = 20 discount_amount = original_price * (discount_percent/100) sale_price = original_price - discount_amount result = sale_price return result
Emma has $15.00 worth of quarters. Her neighbor, Ethan has a fifth of that amount, but then finds 3 extra quarters. How many quarters does Ethan have now?
def solve() -> int: emma_quarters = 1500 // 25 ethan_quarters = emma_quarters // 5 ethan_quarters += 3 result = ethan_quarters return result
Student: A rectangular room has an area of 180 square feet and a length of 15 feet. What is the width of the room?
def solve() -> int: area = 180 length = 15 width = area / length result = width return result
Student: John picked apples in his garden. He picked 6 apples in the morning and twice this many apples in the afternoon. In total, how many apples did John pick?
def solve() -> int: morning_apples = 6 afternoon_apples = 2 * morning_apples total_apples = morning_apples + afternoon_apples result = total_apples return result
Student: Ella has some money to spend on a trip to the zoo. She spends $8 on the entrance ticket, $5 on a map, and $6 on a snack. She also buys some souvenirs for herself and her family. She buys 3 magnets for $2 each, 2 keychains for $3 each, and 4 stickers for $1 each. If she has $12 left, how much money, in dollars,...
def solve() -> int: entrance_ticket = 8 map = 5 snack = 6 magnets = 3 * 2 keychains = 2 * 3 stickers = 4 * 1 total_spent = entrance_ticket + map + snack + magnets + keychains + stickers initial_money = total_spent + 12 result = initial_money return result
Mia and Liam each drove 12 trips to pick up groceries during the pandemic. If each trip was 10 miles, how many miles did they travel in total?
def solve() -> int: trips_per_person = 12 miles_per_trip = 10 mia_total_miles = trips_per_person * miles_per_trip liam_total_miles = trips_per_person * miles_per_trip total_miles = mia_total_miles + liam_total_miles result = total_miles return result
Monica had a term test and got 80, 70, and 65 marks in English, Maths, and Science respectively. What is her average marks?
def solve() -> int: score1 = 80 * 100 / 100 score2 = 70 * 100 / 100 score3 = 65 * 100 / 100 total_score = score1 + score2 + score3 result = total_score / 3 return result
A car traveled 60 miles at a speed of 40 miles/hour, and then another 30 miles at a speed of 20 miles/hour. What was the car's average speed over the entire journey?
def solve() -> int: total_distance = 60 + 30 total_time = 60/40 + 30/20 average_speed = total_distance/total_time result = average_speed return result
A group of friends went to a restaurant and split the $150 bill evenly. However, two friends did not have enough money so they borrowed equally from the other friends. How much money did each person have to pay in the end?
def solve() -> int: total_cost = 150 num_friends = 8 owed_amount = (total_cost - (num_friends // 2)) / (num_friends - 2) result = owed_amount return result
Sarah orders 12 tacos with 2 bites each. She had 10 bites already. She finishes all the tacos in 1 day. How many bites of taco does she have per day?
def solve() -> int: tacos_ordered = 12 bites_per_taco = 2 bites_already_taken = 10 days_to_finish = 1 total_bites = tacos_ordered * bites_per_taco remaining_bites = total_bites - bites_already_taken bites_per_day = remaining_bites / days_to_finish result = bites_per_day ret...
Student: Brad and Kim go fishing. Brad can catch 3 fish per hour while Kim can catch 6 fish per hour. If they went fishing together for 1.5 hours, how many fish did they catch in total?
def solve() -> int: brad_rate = 3 kim_rate = 6 time = 1.5 brad_fish = brad_rate * time kim_fish = kim_rate * time total_fish = brad_fish + kim_fish result = total_fish return result
It's May 2023. John was born in December 1988. Lisa is 4 years younger than John, and Lisa's cousin, Emma, is 1/6 the age of Lisa. How old is Emma?
def solve() -> int: john_birth_year = 1988 current_year = 2023 john_age = current_year - john_birth_year lisa_age = john_age - 4 emma_age = lisa_age / 6 result = emma_age return result
Sasha bought 2 pounds of strawberries. She wants to divide them evenly among her five friends. How many strawberries will each friend receive if one pound has 20 strawberries?
def solve() -> int: total_strawberries = 2 * 20 num_friends = 5 strawberries_per_friend = total_strawberries / num_friends result = strawberries_per_friend return result
Cameron is a real estate agent who made a commission of $5400 from a sale of a house. He has to pay a 10% balance to his broker and 12.5% in taxes, how much money will Cameron take home?
def solve() -> int: income_after_broker_commission = 5400 - (5400 * 0.1) income_after_taxes = income_after_broker_commission - (income_after_broker_commission * 0.125) result = income_after_taxes return result
Sarah has 40 dolls, she gives 1/5 of them away and then buys 16 more. How many dolls does Sarah have now?
def solve() -> int: dolls = 40 given_dolls = 1/5 * dolls added_dolls = 16 result = dolls - given_dolls + added_dolls return result
A park has 5 trees planted in each row, and there are 8 rows. How many trees are there in the park?
def solve() -> int: total_trees = 5*8 result = total_trees return result
Student: Clara went to her local supermarket to buy some fruits for a party. She bought 5 apples, 6 oranges, and 3 bananas. How many pieces of fruits did she buy in total?
def solve() -> int: apples = 5 oranges = 6 bananas = 3 total_fruits = apples + oranges + bananas result = total_fruits return result
A baker directs 118 customers to let them know that their pies are ready. For each call, the assistant called 5 numbers at once. How many calls of 5 numbers each did it take to notify everyone?
def solve() -> int: total_numbers = 118 * 5 numbers_per_call = 5 calls_needed = total_numbers // numbers_per_call + (1 if total_numbers % numbers_per_call > 0 else 0) result = calls_needed return result
A factory produces 1000 bottles of juice per day. Each bottle of juice contains 250 ml of liquid. Due to a malfunction, 5% of the bottles produced on a certain day are defective and leak 10 ml of liquid per hour. How much liquid is lost from the defective bottles in 24 hours?
def solve() -> int: defective_bottles = 0.05 * 1000 leakage_rate = 10 time = 24 liquid_lost = defective_bottles * leakage_rate * time result = liquid_lost return result
Joanne bought 6 boards each of 2.4 meters long, she then cut each board into 12 equal pieces. How many centimeters does each piece have?
def solve() -> int: board_length = 6*2.4 piece_length = board_length/12 length_in_cm = piece_length*100 result = length_in_cm return result
Natalie wants to buy a new book and a bookmark. The book costs $15 and the bookmark costs $2. How much will these items cost her with a 9% bookstore tax? A crate of 12 oranges was left in the sun and is spoiling. Every hour, one orange spoils and the remaining oranges spoil three times as fast as the previous one. How ...
def solve() -> int: book_cost = 15 bookmark_cost = 2 bookstore_tax = 0.09 total_cost = book_cost + bookmark_cost total_cost_with_tax = total_cost + (total_cost * bookstore_tax) first_orange_spoil_rate = 1 last_orange_spoil_rate = first_orange_spoil_rate * (3 ** 11) result ...
Student: A software company has two versions of a software: Pro and Basic. The Pro version costs $150 and the Basic version costs $75. In a month, the company sells 250 Pro versions and 450 Basic versions. What percentage of the total sales is comprised of the Pro version?
def solve() -> int: pro_cost = 150 basic_cost = 75 pro_sales = 250 basic_sales = 450 total_sales = pro_sales * pro_cost + basic_sales * basic_cost pro_percentage = (pro_sales * pro_cost / total_sales) * 100 result = pro_percentage return result
Student: Toni is a busy salesperson. She spends 4 minutes preparing paperwork, 10 minutes organizing her schedule and 8 minutes meeting with each customer. How long does it take her to meet with 12 customers?
def solve() -> int: paperwork = 4 schedule = 10 meeting = 8 fixed_time = paperwork + schedule meeting_time = meeting * 12 total_time = fixed_time + meeting_time result = total_time return result
A bakery sells cakes for $15 each. If Sara buys 2 cakes and receives a discount of 20%, how much does she pay in total?
def solve() -> int: num_cakes = 2 price_cake = 15 discount = 0.20 total_cost = num_cakes * price_cake discount_amount = total_cost * discount final_cost = total_cost - discount_amount result = final_cost return result
If a gallon of paint can cover 150 square feet, how many gallons of paint are needed to cover 750 square feet?
def solve() -> int: sq_ft_covered_per_gallon = 150 total_sq_ft = 750 total_gallons_needed = total_sq_ft/sq_ft_covered_per_gallon result = total_gallons_needed return result
san can knit a scarf in 6 hours. Her friend, Sarah, can knit the same scarf in 4 hours. How long will it take them to knit the scarf if they work together?
def solve() -> int: susan_time = 6 sarah_time = 4 total_time = 1/(1/susan_time + 1/sarah_time) result = total_time return result
The number of children who prefer chocolate ice cream is three times as many as those who prefer vanilla ice cream. If there are 1200 children who prefer vanilla ice cream, how many children are there altogether?
def solve() -> int: vanilla = 1200 chocolate = 3 * vanilla total = vanilla + chocolate result = total return result
A restaurant is offering a 10% discount to all customers. Sarah's bill is $45. What is the new price after the discount?
def solve() -> int: discount =.1 discount_amount = discount * 45 new_price = 45 - discount_amount result = new_price return result
ve wants to buy a new bike for $500 but can only afford to pay $50 per month. If the seller offers a 10% interest rate, how many months will it take Steve to pay off the bike?
def solve() -> int: bike_price = 500 monthly_payment = 50 interest_rate = 0.1 total_interest = bike_price * interest_rate total_loan_amount = bike_price + total_interest months_to_pay = total_loan_amount // monthly_payment result = months_to_pay return result
If a bookstore has 2500 books in stock and sells 50 books each day, how many days will it take to sell out completely?
def solve() -> int: starting_books = 2500 books_sold_per_day = 50 days_to_sell_all = starting_books / books_sold_per_day result = days_to_sell_all return result
Roy went to a bookstore and bought a novel for $20 and two textbooks for $100 each. He received a 10% discount on the books and a 5% discount on the total bill. What was the final price Roy paid after all the discounts?
def solve() -> int: novel_price = 20 textbook_price = 100 discount_books = 0.1 discount_total = 0.05 total_price = novel_price + (2 * textbook_price) discounted_books = total_price * discount_books discounted_total = total_price * discount_total final_price = total_price - disc...
Natalie is shopping for 5 kilograms of oranges, 2 bottles of juice, and 500 grams of chocolate. One kilogram of oranges costs $4, one bottle of juice is $4, and one kilogram of chocolate is $15. What would be the overall cost of Natalie's shopping list?
def solve() -> int: oranges_kg = 5 juice_bottles = 2 chocolate_g = 500 cost_oranges_kg = 4 cost_juice_bottle = 4 cost_chocolate_kg = 15 total_cost = (oranges_kg * cost_oranges_kg) + (juice_bottles * cost_juice_bottle) + (chocolate_g / 1000 * cost_chocolate_kg) result = tot...
Calvin bought a DVD player for $150 and a lamp for $75. He had a 10% discount. How much did he have to pay?
def solve() -> int: discount = 10 priceDVD = 150 priceLamp = 75 discountAmount = (priceDVD + priceLamp) * (discount/100.0) result = (priceDVD + priceLamp) - discountAmount return result
Emma can finish her homework in half the time it takes her to study for a test. If she spends 6 hours studying for a test, how many hours does she need to finish her homework?
def solve() -> int: t = 6 h = 0.5 * t result = h return result
A bakery uses 3 cups of flour to make 1 loaf of bread. If the bakery wants to make 15 loaves of bread, how many cups of flour will they need?
def solve() -> int: flour_per_loaf = 3 num_loaves = 15 total_flour = flour_per_loaf * num_loaves result = total_flour return result
You have 200$ to spend on clothes. You buy a dress for 60$, a pair of shoes for 40$, and then spend 3/5 of what is left on a sweater. How much money do you have left?
def solve() -> int: total_money = 200 dress_price = 60 shoes_price = 40 sweater_price = 0 sweater_fraction = 3/5 total_money = total_money - (dress_price + shoes_price) sweater_price = total_money * sweater_fraction result = total_money - sweater_price return result
At a grocery store, 40% of the customers bought apples and 20% bought both apples and oranges. If there were 600 customers, how many bought oranges?
def solve() -> int: apples_customers = 0.4 * 600 both_customers = 0.2 * 600 only_oranges = (0.4 - 0.2) * 600 total_oranges = only_oranges + both_customers result = total_oranges return result
Student: A special events manager has to buy a series of decorative plates to use for a banquet they are hosting. The series of plates cost $85 per plate plus an additional 20% packaging and handling fee for the entire purchase. How much total money will the events manager need to pay (in dollars) for the series of pla...
def solve() -> int: price_per_plate = 85 packaging_and_handling_fee = 0.2 total_cost = price_per_plate * (1 + packaging_and_handling_fee) result = total_cost return result
Laura is hosting a bake sale. She has made 24 cupcakes and sells them for $2 each. If she spent $1 per cupcake to make them, how much profit does she make?
def solve() -> int: num_cupcakes = 24 cost_per_cupcake = 1 selling_price = 2 total_cost = num_cupcakes * cost_per_cupcake total_sales = num_cupcakes * selling_price profit = total_sales - total_cost result = profit return result
If the square of a number is 64, what is the number?
def solve() -> int: square = 64 number = square ** 0.5 result = number return result
A car travels a distance of 3068 km in 7 days. What is the average distance travelled by the car in a day?
def solve() -> int: average_distance = 3068 / 7 result = average_distance return result
A car travels 120 miles in 2 hours. What is the average speed of the car in miles per hour?
def solve() -> int: distance = 120 time = 2 speed = distance / time result = speed return result
In the Geography quiz held at his school, Juan got one third of the questions correct and wrong double the number of questions he got correct. If each question was worth 3 points and Juan got a total of 45 points, how many questions were asked in the quiz?
def solve() -> int: points_total = 0 points_correct = 0 points_wrong = 0 questions_asked = 0 points_correct = points_total / 3 points_wrong = points_total / 6 questions_asked = points_correct + points_wrong points_correct = 45 / 3 points_wrong = points_correct * 2 quest...
Lucy has 112 eggs and wants to make omelets with 2 eggs each. How many omelets can she make?
def solve() -> int: total_omelets = 112 / 2 result = total_omelets return result
A triangle has a base of length 12 inches and a height of length 8 inches. What is the area of the triangle?
def solve() -> int: base = 12 height = 8 area = 0.5 * base * height result = area return result
If a restaurant sells 2,500 burgers on Monday and the amount doubles every day, how many burgers will be sold in total by Saturday?
def solve() -> int: monday_burgers = 2500 tuesday_burgers = monday_burgers * 2 wednesday_burgers = tuesday_burgers * 2 thursday_burgers = wednesday_burgers * 2 friday_burgers = thursday_burgers * 2 saturday_burgers = friday_burgers * 2 total_burgers = monday_burgers + tuesday_burgers + ...
Sarah sows 150 carrot seeds. 10% of them germinate and Sarah donates 30 of the carrot sprouts. How many carrot plants does she have left?
def solve() -> int: seeds_sown = 150 germination_rate = 0.1 donated_sprouts = 30 germinated_seeds = seeds_sown * germination_rate carrot_plants_left = germinated_seeds - donated_sprouts result = carrot_plants_left return result
If the temperature drops from 78 degrees Fahrenheit to 62 degrees Fahrenheit, what is the percentage decrease in temperature?
def solve() -> int: initial_temp = 78 final_temp = 62 percent_decrease = (initial_temp - final_temp)/initial_temp * 100 result = percent_decrease return result
Before taking steroid supplements, Mark could lift weights no more than 70 pounds. After taking the supplements, he increased that by 240 pounds. If Mark gets a powerlifting belt that increases his strength by an additional 500%, how much will he be able to lift?
def solve() -> int: mark_before = 70 mark_increase = 240 mark_total = mark_before + mark_increase powerlifting_belt_increase = 500/100 mark_new_total = mark_total * (1 + powerlifting_belt_increase) result = mark_new_total return result
Jessica is a tutor, she earns $20 from math tutoring and $30 from science tutoring. If she tutored 5 math sessions last Monday, 2 math sessions last Tuesday, 3 science sessions on Wednesday, and 4 science sessions last Thursday, how much does she earn in total?
def solve() -> int: math_sessions_monday = 5 math_sessions_tuesday = 2 science_sessions_wednesday = 3 science_sessions_thursday = 4 math_earnings = (math_sessions_monday + math_sessions_tuesday) * 20 science_earnings = (science_sessions_wednesday + science_sessions_thursday) * 30 t...