question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A photography studio hires two photographers named Lily and Oliver. Lily charges $40 per hour while Oliver charges $50 per hour. Oliver takes photos for 10 hours every week. How many hours does Lily need to photograph to make the same amount as Oliver in a month? | def solve() -> int:
oliver_hourly_rate = 50
lily_hourly_rate = 40
oliver_hours_per_week = 10
weeks_per_month = 4
oliver_earnings_per_week = oliver_hourly_rate * oliver_hours_per_week
oliver_earnings_per_month = oliver_earnings_per_week * weeks_per_month
lily_earnings_per_month = ol... |
``` A 10 meter ladder is placed against a wall. The bottom of the ladder is placed 6 meters away from the wall. What is the height of the top of the ladder? | def solve() -> int:
height = ((10**2) - (6**2))**0.5
result = round(height, 2)
return result
|
A class of 20 students went on a field trip to the museum. The admission fee was $5 per student, but the teacher got a 20% discount for the whole group. The class also bought 15 souvenirs for $3 each. How much money did the class spend in total at the museum? | def solve() -> int:
admission_fee = 20 * 5 * 0.8
souvenir_cost = 15 * 3
total_cost = admission_fee + souvenir_cost
result = total_cost
return result
|
Kevin and his brother planted carrots in their backyard. They harvested 20 carrots on the first day and sold them for $0.5 each. On the second day, they harvested 18 carrots and ate 6 of them. On the third day, they harvested 24 carrots and sold them for $0.6 each. How much money did they make from selling carrots in t... | def solve() -> int:
carrots1 = 20
carrots2 = 18
carrots3 = 24
money = 0
left = 0
money += carrots1 * 0.5
carrots2 -= 6
money += carrots3 * 0.6
left = carrots2
result = (money, left)
return result
|
- Lisa loves to bake cookies and cakes. She spends 2 hours every weekend making dough and batter. She also spends half an hour each time preheating the oven and cleaning up. How many hours does she spend on baking activities every month? | def solve() -> int:
weekly_baking = 2 + 0.5
monthly_baking = weekly_baking * 4
result = monthly_baking
return result
|
Emma wants to paint a room that is 5 meters long, 4 meters wide, and 3 meters high. If one litre of paint covers 10 square meters, how many liters of paint will Emma need to buy? | def solve() -> int:
length = 5
width = 4
height = 3
area = 2 * (length * width + length * height + width * height)
paint_needed = area / 10
result = paint_needed
return result
|
Sophie is making a dress. She has already worked on it for 2 hours, and she knows it will take another 1.5 hours to complete. The ironing after will take one-quarter of the time she spent making the dress. How long will Sophie spend on this project in total? | def solve() -> int:
hours_worked = 2
time_to_complete = 1.5
ironing_time = (hours_worked + time_to_complete) / 4
total_time = hours_worked + time_to_complete + ironing_time
result = total_time
return result
|
Emily bought 5 shirts for $12 each and 3 pairs of shoes for $25 each. If she spent $10 on transportation, how much money does she have left? | def solve() -> int:
shirt_price = 12
num_shirts = 5
shoe_price = 25
num_shoes = 3
transportation_cost = 10
total_spent = shirt_price * num_shirts + shoe_price * num_shoes + transportation_cost
result = total_spent
return result
|
John has 24 more marbles than Jane. If Jane has 18 marbles, how many marbles do they have altogether? | def solve() -> int:
john = 18 + 24
total = john + 18
result = total
return result
|
Student: A rectangular room has a length of 10 meters and a width of 8 meters. If the cost of carpeting the room is $15 per square meter, how much will it cost to carpet the entire floor? | def solve() -> int:
length = 10
width = 8
area = length * width
cost_per_square_meter = 15
total_cost = area * cost_per_square_meter
result = total_cost
return result
|
Alex saves 15% of his monthly salary of $1200. He also made an extra $200 from selling some items online. How much will he save this month? | def solve() -> int:
monthly_salary = 1200
additional_income = 200
savings_percentage = 0.15
total_income = monthly_salary + additional_income
total_savings = total_income * savings_percentage
result = total_savings
return result
|
Albert bought 36 eggs from the market. He used 12 eggs to make a cake, 8 eggs to make an omelet, and 4 eggs to boil for breakfast. He then noticed that 1/4 of the remaining eggs were cracked. How many eggs did Albert have left that were not cracked? | def solve() -> int:
used = 12 + 8 + 4
left = 36 - used
cracked = left * 1 / 4
not_cracked = left - cracked
result = not_cracked
return result
|
A farmer wants to fence in a square pasture. The pasture is 75 feet wide. How many feet of fencing will the farmer need if he wants to build a fence 5 feet tall around the pasture? | def solve() -> int:
width = 75
height = 5
fencing_needed = 4 * (width * height)
result = fencing_needed
return result
|
A bank has a limit of $5000 on cash withdrawal per day. If a person withdraws $3445 in the morning, how much money is allowed to be withdrawn in the evening? | def solve() -> int:
total_cash_withdrawal_limit = 5000
morning_withdrawal_amount = 3445
remaining_withdrawal_limit = total_cash_withdrawal_limit - morning_withdrawal_amount
result = remaining_withdrawal_limit
return result
|
A pizza restaurant has 25 tables. Each table has 4 chairs. If the restaurant is full and there are 5 people at each table, how many people are in the restaurant? | def solve() -> int:
tables = 25
chairs_per_table = 4
total_chairs = tables * chairs_per_table
people_per_table = 5
total_people = total_chairs * people_per_table
result = total_people
return result
|
A service shop charges $35 for an oil change and $50 for a tire rotation. If a customer wants both services, how much will they have to pay? | def solve() -> int:
oil_change_cost = 35
tire_rotation_cost = 50
total_cost = oil_change_cost + tire_rotation_cost
result = total_cost
return result
|
Sophia bikes 2 miles to school and 3.5 miles to the grocery store every day. She bikes these routes 3 times every week and goes on a 4-mile bike ride on weekends. What is the total mileage on her bike for a typical week? | def solve() -> int:
school_distance = 2
grocery_distance = 3.5
weekly_school_trips = 3
weekend_ride = 4
weekly_school_distance = school_distance * weekly_school_trips
weekly_grocery_distance = grocery_distance * weekly_school_trips
total_weekly_distance = weekly_school_distanc... |
If nine bicycles cost three times as much as one motorcycle, and each bicycle is sold at $300, calculate the total amount of money Tom will pay if he buys nine bicycles and five motorcycles. Sarah needs to travel 320 miles for a business meeting. If she drives at a speed of 70 mph and takes a 20-minute lunch break and ... | def solve() -> int:
bicycles = 9
motorcycles = 5
bicycle_price = 300
motorcycle_price = bicycle_price / 3
total_bicycle_cost = bicycles * bicycle_price
total_motorcycle_cost = motorcycles * motorcycle_price
total_cost = total_bicycle_cost + total_motorcycle_cost
result = total_... |
A high school's total enrollment was 672 students in 2019. In 2020, 206 students graduated, which left 466 students. If the school had 110 fewer 8th graders in 2020 than in 2019, how many 8th graders were in the school in 2020? | def solve() -> int:
total_enrollment = 672
graduates = 206
remaining_students = 466
difference = total_enrollment - graduates
difference_8th_graders = difference - 110
result = difference_8th_graders
return result
|
If it takes 6 people 9 hours to build a house, how long will it take 8 people to build the same house? | def solve() -> int:
time_to_build = 0
number_of_people_1 = 6
number_of_people_2 = 8
time_to_build = (number_of_people_1 * 9) / number_of_people_2
result = time_to_build
return result
|
Maya's rope ladder hangs 30 feet down from a balcony. The ladder falls, with the top of the ladder now resting 12 feet above the ground. How high was the balcony? | def solve() -> int:
ladder_length = 30
ladder_top_height = 12
balcony_height = ladder_length + ladder_top_height
result = balcony_height
return result
|
Jacob is twice as young as Charlotte. Jacob will be 18 years old in three years. What is the total of their ages now? | def solve() -> int:
jacob_age = 18 - 3
charlotte_age = jacob_age * 2
total_age = jacob_age + charlotte_age
result = total_age
return result
|
Student: A rectangular swimming pool has a length of 20 meters, a width of 10 meters, and a depth of 2 meters. If the pool is half full, how many cubic meters of water are in the pool? | def solve() -> int:
length = 20
width = 10
depth = 2
fill_level = 0.5
volume = length * width * depth
water_volume = volume * fill_level
result = water_volume
return result
|
Possible additional questions: Lily has a collection of 18 stickers and she wants to put them in 6 envelopes equally. How many stickers will she put in each envelope? If she buys 4 more envelopes, how many more stickers will she need to buy to fill them all? | def solve() -> int:
stickers_per_envelope = 18 // 6
stickers_needed = 4 * stickers_per_envelope
stickers_to_buy = stickers_needed - 18
result = stickers_to_buy
return result
|
The soda machine dispenses soda at a rate of 2 cans per minute. Each can has a volume of 355 ml. If there are 5 people in line, and each person wants 2 cans, how many total liters of soda will be dispensed? | def solve() -> int:
rate = 2
can_volume = 355
people = 5
cans_per_person = 2
total_cans = people * cans_per_person
total_volume_ml = total_cans * can_volume
total_volume_l = total_volume_ml / 1000
time_minutes = total_cans / rate
result = total_volume_l
... |
Amy and Ben shared a pizza that had 12 slices. Amy ate 3 slices and Ben ate 4 slices. What fraction of the pizza did they eat together? | def solve() -> int:
pizza = 12
amy = 3
ben = 4
fraction = (amy + ben) / pizza
result = fraction
return result
|
Mary commutes for 45 minutes to her workplace and 45 minutes back home every weekday. On weekends, she spends 1 hour driving her children to various activities each day. How many hours does Mary drive in a week? | def solve() -> int:
weekday_drive_to_work = 45 / 60
weekday_drive_back_home = 45 / 60
weekday_total = (weekday_drive_to_work + weekday_drive_back_home) * 5
weekend_total = 1 * 2
result = weekday_total + weekend_total
return result
|
Ethan wants to save up money to buy a new computer. He currently has $400 from his allowance. He also sells his old bike for $120 and receives another $20 from his neighbor as a favor. After saving up his money, he finds out that the computer he wants costs $600. How much money does Ethan need to buy the computer? | def solve() -> int:
total_start = 400
sell_bike = 120
neighbor_gift = 20
computer_cost = 600
total_need = computer_cost - total_start - sell_bike - neighbor_gift
result = total_need
return result
|
Student: John needs to put 200 liters of water into 6 buckets. How many liters of water will be in each bucket? | def solve() -> int:
total_water = 200
num_buckets = 6
water_per_bucket = total_water / num_buckets
result = water_per_bucket
return result
|
In a bakery, there are four display cases and in each display case, the number of croissants is twice as many as the number of bagels in all the cases. If there are 30 bagels in each display case, calculate the total number of croissants in all the cases. | def solve() -> int:
num_cases = 4
num_bagels = 30
num_croissants = 2 * num_bagels
total_croissants = num_cases * num_croissants
result = total_croissants
return result
|
A farmer harvests 500 apples. She sells them for $1 each. The cost for each apple is $0.7. What is the farmer's profit? | def solve() -> int:
apple_amount = 500
selling_price = 1
cost_per_apple = 0.7
total_income = apple_amount * selling_price
total_cost = apple_amount * cost_per_apple
total_profit = total_income - total_cost
result = total_profit
return result
|
A company has a yearly revenue of $500,000. If its expenses are 40% of its revenue, what is the company's profit? | def solve() -> int:
revenue = 500000
expenses = revenue * 0.4
profit = revenue - expenses
result = profit
return result
|
If 5 board games cost $62 each and 4 jigsaw puzzles cost $16 each, how much is the total of the purchase before taxes? | def solve() -> int:
total = 0
total = total + (5*62)
total = total + (4*16)
result = total
return result
|
Student: A store has 50 boxes of pens, with 20 pens in each box. How many pens are there in total? | def solve() -> int:
boxes = 50
pens_per_box = 20
total_pens = boxes * pens_per_box
result = total_pens
return result
|
If a baseball team loses 11 games and wins 28 games, how many games did they play? | def solve() -> int:
lost = 11
wins = 28
games_played = lost + wins
result = games_played
return result
|
Student: Sarah can paint a room in 6 hours. How long would it take her to paint 2 rooms? | def solve() -> int:
room_time = 6
num_rooms = 2
total_time = room_time * num_rooms
result = total_time
return result
|
A bakery makes 720 muffins per hour. How many muffins can it make in a whole day if it operates for 12 hours? | def solve() -> int:
muffins_per_hour = 720
time_in_hours = 12
muffins_per_day = muffins_per_hour * time_in_hours
result = muffins_per_day
return result
|
Possible questions and programs: Ken has four times as many quarters as dimes. If he spends half of his quarters and one-third of his dimes on a snack, what would be the value of money he has left, in dollars, if he had 12 dimes before spending any money? | def solve() -> int:
quarters = 4 * 12
dimes = 12
quarters_spent = quarters // 2
dimes_spent = dimes // 3
value_left = (quarters - quarters_spent) * 0.25 + (dimes - dimes_spent) * 0.1
result = value_left
return result
|
A rectangular garden is 20 meters long and 15 meters wide. If the garden is surrounded by a fence that costs $5.00 per meter, what is the total cost of the fence? | def solve() -> int:
length = 20
width = 15
perimeter = 2 * length + 2 * width
cost_per_meter = 5.0
total_cost = perimeter * cost_per_meter
result = total_cost
return result
|
At Super Bowl, for every six fans wearing the jersey of the home team, there are four fans wearing the visiting team's jersey. Each home jersey fan paid $130, while every visiting team fan paid $110. If there are 240 fans wearing the home team's jersey, what is the total amount raised at the game? | def solve() -> int:
home_jersey_fans = 240
visiting_jersey_fans = (4/6) * home_jersey_fans
total_fans = home_jersey_fans + visiting_jersey_fans
home_jersey_price = 130
visiting_jersey_price = 110
total_amount_raised = (home_jersey_fans * home_jersey_price) + (visiting_jersey_fans * visiting_jers... |
Samantha is driving to the beach, which is 180 miles away. Her car can travel 18 miles per gallon and has a gas tank that can hold 14 gallons. How many more miles can Samantha drive without having to fill up her tank again? | def solve() -> int:
distance_to_beach = 180
miles_per_gallon = 18
gas_tank_capacity = 14
miles_with_full_tank = miles_per_gallon * gas_tank_capacity
miles_driven = distance_to_beach
miles_left = miles_with_full_tank - miles_driven
result = miles_left
return resul... |
Lily has to watch a total of 100 videos in a day. After watching 30 videos, she has only 3 hours remaining. What should be her pace in videos watched per minute, to complete all the videos within the given time? | def solve() -> int:
total_videos = 100
videos_watched = 30
remaining_time = 3 * 60
time_per_video = remaining_time / (total_videos - videos_watched)
pace = 1 / time_per_video
result = pace
return result
|
ome possible questions and programs are: Alex has 32 marbles and Ben has 16 marbles. How many marbles does Ben have when Alex gives away half of his marbles to Charlie? | def solve() -> int:
marbles_given = 32 / 2
marbles_alex = 32 - marbles_given
marbles_ben = 16 + marbles_given
result = marbles_ben
return result
|
My phone's battery case weighs 220 grams when it's empty. If I use my phone for 4 hours each day and I always recharge it every 2 days, how much does the battery case weigh if after I ended up recharging it, I found out that the phone battery was only 20% depleted? | def solve() -> int:
battery_case_weight = 220
phone_usage_per_day = 4
recharge_frequency = 2
battery_depletion = 0.2
phone_usage_per_recharge = phone_usage_per_day * recharge_frequency
battery_depletion_per_recharge = battery_depletion * battery_case_weight
battery_case_weight_afte... |
A triangle has a base of 10 meters and a height of 8 meters. What is the area of the triangle? | def solve() -> int:
base = 10
height = 8
area = (1/2) * base * height
result = area
return result
|
A hotel has 20 guests on weekdays and twice as many on weekends. How many guests will it have at the end of the month? | def solve() -> int:
weekdays = 20
weekends = 2 * weekdays
days_in_month = 30
total_guests = weekdays * 5 + weekends * 2
result = total_guests * days_in_month
return result
|
Connor had 25 stickers on his notebook. He traded 1/4 of them with his friend and then lost 7 stickers. How many stickers does Connor have now? | def solve() -> int:
stickers = 25
traded_stickers = stickers / 4
remaining_stickers = stickers - traded_stickers
lost_stickers = 7
total_stickers = remaining_stickers - lost_stickers
result = total_stickers
return result
|
8. Divya sold 4 items each for $7. How much money did she make? | def solve() -> int:
items_sold = 4
price_per_item = 7
total_money = items_sold * price_per_item
result = total_money
return result
|
A pizza has 8 slices. If a family of 5 people eats one and a half pizzas, how many slices will each person get? | def solve() -> int:
total_slices = 8 * 1.5
slices_per_person = total_slices / 5
result = slices_per_person
return result
|
Student: John has $600. He spent $300 on rent and then transferred 20% of his remaining money to his friend. How much money does he have left? | def solve() -> int:
money = 600
money_after_rent = money - 300
transfer = 0.2 * money_after_rent
money_left = money_after_rent - transfer
result = money_left
return result
|
Mia is baking a cake that requires two layers of batter. The first layer takes 10 minutes to prepare and 25 minutes to bake. The second layer takes 15 minutes to prepare and 20 minutes to bake. Mia can only bake one layer at a time, but can prepare the second layer while the first one is baking. In minutes, how long di... | def solve() -> int:
preparation_time = 10 + 15
baking_time = 25 + 20
time_saved = min(10, 25)
total_time = preparation_time + baking_time - time_saved
result = total_time
return result
|
There are 5 boxes, each box contains 3 cans. Each can contains 8 cookies. How many cookies are there in total? | def solve() -> int:
num_boxes = 5
num_cans = 3
num_cookies = 8
total_cookies = num_boxes * num_cans * num_cookies
result = total_cookies
return result
|
An Olympic-size swimming pool is 50 meters long, 25 meters wide, and 2 meters deep. How many liters of water are needed to fill the pool? | def solve() -> int:
length = 50
width = 25
depth = 2
liters_per_cubic_meter = 1000
pool_volume = length*width*depth
liters_of_water_needed = pool_volume*liters_per_cubic_meter
result = liters_of_water_needed
return result
|
A furniture store has a 15% discount on a $350 couch and a 20% discount on a $200 table. What is the total price the customer pays? | def solve() -> int:
couch_price = 350
couch_discount = (15/100) * couch_price
table_price = 200
table_discount = (20/100) * table_price
total_price = couch_price - couch_discount + table_price - table_discount
result = total_price
return result
|
A store sells 12 bags of apples for $36. How much does each bag of apples cost? | def solve() -> int:
bags_of_apples = 12
total_cost = 36
cost_per_bag = total_cost / bags_of_apples
result = cost_per_bag
return result
|
Possible new questions and programs: A group of dolphins is called a pod. A marine biologist is studying 8 pods of dolphins in the ocean. Each pod has an average of 12 members and consumes 15 kg of fish per day. How many kilograms of fish are eaten by all the pods in a week? | def solve() -> int:
pods = 8
members = 12
fish = 15
days = 7
dolphins = pods * members
fish_per_day = dolphins * fish
fish_per_week = fish_per_day * days
result = fish_per_week
return result
|
A teacher has 30 students in her class. If the class average grade is 85 and the teacher drops the lowest grade, what is the new class average? | def solve() -> int:
num_students = 30
total_grades = (num_students * 85) - 70
new_avg = total_grades / 29
result = new_avg
return result
|
A crafty artist had a square canvas that was 16 inches on each side. She wanted to paint a circular design on the canvas, using the center of the canvas as the center of the circle. She also wanted the circle to touch the edges of the canvas, so that the canvas was just large enough to fit the circle. What was the radi... | def solve() -> int:
side = 16
diagonal = (side**2 + side**2)**0.5
radius = diagonal / 2
result = radius
return result
|
John travels to work every day using a train. He took the same train for 20 days in March, and the train was on time for 17 of those days. In April, he traveled for 24 days, and the train was on time for 20 of those days. What percent of the time was the train on time during those two months? | def solve() -> int:
march_days = 20
march_on_time = 17
april_days = 24
april_on_time = 20
total_days = march_days + april_days
total_on_time = march_on_time + april_on_time
percent_on_time = total_on_time * 100 / total_days
result = percent_on_time
return result
|
Student: Norm decided to rent a small apartment. The bedroom and living room totaled 300 sq ft and the kitchen was 200 sq ft. If Norm spends 1,500 a month in rent, how much money is he spending per sq ft of house? | def solve() -> int:
bedroom_living_room_sq_ft = 300
kitchen_sq_ft = 200
monthly_rent = 1500
total_sq_ft = bedroom_living_room_sq_ft + kitchen_sq_ft
result = monthly_rent / total_sq_ft
return result
|
Student: Greta wants to buy a new pair of jeans and a new skirt. The jeans cost $50.00 plus a 10% tax and the skirt cost $35.00 plus a 10% tax. What is the total cost for both items? | def solve() -> int:
jeans_price = 50.00
skirt_price = 35.00
tax_rate = 0.1
jeans_tax = jeans_price * tax_rate
skirt_tax = skirt_price * tax_rate
jeans_total = jeans_price + jeans_tax
skirt_total = skirt_price + skirt_tax
total_cost = jeans_total + skirt_total
result = total_cost
... |
Trevor and John each worked on their bike project, using a total of 150 bolts. Trevor used 75 bolts while John used the rest. How many bolts did John use in the project? | def solve() -> int:
totalBolts = 150
trevorBolts = 75
result = totalBolts - trevorBolts
return result
|
A lawn mower can mow 1/4 of a lawn in 30 minutes. How long would it take to mow the entire lawn? | def solve() -> int:
lawn_part_per_time = 1/4
time_for_part = 30
time_for_whole_lawn = time_for_part/lawn_part_per_time
result = time_for_whole_lawn
return result
|
Student: Mr. Bennett bought 10 boxes of cookies. There are 24 cookies in each box. He gave away 6 boxes and ate 2 cookies himself. How many cookies did he give away? | def solve() -> int:
num_boxes = 10
num_cookies_per_box = 24
num_boxes_given_away = 6
num_cookies_eaten = 2
total_num_cookies = num_boxes * num_cookies_per_box
num_cookies_given_away = num_boxes_given_away * num_cookies_per_box
num_cookies_left = total_num_cookies - num_cookies_given_away - n... |
Wes rolled a die for 10 times and got the following numbers: 4, 5, 2, 6, 3, 2, 4, 6, 5, 3. What is the average of his rolls? | def solve() -> int:
roll_1 = 4
roll_2 = 5
roll_3 = 2
roll_4 = 6
roll_5 = 3
roll_6 = 2
roll_7 = 4
roll_8 = 6
roll_9 = 5
roll_10 = 3
result = (roll_1 + roll_2 + roll_3 + roll_4 + roll_5 + roll_6 + roll_7 + roll_8 + roll_9 + roll_10)/10
return result
|
There are 25 students in a class and each student needs 3 pencils for the school year. If each pack of pencils has 10, then how many packs of pencils will the class need? | def solve() -> int:
num_students = 25
num_pencils_per_student = 3
num_pencils_needed = num_students * num_pencils_per_student
num_packs_needed = num_pencils_needed // 10 + 1
result = num_packs_needed
return result
|
A bank requires a certain amount of money in order to open a savings account. The bank requires a minimum deposit of 100 dollars. If James deposits 500 dollars in his account, what is the balance in his account? | def solve() -> int:
min_deposit = 100
james_deposit = 500
balance = min_deposit + james_deposit
result = balance
return result
|
A fiber optic cable is cut in two pieces, one is 4/5 times the length of the other. If the longer piece measures 48 ft, what is the length of the shorter piece? | def solve() -> int:
longer_piece = 48
shorter_piece = 0
shorter_piece = longer_piece * (1 - 4/5)
result = 9.6
return result
|
A baker can make 24 cupcakes in one hour, while a chef can make 36 cupcakes in one hour. They both use the same recipe, which requires 2 eggs, 1 cup of flour, and 1/2 cup of sugar for every 12 cupcakes. If they have 10 eggs, 5 cups of flour, and 3 cups of sugar, how many cupcakes can they make together in one hour? | def solve() -> int:
eggs = 10
flour = 5
sugar = 3
eggs_per_batch = 2
flour_per_batch = 1
sugar_per_batch = 1/2
baker_rate = 24
chef_rate = 36
batches_of_12 = min(eggs/eggs_per_batch, flour/flour_per_batch, sugar/sugar_per_batch)
max_cupcakes = batches_of_12 * 12
baker... |
Eric is planning to make hamburgersIn a factory, every 7 hours, 500 products are sold and 800 are produced. How many total products are exchanged within a day? | def solve() -> int:
hours_per_day = 24
products_sold_per_hour = 500
products_produced_per_hour = 800
products_exchanged_per_hour = products_sold_per_hour + products_produced_per_hour
products_exchanged_per_day = products_exchanged_per_hour * hours_per_day
result = products_exchanged_pe... |
Isabel's new phone costs $800 less than her old computer. She sold her computer for $1200 and used that to pay off some of the cost of her phone. She still needs to pay $600 for her new phone. How much did her old computer cost, in dollars? | def solve() -> int:
old_computer = 1200
new_phone = 600
new_phone_cost = old_computer - new_phone + 800
result = new_phone_cost
return result
|
Mia loves swimming. She burns 350 calories per hour swimming. She swims four times a week for 0.75 hours each time and she does this for 10 weeks. She also burns 150 calories per hour walking to and from the pool. She walks for 0.25 hours each way and she does this for every swim. How many calories does she burn in tot... | def solve() -> int:
calories_swimming = 350
calories_walking = 150
swims_per_week = 4
swim_time = 0.75
walk_time = 0.25
weeks = 10
calories_swimming_total = calories_swimming * swims_per_week * swim_time * weeks
calories_walking_total = calories_walking * swims_per_week *... |
If it takes Mary 90 seconds to run a mile and Jerry 120 seconds to run a mile, how much time in seconds would Mary save running 4 miles than Jerry? | def solve() -> int:
mile_distance = 1
distance = 4
time_mary = mile_distance * 90 * distance
time_jerry = mile_distance * 120 * distance
saving = time_jerry - time_mary
result = saving
return result
|
There is a park, with four sides. On the east side, there are 34 trees. On the north side, there are 19 trees. On the south side, there are 18 trees. How many trees are on the west side? | def solve() -> int:
total_trees = 0
east_trees = 34
north_trees = 19
south_trees = 18
total_trees = east_trees + north_trees + south_trees
west_trees = total_trees - (east_trees + north_trees + south_trees)
result = west_trees
return result
|
Clara is preparing bird feed. Each bird needs 0.4 ounces of food per 1/5 pound of body weight. She has 15 pounds of birds. Each packet of bird feed contains 8 ounces and costs $0.75. How much does it cost to feed the birds? | def solve() -> int:
bird_weight = 1/5
food_per_bird = 0.4
total_bird_weight = 15
packet_size = 8
packet_cost = 0.75
total_food = (total_bird_weight / bird_weight) * food_per_bird
num_packets = total_food / packet_size
num_packets = round(num_packets)
total_cost =... |
The McDonald Army Base has half as many war supplies than the Miller Army Base. If McDonald and Miller have a combined total of 4500 war supplies, how many supplies does McDonald have? | def solve() -> int:
num_suppliesM = 4500
num_suppliesMc = 0.5 * num_suppliesM
total_supplies = num_suppliesM + num_suppliesMc
num_suppliesMc = total_supplies - num_suppliesM
result = num_suppliesMc
return result
|
A square has a perimeter of 24cm. What is the length of one of its sides? | def solve() -> int:
perimeter = 24
side_length = perimeter / 4
result = side_length
return result
|
A school has 60 students. One-fifth of the students are in kindergarten and have 1 crayon each. Half of the remaining students are in first grade and have 3 crayons each. The rest of the students are in second grade and have 5 crayons each. How many crayons are there in the school? | def solve() -> int:
students = 60
crayons_k = (1/5)*students*1
crayons_1 = (1/2)*(students - crayons_k)*3
crayons_2 = (students - (crayons_k + crayons_1))/5
total_crayons = crayons_k + crayons_1 + crayons_2
result = total_crayons
return result
|
Student: Q9: Samantha drives 58 miles to and from work four days a week, and her car has a fuel efficiency of 32 mpg. How many gallons of gas does she use in a week? | def solve() -> int:
miles_per_week = 58 * 4
mpg = 32
gallons_per_week = miles_per_week / mpg
result = gallons_per_week
return result
|
Maria went to a store and bought three different items: a backpack for $25, a pencil for $2, and a notepad for $3. The backpack was 3 times more expensive than the notepad and the pencil was half the price of the notepad. How much did Maria spend? | def solve() -> int:
price_of_backpack = 25
price_of_pencil = 2
price_of_notepad = 3
price_of_notepad_half = price_of_notepad/2
price_of_backpack_notepad_ratio = 3
price_of_notepad = price_of_notepad_half*(2)
price_of_backpack = price_of_backpack_notepad_ratio*(price_of_notepad)
total_pri... |
A rectangular room has length 8 meters and width 5 meters. Find the area of the room in square meters. | def solve() -> int:
length_of_room = 8
width_of_room = 5
area_of_room = length_of_room * width_of_room
result = area_of_room
return result
|
John has 4 times as many CDs as Jane. If Jane has 15 CDs, how many CDs does John have? | def solve() -> int:
cds_jane = 15
cds_john = 4*cds_jane
result = cds_john
return result
|
School supplies for a classroom cost a total of $462. If each student chips in $14, how many students are in the classroom? | def solve() -> int:
num_students = 462 // 14
result = num_students
return result
|
You have 10 apples and 6 oranges in a bag, and the price of 4 apples and 2 oranges together is $13. How much does 1 apple cost? | def solve() -> int:
num_apples = 10
num_oranges = 6
price_apple_orange = 13
cost_apple_orange = price_apple_orange / (4 + 2)
cost_1_apple = cost_apple_orange * (4 / (4 + 2))
result = cost_1_apple
return result
|
A candy store offers a 15% discount on all purchases. If you buy $50 worth of candy, how much will you pay after the discount? | def solve() -> int:
price = 50
discount = 0.15
discount_amount = price * discount
total_price = price - discount_amount
result = total_price
return result
|
Erica runs 800 meters in about 120 seconds. What is her average speed in miles per hour? | def solve() -> int:
distance=800
time=120
speed=distance/time
mph=speed/0.000621371
result = mph
return result
|
Bill has a necklace with 7 beaded shells. 1/3 of these shells are green. How many shells are green? | def solve() -> int:
num_shells = 7
green = 1/3
num_green = num_shells * green
result = num_green
return result
|
A rectangle has a length that is twice the width. If the perimeter is 24, what is the length of the rectangle? | def solve() -> int:
perimeter = 24
width = perimeter / 6
length = 2 * width
result = int(length)
return result
|
Student: A school has 900 desks in total. There are 15% more desks in first grade than in second grade. How many desks are there in first grade? | def solve() -> int:
total_desks = 900
percentage_difference = 15
second_grade_desks = total_desks * (100 - percentage_difference) / 100
first_grade_desks = total_desks - second_grade_desks
result = first_grade_desks
return result
|
Amy had 12 stickers in her album. She bought 8 more stickers and traded 4 stickers with her friend. Her friend gave her 6 stickers in exchange. How many stickers did Amy have in her album after the trade? | def solve() -> int:
stickers = 12
stickers = stickers + 8
stickers = stickers - 4
stickers = stickers + 6
result = stickers
return result
|
Kate and Olivia went to the mall and bought some jewelry. Kate bought twice as many necklaces as Olivia did. In total, they spent $120 on jewelry. If Olivia spent $40, how much did Kate spend on necklaces? | def solve() -> int:
olivia_spent = 40
kate_necklaces = 2 * olivia_spent
total_spent = olivia_spent + kate_necklaces
result = total_spent - 120
return result
|
A train is traveling at a speed of 45 mph. If it travels for 2.5 hours, how far does the train go? | def solve() -> int:
train_speed = 45
travel_time = 2.5
distance = train_speed*travel_time
result = distance
return result
|
am and Ben are collecting marbles for a game. Sam has 120 marbles at the start, and he gives away 15 marbles to each of his 4 friends. Ben has 80 marbles at the start, and he gets 20 marbles from each of his 3 friends. How many more marbles does Ben have than Sam at the end? | def solve() -> int:
sam_marbles_start = 120
sam_marbles_given = 15
sam_friends = 4
ben_marbles_start = 80
ben_marbles_received = 20
ben_friends = 3
sam_marbles_end = sam_marbles_start - sam_marbles_given * sam_friends
ben_marbles_end = ben_marbles_start + ben_marbles_received * ben_... |
John has a rectangular garden that is 8ft long and 5ft wide. He wants to plant flowers in 1/4 of the garden. How many square feet of garden will he plant flowers in? | def solve() -> int:
garden_length = 8
garden_width = 5
total_garden_area = garden_length * garden_width
flowers_area = total_garden_area/4
result = flowers_area
return result
|
Ruby works as a graphic designer and also sells homemade candles on Etsy. She makes $30 per hour doing graphic design work and $8 per candle sold. If Ruby works for 22 hours as a graphic designer and sells 15 candles, how much money does she make? | def solve() -> int:
hourly_rate_design = 30
hourly_rate_candle = 8
hours_worked = 22
candles_sold = 15
money_from_design = hourly_rate_design * hours_worked
money_from_candles = hourly_rate_candle * candles_sold
total_money = money_from_design + money_from_candles
result =... |
Sarah can knit a sweater in 6 hours and a scarf in 3 hours. How long will it take her to knit 2 sweaters and 4 scarfs? | def solve() -> int:
sweater_time = 6
scarf_time = 3
num_sweaters = 2
num_scarfs = 4
total_sweater_time = num_sweaters * sweater_time
total_scarf_time = num_scarfs * scarf_time
total_time = total_sweater_time + total_scarf_time
result = total_time
return result
|
A rectangular garden has a length of 10 feet and a width of 6 feet. If the garden is fenced around the perimeter, how many feet of fence are needed? | def solve() -> int:
length = 10
width = 6
perimeter = 2 * length + 2 * width
result = perimeter
return result
|
Thomas bought a package of 72 crayons for $9. If he sells each crayon for 20 cents, how many crayons will he have to sell to break even? | def solve() -> int:
crayons_bought = 72
cost = 9
cost_per_crayon = cost / crayons_bought
price_per_crayon = 0.20
crayons_to_break_even = cost / (price_per_crayon - cost_per_crayon)
result = int(crayons_to_break_even)
return result
|
A boatman goes 9 km downstream in 36 minutes and comes back in 54 minutes. What is the speed of the boat and the speed of the water current? | def solve() -> int:
distance = 9
time_1 = 36/60
time_2 = 54/60
speed_down = distance/time_1
speed_up = distance/time_2
boat_speed = (speed_down + speed_up)/2
current_speed = (speed_down - boat_speed)
result = boat_speed, current_speed
return result
|
Samantha wants to motivate her classmates to attend her study group by offering them pencils. For each hour they stay, they will receive 1 pencil. On average, Samantha's study group lasts for 3 hours. She has $15 to spend on pencils, and each box of pencils contains 25 pencils and costs $2. How many study sessions can ... | def solve() -> int:
hours_per_session = 3
total_money = 15
pencils_per_box = 25
cost_per_box = 2
pencils_available = total_money // cost_per_box * pencils_per_box
study_sessions = pencils_available // hours_per_session
result = study_sessions
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.