question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Rita finished 2/3 of her homework in 40 minutes. If she wants to finish the rest in half an hour, how long, in minutes, will it take her to complete her homework? | def solve() -> int:
time_per_1_3 = 40/(2/3)
time_per_1_6 = 30/1/2
total_time = time_per_1_3 + time_per_1_6
result = total_time
return result
|
Amy had 10 apples in a basket. She ate half of them and gave 2 to her brother. Then she bought 3 more apples and put them in the basket. How many apples did Amy have in the basket at the end? | def solve() -> int:
apples = 10
apples = apples - apples / 2
apples = apples - 2
apples = apples + 3
result = apples
return result
|
Olivia has a book collection. She started with 120 books at the beginning of the year. She lost 7 books, received 12 books as a gift, and bought 30 books from a bookshop. She gave away 15 books to her cousins and donated 20 books to a local library. How many books does Olivia have now? | def solve() -> int:
books = 120
books -= 7
books += 12
books += 30
books -= 15
books -= 20
result = books
return result
|
A rectangular box is 7 feet long, 3 feet wide and 2 feet tall. What is the volume of the box in cubic feet? | def solve() -> int:
length = 7
width = 3
height = 2
volume = length * width * height
result = volume
return result
|
Maddie is painting a picture. It takes her 30 minutes to sketch the outline, and half as long to add color. It takes her 1 hour to complete the painting, six times as long to frame it, and 1/5th the combined painting and framing time to sign it. How many minutes does Maddie spend on the picture total? | def solve() -> int:
sketch_time = 30
color_time = sketch_time / 2
paint_time = 60
frame_time = paint_time * 6
sign_time = (paint_time + frame_time) / 5
total_time = sketch_time + color_time + paint_time + frame_time + sign_time
result = total_time
return result
|
Julia has saved 3000 dollars, and she spends 1200 dollars on shopping. Now how much money does Julia have left? | def solve() -> int:
left = 3000 - 1200
result = left
return result
|
Tim has 2 pizzas and he wants to give each of his 3 friends an equal amount of pizza. How much pizza does each friend get? | def solve() -> int:
pizza_per_friend = 2/3
result = pizza_per_friend
return result
|
Student: Jill has 60 markers and 80 crayons. If she gave away 5/6 of the markers and 3/4 of the crayons, how many markers and crayons did she give away? | def solve() -> int:
markers = 60
crayons = 80
markers_gave_away = 5/6 * markers
crayons_gave_away = 3/4 * crayons
total_gave_away = markers_gave_away + crayons_gave_away
result = total_gave_away
return result
|
Ms. Wang is a nurse and works 40 hours per week. She earns $28 per hour and receives a bonus of $500 every three months. She spends $1200 per month on rent, $600 per month on food, and $300 per month on other expenses. How much money can she save in a year? | def solve() -> int:
hourly_rate = 28
work_hours = 40
weeks = 52
bonus = 500
months = 3
rent = 1200
food = 600
other = 300
income = hourly_rate * work_hours * weeks / 12
bonus_income = bonus * 12 / months
total_income = income + bonus_income
total_expenses = (rent + fo... |
Emily has 14 toy cars. She wants to give away 2 toy cars to each of her 6 friends. How many toys will she have left? | def solve() -> int:
toy_cars = 14
friends = 6
cars_given_away = 2 * friends
toys_left = toy_cars - cars_given_away
result = toys_left
return result
|
Xavier needs to make 250 plates for the upcoming party. He can produce 6 plates in one hour. How many hours will it take for him to produce all 250 plates? | def solve() -> int:
hours = 0
plates = 250
per_hour = 6
hours = plates / per_hour
if plates % per_hour > 0:
hours += 1
result = hours
return result
|
Student: A rectangular box has a length of 6cm, width of 4cm and height of 2cm. What is the volume of the box? | def solve() -> int:
length = 6
width = 4
height = 2
volume = length * width * height
result = volume
return result
|
Student: Daniel has some money to buy a book and a toy. He spends $12 on a novel, and $6 on a car. If he has $4 left to buy a bookmark and a pencil, how much money, in dollars, did he have at first? | def solve() -> int:
book_price = 12
toy_price = 6
remaining_money = book_price + toy_price
remaining_money = remaining_money - 4
result = remaining_money
return result
|
Student: A candy company produces 6000 candies per hour. The company runs for 8 hours a day. If there are no machine malfunctions, how many candies will the company produce in total in a week? | def solve() -> int:
candies_per_hour = 6000
hours_per_day = 8
days_in_week = 7
total_candies = candies_per_hour * hours_per_day * days_in_week
result = total_candies
return result
|
Rachel had 12 cupcakes to share with her 9 cousins and her grandmother. If each of the cupcakes were cut into 5 slices and Rachel, her cousins, and her grandmother all had 1 slice, how many slices are left? | def solve() -> int:
cupcakes = 12
people = 9 + 1 + 1
slices_per_cupcake = 5
total_slices = cupcakes * slices_per_cupcake
slices_taken = people * 1
slices_left = total_slices - slices_taken
result = slices_left
return result
|
Question7: Alex wants to make 6 bouquets of flowers for a school project. If each bouquet needs 18 flowers, how many flowers does Alex need in total? | def solve() -> int:
numBouquets = 6
numFlowersPerBouquet = 18
totalFlowersNeeded = numBouquets * numFlowersPerBouquet
result = totalFlowersNeeded
return result
|
arah has 20 songs in her playlist. If she listens to each song for 3 minutes, how many minutes of music does she have in her playlist? | def solve() -> int:
songs = 20
length_of_song = 3
total_length = 0
for num in range(0, songs):
total_length += length_of_song
result = total_length
return result
|
If 5 people can paint a house in 4 days, how many people are needed to paint it in 2 days? | def solve() -> int:
total_people_days_needed = 5 * 4
people_needed_for_2_days = total_people_days_needed / 2
result = people_needed_for_2_days
return result
|
Possible math questions and Python programs: Anna has 12 more pencils than Bob, and Carlos has one-third as many pencils as Bob. If Anna has 36 pencils, how many pencils does Carlos have? | def solve() -> int:
b = 36 - 12
c = b / 3
result = c
return result
|
If the first week of dieting helps you lose 5 pounds, the second week helps you lose 3 pounds, and every week after that helps you lose 2 pounds. How many pounds will you lose if you diet for 12 weeks? | def solve() -> int:
first_week = 5
second_week = 3
additional_weeks = 2
total_weeks = 12
total_weight_loss = first_week + second_week + (additional_weeks * (total_weeks - 2))
result = total_weight_loss
return result
|
A motorbike can cover a distance of 440 km in 4 hours at a constant speed. How long will it take to travel 880 km at the same speed? | def solve() -> int:
distance = 880
original_rate = 440/4
time_required = distance/original_rate
result = time_required
return result
|
At a toy store, Sarah bought 4 items: a doll, two board games, and a teddy bear. The teddy bear cost twice as much as the doll, but only one third the price of the board games combined. If the teddy bear cost $6, how much did one board game cost? | def solve() -> int:
doll = 0
teddy_bear = 6
board_games = 0
teddy_bear = 2 * doll
board_games = teddy_bear * 3
total_cost = doll + teddy_bear + (2 * board_games)
one_board_game_cost = board_games / 2
result = one_board_game_cost
return result
|
Lily took 9 capsules a day for 25 days. Of these 9 capsules, 4 capsules cost $1.85 each, and the other capsules each cost $3.75 more. How much did she spend in total on the capsules? | def solve() -> int:
capsules_per_day = 9
total_days = 25
cost_of_4_capsules = 1.85
cost_of_each_capsule = cost_of_4_capsules + 3.75
total_capsules = capsules_per_day * total_days
total_cost = (4 * cost_of_4_capsules) + ((total_capsules - 4) * cost_of_each_capsule)
result = tot... |
If a dozen roses is split evenly between two people, how many roses will each person receive? | def solve() -> int:
roses = 12
people = 2
roses_per_person = roses / people
result = roses_per_person
return result
|
Johnny bought three bicycles and a helmet at a total cost of $1,200. If all three bicycles were of equal cost and the helmet was five times as expensive as any one bicycle, what was the cost of a single bicycle? | def solve() -> int:
bicycle_cost = 0
helmet_cost = 0
total_cost = 1200
helmet_cost = 5 * bicycle_cost
total_cost = (3 * bicycle_cost) + helmet_cost
bicycle_cost = (total_cost - helmet_cost) / 3
result = bicycle_cost
return result
|
Brad has a TV, a gaming console, and a sound system that consume power at different rates. The total amount of money that Brad pays for the energy used by the TV is four times the amount he pays for the power used by the gaming console. If the sound system uses power worth $800 in a month, three times what Brad pays fo... | def solve() -> int:
sound_system_power = 800
gaming_console_power = sound_system_power / 3
tv_power = 4 * gaming_console_power
total_power_cost = sound_system_power + gaming_console_power + tv_power
result = total_power_cost
return result
|
Jennifer has 10 necklaces. The first necklace has 5 beads and the second necklace has 3 more beads than the first. The two other necklaces each have three times the number of beads as the first two necklaces. How many beads do Jennifer's necklaces have in total? | def solve() -> int:
necklace1 = 5
necklace2 = necklace1 + 3
necklace3 = necklace1 * 3
necklace4 = necklace2 * 3
total_beads = necklace1 + necklace2 + necklace3 + necklace4
result = total_beads
return result
|
A woman drives 380 miles in 7 hours. If she continues driving at the same speed, how far will she have driven after 12 hours? | def solve() -> int:
speed = 380/7
distance = speed * 12
result = distance
return result
|
Bob earned $500 in one week by working 40 hours. If he continues working at the same rate, how much money will he earn in 50 hours? | def solve() -> int:
hours = 50
rate = 500 / 40
earnings = rate * hours
result = earnings
return result
|
-Here is an example: Janele wants to figure out the average weight of her cats. She has 4 of them. The first two weigh 12 pounds each. The third weighs 14.7 pounds and the fourth weighs 9.3 pounds. What is their average weight? | def solve() -> int:
weights = [12, 12, 14.7, 9.3]
total_weight = sum(weights)
average_weight = total_weight / len(weights)
result = average_weight
return result
|
If a restaurant received $120 in tips and they split the tips evenly amongst their 8 servers, how much money will each server receive in tips? | def solve() -> int:
total_tips = 120
num_servers = 8
tip_per_server = total_tips / num_servers
result = tip_per_server
return result
|
Student: Anam needs to purchase party decorations for her daughter's birthday. She needs 24 paper pinwheels for the party and 15 honeycomb balls costing $3 each. If one pinwheel costs $4, how much will her purchase cost? | def solve() -> int:
pinwheels = 24
honeycomb_balls = 15
cost_pinwheel = 4
cost_honeycomb_ball = 3
total_cost_pinwheels = pinwheels * cost_pinwheel
total_cost_honeycomb_balls = honeycomb_balls * cost_honeycomb_ball
total_cost = total_cost_pinwheels + total_cost_honeycomb_balls
result = to... |
A bakery makes 8 batches of muffins every day. Each batch has 12 muffins. The bakery sells each muffin for $2.50 and pays $0.50 for the ingredients. How much profit does the bakery make in a week (7 days)? | def solve() -> int:
weekly_muffins = 8 * 12 * 7
revenue = weekly_muffins * 2.50
cost = weekly_muffins * 0.50
profit = revenue - cost
result = profit
return result
|
A cylindrical water tank is 2.5 m tall and has a radius of 1.5 m. If the tank is filled with water up to a height of 2 m, what is the volume of water in the tank, in cubic meters? | def solve() -> int:
height = 2
radius = 1.5
pi = 3.14
cylinder_volume = pi * radius**2 * height
water_volume = pi * radius**2 * height * (2 / 2.5)
result = water_volume
return result
|
Student: Q4: Jennie has 128 plates, 1/4 of which are red and the rest are blue. How many blue plates does she have? | def solve() -> int:
total_plates = 128
red_plates = total_plates / 4
blue_plates = total_plates - red_plates
result = blue_plates
return result
|
A family of 5 has a total of 15 items for breakfast. If each person needs to have 3 items, how many items are left? | def solve() -> int:
num_people = 5
items_per_person = 3
total_items = 15
items_left = total_items - (num_people * items_per_person)
result = items_left
return result
|
A grocery store has some vegetable orders to fulfill and also needs to prepare salads for a family gathering that just arrived. 6 neighbors have each ordered 4 salads and half of the family that has arrived have asked for 2 salads each. If the grocery store prepares a total of 42 salads, how many people are in the fami... | def solve() -> int:
salads_per_neighbor = 4
num_neighbors = 6
salads_per_half_family = 2
total_salads = 42
salads_for_neighbors = salads_per_neighbor * num_neighbors
salads_for_family = total_salads - salads_for_neighbors
num_people_in_family = salads_for_family... |
-Separate each question and its program with a dash line (--------). Possible questions and programs: Joanna loves to bake and has a collection of 84 cake pans. She decided to sell some of them online and managed to sell 4 sets of 6 pans each. She also gave away 12 pans to her friends and donated 9 pans to a local char... | def solve() -> int:
cake_pans = 84
cake_pans = cake_pans - 4 * 6
cake_pans = cake_pans - 12
cake_pans = cake_pans - 9
cake_pans = cake_pans + 3
result = cake_pans
return result
|
Student: - A sweater was originally priced at $40 but had a 30% off discount. If Maya bought the sweater and paid 7% sales tax, how much did she pay in total? | def solve() -> int:
original_price = 40
discount_rate = 0.3
sales_tax_rate = 0.07
discounted_price = original_price * (1 - discount_rate)
sales_tax = discounted_price * sales_tax_rate
total_price = discounted_price + sales_tax
result = total_price
return result
|
Maya bought a bag of candy and divided it into 50 pieces. She ate 1 candy every day for a month. Her friend visited and took 5 candies. She gave 10 away to her other friends. How many candies were left? | def solve() -> int:
candy_bag = 50
days_in_month = 30
candies_eaten_per_day = 1
candies_taken_by_friend = 5
candies_given_away = 10
candies_left = candy_bag - (candies_eaten_per_day * days_in_month) - candies_taken_by_friend - candies_given_away
result = candies_left
return res... |
Rachel and Tyler are dividing money from selling their homemade candles. They sell them based on the scent. Each lavender candle sells for $5 and each vanilla candle for $3. They earned $120 each after selling 30 lavender candles and 50 vanilla ones. How many total candles did they sell? | def solve() -> int:
lavender_price = 5
vanilla_price = 3
lavender_quantity = 30
vanilla_quantity = 50
lavender_earnings = lavender_price * lavender_quantity
vanilla_earnings = vanilla_price * vanilla_quantity
total_earnings = lavender_earnings + vanilla_earnings
total_cand... |
Student: 2. Suzy traveled 180 miles in 4 hours. How long did it take her to travel 90 miles? | def solve() -> int:
total_distance = 180
total_time = 4
half_distance = 90
average_speed = total_distance / total_time
half_time = half_distance / average_speed
result = half_time
return result
|
Amy had 18 cupcakes. She decorated 6 of them with sprinkles, 4 of them with chocolate chips, and the rest with frosting. She then gave away 2 cupcakes of each kind to her friends. How many cupcakes did she have left? | def solve() -> int:
total = 18
sprinkles = 6
chips = 4
frosting = total - sprinkles - chips
given = 2
left = total - 3 * given
result = left
return result
|
A rectangle has a length of 15 centimeters and a width of 10 centimeters. What is its area in square meters? | def solve() -> int:
length = 15
width = 10
area = length * width
result = area / 10000
return result
|
Emily has 2 books and five times as many pens as books. If she gives away half her pens and buys a new book, how many books and pens does she have in total? | def solve() -> int:
books = 2
pens = books*5
pens = pens/2
books += 1
total = books + pens
result = total
return result
|
Josh used 1/8 of his toothpaste and he put the rest in the bathroom cabinet. If the toothpaste left in the cabinet weighs 600 grams, how many grams did Josh use? | def solve() -> int:
toothpaste_weight = 600
total_toothpaste_weight = toothpaste_weight / (1 - 1/8)
used_toothpaste_weight = total_toothpaste_weight - toothpaste_weight
result = used_toothpaste_weight
return result
|
Mr. Jackson wants to renovate his house. The total cost is estimated at 60,000 dollars. He makes an initial payment of 10,000 dollars and decides to pay the rest in 24 monthly installments. How much will he pay per month? | def solve() -> int:
total_cost = 60000
initial_payment = 10000
remaining_cost = total_cost - initial_payment
number_of_installments = 24
monthly_payment = remaining_cost / number_of_installments
result = monthly_payment
return result
|
In a store, a shirt is priced at $15 but has a 20% discount on it. Additionally, there is 5% tax on its discounted price. What is the final price of the shirt? | def solve() -> int:
base_price = 15
discount_percent = 20
tax_percent = 5
discounted_price = base_price * (1 - discount_percent/100)
tax = discounted_price * (tax_percent/100)
final_price = discounted_price + tax
result = final_price
return result
|
Alex painted 12 pictures. He sold 3 pictures for $40 each and the rest for $30 each. How much money did he make in total? | def solve() -> int:
pictures = 12
sold_40 = 3
sold_30 = pictures - sold_40
money = sold_40 * 40 + sold_30 * 30
result = money
return result
|
Lisa has $250 for her hobby expenses. She buys art supplies for $80. Her friend buys one of her paintings for $70. Lisa then decides to attend a workshop and spends $100 for registration. How much money does Lisa have left? | def solve() -> int:
money = 250
art_supplies = 80
friend_payment = 70
workshop_registration = 100
money -= art_supplies
money += friend_payment
money -= workshop_registration
result = money
return result
|
In a class of 40 students, 25 students are girls. What percentage of the class are boys? | def solve() -> int:
total_students = 40
girls = 25
boys = total_students - girls
percentage_of_boys = (boys/total_students) * 100
result = percentage_of_boys
return result
|
It is recommended that adults consume at least 25 grams of fiber per day. Mary had a bowl of oatmeal for breakfast that contained 5 grams of fiber, and a salad for lunch that contained 10 grams of fiber. How many more grams of fiber does she need to consume to meet the recommended daily intake? | def solve() -> int:
fiber_per_day = 25
fiber_breakfast = 5
fiber_lunch = 10
fiber_needed = fiber_per_day - (fiber_breakfast + fiber_lunch)
result = fiber_needed
return result
|
A baseball team played 80 games. If they won 45 games and lost 20 games, what percentage of games did they tie? | def solve() -> int:
total_games = 80
won_games = 45
lost_games = 20
tie_games = total_games - won_games - lost_games
tie_percentage = (tie_games/total_games) * 100
result = tie_percentage
return result
|
A box can hold 24 cans of soda. If you need to store 48 cans of soda, how many boxes do you need? | def solve() -> int:
cans_per_box = 24
total_cans = 48
boxes_needed = total_cans // cans_per_box + (total_cans % cans_per_box > 0)
result = boxes_needed
return result
|
A store can display 1,000 products. At the beginning of the month, the store is filled to 9/10 of its capacity. On the first day of the month, 100 products were sold. On the second day, 30 more products were sold than on the first day. On the third day, the store was already emptied. How many products were sold on the ... | def solve() -> int:
capacity = 1000
filled_capacity = capacity * (9/10)
products_sold_first_day = 100
products_sold_second_day = products_sold_first_day + 30
products_sold_third_day = filled_capacity - products_sold_first_day - products_sold_second_day
result = products_sold_third_day
return... |
Alex has 7 packs of gum with 15 sticks of gum in each pack, 11 bags of candy with 20 pieces of candy in each bag, and 4 tins of mints with 50 mints in each tin. How many pieces of candy and mints does Alex have in total? | def solve() -> int:
gum_packs = 7
gum_sticks_per_pack = 15
candy_bags = 11
candy_pieces_per_bag = 20
mint_tins = 4
mints_per_tin = 50
total_gum_sticks = gum_packs * gum_sticks_per_pack
total_candy_pieces = candy_bags * candy_pieces_per_bag
total_mints = mint_tins * mints_per_tin... |
Alex, Kate, and John are comparing the number of goals they have scored this season. Kate has scored 6 more goals than Alex, while John has scored 2 less goals than Kate. Then, Mike has scored twice as many goals as John. How many more goals has Mike scored than Alex? | def solve() -> int:
alex_goals = 10
kate_goals = alex_goals + 6
john_goals = kate_goals - 2
mike_goals = john_goals * 2
more_goals = mike_goals - alex_goals
result = more_goals
return result
|
Jason earns $15 per hour. If he works more than 7 hours per shift, he is eligible for overtime, which is paid by his hourly wage plus a half of his hourly wage. If he works for 9 hours per day for 6 days, how much money will he make? | def solve() -> int:
hourly_wage = 15
overtime_wage = hourly_wage + (hourly_wage / 2)
regular_hours = 7
overtime_hours = 9 - regular_hours
days_worked = 6
regular_pay = regular_hours * hourly_wage
overtime_pay = overtime_hours * overtime_wage
total_pay = (regular_pay + overtime_pay) ... |
James has four fewer quarters than three times the number of dimes and five more dimes than the number of nickels. If he has two dollars and sixty cents in total, how many dimes does he have? | def solve() -> int:
x = 11
result = x+5
return result
|
A group of 6 friends want to split a bill at a restaurant. The total bill is $72. If they each want to pay an equal amount, how much does each person need to pay? | def solve() -> int:
friends = 6
total_bill = 72
each_person_cost = total_bill / friends
result = each_person_cost
return result
|
Laura wanted to lease a bicycle for commuting to her work for the next year. She found a reasonable offer and agreed to pay $40 per month. After six months, the leasing company decided to increase the monthly payment to $45, and Laura agreed to continue. How much did she end up paying in total? | def solve() -> int:
months_1 = 6
months_2 = 12 - months_1
price_1 = 40
price_2 = 45
total_payment = (months_1 * price_1) + (months_2 * price_2)
result = total_payment
return result
|
Kristen received a 20% discount when buying 3 customized books. The original price of each is $18. How much were the three books after the discount? | def solve() -> int:
quantity = 3
discount_percentage = 20
original_price = 18
discount = (discount_percentage / 100) * original_price
discounted_price = original_price - discount
total_price = quantity * discounted_price
result = total_price
return result
|
A restaurant has a menu with items that cost $8, $12, and $18. If John and two of his friends ordered one item of each kind and they shared the cost equally, how much will John have to pay? | def solve() -> int:
num_items = 3
john_share = 1
total_price = (8 + 12 + 18) / num_items
john_price = john_share * total_price
result = john_price
return result
|
Jessica and Tyler invested into a savings account. Jessica's investment yields 2% annually while Tyler's yields 3% annually. If Jessica invested $5000 and Tyler invested $6000, what will be the difference between their return-on-investment after 4 years? | def solve() -> int:
jessica_investment = 5000
tyler_investment = 6000
jessica_yield = 0.02
tyler_yield = 0.03
years = 4
jessica_return = jessica_investment * (1 + jessica_yield) ** years
tyler_return = tyler_investment * (1 + tyler_yield) ** years
difference = jessica_return - ... |
A bag of candies has 5 green candies for every 3 purple candies. If there are 40 green candies, how many purple candies are there? | def solve() -> int:
a = 5
b = 3
x = 40 / a
y = x * b
result = f'There are {int(y)} purple candies in the bag.'
result = int(y)
return result
|
Kelly has a book that is 240 pages long. She reads 12 pages every day. She also has a magazine that is 60 pages long. She reads 6 pages of the magazine every day. How many days does it take her to finish both the book and the magazine? | def solve() -> int:
book_days = 240 // 12
magazine_days = 60 // 6
days = max(book_days, magazine_days)
result = days
return result
|
At a restaurant, a group of 10 people decide to split the bill equally. The total bill plus tax is $250. If the tax is 7%, how much will each person have to pay? | def solve() -> int:
bill = 250
tax_rate = 0.07
total_bill = bill + bill * tax_rate
num_people = 10
amount_per_person = total_bill / num_people
result = round(amount_per_person, 2)
return result
|
A certain bookstore sells books for $20 each. If they sell 400 books in a month, then how much money, in dollars, will they receive in a month? | def solve() -> int:
books_sold = 400
total_cost = books_sold * 20
result = total_cost
return result
|
Jack has 4 packs of crayons with 20 colored crayons in each pack. How many crayons does Jack have in total? | def solve() -> int:
packs = 4
crayons_pack = 20
total_crayons = packs * crayons_pack
result = total_crayons
return result
|
A family of 5 is going to a restaurant. If they each order a meal that costs $15, and they leave a 20% tip, how much money will they spend in total? | def solve() -> int:
number_of_people = 5
meal_cost = 15
tip_percent = 0.2
meal_total = number_of_people * meal_cost
tip_amount = meal_total * tip_percent
total_cost = meal_total + tip_amount
result = total_cost
return result
|
A rectangular garden measures 8m by 10m. If a path 2m wide goes completely around the garden, what is the total length of the path? | def solve() -> int:
length = 8 + 8 + 10 + 10
result = length - 4
return result
|
Rachel bought a racehorse for $100,000 and kept it in her stable. She spent $300 daily on food and $10,000 on training. After 240 days, she sold the horse for $200,000. What profit did she make from the sale? | def solve() -> int:
horse_cost = 100000
daily_food_cost = 300
training_cost = 10000
days = 240
selling_price = 200000
total_food_cost = daily_food_cost * days
total_cost = horse_cost + total_food_cost + training_cost
profit = selling_price - total_cost
result = profit
r... |
A teacher has 15 pencils. The first 5 pencils write 200 words each. Another 5 pencils write 300 words each, and the remaining pencils each write a quarter of the words as the third group of pencils. If the teacher measures twice the total number of words of the first group of pencils, how many words can all the pencils... | def solve() -> int:
pencils = 15
words_group1 = 200
words_group2 = 300
words_group3 = words_group2 / 4
total_words_group1 = words_group1 * 5
total_words_group2 = words_group2 * 5
total_words_group3 = words_group3 * (pencils - 10)
total_words = total_words_group1 + total_words_g... |
If a customer received $3 discount for every 4-packs purchased, how much would they save if they bought 5 packs? | def solve() -> int:
packs_to_buy = 5
discount_per_pack = 3
discounts_applied = packs_to_buy // 4
total_discount = discount_per_pack * discounts_applied
result = total_discount
return result
|
Jake has three times as many high school credits as Brooke. Rachel has half as many credits as Jake. If Brooke has 10 credits, what is three times the total number of credits the three have? | def solve() -> int:
brooke_credits = 10
jake_credits = brooke_credits * 3
rachel_credits = jake_credits/2
total_credits = brooke_credits + jake_credits + rachel_credits
three_times_credits = total_credits * 3
result = three_times_credits
return result
|
If a number is increased by 20% and the resulting number is decreased by 20%, what is the net change in the number? | def solve() -> int:
original_number = 100
percent_increase = 20
percent_decrease = 20
new_number = original_number * (1 + percent_increase/100) * (1 - percent_decrease/100)
net_change = new_number - original_number
result = net_change
return result
|
Student: A train travels at a speed of 100 km/h for 2 hours. What is the distance it covers in the 2 hours? | def solve() -> int:
speed = 100
time = 2
distance = speed * time
result = distance
return result
|
John wants to save $10,000 in 36 months. How much should he save each month if the interest rate on his savings account is 5%? | def solve() -> int:
savings_goal = 10000
time = 36
interest_rate =.05
monthly_rate = interest_rate / 12
monthly_savings = savings_goal * ((monthly_rate*(1+monthly_rate)**time)/((1+monthly_rate)**time-1))
result = round(monthly_savings, 2)
return result
|
A store is having a 30% sale. If a shirt originally costs $30, what is the new price for the shirt? | def solve() -> int:
original_price = 30
discount = 0.3 * original_price
new_price = original_price - discount
result = new_price
return result
|
Student: A flower bed has an area of 45 m². If the width is 5 meters, what is the length? | def solve() -> int:
area = 45
width = 5
length = area / width
result = length
return result
|
After a 15% price reduction, Tom bought a laptop for $672. How much did the laptop originally cost? | def solve() -> int:
original_price = 672 / 0.85
result = original_price
return result
|
A watch originally costing $225 was on sale for 15% off. What was the sale price of the watch? | def solve() -> int:
original_price = 225
discount_percent = 0.15
discount = original_price * discount_percent
sale_price = original_price - discount
result = sale_price
return result
|
At the SeaWorld Zoo, they give four buckets of food to the sea lions daily. The Penguins are fed twice as many buckets as the sea lions while the crabs are fed five times as many buckets as the sea lions. How many weeks will 630 buckets of food last? | def solve() -> int:
sealion_buckets_per_day = 4
penguin_buckets_per_day = 2 * sealion_buckets_per_day
crab_buckets_per_day = 5 * sealion_buckets_per_day
total_buckets_feeding = sealion_buckets_per_day + penguin_buckets_per_day + crab_buckets_per_day
total_buckets = 630
result = tota... |
A train travels at a constant speed of 80 km/h for 3 hours, then at 60 km/h for 2 hours, and then at 100 km/h for 1 hour. What is the average speed of the train for the whole journey? | def solve() -> int:
d = (80 * 3) + (60 * 2) + (100 * 1)
t = 3 + 2 + 1
result = d / t
result = 480 / 6
return result
|
Emily wants to read a book that is four times as long as the book that her friend read, minus 100 pages. Her friend read a book at a pace of 10 pages per minute. If it took her friend 30 minutes to read the book, how long will it take Emily to read her book at the same pace? | def solve() -> int:
friend_pace = 10
friend_time = 30
friend_book_length = friend_pace * friend_time
emily_book_length = (friend_book_length * 4) - 100
emily_time = emily_book_length / friend_pace
result = emily_time
return result
|
In 15 years, Emma will be five times as old as Ava is now. If Ava is 6, how old was Emma when Ava was Emma's age now? | def solve() -> int:
ava_age = 6
emma_age_in_15_years = ava_age * 5
emma_age_now = emma_age_in_15_years - 15
emma_age_when_ava_was_emmas_age_now = emma_age_now - (ava_age - emma_age_now)
result = emma_age_when_ava_was_emmas_age_now
return result
|
At a bookstore, for every $40 spent the store donates $5 to a local library. The average customer spends $30 and there are 45 customers. How much does the bookstore donate? | def solve() -> int:
average_spending = 30
number_of_customers = 45
donation_per_40_spent = 5
total_spending = average_spending * number_of_customers
number_of_40_spent = total_spending // 40
donation_amount = number_of_40_spent * donation_per_40_spent
result = donation_am... |
Dave ran a race that was 4.2km long. His best time was 22.5 minutes. How fast was Dave running, in km/h? | def solve() -> int:
distance = 4.2
time = 22.5
time_in_hours = time/60
speed_in_km_per_hour = distance/time_in_hours
result = speed_in_km_per_hour
return result
|
Karen has a cube that has a volume of 1000 cubic meters. If the length and height are the same, what is the length of each side of the cube? | def solve() -> int:
volume = 1000
side_length = volume**(1/3)
result = side_length
return result
|
Possible questions and programs: Pedro had a collection of 180 stamps. He bought 20 more stamps at a flea market and then traded 50 stamps with his friend. How many stamps did Pedro have left? | def solve() -> int:
stamps = 180
stamps = stamps + 20
stamps = stamps - 50
result = stamps
return result
|
Jason needed to buy some ribbon in order to make a bow for a gift. He bought four 7 inch pieces and five 9 inch pieces. How many total inches of ribbon did Jason buy? | def solve() -> int:
number_7in_pieces = 4
length_7in_pieces = 7
number_9in_pieces = 5
length_9in_pieces = 9
total_7in_piece_length = number_7in_pieces * length_7in_pieces
total_9in_piece_length = number_9in_pieces * length_9in_pieces
total_length_ribbon = total_7in_piece_length + ... |
Possible questions and programs are: Billy collected 15 more stickers than Bobby in a month. If Bobby collected 25 stickers every week, how many stickers did they collect together in four weeks? | def solve() -> int:
bobby_stickers = 25 * 4
billy_stickers = bobby_stickers + 15
total_stickers = bobby_stickers + billy_stickers
result = total_stickers
return result
|
Student: A train travels at a speed of 60 miles per hour. If it travels for 3 hours, how far does it travel? | def solve() -> int:
speed = 60
time = 3
distance = speed * time
result = distance
return result
|
A company has 350 employees. If 1/7 of them quit and the rest were given a 10% raise, how many employees got a raise? | def solve() -> int:
employees = 350
quit_employees = employees * (1/7)
remaining_employees = employees - quit_employees
raised_employees = remaining_employees * (10/100)
result = raised_employees
return result
|
Rachel folded 15 origami cranes on Monday, four times as many on Tuesday, a handful more on Wednesday, then finished the week with 80 origami cranes. How many did she fold on Wednesday? | def solve() -> int:
monday_cranes = 15
tuesday_cranes = monday_cranes * 4
wednesday_cranes = 80 - monday_cranes - tuesday_cranes
result = wednesday_cranes
return result
|
A car travels a distance of 240 miles in 4 hours. What is its speed in miles per hour? | def solve() -> int:
distance = 240
time = 4
speed = distance / time
result = speed
return result
|
A rectangle has a length of 12 inches and a width of 6 inches. What is its perimeter? | def solve() -> int:
perimeter = 2*12 + 2*6
result = perimeter
return result
|
A pizza delivery business has 10 drivers. Each driver earns $100 per day, and the owner also pays an additional $300 per day to the entire team. How much does the owner pay in total for one week (7 days)? | def solve() -> int:
total_drivers = 10
driver_pay = 100
team_pay = 300
days = 7
total_pay = (total_drivers * driver_pay * days) + (team_pay * days)
result = total_pay
return result
|
A surveyor walks 25m west, then 40m north, then 80m east. Calculate the surveyor’s distance from the starting point. | def solve() -> int:
x = 25 - 80
y = 40
distance = (x**2 + y**2)**0.5
result = round(distance, 2)
return result
|
Ben, Sophie, and Tom are painting a room. Ben painted 10 more square feet than Sophie. Sophie painted 3 less square feet than Tom. Tom painted 50 square feet. How many square feet did they paint in total? | def solve() -> int:
tom = 50
sophie = tom - 3
ben = sophie + 10
total = tom + sophie + ben
result = total
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.