question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
If a recipe requires 2 cups of flour, 1/2 cup of sugar and 1/4 cup of butter, and you want to make 4 times the recipe, how much flour do you need? | def solve() -> int:
flour = 2
sugar = 1/2
butter = 1/4
multiplier = 4
flour *= multiplier
result = flour
return result
|
A father and son owned a boat. The father bought the boat for $6000. 6 years later, the boat was sold for $8500. If the son and father split the profit 50/50, what was the son's share? | def solve() -> int:
original_price = 6000
sold_price = 8500
profit = sold_price - original_price
share_of_son = profit / 2
result = share_of_son
return result
|
Ava is working on a puzzle that has 500 pieces. If she has completed 85% of the puzzle, how many pieces does she still need to put together? | def solve() -> int:
total_pieces = 500
completed_percentage = 85
completed_pieces = (completed_percentage / 100) * total_pieces
remaining_pieces = total_pieces - completed_pieces
result = remaining_pieces
return result
|
Student: 4. Andrew's family has 7 guitars, 2 banjos, and a certain number of mandolins. Each guitar has 6 strings. Each banjo has 4 strings. Each mandolin has 8 strings. If the total number of strings among the guitars, banjos, and mandolins is 104 strings, how many mandolins does Andrew's family have? | def solve() -> int:
guitars = 7
banjos = 2
strings_per_guitar = 6
strings_per_banjo = 4
strings_per_mandolin = 8
total_strings = 104
total_strings_from_guitars_and_banjos = guitars * strings_per_guitar + banjos * strings_per_banjo
mandolins = (total_strings - total_strings_from_guitars_a... |
Robert needs to build a wall of length 24m and height 2.5m. How much cement does he need if 1 kg of cement fills 1 cubic meter of wall? | def solve() -> int:
length = 24
height = 2.5
width = 1
volume = length * width * height
amount_cement = volume
result = amount_cement
return result
|
Tom has 5 apples and he wants to divide them equally among his 3 friends. How many apples will each friend get and how many apples will be left over? | def solve() -> int:
total_apples = 5
num_friends = 3
apples_per_friend = total_apples // num_friends
apples_left_over = total_apples % num_friends
result = (apples_per_friend, apples_left_over)
return result
|
Student: You want to save $300 by the end of the year. If you save $25 each month, how many months will it take for you to reach your goal? | def solve() -> int:
goal = 300
monthly_savings = 25
months = goal // monthly_savings
result = months
return result
|
A car rental company charges $100 for the first day and $50 for each additional day. A customer wants to rent a car for a week. How much will the customer pay, and how much will they save if they get a 10% discount on the total price? | def solve() -> int:
total_price = 100 + 50 * (7 - 1)
discount = 0.1 * total_price
total_price_with_discount = total_price - discount
savings = total_price - total_price_with_discount
result = (total_price, total_price_with_discount, savings)
return result
|
A hair stylist purchased two hair dryers and paid $220. If one hair dryer costs $85 more than the other, what is the price of the more expensive hair dryer? | def solve() -> int:
price_cheaper = 67.5
price_expensive = price_cheaper + 85
result = price_expensive
return result
|
A stationary store had 1500 pens in stock. They sold off some pens and restocked 700 pens. If they now have 800 pens in stock, how many pens did they sell? | def solve() -> int:
pens_in_stock = 1500
pens_restocked = 700
pens_stock_after_restocking = 800
pens_sold = pens_in_stock + pens_restocked - pens_stock_after_restocking
result = pens_sold
return result
|
If there are 9 elephants and each elephant eats 4 leaves three times a day and 1 coconut once a day, how many leaves and coconuts will be needed to feed the elephants for 2 weeks? | def solve() -> int:
elephants = 9
leaves_per_day = 4 * 3 * elephants
coconuts_per_day = 1 * elephants
days_in_two_weeks = 14
total_leaves = leaves_per_day * days_in_two_weeks
total_coconuts = coconuts_per_day * days_in_two_weeks
result = total_leaves, total_coconuts
return result
|
David and Emma were skating in the park. Together they covered 10 miles. Emma skated one-fifth of the distance that David skated. How many miles did David skate? | def solve() -> int:
david_distance = 0
emma_distance = 0
total_distance = 10
emma_distance = david_distance / 5
david_distance = total_distance - emma_distance
result = david_distance
return result
|
From Tuesday to Thursday, Alex reads a book for 20 minutes. On Friday, he reads twice as much as on a weekday. On Saturday and Sunday, he reads for an hour each day. How many minutes does Alex spend reading each week? | def solve() -> int:
weekday_reading = 3 * 20 + 2 * 20
weekend_reading = 2 * 60
weekly_reading = weekday_reading + weekend_reading
result = weekly_reading
return result
|
A truck can carry a maximum load of 20,000 pounds. If the truck is carrying 5,000 pounds already, how much more weight can the truck carry? | def solve() -> int:
remaining = 20000 - 5000
result = f"The truck can carry {remaining} more pounds of weight."
return result
|
Grace and Henry collected some coins to donate to a charity. They collected 25 pennies, 15 nickels, 10 dimes, and 5 quarters. If each penny is worth 1 cent, each nickel is worth 5 cents, each dime is worth 10 cents, and each quarter is worth 25 cents, how much money did they donate in total? | def solve() -> int:
pennies = 25
nickels = 15
dimes = 10
quarters = 5
value_of_pennies = pennies * 1
value_of_nickels = nickels * 5
value_of_dimes = dimes * 10
value_of_quarters = quarters * 25
total_value = value_of_pennies + value_of_nickels + value_of_dimes + value_of_quarters... |
The price of a shirt is reduced by 20% during a sale. After the sale, the price is increased by 15%. If the original price of the shirt was $40, what is the final price of the shirt? | def solve() -> int:
original_price = 40
discount_rate = 0.2
increase_rate = 0.15
sale_price = original_price * (1 - discount_rate)
final_price = sale_price * (1 + increase_rate)
result = final_price
return result
|
John, Mary, and Bob have a total of $3500 in the ratio of 3:5:7. How much money does John have? | def solve() -> int:
total_money = 3500
ratio = [3, 5, 7]
total_ratio = sum(ratio)
john_money = (ratio[0]/total_ratio) * total_money
result = john_money
return result
|
If she can make 18 cupcakes from one batch of batter, 6 batches in one hour, and 4 hours in one afternoon, how many cupcakes can she bake in one afternoon? | def solve() -> int:
cupcakes_per_batch = 18
batches_per_hour = 6
hours_per_afternoon = 4
cupcakes_per_afternoon = cupcakes_per_batch * batches_per_hour * hours_per_afternoon
result = cupcakes_per_afternoon
return result
|
Mark is on a treasure hunt, he started with 20 pieces of gold. Every day the amount of pieces double. How much will Mark have collected after 5 days? | def solve() -> int:
pieces_of_gold = 20
for x in range(5):
pieces_of_gold = pieces_of_gold * 2
result = pieces_of_gold
return result
|
What is the perimeter of a rectangle that is 4 yards long and 3 yards wide? | def solve() -> int:
length = 4
width = 3
result = 2*length + 2*width
return result
|
An organic farm is selling apples for $0.49 each. If a customer bought 21 apples, how much did they pay in total? | def solve() -> int:
price_per_apple= 0.49
num_apples= 21
total_cost= price_per_apple * num_apples
result = total_cost
return result
|
Student: Paula loves to eat strawberries, kiwis, and pineapples for lunch. She ate 15 strawberries, 3 kiwis, and a quarter of a pineapple yesterday. Today she ate twice as many strawberries as yesterday, 2 less kiwis than yesterday, and 3 times as much pineapple as yesterday. How many fruits did she eat in total for th... | def solve() -> int:
strawberries_yesterday = 15
kiwis_yesterday = 3
pineapple_yesterday = 0.25
strawberries_today = strawberries_yesterday * 2
kiwis_today = kiwis_yesterday - 2
pineapple_today = pineapple_yesterday * 3
total_fruits = strawberries_yesterday + kiwis_yesterday + pineapple_yeste... |
A room is 12 feet long, 9 feet wide, and 8 feet high. What is the volume of the room in cubic feet? | def solve() -> int:
length = 12
width = 9
height = 8
volume = length * width * height
result = volume
return result
|
A bird flies 225 miles in 3 hours. At the same rate, how many additional hours would it take to fly an additional 75 miles? | def solve() -> int:
distance1 = 225
time1 = 3
rate = distance1/time1
distance2 = 75
time2 = distance2/rate
result = time2 - time1
return result
|
Joe has a jar of 150 marbles. 5/6 of the marbles are blue and the rest are red. How many red marbles does he have? | def solve() -> int:
total_marbles = 150
blue_marbles = total_marbles * 5/6
red_marbles = total_marbles - blue_marbles
result = red_marbles
return result
|
A store is offering a 15% discount on all items. If the original price of a shirt was $25, what is the new price after the discount is applied? | def solve() -> int:
original_price = 25
discount_percentage = 0.15
discount_amount = original_price * discount_percentage
new_price = original_price - discount_amount
result = new_price
return result
|
Diane wants to buy a toy car that costs 15 dollars and a toy doll that costs 10 dollars. How much money does Diane need to buy both of the toys? | def solve() -> int:
toy_car_price = 15
toy_doll_price = 10
total_price = toy_car_price + toy_doll_price
result = total_price
return result
|
After a morning run which covered a distance of 8 km, Manuel walks a distance of 2 km to work. If he walks at a speed of 5 km/h, how long before he gets to work, given that he runs at a speed of 10 km/h? | def solve() -> int:
distance = 2
speed1 = 10
speed2 = 5
time_running = distance / speed1
distance_remaining = 8 - distance
time_walking = distance_remaining / speed2
total_time = time_running + time_walking
result = total_time * 60
return result
|
A bookshelf contains books of different sizes. The largest book has width 16 inches and height 10 inches. The smallest book has width 6 inches and height 7 inches. What is the minimum height of the bookshelf if all the books are standing up side by side by their height? | def solve() -> int:
A_width = 16
A_height = 10
B_width = 6
B_height = 7
C_books = 5
D_height = max(A_height, B_height)*C_books
result = D_height
return result
|
Diana can knit a sweater in 5 days if she spends 3 hours each day. However, if she only spends 2 hours a day, it takes her 8 days to knit the same sweater. If she knits 2 sweaters in a week, how many hours should she knit each day? | def solve() -> int:
hours_per_day = (2*5*3 + 2*8*2)/(7*2)
result = hours_per_day
return result
|
Student: A class has a total of 30 students, and 5 of them are boys. If there are 3 girls for every 2 boys, how many girls are in the class? | def solve() -> int:
total_students = 30
boys = 5
ratio = 3 / 2
girls = ratio * boys
result = total_students - boys
return result
|
Possible questions, codes and outputs are: A farmer wants to fence his rectangular field using wooden poles and wire. The length of the field is 120 m and the width is 80 m. He needs one pole every 10 m along the sides and two poles at each corner. How many poles does he need in total? | def solve() -> int:
poles_length = 120 // 10 + 1
poles_width = 80 // 10 + 1
total_poles = 2 * poles_length + 2 * poles_width - 4 + 8
result = total_poles
return result
|
A grocery store is having a sale where every item is 20% off. If a customer buys $50 worth of groceries, how much will they pay after the discount? | def solve() -> int:
discount = 0.2 * 50
total = 50 - discount
result = total
return result
|
Student: A baker made 12 dozen muffins of three different flavors: blueberry, chocolate, and banana. He sold 4 dozen blueberry muffins for $1.50 each, 5 dozen chocolate muffins for $2 each, and 3 dozen banana muffins for $1.25 each. He also had to pay $20 for the ingredients and $10 for the electricity. How much profit... | def solve() -> int:
blueberry_muffins = 4
blueberry_price = 1.50
chocolate_muffins = 5
chocolate_price = 2
banana_muffins = 3
banana_price = 1.25
ingredients_cost = 20
electricity_cost = 10
total_muffins = blueberry_muffins + chocolate_muffins + banana_muffins
total_revenue = (bl... |
Sarah can type 45 words per minute. If she types for 1 hour and 15 minutes, how many words did she type? | def solve() -> int:
words_per_minute = 45
total_time_in_minutes = 60 + 15
total_words_typed = words_per_minute*total_time_in_minutes
result = total_words_typed
return result
|
There are 20 chocolates in a box. If there are 3 boxes, how many chocolates are in total? | def solve() -> int:
chocolates_in_one_box = 20
total_boxes = 3
total_chocolates = chocolates_in_one_box * total_boxes
result = f'<<<{total_chocolates}>>>'
result = total_chocolates
return result
|
Mark's quinoa has 22 grams of protein for every 1 1/2 cups. His protein shake has 35 grams of protein per scoop and his salmon has 42 grams of protein. If he has 1 cup of quinoa, 2 scoops of protein shake and 1 salmon fillet, how many grams of protein will he consume? | def solve() -> int:
quinoa_protein_per_cup = 22
quinoa_cups = 1
protein_shake_protein_per_scoop = 35
protein_shake_scoops = 2
salmon_protein = 42
quinoa_protein = quinoa_protein_per_cup * quinoa_cups
protein_shake_protein = protein_shake_protein_per_scoop * protein_shake_scoops
... |
Ten years ago, Mark was seven times younger than his father. If Mark's father is currently 49 years old, how old is Mark now? | def solve() -> int:
father_age = 49
mark_age_10_years_ago = (father_age - 10) / 7
mark_age = mark_age_10_years_ago + 10
result = mark_age
return result
|
A rectangular garden has a length of 10 feet and a width of 8 feet. If each square foot of the garden needs 2 seeds, how many seeds are needed to plant the entire garden? | def solve() -> int:
length = 10
width = 8
area = length * width
seeds_per_sq_foot = 2
total_seeds_needed = area * seeds_per_sq_foot
result = total_seeds_needed
return result
|
Emily has $1000 in her savings account. She deposits $50 every week and withdraws $20 for her expenses every week. How much money will she have after 4 weeks? | def solve() -> int:
week_deposit = 50
week_withdrawal = 20
starting_amount = 1000
total_deposit = week_deposit * 4
total_withdrawal = week_withdrawal * 4
amount = starting_amount + total_deposit - total_withdrawal
result = amount
return result
|
Amy has a rectangular garden that is 12 m long and 9 m wide. She wants to plant flowers along the edges of the garden, leaving a 1 m gap between the flowers and the fence. The flowers need 0.25 m2 of space each. How many flowers can she plant? | def solve() -> int:
area = 12 * 9
gap = (12 - 2) * (9 - 2)
available = area - gap
result = int(available / 0.25)
return result
|
Olivia and Daniel have a jewelry collection. Olivia collects rings and Daniel collects bracelets. Olivia has 50 rings and Daniel has 80 bracelets. If the rings are sold for $20 each and the bracelets are sold for $15 each, what is the difference in the amount of money they make in dollars? | def solve() -> int:
olivia_rings = 50
daniel_bracelets = 80
ring_price = 20
bracelet_price = 15
olivia_money = olivia_rings * ring_price
daniel_money = daniel_bracelets * bracelet_price
difference = olivia_money - daniel_money
result = difference
return result
|
After playing chess for 1 hour, Sam took a 10-minute break and then played for another hour. Meanwhile, Abby played for the whole time that Sam was playing and then played for another 1/3 hour. How long did Sam and Abby play chess together without counting Sam's break time? | def solve() -> int:
sam_playing_time = 1 + 1
abby_playing_time = sam_playing_time + 1/3
total_playing_time = sam_playing_time + abby_playing_time
result = total_playing_time
return result
|
Sarah is buying books for a book club. There are 25 members and she wants to buy books for 70% of them. They cost $10 each. If she has $200, what percentage of her money will she spend on books? | def solve() -> int:
num_members = 25
percent_books = 70
book_cost = 10
total_cost = num_members * percent_books / 100 * book_cost
percent_spent = total_cost / 200 * 100
result = percent_spent
return result
|
A stationary store has 632 notebooks in their inventory. They sold 27 notebooks in-store on Thursday and sold 107 notebooks online. On Sunday, they sold twice the number of notebooks in-store and increased their online sales by 72 notebooks. They also received a shipment of 121 notebooks. How many notebooks do they cur... | def solve() -> int:
inventory = 632
instore_thursday = 27
online_thursday = 107
instore_sunday = instore_thursday * 2
online_sunday = online_thursday + 72
shipment = 121
total_sold = instore_thursday + online_thursday + instore_sunday + online_sunday
current_inventory = inventory - ... |
If Isabel can knit 4 scarves in the same amount of time that it takes Kelsey to knit 7 scarves, and Kelsey can knit a scarf in 20 minutes, how long does it take Isabel to knit a scarf? | def solve() -> int:
kelsey_time_per_scarf = 20
isabel_scarves_per_time = 4/7
isabel_time_per_scarf = kelsey_time_per_scarf / isabel_scarves_per_time
result = isabel_time_per_scarf
return result
|
Student: # 4. | def solve() -> int:
a = 3
b = 4
c = 5
area_square = a * a
area_rectangle = b * c
difference = area_square - area_rectangle
result = difference
return result
|
There are 2.5 liters of water poured into a small rectangular aquarium. The aquarium is 8 cm long, 6 cm wide, and 5 cm deep. What is the total volume of the aquarium in cm3? | def solve() -> int:
length = 8
width = 6
depth = 5
volume = length * width * depth
result = volume
return result
|
If a dress originally costs $80 and is on sale for 20% off, how much is the discounted dress? | def solve() -> int:
original_price = 80
discount_percentage = 20
sale_price = original_price - (original_price * (discount_percentage/100))
result = sale_price
return result
|
Student: Lisa spent 30% of her salary to buy 3 DVDs and 5 magazines. If she spent a total of $78, how much was her salary? | def solve() -> int:
dvds = 3
magazines = 5
total_spent = 78
percentage_spent = 0.3
salary = total_spent / percentage_spent
result = salary
return result
|
If a train travels at a speed of 50 miles per hour, how long will it take to travel 200 miles? | def solve() -> int:
speed = 50
distance = 200
time = distance / speed
result = time
return result
|
Jamal has 700 books in his library. He would like to arrange them in separate shelves. Each shelf can hold a maximum of 45 books. How many shelves are needed to hold all the books? | def solve() -> int:
num_books = 700
books_per_shelf = 45
shelves_needed = num_books // books_per_shelf + 1
result = shelves_needed
return result
|
After saving for a long time, Sarah decided to indulge in a fancy dinner. She ordered a 3-course meal for $75, a glass of wine for $15, and a dessert for $10. She also left a 20% tip. If Sarah had $200, how much does she have left? | def solve() -> int:
meal_cost = 75
wine_cost = 15
dessert_cost = 10
tip_percent = 0.2
total_cost = meal_cost + wine_cost + dessert_cost
tip_amount = total_cost * tip_percent
total_cost_with_tip = total_cost + tip_amount
leftover_money = 200 - total_cost_with_tip
result... |
A person spent $480 on clothes. He paid full price for the first two shirts. The third shirt cost 20% less than the second shirt, and the fourth shirt cost 50% more than the third shirt. What was the price of the fourth shirt? | def solve() -> int:
total_cost = 480
first_shirt = second_shirt = 1/4 * total_cost
third_shirt = 0.8 * second_shirt
fourth_shirt = 1.5 * third_shirt
result = fourth_shirt
return result
|
Mia and Nia have decided to save up to buy a new pet for $180. Mia has contributed $15 in her piggy bank and Nia has contributed $20. Each one will contribute another $15 every week. How many weeks will it take for them to save enough money to cover the cost of the pet? | def solve() -> int:
balance = 35
expense = 180
increment = 30
week = 0
while balance < expense:
balance += increment
week += 1
result = week
return result
|
Student: An art supply store has a total of 42 markers, half of them are thick markers and the other half are thin markers. How many thick markers are there in the store? | def solve() -> int:
total_markers = 42
num_thick_markers = total_markers / 2
result = num_thick_markers
return result
|
A recipe calls for 2/3 of a cup of sugar, but Maria needs to make a double batch of the recipe. How many cups of sugar will she need in total? | def solve() -> int:
sugar_per_recipe = 2/3
num_recipes = 2
total_sugar = sugar_per_recipe * num_recipes
result = total_sugar
return result
|
A family of four goes to the movies once a month. The adult tickets cost $10 each and the child tickets cost $7 each. The family also spends $15 on popcorn and drinks each time. How much money, in dollars, does the family spend on going to the movies in a year? | def solve() -> int:
cost_of_tickets = (2 * 10) + (2 * 7)
cost_per_time = cost_of_tickets + 15
cost_per_year = cost_per_time * 12
result = cost_per_year
return result
|
A classroom has an equal number of students from Grade 7 and Grade 8. If there are 28 students from each grade, how many students are in the class? | def solve() -> int:
students_per_grade = 28
total_students = students_per_grade * 2
result = total_students
return result
|
Some possible questions and programs are: If Abby has three times as many cookies as Ben does, and Ben has one-fourth the number of cookies that Cathy has, and Cathy has 32 cookies, how many more cookies does Abby have than Ben? | def solve() -> int:
cathy = 32
ben = cathy / 4
abby = ben * 3
difference = abby - ben
result = difference
return result
|
A bag contains only red and green marbles. The number of green marbles is 60% of the total number of marbles. If the bag contains 36 red marbles, how many marbles are there in the bag? | def solve() -> int:
red_marbles = 36
green_marbles_ratio = 0.6
total_marbles = red_marbles / (1-green_marbles_ratio)
result = total_marbles
return result
|
A music festival has 6 bands performing every day for 5 days. If each band plays for 2 hours, how many hours of music will be played in total? | def solve() -> int:
hours_of_music = 6 * 5 * 2
result = hours_of_music
return result
|
Lisa has 12 pencils and Jayden gives her half of his 18 pencils. If each pencil is 15 cm long, what is the total length of Lisa's pencils in meters? | def solve() -> int:
lisa_pencils = 12 + (18 / 2)
lisa_length_cm = lisa_pencils * 15
lisa_length_m = lisa_length_cm / 100
result = lisa_length_m
return result
|
Emma bought 9 fewer pens with black ink than blue ink. She bought 24 pens with blue ink and each pen has 0.7 ounces of ink. For the pens with black ink, she bought each pen with 0.5 ounces of ink. How many ounces of ink did Emma buy in total? | def solve() -> int:
blue_ink_pens = 24
black_ink_pens = blue_ink_pens - 9
blue_ink_ounce = 0.7
black_ink_ounce = 0.5
total_blue_ink = blue_ink_pens * blue_ink_ounce
total_black_ink = black_ink_pens * black_ink_ounce
total_ink = total_blue_ink + total_black_ink
result = tot... |
If a sheet of paper is folded in half 5 times, how many layers will there be? | def solve() -> int:
number_of_folds = 5
layers = 2 ** number_of_folds
result = layers
return result
|
Mia traveled by boat 200 miles in 3 hours 30 minutes. What was the average speed of the boat in miles per hour? | def solve() -> int:
distance = 200
time = 3.5
average_speed = distance / time
result = average_speed
return result
|
The entrance fee for a music festival is $45 for youth (ages 13-23) and $90 for regular adult (ages 24+). There were 2 youth and 8 regular adults attending the music festival. How much was the total entrance fee? | def solve() -> int:
fee_regular_adult = 90
fee_youth = 45
total_cost = (fee_regular_adult * 8) + (fee_youth * 2)
result = total_cost
return result
|
In a basketball game, a player made 24 shots out of 30 attempts. What is the shooting percentage of the player? | def solve() -> int:
num_shots_made = 24
num_attempts = 30
shooting_percentage = num_shots_made / num_attempts * 100
result = shooting_percentage
return result
|
In a store, there are 240 oranges, 120 lemons, and 84 grapefruits. If 2 boxes of oranges are sold, and one-half of the lemons and 1 grapefruit are sold, then calculate how many fruits are left in the store. | def solve() -> int:
total_fruits = 240 + 120 + 84
oranges_sold = 2*12
lemons_sold = 0.5*120
grapefruits_sold = 1
total_fruits_sold = oranges_sold + lemons_sold + grapefruits_sold
total_fruits_left = total_fruits - total_fruits_sold
result = total_fruits_left
return result
|
A bakery has 100 muffins. If 1/5 of the muffins are chocolate chip and 1/4 of the muffins are blueberry, how many strawberry muffins are left? | def solve() -> int:
num_muffins = 100
num_choc_chip_muffins = num_muffins//5
num_blueberry_muffins = num_muffins//4
num_strawberry_muffins = num_muffins - (num_choc_chip_muffins + num_blueberry_muffins)
result = num_strawberry_muffins
return result
|
John has to pay $350 for the first 2 hours of renting a jet ski, and an additional $75 for each hour over the first 2 hours. How much will it cost to rent a jet ski for 5 hours? | def solve() -> int:
additional_hours = 5 - 2
price = 350 + (additional_hours * 75)
result = price
return result
|
If a number is increased by 20%, then decreased by 10%, what is the overall percentage change? | def solve() -> int:
starting_number = 1
increase_percentage = 0.20
decrease_percentage = 0.10
new_number = starting_number * (1 + increase_percentage) * (1 - decrease_percentage)
percentage_change = (new_number - starting_number) / starting_number
overall_percentage_change = percentage_change * ... |
A toy store offers a 10% discount for the amount exceeding $75 of the customer's total purchase. Sarah bought a board game for $25; 2 dolls that cost $10 each; a puzzle that costs $15.50. How much will Sarah pay for those items? | def solve() -> int:
board_game_price = 25
doll_price = 10
puzzle_price = 15.50
total_purchase = board_game_price + (2 * doll_price) + puzzle_price
discounted_amount = max(total_purchase - 75, 0)
discount = discounted_amount * 0.1
final_price = total_purchase - discount
... |
Jessica needs to bake 25 cakes. Each cake requires 2 cups of sugar. If Jessica buys 10-pound sugar bags where one bag contains 10 cups of sugar, how many bags does Jessica have to buy? | def solve() -> int:
cakes_needed = 25
sugar_per_cake = 2
total_sugar_needed = cakes_needed * sugar_per_cake
sugar_bag_capacity = 10
bags_sugar = total_sugar_needed / sugar_bag_capacity
result = bags_sugar
return result
|
If John can paint a room in 8 hours, and Jane can paint the same room in 6 hours, how long will it take if they work together? | def solve() -> int:
john_rate = 1/8
jane_rate = 1/6
combined_rate = john_rate + jane_rate
time_to_paint_the_room_together = 1/combined_rate
result = time_to_paint_the_room_together
return result
|
The base of a triangle is 8 inches and its height is 10 inches. What is the area of the triangle? | def solve() -> int:
base = 8
height = 10
area = (base * height)/2
result = area
return result
|
Jenny has a fruit basket with 36 apples in it. For every apple that she eats, her sister Claire eats 2. If Jenny eats 4 apples from the basket in a day, how many apples are left by the end of the week? | def solve() -> int:
apples_in_basket = 36
jenny_eats_per_day = 4
claire_eats_per_day = 2 * jenny_eats_per_day
days_in_week = 7
apples_eaten_by_jenny = jenny_eats_per_day * days_in_week
apples_eaten_by_claire = claire_eats_per_day * days_in_week
apples_left = apples_in_basket - appl... |
A store is having a sale - 20% off all items. If a dress is originally $75, how much will it cost? | def solve() -> int:
original_price = 75
discount_percent = 0.2
discount_amount = original_price * discount_percent
sale_price = original_price - discount_amount
result = sale_price
return result
|
On planet Flora, there are three types of flowers: roses, lilies, and tulips. In a garden, there are 120 roses, 80 lilies, and 40 tulips. Each rose has 5 petals, each lily has 6 petals, and each tulip has 4 petals. If a bee collects one petal from each flower in the garden, how many petals will the bee collect in total... | def solve() -> int:
roses = 120
lilies = 80
tulips = 40
rose_petals = 5
lily_petals = 6
tulip_petals = 4
total_petals = roses * rose_petals + lilies * lily_petals + tulips * tulip_petals
result = total_petals
return result
|
Mrs. Lee is baking cookies for her class of 24 students. She has 2 baking trays that can fit 12 cookies each. She wants to make 3 cookies for each student. How many times will she need to use the oven to bake all the cookies? | def solve() -> int:
students = 24
trays = 2
cookies_per_tray = 12
cookies_per_student = 3
total_cookies = students * cookies_per_student
trays_needed = total_cookies / cookies_per_tray
oven_times = trays_needed / trays
result = oven_times
return result
|
Matthew bought 3 chocolate bars, each $2, and 8 bags of chips, each $1.50. How much did he spend altogether? | def solve() -> int:
chocolate_price = 2
chips_price = 1.5
num_of_chocolate = 3
num_of_chips = 8
total_chocolate_price = chocolate_price*num_of_chocolate
total_chips_price = chips_price*num_of_chips
total_price = total_chocolate_price+total_chips_price
result = to... |
Calvin wants to buy a video game that costs $60.00. He has a coupon that gives him a 20% discount on the game. He also has to pay a 10% sales tax on the discounted price. How much money does Calvin have to pay in total for the game? | def solve() -> int:
discounted_price = 60 * (1 - 0.2)
sales_tax = discounted_price * 0.1
total_price = discounted_price + sales_tax
result = total_price
return result
|
Sarah bought a dress for $60 and a pair of shoes for $40. If she received a 20% discount on the dress and paid full price for the shoes, what was the total cost of her purchase? | def solve() -> int:
dress_price = 60
shoe_price = 40
discount = 0.2
discount_amount = dress_price * discount
discounted_dress_price = dress_price - discount_amount
total_cost = discounted_dress_price + shoe_price
result = total_cost
return result
|
Jessica and David are selling lemonade at a stand. Jessica sold twice as many cups of lemonade as David, and David sold 20 cups. How many cups did Jessica sell? | def solve() -> int:
david_cups = 20
jessica_cups = david_cups * 2
result = jessica_cups
return result
|
``` A bakery sells cakes for $20 each. The bakery pays $10 to make each cake and has fixed costs of $1000 per day. How many cakes does the bakery need to sell to start seeing a profit? | def solve() -> int:
cost_per_cake = 10
fixed_costs = 1000
revenue_for_profit = fixed_costs
cakes_needed_for_profit = revenue_for_profit / (20 - cost_per_cake)
result = cakes_needed_for_profit
return result
|
Student: Leo wants to buy a new bike that costs $250. He has already saved $100 from his allowance and birthday money. He decides to do some chores for his neighbors and earns $8 per hour. How many hours does he need to work to buy the bike? | def solve() -> int:
bike_cost = 250
saved_money = 100
hourly_rate = 8
remaining_money = bike_cost - saved_money
hours = remaining_money / hourly_rate
result = hours
return result
|
David has $54. He spends $4 a day for 7 days. How much money does David have left? | def solve() -> int:
start_cash = 54
daily_cost = 4
num_days = 7
total_cost = daily_cost * num_days
remaining = start_cash - total_cost
result = remaining
return result
|
A company increased the salary of its employees by 10%. If an employee's salary was $50,000 before the increase, what is the new salary? | def solve() -> int:
old_salary = 50000
increase_percentage = 0.1
increase_amount = old_salary * increase_percentage
new_salary = old_salary + increase_amount
result = new_salary
return result
|
Sarah wants to bake 60 muffins for a party. After she made them, 8 of the muffins were not good enough to serve. She then distributed the rest of the muffins equally between 6 baskets. How many muffins were in each basket? | def solve() -> int:
total_muffins = 60
bad_muffins = 8
good_muffins = total_muffins - bad_muffins
baskets = 6
muffins_per_basket = good_muffins // baskets
result = muffins_per_basket
return result
|
In a classroom, there are 30 students and 2/3 of them are girls. How many girls are there? | def solve() -> int:
number_students = 30
percent_girls = 2/3
number_girls = number_students * percent_girls
result = number_girls
return result
|
A painter makes 20 paintings a month. In 50% of the paintings, the colors do not mix properly. If in 40% of those cases, she makes a new painting, how many new paintings does she make? | def solve() -> int:
paintings_per_month = 20
color_mixing_percentage = 50
paintings_with_color_mixing_issues = (color_mixing_percentage / 100) * paintings_per_month
new_painting_percentage = 40
new_paintings_required = (new_painting_percentage / 100) * paintings_with_color_mixing... |
A car is traveling at a speed of 65 miles per hour. How many miles will it travel in 3 hours? | def solve() -> int:
speed_of_car_in_mph = 65
time_of_travel_in_hours = 3
distance_traveled_by_car_in_miles = speed_of_car_in_mph * time_of_travel_in_hours
result = distance_traveled_by_car_in_miles
return result
|
Nicole bakes 60 cupcakes for a fundraiser. By lunchtime, a certain number of cupcakes had been sold. She then bakes 30 more cupcakes and by the end of the fundraiser, only 20 remain unsold. How many cupcakes were sold by lunchtime? | def solve() -> int:
total_cupcakes = 60
unsold_cupcakes = 20
additional_cupcakes = 30
sold_cupcakes = total_cupcakes - unsold_cupcakes - additional_cupcakes
result = sold_cupcakes
return result
|
A restaurant has 25 tables and each table can seat 4 people. On weekdays, they can serve a total of 50% of their maximum capacity in a day. How many people can they serve in a week? | def solve() -> int:
num_tables = 25
table_capacity = 4
weekday_capacity = 0.5
num_weekdays = 5
total_capacity = num_tables * table_capacity * 7
weekday_people = total_capacity * weekday_capacity
total_people = weekday_people * num_weekdays
result = total_people
return result
|
A rectangle has a length of 10 meters and a width of 5 meters. What is its area in square meters? | def solve() -> int:
length = 10
width = 5
area = length * width
result = f'<<<{area}>>>'
result = area
return result
|
Sarah and Jack are training to swim a relay race. Sarah swims 1 lap for every 5 laps that Jack swims. If they swim a total of 18 laps, how many laps did Jack swim? | def solve() -> int:
sarah_laps = 1
jack_laps = 5 * sarah_laps
total_laps = 18
jack_laps = (total_laps * jack_laps) / (sarah_laps + jack_laps)
result = jack_laps
return result
|
If 8 people can paint a house in 6 hours, how many hours will it take for 12 people to paint the same house? | def solve() -> int:
hours = (8*6)/12
result = hours
return result
|
A bookstore has 120 books in stock. They sell 30 books on Monday and 50 books on Tuesday. What percentage of books are left in the bookstore? | def solve() -> int:
total_books = 120
books_sold = 30 + 50
books_left = total_books - books_sold
percent_left = (books_left / total_books) * 100
result = percent_left
return result
|
Bob finished a 5-kilometer race in 25 minutes and 15 seconds. How many seconds per kilometer did he run? | def solve() -> int:
total_distance = 5
total_time = 25*60 + 15
seconds_per_kilometer = total_time / total_distance
result = seconds_per_kilometer
return result
|
A pizza restaurant has an oven that can cook 12 pizzas at a time. If the restaurant cooks 240 pizzas in a day, how many batches of pizzas does the restaurant cook in a day? | def solve() -> int:
pizzas = 240
pizzas_per_batch = 12
batches = pizzas // pizzas_per_batch
result = batches
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.