question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A fruit basket has 50 fruits. 15% of the fruits are oranges and 40% of the remaining fruits are bananas. How many bananas are in the basket? | def solve() -> int:
totalfruits = 50
oranges = totalfruits * 15/100
remainingfruits = totalfruits - oranges
bananas = remainingfruits * 40/100
result = bananas
return result
|
Leo rented a car for 5 days and paid $49 per day. He also paid $32 for gas and $15 for tolls. Maya rented a car for 4 days and paid $59 per day. She also paid $28 for gas and $12 for tolls. How many more dollars did Leo spend on the car rental than Maya? | def solve() -> int:
leo_total = 5 * 49 + 32 + 15
maya_total = 4 * 59 + 28 + 12
difference = leo_total - maya_total
result = difference
return result
|
Andy bought 27 tomatoes, 18 eggs and 24 oranges from the store. Tomatoes cost $2 each, eggs cost $1 each, and oranges cost $4 each. How much did Andy spend in total? | def solve() -> int:
cost_tomatoes = 2
cost_eggs = 1
cost_oranges = 4
total_tomatoes = 27 * cost_tomatoes
total_eggs = 18 * cost_eggs
total_oranges = 24 * cost_oranges
total_cost = total_tomatoes + total_eggs + total_oranges
result = total_cost
return result
|
Jessica baked 2 fewer pans of brownies than cakes. She baked 10 pans of cakes, and each pan has 8 slices. For the pans of brownies, she baked each pan with 15 slices. How many slices of cake and brownies does Jessica have in total? | def solve() -> int:
cakes = 10
brownies = cakes - 2
cake_slices = cakes * 8
brownie_slices = brownies * 15
total_slices = cake_slices + brownie_slices
result = total_slices
return result
|
Jerry's salary increased by 28% to $3100 this year. Last year, Emily's salary was four times Jerry's salary this year. If Emily's salary increased by 14% this year, what is her current salary? | def solve() -> int:
jerrys_salary = 3100
emilys_salary_last_year = 4 * jerrys_salary
emilys_salary_this_year = emilys_salary_last_year * (1 + 0.14)
result = emilys_salary_this_year
return result
|
Student: A company wants to pay out a $5000 bonus to its employees. If there are 20 employees in total, how much will each employee receive? | def solve() -> int:
total_bonus = 5000
num_employees = 20
bonus_per_employee = total_bonus / num_employees
result = bonus_per_employee
return result
|
A cake recipe requires 1 egg for every 2 cups of flour. If the recipe requires 8 cups of flour, how many eggs will be needed? | def solve() -> int:
eggs = 0
flour = 8
while flour > 0:
eggs += 1
flour -= 2
result = eggs
return result
|
Result: 117 Alex has 7 times as many pens as calculators. If he has 15 more calculators than erasers, and buys 4 more erasers and 3 more calculators, what is the total number of items he has? | def solve() -> int:
x = 10
erasers = x
calculators = x + 15
pens = 7 * calculators
erasers_new = erasers + 4
calculators_new = calculators + 3
pens_new = pens
total_items = erasers_new + calculators_new + pens_new
result = total_items
return result
|
In a football game, Team A scored 45 points, and Team B scored 13 fewer points. What was the total number of points scored in the game? | def solve() -> int:
team_a = 45
team_b = team_a - 13
total_points = team_a + team_b
result = total_points
return result
|
Maya is baking cookies for her friends. She has a recipe that makes 36 cookies and uses 3 cups of flour. She wants to make half of the recipe. How much flour does she need? | def solve() -> int:
half_cookies = 36 / 2
ratio = 3 / 36
flour = ratio * half_cookies
result = flour
return result
|
Student: A zookeeper fed 60 bananas to 12 monkeys. Each monkey ate the same number of bananas. Later, he gave 3 more bananas to each monkey. How many bananas did each monkey eat in total? | def solve() -> int:
num_monkeys = 12
num_bananas = 60
extra_bananas = 3
total_bananas = num_bananas + extra_bananas
result = total_bananas / num_monkeys
return result
|
Mandy wants to run a 5 km race. She must maintain an average speed of 10 kph to complete the race in 30 minutes. She runs at a constant speed of 8 kph for the first 3 km. What speed must she maintain for the remaining distance to finish on time? | def solve() -> int:
distance = 5
time = 0.5
speed1 = 8
distance1 = 3
distance2 = distance - distance1
time1 = distance1 / speed1
time2 = time - time1
average_speed = distance / time
speed2 = distance2 / time2
result = speed2
return result
|
A marathon is 42 km. If a runner runs at a pace of 10 km per hour, how long will the marathon take to complete? | def solve() -> int:
marathon_distance = 42
runner_pace = 10
marathon_duration = marathon_distance / runner_pace
result = marathon_duration
return result
|
Student: A swimming pool is 15 meters long, 8 meters wide, and 2 meters deep. How many liters of water will be needed to fill the pool? | def solve() -> int:
length = 15
width = 8
depth = 2
volume = length * width * depth
liters = volume * 1000
result = liters
return result
|
A grocery store has 200 customers in line. They have 30 packs of eggs, each containing 12 eggs. Each customer wants 6 eggs. If the grocery store serves customers in the order they arrived, how many customers will leave without any eggs? | def solve() -> int:
total_customers = 200
total_eggs = 30 * 12
eggs_per_customer = 6
max_customers_served = total_eggs // eggs_per_customer
customers_without_eggs = total_customers - max_customers_served
result = customers_without_eggs
return result
|
A grocery store has 20 bags of apples and 30 bags of oranges. Each bag of apples costs $4.85 and each bag of oranges costs $3.50. If a customer buys 5 bags of apples and 3 bags of oranges, how much do they need to pay? | def solve() -> int:
num_apples = 5
num_oranges = 3
cost_apples = 4.85
cost_oranges = 3.50
total_cost = num_apples*cost_apples + num_oranges*cost_oranges
result = total_cost
return result
|
Possible new questions: There are 20 balloons in a bag and three times as many balloons in another bag. If 1/4 of the balloons in the first bag and 2/5 of the balloons in the second bag are blue, calculate the total number of blue balloons. | def solve() -> int:
bag1 = 20
bag2 = 3 * bag1
blue1 = 1/4 * bag1
blue2 = 2/5 * bag2
total_blue = blue1 + blue2
result = total_blue
return result
|
Jack and his family are driving 597 kilometers. They can drive 80 kilometers every 2.5 hours, how long will their driving take? | def solve() -> int:
totalDistance = 597
distancePer2_5Hours = 80
totalTime = totalDistance // distancePer2_5Hours
result = totalTime
return result
|
Student: A bakery sells 250 cupcakes in a day. If 70% of the sales are chocolate cupcakes and the rest are vanilla, how many vanilla cupcakes did they sell? | def solve() -> int:
total_cupcakes = 250
chocolate_ratio = 0.7
vanilla_ratio = 1 - chocolate_ratio
chocolate_cupcakes = total_cupcakes * chocolate_ratio
vanilla_cupcakes = total_cupcakes * vanilla_ratio
result = vanilla_cupcakes
return result
|
Mia buys a diamond necklace for $20,000 and sells it for 18% profit. She splits the profit with her sister. How much does her sister receive after taxes take away 13%? | def solve() -> int:
cost_price = 20000
profit_percentage = 18
selling_price = cost_price + (cost_price * profit_percentage / 100)
profit = selling_price - cost_price
split_profit = profit / 2
tax_percentage = 13
sister_share = split_profit - (split_profit * tax_percentage / 100)
res... |
Mina runs at a constant speed of 10 km/h. She runs for 15 minutes from her home to the park, rests for 10 minutes, and then runs back home along the same route. How far is the park from her home in kilometers? | def solve() -> int:
distance = 0.25 * 10
result = distance
return result
|
Mike earns $1,000 per week. If he has 3 employees who make $500 per week, how much would his salary be if he sacrificed a part of it to ensure all his employees earn $750 per week? | def solve() -> int:
mike_salary = 1000
num_employees = 3
employee_salary = 500
new_employee_salary = 750
total_employee_salary = num_employees * employee_salary
sacrifice_amount = (new_employee_salary - employee_salary) * num_employees
new_mike_salary = mike_salary - sacrifice... |
Three friends decided to go on a skiing trip costing them a total of $360. They decided to split the expenses evenly. How much money should each friend pay? | def solve() -> int:
total_price = 360.00
people_number = 3.00
shared_expenses = total_price / people_number
result = shared_expenses
return result
|
If Gavin is four times as old as Max and half as old as Zoe, who is 28, what is the average age of the three? Sarah is twice the height of Alex minus 3 inches. Sarah and Alex have a total height of 70 inches. How tall is Sarah? | def solve() -> int:
average_age = (14 + 3.5 + 28) / 3
result = round(average_age, 2)
return result
|
Tori has 10 different pairs of socks. What's the probability that she'll be able to wear a matching pair (i. e left and right sock with the same pattern) of socks for at least 2 days if she wears exactly 2 socks every day in February (assume there are 28 days in the month)? | def solve() -> int:
number_of_pairs = 10
probability_of_no_match = (3/4)**28
result = round(1 - probability_of_no_match, 2)
return result
|
A grocery store sells apples for $0.50 each and oranges for $0.75 each. If you buy 2 apples and 3 oranges, what is the total cost? | def solve() -> int:
apple_price = 0.5
orange_price = 0.75
num_apples = 2
num_oranges = 3
total_cost = num_apples * apple_price + num_oranges * orange_price
result = total_cost
return result
|
Sarah runs a hair salon and charges $50 for a haircut. It costs her $10 in supplies for each haircut. If she performs 200 haircuts in a month and also sells $300 worth of hair products, how much profit did she make after paying $4000 in rent and other expenses? | def solve() -> int:
haircut_price = 50
supplies_cost = 10
haircuts_per_month = 200
product_sales = 300
expenses = 4000
total_income = haircut_price * haircuts_per_month + product_sales
total_expenses = expenses + supplies_cost * haircuts_per_month
profit = total_income - total_... |
April has a large bird cage and she needs to buy 3 kilograms of birdseed for it. She finds out that each kilogram costs $5.50. If she also needs to pay an extra $2.50 for delivery of the birdseed, how much does she need to pay in total? | def solve() -> int:
kilo = 3
costKilo = 5.50
addDelivery = 2.50
totalCost = kilo * costKilo + addDelivery
result = totalCost
return result
|
arah bought a new car for $25,000. She put a down payment of 20% and took a loan for the rest. If the interest rate on the loan is 5% per annum compounded monthly and the loan term is 5 years, what is the monthly payment she has to make? | def solve() -> int:
loan_amount = 25000 * 0.8
monthly_interest_rate = 0.05/12
num_payments = 5*12
monthly_payment = (loan_amount * monthly_interest_rate * (1+monthly_interest_rate)**num_payments)/((1+monthly_interest_rate)**num_payments - 1)
result = monthly_payment
return result
|
On his 50th birthday, John will be four times as old as his nephew is today. If John’s nephew is currently 12 years old, how old is John now? | def solve() -> int:
nephew_age = 12
john_age_on_50th_birthday = 4 * nephew_age
john_current_age = john_age_on_50th_birthday - 50
result = john_current_age
return result
|
Mary wants to decrease her spending on clothes. Currently, she spends $400 on clothes per month. If she reduces her spending by half every month, how many months will it take her to spend only $50 on clothes per month? | def solve() -> int:
current_spending = 400
target_spending = 50
months = 0
while current_spending >= target_spending:
current_spending /= 2
months += 1
result = months
return result
|
Student: A box contains 35 red balls and 25 blue balls. What fraction of the balls are red? | def solve() -> int:
red_balls = 35
blue_balls = 25
total_balls = red_balls + blue_balls
fraction_red_balls = red_balls / total_balls
result = fraction_red_balls
return result
|
Possible questions and programs: Lily bought some chickens to raise in her backyard. She started with 8 chickens, and each chicken laid 5 eggs in the first month. She decided to keep half of the eggs and sell the other half at the market. How much money did she make if she sold each egg for 50 cents? | def solve() -> int:
chickens = 8
eggs_per_chicken = 5
price_per_egg = 0.5
total_eggs = chickens * eggs_per_chicken
eggs_kept = total_eggs // 2
eggs_sold = total_eggs - eggs_kept
revenue = eggs_sold * price_per_egg
result = revenue
return result
|
A car travels 400 miles on 15 gallons of gas. How many gallons of gas will it need to travel 800 miles? | def solve() -> int:
miles_per_gallon = 400/15
distance = 800
gallons_needed = distance/miles_per_gallon
result = gallons_needed
return result
|
In a pond a family of frogs hopped away. The family had twice as many children as adult frogs. There were 8 children, how many frogs were there altogether? | def solve() -> int:
number_of_adult = int(8/2)
number_of_children = int(8)
total_number_of_frogs = number_of_adult + number_of_children
result = total_number_of_frogs
return result
|
At a gym, there are 120 people. If 1/4 are using equipment, and 1/3 of those using equipment are on a treadmill, how many people are not exercising? | def solve() -> int:
people = 120
using_equipment = people * (1/4)
on_treadmill = using_equipment * (1/3)
not_exercising = people - using_equipment
result = not_exercising
return result
|
an went grocery shopping and paid a total of $150 for 3 different items. He got a 25% discount. How much money did he save? | def solve() -> int:
price = 50
discount = 25
copies = 3
discount_amount = (discount/100)*price
final_price = 3*price - discount_amount
savings = 3*price - final_price
result = savings
return result
|
A car travels at an average speed of 60 miles per hour. If it travels for 3 hours, how far has it traveled? | def solve() -> int:
speed = 60
time = 3
distance = speed * time
result = distance
return result
|
Nicole has 300 erasers. She put 50 erasers in her room and shared the rest with 7 friends. How many erasers did each friend get? | def solve() -> int:
result = 0
x = 300
y = 50
z = 7
erasers = x - y
erasers_each_friend = erasers / z
result = erasers_each_friend
return result
|
- Amanda has a vegetable garden that produces 15 lbs of tomatoes, 12 lbs of cucumbers, and 10 lbs of zucchini each month. She sells them at a farmers market for $1.50, $1.00, and $0.80 per lb respectively. She also spends $20 on seeds, fertilizer, and water each month. How much profit does she make monthly? | def solve() -> int:
revenue = 15 * 1.5 + 12 * 1 + 10 * 0.8
cost = 20
profit = revenue - cost
result = profit
return result
|
If a car travels at a speed of 60km/h for 3 hours, how far does it travel? | def solve() -> int:
speed = 60
time = 3
distance = speed * time
result = distance
return result
|
A recipe calls for 2/3 cups of flour to make 12 cookies. How much flour is needed to make 36 cookies? | def solve() -> int:
num_cookies = 36
flour_needed = (2/3 * num_cookies)/12
result = flour_needed
return result
|
Alicia has a farm of wheat and barley. She can harvest her wheat every 5 months and can sell the harvest for $20. She can harvest her barley every 3 months and can sell this harvest for $15. How much money can Alicia earn every year? | def solve() -> int:
total_wheat = 12 * 20
total_barley = 12 * 15
result = total_wheat + total_barley
return result
|
A clinic has three rooms: Room A, B, and C. In Room A, 60% of the patients are children, in Room B, 40% of the patients are children, and in Room C, the rest are children. If there are 36 children in Room B, how many are in Room C? | def solve() -> int:
room_a_percentage = 60
room_b_percentage = 40
room_b_children = 36
room_a_children = (room_a_percentage / 100) * (100 - room_b_percentage) * room_b_children / room_b_percentage
room_c_children = (100 - room_a_percentage - room_b_percentage) * room_b_children / room_b_percent... |
8. William has 17 blocks. He buys 7 more blocks. How many blocks does William have now? | def solve() -> int:
num_blocks = 17
buy_more = 7
williams_blocks = num_blocks + buy_more
result = williams_blocks
return result
|
William went clothes shopping. In the first store, he tried on 6 pairs of pants. In the second store, he tried on 3 more pairs of pants than in the first store. In the third store, he did not find anything he liked. But in the fourth store, he tried on half as many pairs of pants as he did in the other three stores com... | def solve() -> int:
pants_store1 = 6
pants_store2 = pants_store1 + 3
pants_store3 = 0
pants_store4 = (pants_store1 + pants_store2 + pants_store3) / 2
total_pants_tried = pants_store1 + pants_store2 + pants_store3 + pants_store4
result = total_pants_tried
return result
|
A pool is 20 feet long, 12 feet wide, and 4 feet deep. What is the volume of the pool in cubic feet? | def solve() -> int:
length = 20
width = 12
depth = 4
volume = length * width * depth
result = volume
return result
|
Sarah is thinking about buying a hybrid car to reduce her carbon footprint. If the production of the hybrid car produces 2 metric tons of carbon dioxide and a regular car produces 5 pounds of carbon dioxide per mile, how many miles would Sarah have to drive in the hybrid car for it to become a lower-carbon solution? | def solve() -> int:
hybrid_car_co2 = 2
regular_car_co2 = 5
regular_car_co2 = regular_car_co2 * 0.000453592
miles = hybrid_car_co2 / regular_car_co2
result = miles
return result
|
Rachel needs 5 lemons to make 1 pitcher of lemonade. She has 25 lemons. How many pitchers of lemonade can she make? | def solve() -> int:
lemons_needed_per_pitcher = 5
lemons_available = 25
pitchers_of_lemonade = lemons_available // lemons_needed_per_pitcher
result = pitchers_of_lemonade
return result
|
A car traveled 240 miles in 4 hours. If it traveled at a constant speed, what was its speed in miles per hour? | def solve() -> int:
distance_traveled = 240
time_taken = 4
speed = distance_traveled / time_taken
result = speed
return result
|
If there are three times as many pencils as pens in a drawer and there are 21 pens, how many pencils are in the drawer if Jada takes 1/2 of each item from the drawer? | def solve() -> int:
pens = 21
pencils = 3 * pens
total_items = pens + pencils
half_items = total_items / 2
half_pens = half_items / 4
half_pencils = half_pens * 3
result = half_pencils
return result
|
You earn $12 per hour for a part-time job. If you work 20 hours in a week, how much money will you make in a week? | def solve() -> int:
hourly_wage = 12
hours_worked = 20
weekly_salary = hourly_wage * hours_worked
result = weekly_salary
return result
|
``` John wants to save $200. He will put $50 at the end of each week. How many weeks will it take him to save for this amount? | def solve() -> int:
target_savings = 200
weekly_savings = 50
weeks_to_save = target_savings / weekly_savings
result = weeks_to_save
return result
|
A farmer has a rectangular field that measures 100 meters by 80 meters. He wants to fence the field with barbed wire. He needs to use three strands of wire for the fence. How much wire does he need total? | def solve() -> int:
perimeter = (100 + 80) * 2
wire = perimeter * 3
result = wire
return result
|
Sophia purchased a train ticket for a round trip. The ticket cost $65 and she paid a $6 service fee for the online booking. How much did Sophia have to pay? | def solve() -> int:
ticket_cost = 65
service_fee = 6
total_cost = ticket_cost * 2 + service_fee
result = total_cost
return result
|
A piggy bank has 100 coins of 50 cents each. How much money is in the piggy bank? | def solve() -> int:
total_money = 100 * 0.5
result = total_money
return result
|
A bicycle is sold for $350, which is 40% more than its original price. What is the original price of the bicycle? | def solve() -> int:
selling_price = 350
percentage_increase = 40
original_price = selling_price / (1 + percentage_increase / 100)
result = original_price
return result
|
A garden bed is to be surrounded by a fence built out of 200 ft of wire. If the length of the bed is 50ft, what is the width of the bed? | def solve() -> int:
length_of_bed = 50
perimeter_of_fence = 200
width_of_bed = (perimeter_of_fence - 2 * length_of_bed) / 2
result = width_of_bed
return result
|
Student: In a grocery store, there are 4 apples, 5 oranges, 3 pears, 4 bananas, and 10 logs of bread for sale. How much do you need to pay for all items if each apple costs 70 cents, each orange costs 85 cents, each pear costs 25 cents, each banana costs 50 cents, and each log of bread costs $2. | def solve() -> int:
apples = 4
oranges = 5
pears = 3
bananas = 4
bread = 10
apple_cost = apples * 0.7
orange_cost = oranges * 0.85
pear_cost = pears * 0.25
banana_cost = bananas * 0.5
bread_cost = bread * 2
total_cost = apple_cost + orange_cost + pear_cost + banana_cost + bre... |
A swimming pool is filled with a hose that fills at a rate of 10 liters per minute. If the pool can hold 1000 liters, how long will it take to fill up the entire pool? | def solve() -> int:
pool_volume = 1000
fill_rate = 10
fill_time = pool_volume / fill_rate
result = fill_time
return result
|
Emily and Jack order a family-sized lasagna. The lasagna has 20 pieces and they have already eaten 12. How many pieces are left per person? | def solve() -> int:
lasagna_pieces = 20
eaten_pieces = 12
remaining_pieces = lasagna_pieces - eaten_pieces
people = 2
pieces_per_person = remaining_pieces / people
result = pieces_per_person
return result
|
A ladder leans against a wall and makes a 45-degree angle with the ground. If the foot of the ladder is 12 feet away from the wall, how long is the ladder? | def solve() -> int:
from math import sin, radians
angle = radians(45)
ladder_length = 12/sin(angle)
result = ladder_length
return result
|
If a teacher can grade 60 exam papers in 2 hours, how many papers can another teacher grade in 1 hour and 30 minutes that is 20 less than four times as many papers graded by the first teacher at the same rate? | def solve() -> int:
papers_first_teacher = 60
time_first_teacher = 2
papers_second_teacher = (4 * papers_first_teacher) - 20
time_second_teacher = 1.5
papers_per_hour_first_teacher = papers_first_teacher / time_first_teacher
papers_per_hour_second_teacher = papers_second_teacher / time... |
Student: Jane bought a new dress for $85. She also bought a pair of shoes that cost her $60. If she paid with a $250 bill, how much change did she receive? | def solve() -> int:
dress = 85
shoes = 60
total = dress + shoes
change = 250 - total
result = change
return result
|
A rectangular box measures 5 cm by 10 cm by 15 cm. What is its volume in cubic centimeters? | def solve() -> int:
box_vol = 5 * 10 * 15
result = box_vol
return result
|
Chris needs to get an x-ray that costs $300, but his insurance will cover 80%. How much will he have to pay out of pocket? | def solve() -> int:
cost = 300
insurance_coverage = 0.8
amount_covered = cost * insurance_coverage
amount_out_of_pocket = cost - amount_covered
result = amount_out_of_pocket
return result
|
David wants to go rock climbing, but he's concerned about the weather. For every 1 mph of wind speed above 10 mph, the likelihood of a loose rock falling increases by 5%. If a loose rock falls, there's a 60% chance of injury. If the wind speed is 15 mph, what is the probability of David getting injured if a loose rock ... | def solve() -> int:
wind_speed = 15
likelihood_increase = (wind_speed - 10) * 0.05
probability_of_injury = 0.6
probability_of_injury_if_rock_falls = probability_of_injury * (1 + likelihood_increase)
result = probability_of_injury_if_rock_falls
return result
|
- Anna and Ben are saving money for a trip. Anna saves $100 a month and has been saving for 12 months. Ben saves $150 a month and started 6 months ago. How much money do they have together? | def solve() -> int:
anna_amount = 100
anna_months = 12
ben_amount = 150
ben_months = 6
anna_money = anna_amount * anna_months
ben_money = ben_amount * ben_months
combined = anna_money + ben_money
result = combined
return result
|
A store is selling 35 identical notebooks at $5 each. What is the total cost of buying all the notebooks? | def solve() -> int:
n_books = 35
cost_per_book = 5
total_cost = n_books * cost_per_book
result = total_cost
return result
|
Mia has a rectangular garden that is 8 meters long and 6 meters wide. She wants to plant some flowers along the perimeter of the garden. She needs 4 flowers for each meter of the perimeter. How many flowers does she need in total? | def solve() -> int:
perimeter = 8 + 8 + 6 + 6
flowers_per_meter = perimeter * 4
result = flowers_per_meter
return result
|
Emira has bought a total of 51 CDs that cost $15 each. She adds a 4% tax to the cost of 25 of them and a 9% tax to the other 26. How much in taxes Emira needs to pay? | def solve() -> int:
tax = 0
cd_cost = 15
num_cds1 = 25
num_cds2 = 26
tax1 = 0.04
tax2 = 0.09
tax1_cost = num_cds1 * cd_cost * tax1
tax2_cost = num_cds2 * cd_cost * tax2
tax = tax1_cost + tax2_cost
result = tax
return result
|
Student: A company produces 500 pencils per hour. If they work for 8 hours a day, how many pencils do they produce in one day? | def solve() -> int:
pencils_per_hour = 500
hours_per_day = 8
pencils_per_day = pencils_per_hour * hours_per_day
result = pencils_per_day
return result
|
At a florist, there are 100 flowers. 40% of them are red roses, and the rest are white roses. Among the white roses, 20% are buds. How many adult male red roses are there at the florist? | def solve() -> int:
total_flowers = 100
red_roses = total_flowers * 0.4
white_roses = total_flowers - red_roses
white_roses_buds = white_roses * 0.2
white_roses_adults = white_roses - white_roses_buds
red_roses_adults = red_roses - white_roses_adults
result = red_roses_adults
r... |
Today, a car’s speed is increasing by 5 miles per hour every 30 minutes. If the car starts at a speed of 60 miles per hour at 9 AM, what will be the speed of the car at 11 AM? | def solve() -> int:
start_speed = 60
increase_per_hour = 10
increase_per_minute = increase_per_hour / 60
time_difference_in_minutes = 120
increase_in_speed = increase_per_minute * time_difference_in_minutes
final_speed = start_speed + increase_in_speed
result = final_speed
return result
|
Student: A car traveled 120 miles in 2 hours. What was the average speed, in miles per hour, of the car? | def solve() -> int:
distance = 120
time = 2
speed = distance / time
result = speed
return result
|
A cell phone plan costs $40 per month plus $0.20 per minute of call time. If someone talks for 300 minutes, how much do they pay in total? | def solve() -> int:
plan_cost = 40
call_minutes = 300
total_cost = plan_cost + (0.2 * call_minutes)
result = total_cost
return result
|
If the perimeter of a square is 28 cm, what is the length of one of its sides? | def solve() -> int:
side_length = 28/4
result = side_length
return result
|
Student: In 12 years, Luke will be twice as old as his younger brother Toby. How old is Luke now? | def solve() -> int:
luke_age = 0
toby_age = 0
luke_age_in_12_years = luke_age + 12
toby_age_in_12_years = toby_age + 12
luke_age = luke_age_in_12_years - toby_age_in_12_years
result = luke_age
return result
|
Student: If a company charges $10 per hour for their services, how much will they charge for 25 hours of work? | def solve() -> int:
hours = 25
rate = 10
cost = hours * rate
result = cost
return result
|
A store starts with 100 shirts in stock. The store sells 30 shirts on the first day, 25 on the second day, and the remainder on the third day. How many shirts were sold on the third day? | def solve() -> int:
shirt_sold_on_first_two_days = 30 + 25
remaining_stock = 100 - shirt_sold_on_first_two_days
result = remaining_stock
return result
|
A store has a 30% off sale on all their items. Sara picks out a shirt that is regularly priced at $50. How much will Sara pay for the shirt after the sale? | def solve() -> int:
regular_price = 50
discount_percentage = 0.3
discount_amount = regular_price * discount_percentage
new_price = regular_price - discount_amount
result = new_price
return result
|
Samantha arrived in Japan and her luggage weighed 12 pounds. While on her trip, she purchased 7 ceramic bowls that weighed 18 ounces each, 5 pounds of sushi, 4 packs of tea that weighed 6 ounces each and 3 jars of honey that weighed 10 ounces each. How heavy was Samantha's luggage on the return flight home considering ... | def solve() -> int:
arrival_weight = 12
bowl_weight = 7 * 18 / 16
sushi_weight = 5
tea_weight = 4 * 6 / 16
honey_weight = 3 * 10 / 16
total_weight = bowl_weight + sushi_weight + tea_weight + honey_weight
return_weight = arrival_weight + total_weight
res... |
A farmer has 11 horses with 3 times the number of cows as horses. The number of geese is 2 times the number of cows plus 1. The number of ducks is 3 times the number of geese plus 4. What is the difference between the number of horses and the number of ducks? | def solve() -> int:
num_horses = 11
num_cows = num_horses / 3
num_geese = (num_cows * 2) + 1
num_ducks = (num_geese * 3) + 4
result = num_horses - num_ducks
return result
|
If a recipe for a cake requires 3 eggs and 2 cups of flour, how many eggs and cups of flour are needed to make 5 cakes? | def solve() -> int:
eggs_per_cake = 3
flour_per_cake = 2
eggs_for_5 = eggs_per_cake * 5
flour_for_5 = flour_per_cake * 5
result = (eggs_for_5, flour_for_5)
return result
|
A pack of gum contains 12 pieces and costs $1.20. How much does each piece of gum cost? | def solve() -> int:
pack = 1.2
pieces = 12
cost = pack / pieces
result = cost
return result
|
A music festival has six stages, each capable of accommodating 500 spectators. How many spectators in total can the festival accommodate? | def solve() -> int:
stage_capacity = 500
num_stages = 6
total_capacity = stage_capacity * num_stages
result = total_capacity
return result
|
Sam is collecting soda cans for recycling. He gets $0.1 for each regular can and $0.15 for each large can. He has 24 regular cans and 16 large cans in his bag. He also finds 8 more regular cans and 4 more large cans on his way to the recycling center. How much money will he get in total? | def solve() -> int:
regular = 24
large = 16
regular_cost = 0.1
large_cost = 0.15
regular = regular + 8
large = large + 4
total_money = regular * regular_cost + large * large_cost
result = total_money
return result
|
Mike has 24 pencils and he gives 3 to his sister and 2 to his friend. How many pencils does Mike have remaining? | def solve() -> int:
mikes_pencils_initial = 24
pencils_given_sister = 3
pencils_given_friend = 2
pencils_leftover = mikes_pencils_initial - pencils_given_sister - pencils_given_friend
result = pencils_leftover
return result
|
A car traveled 240 km at a speed of 60 km/hr. How much time did it take to complete the journey? | def solve() -> int:
distance = 240
speed = 60
time = distance / speed
result = time
return result
|
A bookstore sells a novel for $18 and a textbook for $82. If a customer buys 5 books and the total cost with tax is $497.75, how many of each type of book did the customer purchase? | def solve() -> int:
tax_rate = 1.08
bookstore_total = 497.75/tax_rate
novel_price = 18
textbook_price = 82
x = bookstore_total/textbook_price
y = (bookstore_total - (x*textbook_price))/novel_price
result = f"Number of textbooks = {round(x,2)}, Number of novels = {round(y,2)}"
return res... |
Carter had 25 baseball cards and shared them with his two friends. He kept 1/3 of the cards and gave the rest to his friends. His friends each took 7 cards and gave the remaining cards to their siblings. How many baseball cards did each sibling get? | def solve() -> int:
cards_total = 25
carter_cards = cards_total * (1/3)
friends_cards = cards_total - carter_cards
friends_each = friends_cards / 2
siblings_each = (friends_each - 7) / 2
result = siblings_each
return result
|
Sunnydale buries their time capsule 10 meters below ground. Moonville buries their capsule 5 meters deeper than 6 times the depth of Sunnydale's time capsule. How deep is Moonville's time capsule buried? | def solve() -> int:
sunnydale_depth = 10
moonville_depth = 6 * sunnydale_depth + 5
result = moonville_depth
return result
|
If a store is selling items at a 30% discount, and an item normally costs $50, what is the discounted price? | def solve() -> int:
original_price = 50
discount_percent = 0.3
discounted_price = original_price - (original_price * discount_percent)
result = discounted_price
return result
|
David gets paid $12 for each pizza he delivers and $8 per hour for working in the pizza parlor. Last week he worked for 35 hours and made 20 deliveries. Calculate his total income. | def solve() -> int:
hourly_rate = 8
hours_worked = 35
hourly_pay = hourly_rate * hours_worked
delivery_pay = 12 * 20
total_income = hourly_pay + delivery_pay
result = total_income
return result
|
Jack is dividing 50 candies between 3 kids. The first kid gets 1/2 of the total as many as the other two kids together. How many candies does the first kid get? | def solve() -> int:
x = 50
y = (x / 2) - (x/4)
result = int(y)
return result
|
Student: A metal rod is 4 feet long. If we cut off 10% from the length, how long is the remaining piece? | def solve() -> int:
length_of_rod = 4
percentage_cut_off = 10
length_cut_off = length_of_rod * (percentage_cut_off/100)
length_remaining = length_of_rod - length_cut_off
result = length_remaining
return result
|
Mandy earns $25 per hour working at a coffee shop. She worked 8 hours a day for 5 days. How much did she earn altogether? | def solve() -> int:
hourly_wage = 25
hours_per_day = 8
days_worked = 5
total_earned = hourly_wage * hours_per_day * days_worked
result = total_earned
return result
|
Daniel has twice as many marbles as Emma. Frank has five less marbles than Daniel. How many marbles do these three kids have, if Frank has 11 marbles? | def solve() -> int:
daniel = 11 + 5
emma = daniel // 2
total = daniel + emma + 11
result = total
return result
|
san saved $200 for 5 months and then saved $350 for the next 3 months. What was her average monthly savings? | def solve() -> int:
savings1 = 200
savings2 = 350
months1 = 5
months2 = 3
total_savings = savings1 + savings2
total_months = months1 + months2
avg_monthly_savings = total_savings/total_months
result = avg_monthly_savings
return result
|
Tom wants to purchase a car that costs $35,000. He has $10,000 towards the car and will borrow the rest from a bank that will charge him an annual interest rate of 5%. If he repays the loan over 5 years, how much should he repay monthly to the bank? | def solve() -> int:
TotalCost = 35000
DownPayment = 10000
Loan = TotalCost - DownPayment
AnnualInterestRate = 5
InterestRate = AnnualInterestRate / 100 / 12
NumberOfYears = 5
NumberOfPayments = NumberOfYears * 12
MonthlyPayment = (Loan * InterestRate * ((1 + InterestRate)**NumberOfPaymen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.