question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
In a town fair, there were 200 people in a fun ride. 50 of them went to grab some food, and then 10 new people joined in for the ride. Half of the people who went to eat didn't come back. 2 more new people joined in for the ride. 40 more people left after the ride. Then half of the remaining people left. How many peopl... | def solve() -> int:
people_in_ride = 200
people_went_to_eat = 50
new_people_joined = 10
people_who_came_back = people_went_to_eat / 2
new_people_joined_2 = 2
people_left_after_ride = 40
remaining_people = people_in_ride - people_went_to_eat + people_who_came_back + new_people_joined - people... |
If a chef can cook 6 dishes in an hour, how many dishes can she cook in 4 hours of work? | def solve() -> int:
dishes_per_hour = 6
hours_of_work = 4
total_dishes = dishes_per_hour * hours_of_work
result = total_dishes
return result
|
A book has 120 pages. If each chapter has 12 pages, how many chapters does the book have? | def solve() -> int:
num_of_pages = 120
num_of_pages_per_chapter = 12
num_of_chapters = num_of_pages // num_of_pages_per_chapter
result = num_of_chapters
return result
|
Jason can solve 20 math problems in 30 minutes when he is alert, but when he is feeling tired, he can only solve 8 math problems in 30 minutes. If Jason practices for 2 hours every day, and he is alert for 5 days and tired for 2 days this week, how many math problems did he solve in total? | def solve() -> int:
alert_problems_per_30mins = 20
tired_problems_per_30mins = 8
practice_hours_per_day = 2
alert_days = 5
tired_days = 2
total_alert_problems = alert_problems_per_30mins * (practice_hours_per_day * 60 / 30) * alert_days
total_tired_problems = tired_problems_per_30mins *... |
Student: Patrick has a recipe that needs 3 cups of sugar and 2 cups of butter to make. If he is out of butter, how many cups of sugar does he need in order to make the recipe? | def solve() -> int:
sugar = 3
butter = 2
result = sugar * butter
return result
|
Mary cooks for 20 minutes every morning and evening and spends one-third of an hour cleaning up her kitchen. How many minutes does Mary spend on cooking and cleaning each day? | def solve() -> int:
cooking_time = 20
cleaning_time = 1/3 * 60
total_time = (cooking_time * 2) + cleaning_time
result = total_time
return result
|
Sarah rides her bike for 15 kilometers every day for the first 180 days of the year. For the remaining days of the year, she doubles her cycling distance to 30 kilometers per day. What is her total cycling distance for the year? | def solve() -> int:
days_in_year = 365
first_half_days = 180
second_half_days = days_in_year - first_half_days
first_half_distance = 15 * first_half_days
second_half_distance = 30 * second_half_days
total_distance = first_half_distance + second_half_distance
result = total_dis... |
A bakery sold two cakes for $64. If the cost of the first cake is $29 more than the second, what is the cost of the first cake? | def solve() -> int:
cost_of_second_cake = 0
cost_of_first_cake = 0
cost_of_second_cake = (64 - 29) / 2
cost_of_first_cake = cost_of_second_cake + 29
result = cost_of_first_cake
return result
|
A box contains 12 red balls and 18 blue balls. If one ball is drawn randomly, what is the probability of getting a blue ball? | def solve() -> int:
total_balls = 30
blue_balls = 18
probability_of_getting_blue_ball = blue_balls/total_balls
result = probability_of_getting_blue_ball
return result
|
In a library, 50% of the books are non-fiction. If there are 1000 books in the library, how many books are fiction? | def solve() -> int:
total_books = 1000
non_fiction_books = total_books * 0.5
fiction_books = total_books - non_fiction_books
result = fiction_books
return result
|
Student: Sheryl has 90 stickers. She wants to give 5 of them to each of her 19 classmates. How many stickers are left? | def solve() -> int:
stickers = 90
classmates = 19
stickers_given = 5 * classmates
stickers_left = stickers - stickers_given
result = stickers_left
return result
|
You want to buy 4 shirts that cost $12 each and a pair of pants that costs $30. What is the total cost of your purchase? | def solve() -> int:
shirt_cost = 12
num_shirts = 4
pants_cost = 30
total_cost = (shirt_cost * num_shirts) + pants_cost
result = total_cost
return result
|
If a painter can paint a room in 3 hours, and there are 12 rooms in a building, how many painters are needed to paint all the rooms in 2 days? | def solve() -> int:
hours_per_room = 3
total_rooms = 12
days = 2
total_hours = hours_per_room * total_rooms
hours_in_2_days = 24 * days
painters_needed = total_hours / hours_in_2_days
result = painters_needed
return result
|
Grace wants to save up $500 for a new phone. She already has $200 saved up and decides to save $20 every week. How many weeks will it take for her to save enough money for the phone? | def solve() -> int:
total_savings = 500
current_savings = 200
weekly_savings = 20
weeks_needed = (total_savings - current_savings) / weekly_savings
result = weeks_needed
return result
|
The perimeter of a square is 24 centimeters. What is the area of the square? | def solve() -> int:
perimeter = 24
sideLength = perimeter /4
area = sideLength*sideLength
result = area
return result
|
A restaurant sold 120 hamburgers, 85 hot dogs, 50 sandwiches, 30 plates of pasta, and 25 salads in one day. If a hamburger takes 5 minutes to cook, a hot dog 3 minutes, sandwich 4 minutes, pasta 6 minutes, and a salad takes 2 minutes to prepare, how many hours did the restaurant spend cooking? | def solve() -> int:
burgers_time = 120 * 5 / 60
hot_dogs_time = 85 * 3 / 60
sandwiches_time = 50 * 4 / 60
pasta_time = 30 * 6 / 60
salads_time = 25 * 2 / 60
total_time = burgers_time + hot_dogs_time + sandwiches_time + pasta_time + salads_time
result = total_time/60
return result
|
A car travels 200km in 4 hours. What is the average speed of the car? | def solve() -> int:
distance = 200
time = 4
speed = distance / time
result = speed
return result
|
A board game costs $24.99 and is on sale for 20% off. What is the sale price of the board game? | def solve() -> int:
original_price = 24.99
percent_off = 20
amount_off = original_price * (percent_off / 100)
sale_price = original_price - amount_off
result = sale_price
return result
|
A pizza shop charges $15.00 for a large pizza that has 8 slices. They also have a deal where you can buy 3 large pizzas for $40.00. How much do you save per slice if you buy the deal instead of the regular price? | def solve() -> int:
regular_price = 15 / 8
deal_price = 40 / (3 * 8)
price_diff = regular_price - deal_price
result = round(price_diff, 2)
return result
|
Liam is shopping for a new camera and has two choices. The first camera is $1,000, and the second camera is 3 times more expensive than the first camera. How much would Liam have to pay if he decides to buy both cameras? | def solve() -> int:
first_camera_price = 1000
second_camera_price = 3 * first_camera_price
total_price = first_camera_price + second_camera_price
result = total_price
return result
|
The expense ratios of two competing mutual funds are 1.30% and 1.50%. If both funds had an average annual return of 6%, how much more money would investors make in a year by investing in the first fund with a ratio of 1.30%? | def solve() -> int:
expense_ratio1 = 1.3 / 100
expense_ratio2 = 1.5/100
annual_return = 6/100
gain_difference = (annual_return - expense_ratio1) - (annual_return - expense_ratio2)
result = gain_difference
return result
|
- Lily read four times as many pages as Ryan. Ryan read 15 fewer pages than Max. Max read 75 pages of a novel. How many pages did Lily read? | def solve() -> int:
max = 75
ryan = max - 15
lily = 4 * ryan
result = lily
return result
|
The length of a rectangle is 3 times the width. The width of the rectangle is 8 meters. If the area of the rectangle is 240 square meters, what is the length of the rectangle? | def solve() -> int:
width = 8
length = 3 * width
area = width * length
result = length
return result
|
A recipe calls for 2 1/3 cups of flour to make 24 cookies. How much flour is needed to make 60 cookies? | def solve() -> int:
flour_per_cookie = 2.33 / 24
flour_needed = flour_per_cookie * 60
result = round(flour_needed,2)
return result
|
A grocery store bought 500 bananas for the week. If the bananas sell at a rate of 25 per day, how many days will it take to sell all the bananas? | def solve() -> int:
num_of_bananas = 500
bananas_per_day = 25
days_to_sell = num_of_bananas // bananas_per_day
result = days_to_sell
return result
|
Leila baked 48 muffins for a bake sale. She sold 36 muffins for $0.75 each and gave away the rest to her friends. How much money did she make from the bake sale? | def solve() -> int:
baked = 48
sold = 36
given = baked - sold
price = 0.75
revenue = sold * price
result = revenue
return result
|
Ethan picked 18 acorns from the park. The next day, he picked 4 more, and on the third day, he picked half as many as the total number he collected from the first two days. How many acorns does Ethan have? Samantha slices a single pineapple into 30 sections, and each section contains 12 red berries and 18 yellow berrie... | def solve() -> int:
day1 = 18
day2 = day1 + 4
day3 = (day1 + day2) / 2
total_acorns = day1 + day2 + day3
sections = 30
red_ber = 12
yellow_ber = 18
total_ber = sections * (red_ber + yellow_ber)
result = total_acorns + total_ber
return result
|
If Dave can run a mile in 10 minutes, how many miles can he run in an hour? | def solve() -> int:
time_per_mile = 10
minutes_in_hour = 60
result = minutes_in_hour // time_per_mile
return result
|
If a box weighs 18 kilograms when empty and 22 kilograms when filled with sand, how much does the box weigh when filled with 10 pounds of rocks? | def solve() -> int:
weight_of_box_empty = 18
weight_of_box_full_sand = 22
mass_of_rocks = 10
mass_of_rocks_kg = mass_of_rocks / 2.2
result = weight_of_box_empty + weight_of_box_full_sand + mass_of_rocks_kg
return result
|
A water tank can hold 240 liters of water. It is currently filled to 80% of its capacity. How many liters of water need to be drained out so that the tank is only 60% full? | def solve() -> int:
water_at_80 = 240 * 0.8
water_at_60 = 240 * 0.6
water_to_drain = water_at_80 - water_at_60
result = water_to_drain
return result
|
If a hawk is laying 6 eggs, and about 50% of them are lost, how many will be left? | def solve() -> int:
eggs = 6
loss_percentage = 0.5
lost_eggs = eggs * loss_percentage
remaining_eggs = eggs - lost_eggs
result = remaining_eggs
return result
|
Mike is taking a 902 mile road trip to see his family. He drives an average speed of 58 miles per hour and stops for 5 minutes per 2 hours of driving. His car gets 19 miles per gallon, and it takes him 10 minutes to fill up his tank when it runs out. He starts out with a full tank of gas. How many gallons of gas will h... | def solve() -> int:
miles = 902
miles_per_hour = 58
stop_time = 5
miles_per_gallon = 19
hours_on_trip = 902 / 58
gallons_used_on_trip = (hours_on_trip + stop_time/60)/19
result = gallons_used_on_trip
return result
|
Tina can paint 2 murals with 5 gallons of paint. How much paint does she need to paint 8 murals and 12 canvases? | def solve() -> int:
murals_per_gallon = 2
gallons_needed = 5
total_murals = 8
total_canvases = 12
total_paint_needed = (total_murals + total_canvases) / murals_per_gallon * gallons_needed
result = total_paint_needed
return result
|
Jack loves to paint and paints at the same rate every ten days. He paints 3 canvases on the first day, then doubles that number of canvases on the second day. On the third day, he quadruples the number of canvases he painted on the second day. How many canvases would Jack have painted if he continued to paint for 30 da... | def solve() -> int:
day1 = 3
day2 = day1 * 2
day3 = day2 * 4
rate = day1 + day2 + day3
total_canvases = (rate * 3) + day1 + day2
result = total_canvases
return result
|
Ethan runs 4 laps around a track, and each lap takes 2 minutes to complete. If Ethan runs for 30 minutes, how many laps did he complete? | def solve() -> int:
laps = 30 / 2
result = laps
return result
|
A ticket to the zoo costs $10. The cost of a souvenir is 50% of the cost of the ticket and a snack costs 20% of the cost of the souvenir. A family of four bought 4 tickets, 2 souvenirs, and 4 snacks. How much did they spend? | def solve() -> int:
ticket = 10
souvenir = 0.5 * ticket
snack = 0.2 * souvenir
total = 4 * ticket + 2 * souvenir + 4 * snack
result = total
return result
|
If Sam has 10 apples and gives 2 to John and 3 to Jill, how many apples are left with Sam? | def solve() -> int:
sam_apples = 10
john_apples = 2
jill_apples = 3
total_given = john_apples + jill_apples
apples_left = sam_apples - total_given
result = apples_left
return result
|
If a cube has a volume of 27 cubic meters, what is the length of one of its edges? | def solve() -> int:
volume = 27
edge = volume**(1/3)
result = edge
return result
|
-The numbers in the questions should be integers between 1 and 1000, and should be different for each question. -The questions should involve **at least two different operations** among addition, subtraction, multiplication, division, or finding fractions or percentages of quantities. -The questions should involve **at... | def solve() -> int:
total_rows = 432 // 12
rows_per_color = total_rows // 3
pencils_per_color = rows_per_color * 12
black_pencils_given = pencils_per_color // 3
result = black_pencils_given
return result
|
A car repair shop can fix up to 20 cars in one week. Last week they fixed 16 cars. If they charge an average of $450 per car, how much money did they earn last week? | def solve() -> int:
max_cars = 20
cars_fixed = 16
average_charge = 450
total_earnings = cars_fixed * average_charge
result = total_earnings
return result
|
Kate has $30 and wants to buy three different candy sticks. Each candy stick is sold at $5. How much money will Kate have left after buying the three candy sticks? | def solve() -> int:
total = 30
sticks = 3
price = 5
remaining = total - (sticks * price)
result = remaining
return result
|
A baseball team has played 70 games and has a win percentage of 62%. How many games have they won? | def solve() -> int:
total_games = 70
win_percentage = 0.62
games_won = total_games * win_percentage
result = games_won
return result
|
A couple went to a fancy restaurant and their bill came to $120. The gentleman offered to pay two-thirds of the bill, while the lady would pay for the remaining amount. If they left a 25% tip, how much will the lady pay in total? | def solve() -> int:
bill = 120
gentleman_payment = (2/3) * bill
tip = 0.25 * bill
lady_payment = bill - gentleman_payment + tip
result = lady_payment
return result
|
Jane and Jack shared a pizza. Jane ate twice as many pieces as Jack. If Jane ate 6 pieces of pizza, how many pieces did Jack eat? | def solve() -> int:
total_pieces_jane = 6
pieces_jack = total_pieces_jane / 2
result = pieces_jack
return result
|
A movie theater has a profit of $500 per screening. If they screened a movie for 8 days and made a total profit of $8000, how many screenings did they have each day? | def solve() -> int:
profit_per_screening = 500
total_profit = 8000
days = 8
screens_per_day = total_profit/(profit_per_screening*days)
result = screens_per_day
return result
|
Joe decided to make a quilt for his grandmother for her birthday. He cut 9 squares from one fabric, 12 squares from a different fabric, and 15 squares from a third fabric. How many squares did he cut altogether? | def solve() -> int:
squares1 = 9
squares2 = 12
squares3 = 15
total = squares1 + squares2 + squares3
result = total
return result
|
A car's original price was $25,000, but it got reduced by 15%. What is its selling price? | def solve() -> int:
original_price = 25000
reduction_percentage = 15
reduction_amount = original_price * (reduction_percentage / 100)
selling_price = original_price - reduction_amount
result = selling_price
return result
|
If gas costs $2.50 per gallon and a car holds 12 gallons, how much does it cost to fill up the tank? John had 20 apples and 15 oranges. If he gives away 5 apples and 3 oranges, how many fruits does he have left? | def solve() -> int:
gas_cost = 2.50
car_capacity = 12
total_cost = gas_cost * car_capacity
result = total_cost
apples = 20
oranges = 15
given_apples = 5
given_oranges = 3
remaining_apples = apples - given_apples
remaining_oranges = oranges - given_oranges... |
The 2 sides of a rectangle have a ratio of 2:5. If the smaller side has a length of 4 cm, what is the perimeter of the rectangle? | def solve() -> int:
smaller_side = 4
larger_side = 5 / 2 * smaller_side
perimeter = 2 * (smaller_side + larger_side)
result = perimeter
return result
|
Peter buys a car for $25,000. He buys a second car that is half that price and sells the first one for one third of its value. How much money does he lose? | def solve() -> int:
car_price = 25000
second_car_price = car_price / 2
money_from_selling_first_car = car_price / 3
money_lost = car_price - money_from_selling_first_car - second_car_price
result = money_lost
return result
|
Vanessa has a job that pays $20 per hour. She works 8 hours per day and gets paid weekly. If she took a week off and missed 3 days of work, how much money will she lose? | def solve() -> int:
hourly_rate = 20
hours_per_day = 8
days_per_week = 7
total_hours_worked = (days_per_week - 3) * hours_per_day
total_money_earned = total_hours_worked * hourly_rate
result = total_money_earned
return result
|
Malik works 40 hours per week in a retail store making $12/hour. He also works a part-time job 10 hours a week making $15/hour. Malik spent $100 on groceries and $50 on rent this week. How much money did Malik make this week after his expenses? | def solve() -> int:
fullTimeHours = 40
fullTimePayRate = 12
partTimeHours = 10
partTimePayRate = 15
groceryExpenses = 100
rentExpenses = 50
fullTimePay = fullTimeHours * fullTimePayRate
partTimePay = partTimeHours * partTimePayRate
totalEarnings = fullTimePay + partTimePay
t... |
Student: Emma purchased 12 pencils and 15 pens from the store. How many items did she buy in total? | def solve() -> int:
pencils = 12
pens = 15
total_items = pencils + pens
result = total_items
return result
|
A pool is 20 feet long, 15 feet wide, and 5 feet deep. How much water is needed to fill the pool? | def solve() -> int:
length = 20
width = 15
depth = 5
water = length * width * depth
result = water
return result
|
A company wants to increase its sales by 15%. If their current sales are $50,000, what is their new target? | def solve() -> int:
increase_amount = 50000 * 0.15
new_target = 50000 + increase_amount
result = new_target
return result
|
A store sell 6 candy bars for $2.40. How much would you pay for 15 candy bars? | def solve() -> int:
candy_bars = 15
price = 2.40/6
total_price = price * candy_bars
result = total_price
return result
|
If a baker makes 36 cupcakes in 45 minutes, how many cupcakes can he make in 3 hours? | def solve() -> int:
batches = 3 * 60 / 45
cupcakes = batches * 36
result = cupcakes
return result
|
A teacher can correct 40 exams (each exam consisting of 5 questions) in 2 hours. If each exam consists of 6 questions instead, how many exams can the teacher correct in 1 hour? | def solve() -> int:
num_questions_per_exam = 5
num_exams = 40
num_hours = 2
num_questions_per_exam_new = 6
num_hours_new = 1
num_exams_new = (num_exams * num_hours_new * num_questions_per_exam_new) / (num_questions_per_exam * num_hours)
result = num_exams_new
return result... |
Jacob walked 8 km in 1 hour. How long would it take him to walk 15 km, assuming he maintains the same speed throughout the journey? | def solve() -> int:
distance = 15 - 8
speed = distance / 8
time = distance / speed
result = time
return result
|
A car can travel 440 kilometers with a full tank of gas. If the car has already traveled 220 kilometers, what percentage of gas is left in the tank? | def solve() -> int:
total_distance = 440
distance_traveled = 220
distance_left = total_distance - distance_traveled
percentage_left = distance_left / total_distance * 100
result = percentage_left
return result
|
A train travels from A to B in 12 hours. If it travels back from B to A in 16 hours, what is the total time in hours for the round trip? | def solve() -> int:
total_time = 0
time_to_go = 12
time_to_come = 16
total_time = time_to_go + time_to_come
result = total_time
return result
|
A plate of six slices of bread was left out in the sun and is slowly melting. Every time a slice melts the remaining slices melt eleven times as fast as the previous one. How many times faster than the first slice does the last slice’s remains melt? | def solve() -> int:
first_slice = 1
last_slice = 6
melting_speed_ratio = last_slice / first_slice
remaining_melting_speed_ratio = melting_speed_ratio ** (last_slice - 1)
result = remaining_melting_speed_ratio
return result
|
John has a pencil collection. Every month, he would buy new pencils to add to his collection. After 3 years, his collection contained 120 pencils. If he added twice the number of pencils he did the previous year, how many pencils did he add the first year? | def solve() -> int:
years = 3
total_pencils = 120
pencils_added_last_year = total_pencils // 3
pencils_added_two_years_ago = pencils_added_last_year // 2
pencils_added_three_years_ago = total_pencils - pencils_added_last_year - pencils_added_two_years_ago
result = pencils_added_three_y... |
Emma has 15 pencils. She gives 3 pencils to her friend and then buys 8 more. How many pencils does Emma have now? | def solve() -> int:
pencils = 15
pencils -= 3
pencils += 8
result = pencils
return result
|
Last year, Jake was twice as old as Sam. If Sam is going to be 28 next year, how old is Jake now? | def solve() -> int:
sam_age_next_year = 28
jake_age_last_year = 2 * sam_age_next_year - 1
jake_age_now = jake_age_last_year + 1
result = jake_age_now
return result
|
Marco has a rectangular garden that is 24 meters long and 18 meters wide. He wants to plant flowers along the perimeter of the garden, leaving 2 meters of space between the flowers and the fence. He can plant one flower every 0.5 meters. How many flowers does he need to buy? | def solve() -> int:
length_inner = 24 - 2 * 2
width_inner = 18 - 2 * 2
perimeter_inner = 2 * (length_inner + width_inner)
flowers_per_meter = 1 / 0.5
flowers = perimeter_inner * flowers_per_meter
result = flowers
return result
|
A pool has a volume of 500 cubic meters. If the pool is 5 meters wide and 10 meters long, how deep is the pool? | def solve() -> int:
width = 5
length = 10
volume = 500
depth = volume / (width * length)
result = depth
return result
|
Some possible questions and programs are: Harry bought 6 packs of stickers. Each pack had 12 stickers. He gave 4 stickers to each of his 8 friends. How many stickers did he have left? | def solve() -> int:
total_stickers = 6 * 12
given_stickers = 4 * 8
remaining_stickers = total_stickers - given_stickers
result = remaining_stickers
return result
|
John, Mike and Tim went to a fair with their sister. John won 10 stuffed animals, Mike won 8 and Tim won 5. On their way back, the sister bought another 21 stuffed animals and gave 4 to John, 7 to Mike and the rest to Tim. How many more stuffed animals does Tim have now than John? | def solve() -> int:
john_wins = 10
mike_wins = 8
tim_wins = 5
sister_buys = 21
john_got = 4
mike_got = 7
total_john = john_wins + john_got
total_mike = mike_wins + mike_got
total_tim = tim_wins + (sister_buys - john_got - mike_got)
difference = total_tim - total_jo... |
Student: A certain family buys fruits and vegetables from two stores. They conclude that in average, they spent 40% of their grocery budget on fruits and 60% of their budget on vegetables. If they spent $400 USD on fruits and vegetables combined, how much money did they spend on fruits? | def solve() -> int:
total_budget = 400
fruits_percentage = 40
fruits_budget = total_budget * fruits_percentage / 100
result = fruits_budget
return result
|
A box contains 48 pencils. There are 8 pencils in each pack. How many packs of pencils are in the box? | def solve() -> int:
pencils_per_pack = 8
total_pencils = 48
packs_of_pencils = total_pencils // pencils_per_pack
result = packs_of_pencils
return result
|
A printer can print 10 pages per minute. If you have a 40-page report, how long will it take to print the report? | def solve() -> int:
report_size = 40
ppm = 10
time_in_minutes = report_size / ppm
result = time_in_minutes
return result
|
Student: In a math competition, there are 30 questions worth 5 points each, and 20 questions worth 8 points each. If a contestant answered every question correctly, what is his total score? | def solve() -> int:
num_5_points = 30
num_8_points = 20
total_score = num_5_points * 5 + num_8_points * 8
result = total_score
return result
|
A tank can hold 500 liters of water. If 100 liters of water are added to the tank, what is the percentage of increase in water level in the tank? | def solve() -> int:
original_percent_full = 100 * (0.0 + 100) / 500
new_percent_full = 100 * (100.0 + 100) / 500
percent_increase = new_percent_full - original_percent_full
result = f'{percent_increase}%'
result = percent_increase
return result
|
A basketball team scored a total of 360 points in a season. If the team played 30 games, what was their average score per game? | def solve() -> int:
total_points = 360
games_played = 30
average_score_per_game = total_points/games_played
result = average_score_per_game
return result
|
9. Gloria is baking 12 muffins and each requires 1/2 cup of chocolate chips. How many cups of chocolate chips will she need? | def solve() -> int:
muffins_to_make = 12
chocolate_chips_per_muffin = 0.5
total_chocolate_chips = muffins_to_make * chocolate_chips_per_muffin
result = total_chocolate_chips
return result
|
Rachel has 6 books and buys 3 more at the store. She reads 2 books on Monday and then reads 1 more than double the amount she read the day before each following day. How many books does Rachel read on Friday? | def solve() -> int:
books = 6
books += 3
books_read = 2
books_read += 1+(2*books_read)
books_read += 1+(2*books_read)
books_read += 1+(2*books_read)
result = books_read
return result
|
Naomi made a total of $8,500 working as a florist and a cashier. She sold flowers three times as often as she worked as a cashier. She worked as a cashier twice as often as she watered plants. If Naomi made $400 watering plants, how much did she make selling flowers? | def solve() -> int:
total_income = 8500
cashier_income = total_income / 5
plant_income = 400
flower_income = total_income - cashier_income - plant_income
result = flower_income
return result
|
Mia sold 80% of her lemonade for $2 per cup. She made a total of $320 from the lemonade sales. How many cups of lemonade did she make in total? | def solve() -> int:
total_revenue = 320
price_per_cup = 2
percentage_sold = 0.8
cups_sold = total_revenue / price_per_cup
total_cups = cups_sold / percentage_sold
total_cups = round(total_cups)
result = total_cups
return result
|
A store has 100 books and 60 pens. If every book costs twice as much as every pen, how much revenue will be earned if all the books and pens are sold? | def solve() -> int:
num_books = 100
num_pens = 60
price_ratio = 2
total_spent_on_pens = num_pens * 1
total_spent_on_books = num_books * (1 * price_ratio)
total_revenue = total_spent_on_books + total_spent_on_pens
result = total_revenue
return result
|
Betty has 12 candies in her bag. She eats two of them and then shares the rest equally with her two sisters. Her sisters each have four chocolates and eight marshmallows in their bags. How many candies, chocolates, and marshmallows do the three sisters have altogether? | def solve() -> int:
betty_candies = 12 - 2
betty_candies = betty_candies // 3
sister_candies = betty_candies
sister_chocolates = 4
sister_marshmallows = 8
total_candies = betty_candies + 2 * sister_candies
total_chocolates = 3 * sister_chocolates
total_marshmallows = 3 * sister_marshmal... |
A soccer team played 10 games in a season. They won 3, lost 4, and tied 3. What percentage of their games did they win? | def solve() -> int:
total_games = 10
won_games = 3
win_percent = (won_games / total_games) * 100
result = win_percent
return result
|
A nickel has the same value as 5 pennies and a quarter has the same value as 5 nickels. How many pennies will Emma have by exchanging her 18 nickels and 10 quarters? | def solve() -> int:
nickel = 5
quarter = nickel * 5
pennies_from_nickels = nickel * 18
pennies_from_quarters = quarter * 10
total_pennies = pennies_from_nickels + pennies_from_quarters
result = total_pennies
return result
|
A teacher is grading assignments. There are 10 assignments, each assignment is worth 100 points except for the last assignment which is worth 25 points more. If there are 30 students in the class and each student gets an average of 80 points, what is the total grade the class gets? | def solve() -> int:
num_assignments = 10
points_per_assignment = 100
last_assignment_bonus = 25
num_students = 30
average_points = 80
total_points = (num_assignments - 1) * points_per_assignment + (points_per_assignment + last_assignment_bonus)
class_grade = num_students * average_point... |
Aaron has some blocks. If he has 12 blocks in eight steps, how many blocks does he have in total? | def solve() -> int:
total_blocks = 12 * 8
result = total_blocks
return result
|
Chloe has three times as many crayons as Madison does. Ava has nine times as many crayons as Madison. If Ava has 45 crayons, how many crayons does Chloe have? | def solve() -> int:
madison_crayons = 45/9
chloe_crayons = 3*madison_crayons
result = chloe_crayons
return result
|
acy saved $14 in August, $46 in September, and $30 in October. Then Stacy spent $54 on movies and $33 on food. Stacy’s mom said she would give her $22 if she saves more than $130. How much money does Stacy have left? | def solve() -> int:
amount_saved = 14+46+30
spent = 54+33
total = amount_saved - spent
if total > 130:
total += 22
result = total
return result
|
In a store, the ratio of hats to t-shirts is 2 to 3. How many hats are there if there are 12 t-shirts? | def solve() -> int:
t_shirts = 12
ratio = 2 / 3
hats = t_shirts * ratio
result = hats
return result
|
A store has 500 items in stock. If they sell 125 items and restock with 300 more items, how many items do they have now? | def solve() -> int:
items_in_stock = 500
items_sold = 125
new_items = 300
total_items = items_in_stock - items_sold + new_items
result = total_items
return result
|
Emma runs 5k in 30 minutes. What is her average speed in km per hour? | def solve() -> int:
distance_in_km = 5
time_in_hours = 0.5
avg_speed = distance_in_km / time_in_hours
result = avg_speed
return result
|
Kira bought 8 books from an online store. Each book cost $18, but she got a 20% discount on the total price. She also had to pay a $5 shipping fee and a 7% sales tax. How much did Kira pay in total? | def solve() -> int:
original_price = 8 * 18
discounted_price = original_price * 0.8
shipping_fee = 5
sales_tax = (discounted_price + shipping_fee) * 0.07
total = discounted_price + shipping_fee + sales_tax
result = total
return result
|
Maria is a cashier who works at the supermarket every day. It takes her 5 minutes to find her parking spot and another 3 minutes to get to the entrance. Two days of the week, it takes her 25 minutes to count the cash, and the other three days she only needs 15 minutes. How much time does she spend on all these activiti... | def solve() -> int:
parking_time = 5
entrance_time = 3
count_cash_time_2_days = 25
count_cash_time_3_days = 15
total_time = parking_time + entrance_time + (count_cash_time_2_days * 2) + (count_cash_time_3_days * 3)
result = total_time
return result
|
A recipe calls for 3/4 cups of sugar to make 12 cookies. If you want to make 30 cookies, how much sugar do you need? | def solve() -> int:
sugar_per_cookie = 3/4
cookies_needed = 30
total_sugar_needed = sugar_per_cookie * cookies_needed / 12
result = total_sugar_needed
return result
|
Student: The sum of the ages of Nick and Tony is 57 years. If Nick will be twice Tony's age 10 years from now, calculate Tony's age now. | def solve() -> int:
nick_age = 0
tony_age = 0
total_age = nick_age + tony_age
total_age = 57
tony_age = total_age - nick_age
nick_age = total_age - tony_age
nick_age_10_years_later = nick_age + 10
tony_age_10_years_later = tony_age + 10
tony_age = nick_age_10_years_later - (2 * tony_... |
A rectangular garden has a width of 10 meters and a perimeter of 80 meters. What is the length of the garden? | def solve() -> int:
width = 10
perimeter = 80
length = (perimeter - 2 * width) / 2
result = length
return result
|
Samantha and Peter are both reading books. Samantha reads a certain number of pages and Peter reads 10 pages less. If they read a total of 150 pages, how many pages did Peter read? | def solve() -> int:
samantha_pages = 75
peter_pages = samantha_pages - 10
total_pages = samantha_pages + peter_pages
result = peter_pages
return result
|
A car travel 800 miles in 12 hours and 20 minutes. What was the car's speed in miles per hour? | def solve() -> int:
result = 0
Distance = 800
HoursNumber = 12
MinutesNumber = 20
TotalTime = HoursNumber + MinutesNumber/60
result = Distance/TotalTime
result = 60
return result
|
At the Tasty Thai restaurant, Max bought two bowls of pad thai at $12 each and six orders of spring rolls, at $4 each, and a Thai iced tea, for $3. He left a 25% tip. How much did the meal cost Max, with tax, in dollars? | def solve() -> int:
pad_thai_price = 12
spring_roll_price = 4
iced_tea_price = 3
num_pad_thai = 2
num_spring_rolls = 6
subtotal = (pad_thai_price * num_pad_thai) + (spring_roll_price * num_spring_rolls) + iced_tea_price
tip = subtotal * 0.25
total_cost = subtotal + tip
... |
John got paid $200. He gave $100 to his friend and spent $45 on groceries. How much money does John have left? | def solve() -> int:
income = 200
gift = 100
groceries = 45
left = income - gift - groceries
result = left
return result
|
A movie costs $12. The cost of two bags of popcorn is 40% of the cost of the movie, and a box of candy costs 50% of the cost of the two bags of popcorn. If a family bought five movies, ten bags of popcorn, and ten boxes of candy, how much did they spend? | def solve() -> int:
movie_cost = 12
popcorn_cost = 0.4 * movie_cost * 2
candy_cost = 0.5 * popcorn_cost
total_cost = (movie_cost * 5) + (popcorn_cost * 10) + (candy_cost * 10)
result = total_cost
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.