question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A box of apples is sold for $24. If each apple costs $0.6, how many apples are in the box? | def solve() -> int:
totalCost = 24
costPerApple = 0.6
numOfApples = totalCost/costPerApple
result = numOfApples
return result
|
am's mother bought 6 candy bars for $2.50. How much did Sam's mother pay for the entire box of 35 candy bars? | def solve() -> int:
original_price = 2.50
original_bars = 6
total_bars = 35
total_price = original_price * (total_bars/original_bars)
result = total_price
return result
|
Ava wants to take a trip to Hawaii, but first she has to pay her medical bills. The trip costs $3,000 and her medical bills cost $1,200. Knowing that Ava has saved $250/month for 4 years, how much money will she have left after paying her medical bills? | def solve() -> int:
trip_cost = 3000
medical_bills = 1200
savings_per_month = 250
savings_duration_in_years = 4
total_savings = savings_per_month * 12 * savings_duration_in_years
remaining_savings = total_savings - medical_bills
remaining_savings -= trip_cost
result =... |
Evan has a garden where he grows 18 tomatoes. He is going to make jars of tomato sauce and each jar requires 5 tomatoes. How many jars of tomato sauce can Evan make? | def solve() -> int:
totalTomatoes = 18
neededForJar = 5
numOfJars = totalTomatoes // neededForJar
result = numOfJars
return result
|
Student: A pizza has a diameter of 16 inches. What is the circumference of the pizza? | def solve() -> int:
diameter = 16
radius = diameter / 2
circumference = 2 * 3.14 * radius
result = circumference
return result
|
Andrew is jogging around the neighborhood. He jogs 1.5 miles to the corner store, then jogs four times the distance so far until he reaches the library. From there, he jogs one-third of the total distance up to this point to finish his route. How many miles did Andrew jog in total? | def solve() -> int:
distance_to_store = 1.5
distance_to_library = 4 * distance_to_store
total_distance = distance_to_store + distance_to_library + (1/3) * (distance_to_store + distance_to_library)
result = total_distance
return result
|
Leo has a jar of 120 marbles. He gives away 20% of them to his friends and then loses 10% of the remaining marbles. How many marbles does he have left? | def solve() -> int:
initial = 120
given_away = 0.2
lost = 0.1
after_giving = initial * (1 - given_away)
after_losing = after_giving * (1 - lost)
result = after_losing
return result
|
If a bus travels at a speed of 30 mph, how long will it take for it to travel 180 miles? | def solve() -> int:
speed = 30
distance = 180
time = distance/speed
result = time
return result
|
Lisa wants to leave a 18% tip on a $160 brunch bill. If her friend offers to pay $20, how much should Lisa contribute? | def solve() -> int:
bill = 160
tip_percentage = 0.18
friend_payment = 20
tip_amount = bill * tip_percentage
lisa_payment = bill + tip_amount - friend_payment
result = lisa_payment
return result
|
A fountain fills a pool at a rate of 50 liters per minute. If the pool already has 300 liters of water and the maximum capacity of the pool is 2000 liters, how much time will it take to fill the pool completely? | def solve() -> int:
fill_rate_per_minute = 50
water_present = 300
max_capacity = 2000
water_needed = max_capacity - water_present
fill_time = water_needed / fill_rate_per_minute
result = fill_time
return result
|
Every Monday, Wednesday, and Friday, Joe goes for a 20-minute jog and spends another 30 minutes doing stretches. During the rest of the week, he does double the usual routine. How many minutes of exercise does Joe do in 1 week? | def solve() -> int:
mon_wed_fri_exercise = 20 + 30
rest_of_week_exercise = 2 * (20 + 30)
total_exercise = 3 * mon_wed_fri_exercise + 4 * rest_of_week_exercise
result = total_exercise
return result
|
A recipe calls for 2 cups of flour and 1 cup of sugar. If Paula wants to make half the recipe, how much flour and sugar does she need? | def solve() -> int:
flour_amt = 2
sugar_amt = 1
recipe_multiplier = 0.5
flour_needed = flour_amt * recipe_multiplier
sugar_needed = sugar_amt * recipe_multiplier
result = (flour_needed, sugar_needed)
return result
|
Emily wants to get in shape, so she decides to join two different gyms. The first gym charges $50 per month and has a one-time fee of $75. The second gym is twice as expensive as the first one and charges a sign-up fee of $100. How much will Emily spend on gym memberships in her first year? | def solve() -> int:
first_gym_monthly_fee = 50
first_gym_one_time_fee = 75
second_gym_monthly_fee = 2 * first_gym_monthly_fee
second_gym_one_time_fee = 100
first_gym_total_fee = first_gym_monthly_fee * 12 + first_gym_one_time_fee
second_gym_total_fee = second_gym_monthly_fee * 12 + second_g... |
Ali drove 400 miles in 5 hours. If he drove at the same speed, how long would it take him to drive 300 miles? | def solve() -> int:
speed = 400 / 5
time = 300 / speed
result = time
return result
|
David runs a butcher shop. On Monday, he bought 200 kg of beef. On Tuesday, he sold a total of 75 kg of beef to customers. On Wednesday, 25 kg of beef went bad and could not be sold. On Thursday morning, another shipment of beef arrived that was double the size of the first order. How many kilograms of beef does David ... | def solve() -> int:
monday_purchase = 200
tuesday_sales = 75
wednesday_waste = 25
thursday_purchase = monday_purchase * 2
thursday_total = monday_purchase - tuesday_sales - wednesday_waste + thursday_purchase
friday_total = thursday_total
result = friday_total
... |
Steve and his roommates are paying their monthly rent. Steve agreed to contribute 25% of the rent. If the rent is $800 per month, how much do his roommates need to pay? | def solve() -> int:
rent = 800
steve_contribution = rent * 0.25
roommates_contribution = rent - steve_contribution
result = roommates_contribution
return result
|
Elliot received a gift card worth $100. He spent 25% of the gift card on shoes and used 40% of what was left to buy a hat. How much was spent on the hat? | def solve() -> int:
gift_card = 100
spent_on_shoes = 0.25 * gift_card
remaining_balance = gift_card - spent_on_shoes
spent_on_hat = 0.4 * remaining_balance
result = spent_on_hat
return result
|
A group of friends decided to split a $190 bill evenly. However, one friend only has $20 to contribute. How much will each person contribute? | def solve() -> int:
total_bill = 190
num_people = 7
one_person_payment = (total_bill - 20) / num_people
result = one_person_payment
return result
|
3. If the cost of 10 items is $810, what is the cost of 7 items? | def solve() -> int:
total_price = 0
total_cost = 810
item_cost = total_cost / 10
total_price = item_cost * 7
result = total_price
return result
|
Emma needs to make 25 pounds of ice cubes. She knows that 2.5 ounces of water make 1 cube and each cube weighs 1/18th of a pound. It takes her 2.5 hours to make 50 cubes. Every hour her ice maker run costs $2.00. Every ounce of water costs $0.08. How much will it cost to make all the ice? | def solve() -> int:
water_per_cube = 2.5
weight_per_cube = 1/18
cubes_needed = 25 * 16 / water_per_cube
total_weight = cubes_needed * weight_per_cube
hours_needed = cubes_needed / 50 * 2.5
cost_per_hour = 2.00
cost_per_ounce = 0.08
total_cost = hours_needed * cost_per_hour + cubes_needed... |
Tony owns a pizza shop. He charges $12 for a large pizza, $8 for a medium pizza, and $6 for a small pizza. He also offers a deal that gives customers a free small pizza for every 3 pizzas they buy. If he sells 15 large pizzas, 12 medium pizzas, and 9 small pizzas in a day, how much money does he make in a day? | def solve() -> int:
large_price = 12
medium_price = 8
small_price = 6
large_sales = 15
medium_sales = 12
small_sales = 9
total_pizzas = large_sales + medium_sales + small_sales
free_pizzas = total_pizzas // 3
paid_pizzas = total_pizzas - free_pizzas
money_from_paid_pizz... |
With a total of $1401 contributed from Tom, Jerry and Anna, how much did each of them contribute if Tom contributed $239 more than Jerry, and Jerry contributed $107 more than Anna? | def solve() -> int:
x=1401
y=239
z=107
a=x-(y+z)
b=a+z
c=b+y
result = a,b,c
return result
|
You want to invest $100 in a savings account that offers 5% annual interest. If you leave the money in the account for 2 years, how much will you have at the end of 2 years? | def solve() -> int:
principal = 100
interest_rate = 0.05
time_period = 2
interest_earned = principal * (1 + interest_rate)**time_period
result = interest_earned
return result
|
John has 10 birds and 3 times more fish than birds. If he had 2 fewer cats than fish, how many more fish and cats combined does John have than birds? | def solve() -> int:
num_birds = 10
num_fish = num_birds * 3
num_cats = num_fish - 2
total = num_fish + num_cats - num_birds
result = total
return result
|
If a box of chips contains 24 packets and a person eats 3 packets per day, how many days will the box last? | def solve() -> int:
packets_in_box = 24
packets_eaten_per_day = 3
days_till_empty = packets_in_box // packets_eaten_per_day
result = days_till_empty
return result
|
A cookie recipe calls for 2 cups of sugar to make 12 cookies. How much sugar is needed to make 50 cookies? | def solve() -> int:
cookies_needed = 50
cookies_in_recipe = 12
sugar_in_recipe = 2
sugar_needed = (cookies_needed / cookies_in_recipe) * sugar_in_recipe
result = sugar_needed
return result
|
Samantha is saving money to surprise her parents with a vacation. Every week, she saves $50 in her suitcase. If it takes her 8 weeks to fill the suitcase, and she fills it up 7 times, how much money would Samantha have saved in total? | def solve() -> int:
weeks_to_fill_suitcase = 8
money_saved_per_week = 50
times_suitcase_filled = 7
total_money_saved = weeks_to_fill_suitcase * money_saved_per_week * times_suitcase_filled
result = total_money_saved
return result
|
If Sarah has to pay $10 per hour for 25 hours of cleaning, plus a $30 cleaning supply fee, how much does she pay in total? | def solve() -> int:
hours_of_cleaning = 25
hourly_rate = 10
supply_fee = 30
total_cost = (hours_of_cleaning * hourly_rate) + supply_fee
result = total_cost
return result
|
Olivia collects perfumes and wants to showcase them on a display stand. Her wide display can hold 24 perfumes, her narrow display can hold half that amount, and her small display can hold 10 perfumes, equally spaced along the single row. If Olivia accidentally spillsLast month, Mrs. Johnson bought 10 meters of fabric f... | def solve() -> int:
wide_display = 24
narrow_display = wide_display / 2
small_display = 10
total_display = wide_display + narrow_display + small_display
last_month_fabric = 10 * 100
this_month_fabric = (10 - 3) * 100
total_fabric = last_month_fabric + this_month_fabric
result... |
Diana went to the supermarket and bought 3 pounds of bananas for $0.50 per pound, 2 boxes of cereal for $3 each, and a dozen eggs for $1.50. If she had a $2 discount coupon, what was her total cost? | def solve() -> int:
bananas_cost = 0.50 * 3
cereal_cost = 2 * 3
eggs_cost = 1.50
total_cost = bananas_cost + cereal_cost + eggs_cost
total_cost_with_coupon = total_cost - 2
result = total_cost_with_coupon
return result
|
ally can run 5 miles in 40 minutes. If Jackie can run 3 times as fast as Sally, how long will it take Jackie to run 7 miles? | def solve() -> int:
speed_of_sally = 5 / (40/60)
speed_of_jackie = speed_of_sally * 3
time_of_jackie = 7 / speed_of_jackie
result = time_of_jackie
return result
|
A farmer has to spend $5 per acre of gas. His tractor can plow 2 acres per gallon. He drives at a rate of 10 miles per hour. If he is paid $25 per acre, how much money does he make if he plows for 5 hours? | def solve() -> int:
gas_cost_per_acre = 5
acres_per_gallon = 2
rate_of_plowing = 10
payment_per_acre = 25
hours_of_plowing = 5
gallons_of_gas = (rate_of_plowing * hours_of_plowing) / acres_per_gallon
total_gas_cost = gallons_of_gas * gas_cost_per_acre
total_payment = payme... |
A company produces 5,000 units of a product and sells it for $10 each. If the cost to produce one unit is $5, what is the profit the company made? | def solve() -> int:
num_of_units = 5000
selling_price = 10
cost_per_unit = 5
total_revenue = num_of_units * selling_price
total_cost = num_of_units * cost_per_unit
profit = total_revenue - total_cost
result = profit
return result
|
A garden has a perimeter of 48 feet. If the length is twice the width, what is the area of the garden? | def solve() -> int:
length = 18
width = 9
area = 162
result = area
return result
|
Student: Mia wants to bake some cookies for her classmates. She needs 3 cups of flour, 2 cups of sugar, 1 cup of butter, and 2 eggs. She checks her pantry and sees that she has 5 cups of flour, 3 cups of sugar, 2 cups of butter, and 6 eggs. She decides to bake as many batches of cookies as she can with the ingredients ... | def solve() -> int:
flour_needed = 3
sugar_needed = 2
butter_needed = 1
eggs_needed = 2
flour_available = 5
sugar_available = 3
butter_available = 2
eggs_available = 6
batches_flour = flour_available // flour_needed
batches_sugar = sugar_available // sugar_needed
batches_butt... |
Dean borrowed $6700 and will repay it over the course of 5 years with an interest rate of 11%. How much total money will Dean have paid back to the bank after 5 years? | def solve() -> int:
loan = 6700
interest = 0.11
time = 5
total_amount_paid = loan * (1 + interest) ** time
result = round(total_amount_paid, 2)
return result
|
A triangular prism has a base that is 10 cm wide with a height of 8 cm. The height of the triangular prism is 15 cm. What is the volume of the prism? | def solve() -> int:
base_width = 10
base_height = 8
prism_height = 15
base_area = 0.5 * base_width * base_height
volume = base_area * prism_height
result = volume
return result
|
Student: Joseph runs a fruit shop. He buys 5 oranges for $3 each and sells them for $6 each. How much money did Joseph make when he sold 15 oranges? | def solve() -> int:
cost_per_orange = 3
price_per_orange = 6
oranges_bought = 5
oranges_sold = 15
total_cost = cost_per_orange * oranges_bought
total_price = price_per_orange * oranges_sold
profit = total_price - total_cost
result = profit
return result
|
If a car travels 280 kilometers on 20 liters of gas, how many kilometers can it travel on 30 liters of gas? | def solve() -> int:
distance_traveled = 280
gas_used = 20
gas_remaining = 30
distance_per_liter = distance_traveled / gas_used
total_distance = distance_per_liter * gas_remaining
result = total_distance
return result
|
Elizabeth is 62 inches tall. Over the course of 8 months she grows at a rate of 0.75 inches per week. What is her new height in feet? | def solve() -> int:
height_in_inches = 62
growth_rate_per_week = 0.75
months = 8
growth_in_inches = growth_rate_per_week * 4 * months
new_height_in_inches = height_in_inches + growth_in_inches
new_height_in_feet = new_height_in_inches / 12
result = new_height_in_feet
return res... |
A coffee shop sold 800 cups of coffee in a month. In the first week, 100 cups of coffee were sold. In the second week, half as many cups of coffee were sold. There was an equal number of cups of coffee sold in the third and fourth week. How many cups of coffee were sold in the third and fourth week? | def solve() -> int:
total_cups_sold = 800
cups_sold_first_week = 100
cups_sold_second_week = cups_sold_first_week / 2
cups_sold_third_week = (total_cups_sold - cups_sold_first_week - cups_sold_second_week) / 2
cups_sold_fourth_week = cups_sold_third_week
result = cups_sold_third_week +... |
Joshua has 16 toy cars. His brother gave him 5 more cars. How many cars does Joshua have now? | def solve() -> int:
given_cars = 16
added_cars = 5
result = given_cars + added_cars
return result
|
Alex is purchasing a blender for $100 with a 80% discount and a 35% state tax afterwards. What is the total cost of the blender? | def solve() -> int:
total_cost = 0
discount = 80
msrp = 100
tax = 0.35
discounted_price = msrp * (1 - discount/100)
total_cost = discounted_price * (1 + tax)
result = total_cost
return result
|
A rectangle has a width of 5 meters and a perimeter of 18 meters. What is the length of the rectangle? | def solve() -> int:
width = 5
perimeter = 18
length = (perimeter - 2*width) / 2
result = length
return result
|
Possible questions and programs: Leo buys a 4-pound bag of oranges. He eats two oranges that weigh 6 ounces each. He then makes juice from the remaining oranges and fills a 32-ounce pitcher. How many pounds of oranges are left in the bag? | def solve() -> int:
bag = 4 * 16
eaten = 2 * 6
juice = 32
left = bag - eaten - juice
left = left / 16
result = left
return result
|
John had a boardwalk project and needed a certain number of boards. He bought 6 large boards with a length of 8 feet and 8 small boards with a length of 4 feet. How many feet of boards did John buy in total? | def solve() -> int:
large_board_length = 8
small_board_length = 4
num_large_boards = 6
num_small_boards = 8
total_large_length = large_board_length * num_large_boards
total_small_length = small_board_length * num_small_boards
total_length = total_large_length + total_small_len... |
Olivia is aiming to complete as many pull-ups as possible. She thinks that if she can do half as many as her friend who can do the most, there is no way anyone else can beat her. She can already complete a third of the number of pull-ups her friend can do but wonders if she will be able to complete the rest. If Olivia'... | def solve() -> int:
friend_pull_ups = 30
olivia_pull_ups = friend_pull_ups / 3
olivia_goal_pull_ups = friend_pull_ups / 2
pull_ups_to_beat_friend = olivia_goal_pull_ups - olivia_pull_ups
result = pull_ups_to_beat_friend
return result
|
Alex is working on their endurance and swims 1 mile a week. The second week, they swim twice as long plus an additional half mile per week. The third week, they swim only 1/4 of how much they swam the first week. The week after that, they develop a cramp and have to reduce their swimming distance by 1/3 of a mile per w... | def solve() -> int:
week1 = 1
week2 = week1 * 2 + 0.5
week3 = week1 * 0.25
week4 = week2 - (1/3)
result = week4
return result
|
Gerald the giraffe needs new hats for his long neck. Hat stores only sell hats in pairs. If he already owns the 4 hats he is wearing, how many pairs of hats does he need to buy to have 10 complete sets of hats? | def solve() -> int:
hats_owned = 4
hats_per_set = 2
sets_needed = 10
total_hats_needed = sets_needed * hats_per_set
hats_to_buy = total_hats_needed - hats_owned
pairs_to_buy = hats_to_buy // 2
result = pairs_to_buy
return result
|
Student: In a class of 20 students, the average score on a test was 75 points. If 3 students scored 60 points and 2 students scored 80 points, what was the average score of the remaining students? | def solve() -> int:
num_students = 20
avg_score = 75
low_score = 3
low_score_points = 60
high_score = 2
high_score_points = 80
low_score_total = low_score * low_score_points
high_score_total = high_score * high_score_points
remaining_students = num_students - low_score - high_score
... |
Lily and her friends went to a movie theater for a Saturday matinee. They saw 200 people at the theater before the movie started. However, 50 people left before the movie started. If the rest watched the movie until the end, how many people watched the movie with Lily and her friends? | def solve() -> int:
initial_people = 200
left_people = 50
watched_people = initial_people - left_people
result = watched_people
return result
|
A school has 720 students and 18 classes. Each class has the same number of students. The school organizes a field trip and needs to rent buses. Each bus can carry 40 students. How many buses does the school need to rent? | def solve() -> int:
students = 720
classes = 18
capacity = 40
class_size = students / classes
bus_per_class = class_size / capacity
buses = bus_per_class * classes
result = buses
return result
|
Rachel invested $100 into a stock portfolio. The portfolio promised a yearly return rate of 15%. If she deposited an additional $25 every week into the account to add to her initial investment of $100, how much money will she have in the portfolio after one year? | def solve() -> int:
initial_investment = 100
weekly_deposit = 25
yearly_return_rate = 0.15
weeks_in_year = 52
total_deposited = initial_investment + (weekly_deposit * weeks_in_year)
total_return = total_deposited * yearly_return_rate
final_amount = total_deposited + total_retu... |
John has twice as many marbles as Mark. If Mark has 18 marbles, how many marbles do they have altogether? | def solve() -> int:
mark = 18
john = 2*mark
total = mark + john
result = total
return result
|
Student: Emily has three times as many stickers as pencils. She also has 12 more pencils than erasers. If she buys 2/5 times more of each item, how many items will she have in total if she currently has 90 stickers? | def solve() -> int:
stickers = 90
pencils = stickers / 3
erasers = pencils - 12
buy_stickers = stickers * 2 / 5
buy_pencils = pencils * 2 / 5
buy_erasers = erasers * 2 / 5
total_stickers = stickers + buy_stickers
total_pencils = pencils + buy_pencils
total_erasers = erasers +... |
Jared bought a new TV for 500 dollars. To get a better rate, he traded his gaming console which he originally bought for 200 dollars. Calculate Jared's overall savings from this trade. | def solve() -> int:
total_price = 500
trade_price = 200
savings = total_price - trade_price
result = savings
return result
|
``` A rectangle has a perimeter of 36 inches and one side that is 8 inches long. What is the length of the other side? | def solve() -> int:
perimeter = 36
given_side = 8
other_sides_total = (perimeter - given_side) / 2
result = other_sides_total
return result
|
Maya buys a 10 pack of doughnuts. If she has 7 cousins and wants to give each cousin the same number of doughnuts, and she has twice as many sisters as brothers, how many doughnuts can each cousin get? | def solve() -> int:
doughnuts = 10
cousins = 7
sisters = 2
brothers = sisters / 2
total_people = cousins + sisters + brothers
doughnuts_per_person = doughnuts / total_people
result = doughnuts_per_person
return result
|
Student: Bob borrowed a book from the library that has 240 pages. He read 20% of the book on the first day and 25% of the remaining pages on the second day. How many pages did he read on the second day? | def solve() -> int:
pages = 240
pages_read_first_day = pages * 0.2
pages_read_second_day = (pages - pages_read_first_day) * 0.25
result = pages_read_second_day
return result
|
Student: Four friends went to the movies, paying $17 each for their tickets. If they handed the cashier a $100 bill, how much change should they receive? | def solve() -> int:
ticket_price = 17
num_tickets = 4
total_cost = ticket_price * num_tickets
amount_paid = 100
change = amount_paid - total_cost
result = change
return result
|
John spent 30% of his salary on rent, 20% on food, and 10% on entertainment. If his salary is $3500, how much money does he have left? | def solve() -> int:
salary = 3500
rent_spending = 0.3 * salary
food_spending = 0.2 * salary
entertainment_spending = 0.1 * salary
money_left = salary - (rent_spending + food_spending + entertainment_spending)
result = money_left
return result
|
On Monday, Alex bought bread for $3.20, milk for $2.50 and 3 apples costing $0.50 each. How much did he spend in total? | def solve() -> int:
bread = 3.20
milk = 2.50
apple = 0.50
total = bread + milk + (apple*3)
result = total
return result
|
At an event center, 20% of the visitors are under 15, 25% are between 15-20, 30% are between 20-30 and the rest are over 30 years old. If there are 1000 visitors, how many more visitors there are over 30 years old compared to between 15-20 years old? | def solve() -> int:
visitors = 1000
under_15 = visitors * 0.20
age_15_20 = visitors * 0.25
age_20_30 = visitors * 0.30
over_30 = visitors - under_15 - age_15_20 - age_20_30
difference = over_30 - age_15_20
result = difference
return result
|
Student: Jack has 12 apples and he wants to put them in baskets that can hold 3 apples each. How many baskets will he need? | def solve() -> int:
apples = 12
basket_capacity = 3
baskets = apples // basket_capacity
result = baskets
return result
|
Sandy wants to buy a new laptop. She finds a deal on a laptop with a regular price of $800 that is on sale for 10% off. The sales tax is 6%. How much will Sandy pay in total? | def solve() -> int:
regular_price = 800
discount_percent = 0.10
sales_tax_percent = 0.06
discount_amount = regular_price * discount_percent
discounted_price = regular_price - discount_amount
sales_tax_amount = discounted_price * sales_tax_percent
total_price = discounted_price + sales_tax_am... |
Sarah has three days to read a 500-page book, where on the first day, she read 60 pages. On the next day, she read twice as much as what she read on her first day. How many pages does Sarah need to read on her last day to finish the book on time? | def solve() -> int:
first_day = 60
second_day = first_day * 2
remaining_pages = 500 - (first_day + second_day)
last_day = remaining_pages
result = last_day
return result
|
If a book costs $7 and Sarah wants to buy 12 books, but her dad wants her to save at least $40 before spending money, how much money does Sarah still need to save? | def solve() -> int:
books = 12
book_price = 7
money_saved = 40
total_cost = books * book_price
money_needed = total_cost - money_saved
result = money_needed
return result
|
A bike race is being held on a track that is 120 feet wide. If each bike takes up 2 feet of space and there must be at least 1 foot of space between each bike, how many bikes can race on the track at once? | def solve() -> int:
track_width = 120
bike_width = 2
space_between_bikes = 1
total_width_needed = bike_width + space_between_bikes
number_of_bikes = track_width // total_width_needed
result = number_of_bikes
return result
|
Kim wants to make 36 cupcakes for her class party. She has a recipe that requires 2.5 cups of flour for 12 cupcakes. If she has 7 cups of flour in total, how many batches of cupcakes can she make? | def solve() -> int:
num_of_cupcakes = 36
flour_for_12 = 2.5
total_flour = 7
flour_for_36 = flour_for_12 * 3
batches = total_flour // flour_for_36
result = batches
return result
|
Alex has a small bakery that sells 200 croissants per day. To increase sales, Alex decided to increase the size of the croissants by 20%. If Alex sells croissants for 5 days a week, how many croissants does he sell in a year? | def solve() -> int:
croissants_per_day = 200
increase_percentage = 20
days_per_week = 5
weeks_per_year = 52
croissants_per_week = croissants_per_day * days_per_week
croissants_per_year = croissants_per_week * weeks_per_year
increase_amount = croissants_per_day * (increase_percentag... |
In a class of 45 students, the ratio of boys to girls is 3:5. If there are 15 boys, how many girls are in the class? | def solve() -> int:
boys = 15
girls = (boys * 5) / 3
result = girls
return result
|
You go to a restaurant and have a meal that costs $30. If you want to leave a 20% tip, how much money will you leave for a tip? | def solve() -> int:
bill_total = 30
tip_percent = 0.2
tip_amount = bill_total * tip_percent
result = tip_amount
return result
|
Mr.John has 12 teachers in his school. Out of these 12 teachers, 8 are full-time teachers and 4 are part-time teachers. If each full-time teacher gets an annual salary of $50,000, what is the total annual salary of all the teachers combined? | def solve() -> int:
total_salary = 0
num_of_full_time_teachers = 8
salary_per_full_time_teacher = 50000
num_of_part_time_teachers = 4
salary_per_part_time_teacher = 0
total_salary = num_of_full_time_teachers * salary_per_full_time_teacher + num_of_part_time_teachers * salary_per_part_time_teache... |
Result: 3.0 A candy store had 120 chocolate bars. They sold half of them, bought 40 more and then sold another third of them. How many chocolate bars are left? | def solve() -> int:
candy_bars = 120
half_bars = candy_bars / 2
bought_bars = 40
sold_third = half_bars / 3
bars_left = half_bars + bought_bars - sold_third
result = bars_left
return result
|
Jack went strawberry picking and collected six quarts of strawberries. He brought two identical containers to fill with berries. Jack put two quarts in each container and placed the remainder in a small container. How many quarts of strawberries did Jack put in the small container? | def solve() -> int:
total_strawberries = 6
container_size = 2
num_containers = total_strawberries // container_size
small_container_strawberries = total_strawberries - (num_containers * container_size)
result = small_container_strawberries
return result
|
Bob is reading a magazine with 60 pages. He started on page 10 and an hour ago he was only on page 20. If he continues to read at this pace, how much longer will it take him to finish the magazine? | def solve() -> int:
pages_total = 60
current_page = 20
pages_left = pages_total - current_page
pages_per_hour = current_page - 10
hours_left = pages_left / pages_per_hour
result = hours_left
return result
|
Andy collects stickers and trades them with his friends. He starts with 30 Pokemon stickers, 40 Marvel stickers, and 50 Star Wars stickers. He trades 5 Pokemon stickers for 10 Marvel stickers, then trades 10 Marvel stickers for 20 Star Wars stickers, then trades 15 Star Wars stickers for 30 Pokemon stickers. What perce... | def solve() -> int:
pokemon = 30
marvel = 40
star_wars = 50
pokemon = pokemon - 5
marvel = marvel + 10
marvel = marvel - 10
star_wars = star_wars + 20
star_wars = star_wars - 15
pokemon = pokemon + 30
total = pokemon + marvel + star_wars
percent_star_wars = star_wars / total ... |
Lila is preparing an order for a café. Each muffin has 300 calories and each croissant has 150 calories. Lila wants the order to have a total of 1200 calories. How many muffins should she put in the order? | def solve() -> int:
muffin_calories = 300
croissant_calories = 150
total_calories = 1200
x = (total_calories - croissant_calories) / (muffin_calories - croissant_calories)
result = round(x)
return result
|
Student: Amy, Ben, and Carl have a total of 300 stickers. Amy has 10 more stickers than Ben. If Carl has 120 stickers, how many stickers does Ben have? | def solve() -> int:
total = 300
carl = 120
amy = None
ben = None
ben = 85
amy = ben + 10
amy = 110
result = ben
return result
|
It takes Joe 10 minutes to produce one item and Tom takes 6 minutes to produce one item. If they both start at the same time, how long will it take for them to produce all the items in total? | def solve() -> int:
time_joe = 200 * 10
time_tom = 200 * 6
time_total = time_joe + time_tom
result = time_total
return result
|
Joey has 15 red blocks and 12 blue blocks. He wants to build a tower with equal number of red and blue blocks. How many blocks in total will Joey use in his tower? | def solve() -> int:
red_blocks = 15
blue_blocks = 12
tower_blocks = (red_blocks + blue_blocks) // 2
result = tower_blocks
return result
|
Mary has 24 apples. She gives away 1/4 of them to her friend, eats 1/3 of them, and has 10 apples left. How many apples did Mary eat? | def solve() -> int:
apples = 24
given_away = apples * 1/4
eaten = apples * 1/3
left = 10
eaten = eaten - (apples - given_away - eaten - left)
result = eaten
return result
|
Jenny has 16 toy cars which is twice the number of toy cars Lisa has. If Lisa gave Jenny 6 toy cars, how many toy cars would Jenny have? | def solve() -> int:
jenny_cars = 16
lisa_cars = jenny_cars/2
jenny_cars = jenny_cars + 6
result = jenny_cars
return result
|
Kevin wants to buy a new laptop that costs $800. He has saved up $500 so far, and he earns $12 per hour at his part-time job. He also spends $20 per week on transportation and snacks. How many weeks will it take him to save enough money to buy the laptop, assuming he works 15 hours per week and does not spend money on ... | def solve() -> int:
laptop_cost = 800
savings = 500
wage = 12
hours = 15
expenses = 20
money_needed = laptop_cost - savings
income = wage * hours
net_income = income - expenses
weeks = money_needed // net_income
if money_needed % net_income > 0:
w... |
A construction company can finish building a house in 32 days if they have 8 workers. If they only had 6 workers, how many days would it take them to finish building the same house? | def solve() -> int:
workers_1 = 8
days_1 = 32
workers_2 = 6
days_2 = (workers_1 * days_1) / (workers_2)
result = days_2
return result
|
Student: A restaurant has a total of 78 chairs. Five chairs were broken and the restaurant bought 18 new chairs. How many chairs does the restaurant have now? | def solve() -> int:
chairs = 78
chairs = chairs - 5
chairs = chairs + 18
result = chairs
return result
|
Eric bought 9 shirts and 6 pairs of pants for a total of $180. If each shirt costs $15, what is the cost of each pair of pants? | def solve() -> int:
shirts = 9
pants = 6
total_cost = 180
shirt_cost = 15
pants_cost = (total_cost - (shirts * shirt_cost)) / pants
result = pants_cost
return result
|
A company has a total budget of $5000 for advertising. The company wants to split the budget between online and offline advertising. If the company wants to spend twice as much on online advertising as on offline advertising, how much money should be spent on each type of advertising? | def solve() -> int:
total_budget = 5000
online_spending_ratio = 2
total_ratio = 1 + online_spending_ratio
offline_spending = total_budget / total_ratio
online_spending = offline_spending * online_spending_ratio
result = offline_spending, online_spending
return result
|
Eric is 12 years older than Frank. Frank is one third as old as Gina. If Gina is 45, how old is Eric? | def solve() -> int:
Frank = 45 / 3
Eric = Frank + 12
result = Eric
return result
|
To make one serving of spaghetti, you need 1/2 cup of spaghetti and 1/4 cup of tomato sauce. How much spaghetti and tomato sauce is needed to make 5 servings? | def solve() -> int:
spaghetti_needed = 5*(1/2)
sauce_needed = 5*(1/4)
result = (spaghetti_needed, sauce_needed)
return result
|
Aiden can swim 100 meters in 90 seconds. How far can he swim in 30 minutes if he takes a 20-second break after every 2 minutes? | def solve() -> int:
swim_distance = 100
swim_time = 90
break_time = 20
total_time = 30 * 60
swim_distance_per_second = swim_distance / swim_time
total_swim_time = total_time - (total_time // 120) * break_time
total_swim_distance = total_swim_time * swim_distance_per_second
resu... |
arah bought a box of 64 crayons. And she gave her brother a third of the crayons. How many crayons did Sarah’s brother get? | def solve() -> int:
crayons = 64
brothers = 3
result = crayons // brothers
return result
|
A bakery sold 50 croissants on Friday. On Saturday, the bakery sold three times that many croissants. On Sunday, the bakery sold one-fourth the number of croissants it did on Saturday. How many croissants did the bakery sell by Sunday? | def solve() -> int:
croissants_friday = 50
croissants_saturday = 3 * croissants_friday
croissants_sunday = croissants_saturday / 4
result = croissants_friday + croissants_saturday + croissants_sunday
return result
|
Tina has 36 stickers. She gives 9 of them to her brother and the rest to her friends. If she gives the same number of stickers to each friend, and has 3 friends, how many stickers does each friend get? | def solve() -> int:
stickers_left = 36 - 9
stickers_per_friend = stickers_left / 3
result = stickers_per_friend
return result
|
How much money will Amy have if she starts with $24 and adds $5 then spends $2? | def solve() -> int:
start_amount = 24
add_amount = 5
spend_amount = 2
result = start_amount + add_amount - spend_amount
return result
|
Five friends went out for lunch and shared a $65 bill. If each of their shares was equal, how much did each of them pay? | def solve() -> int:
total_bill = 65
friends = 5
share_per_person = total_bill / friends
result = share_per_person
return result
|
7. Anna has 4 apples for every 8 bananas she has. How many bananas does Anna have if she has 48 apples? | def solve() -> int:
apples = 48
perapple = 4
result = apples/perapple * 8
return result
|
A rectangular plot of land has a length which is 3 times its width. If the perimeter of the plot is 88 meters, what are the length and width of the plot? | def solve() -> int:
perimeter = 88
length_to_width_ratio = 3
x = perimeter / 8
width = x
length = width * length_to_width_ratio
result = (length, width)
return result
|
Mr. Lee purchased a house for $100000. Eight years later, he sold it for a 15% profit and paid a 7% commission to the real estate agent. What was the selling price of the house? | def solve() -> int:
purchase_price = 100000
profit_percentage = 15
commission_percentage = 7
profit = purchase_price * (profit_percentage / 100)
selling_price = purchase_price + profit
commission = selling_price * (commission_percentage / 100)
selling_price -= commission
result... |
Student: In a class of 50 students, 40% of them are girls, and of the girls, 60% wear glasses. How many girls in the class wear glasses? | def solve() -> int:
total_students = 50
percent_girls = 0.4
percent_glasses = 0.6
num_girls = total_students * percent_girls
num_glasses = num_girls * percent_glasses
result = round(num_glasses)
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.