question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Ben has a rectangular garden that is 8 meters long and 6 meters wide. He wants to plant some flowers along the border of the garden, leaving a 1 meter gap between the flowers and the edge of the garden. If each flower needs 0.5 square meters of space, how many flowers can he plant? | def solve() -> int:
garden_length = 8
garden_width = 6
gap = 1
flower_area = 0.5
border_length = garden_length - 2 * gap
border_width = garden_width - 2 * gap
border_area = 2 * (border_length + border_width) * gap
flowers = border_area // flower_area
result = flowers
return resu... |
Omar is painting his room. He has a can of blue paint that covers 60 square feet per gallon. He wants to mix it with some white paint to get a lighter shade. He decides to use 25% white paint and 75% blue paint. If his room has 240 square feet of wall space, how many gallons of blue paint does he need? | def solve() -> int:
blue = 60
white = 0.25
wall = 240
mixed = wall / (blue * (1 - white))
blue_needed = mixed * (1 - white)
result = blue_needed
return result
|
For every customer served at a car dealership, the sales team gets 5 bonus points. If the team served a total of 75 customers last month, how many bonus points did they earn? | def solve() -> int:
numCustomers = 75
bonusPoints = numCustomers * 5
result = bonusPoints
return result
|
If a rectangle has a length of 15cm and a width of 10cm, what is the area of the rectangle? | def solve() -> int:
rectangle_length = 15
rectangle_width = 10
rectangle_area = rectangle_length * rectangle_width
result = rectangle_area
return result
|
Maria wants to put a border of tiles around her shower. The ceramic tiles measure 2 inches by 4 inches. If the border around the shower has a perimeter of 56 inches, how many tiles does Maria need? | def solve() -> int:
tile_length = 2
tile_width = 4
perimeter = 56
tiles = perimeter/(2 * tile_length + 2 * tile_width)
result = tiles
return result
|
If a recipe requires 2 cups of flour to make 12 muffins, how much flour is needed to make 24 muffins? | def solve() -> int:
flour_for_12 = 2
number_of_muffins = 24
flour_for_24 = flour_for_12 * (number_of_muffins / 12)
result = flour_for_24
return result
|
Jessie starts working at McDonald's for $10/hour. She gets a 20% raise the first year, but the second year the company's profits decrease and her pay is cut to 55% of what it used to be. How much does Jessie make now? | def solve() -> int:
initial_pay = 10
rate_increase = 1.20
rate_decrease = 0.55
pay_increased = initial_pay * rate_increase
pay_decreased = pay_increased * rate_decrease
result = pay_decreased
return result
|
Jake has 24 toy cars. He wants to split them into groups of 4. How many groups of toy cars can he make? | def solve() -> int:
toy_cars = 24
cars_per_group = 4
groups = toy_cars // cars_per_group
result = groups
return result
|
Tyler is hosting a game night for a group of 15 friends. He has 30 board games to share, 2 games for every 3 friends. Half the friends play 3 games each and half the friends play 4 games each. How many games are played in total? | def solve() -> int:
friends = 15
board_games = 30
games_per_friend = 2
total_games = friends * games_per_friend
half_friends = friends // 2
half_friends_play_3_games = half_friends // 2
half_friends_play_4_games = half_friends - half_friends_play_3_games
total_games_played... |
At a grocery store, there are 200 loaves of bread for sale. 30% of them are whole wheat, and half as many are sourdough. If a loaf of bread is chosen at random, what are the odds it's not whole wheat or sourdough (expressed as a percentage)? | def solve() -> int:
whole_wheat = 200 * 0.3
sourdough = whole_wheat / 2
other_breads = 200 - whole_wheat - sourdough
other_breads_probability = other_breads / 200 * 100
result = other_breads_probability
return result
|
Alice and Bob decide to climb a mountain. Alice takes a gradual path and Bob takes a steep path. Alice can climb 100 feet in 10 minutes and Bob can climb 200 feet in 30 minutes. Who is the slower climber, and how long will it take for them to both reach the top, if the mountain is 2000 feet high? | def solve() -> int:
alice_speed = 100/10
bob_speed = 200/30
if alice_speed < bob_speed:
slower_climber = "Alice"
time_to_reach_top = 2000/alice_speed
else:
slower_climber = "Bob"
time_to_reach_top = 2000/bob_speed
result = f"{slower_climber} is the slower ... |
If Maria has $85 in her wallet and she spends $12 each day, how many days will it take her to spend all the money? | def solve() -> int:
money = 85
daily_spend = 12
days = money/daily_spend
result = days
return result
|
The height of one candle and one vase is in the ratio 6:9. If the total height of both items is 180 cm, how tall is the vase? | def solve() -> int:
height_candle = 0
height_vase = 0
total_height = 180
height_candle = total_height * (6/15)
height_vase = total_height * (9/15)
result = height_vase
return result
|
A baker baked 350 cupcakes this week. He was able to sell 50% of the cupcakes. How many cupcakes did he sell? | def solve() -> int:
x = 0.5 * 350
result = int(x)
return result
|
Ali can perform a task in 15 minutes. How long will it take him to complete the task if he performs it twice back to back? | def solve() -> int:
time_per_task = 15
total_time = time_per_task * 2
result = total_time
return result
|
A bag of candy weighs 12 ounces, and a bag of popcorn weighs 5 ounces. If Rachel buys 2 bags of candy and 4 bags of popcorn, how many pounds does she have to carry? | def solve() -> int:
bagOfCandy = 12
bagOfPopcorn = 5
numOfCandy = 2
numOfPopcorn = 4
totalWeightInOunces = (bagOfCandy * numOfCandy) + (bagOfPopcorn * numOfPopcorn)
totalWeightInPounds = totalWeightInOunces / 16
result = totalWeightInPounds
return result
|
Bob is making lemonade for a school fair. He needs 5 lemons for every liter of lemonade and he wants to make 20 liters of lemonade. He also needs 200 grams of sugar for every liter of lemonade and he has 3 kilograms of sugar at home. Lemons cost $0.5 each and sugar costs $2 per kilogram. How much money does he spend on... | def solve() -> int:
lemons_needed = 5 * 20
sugar_needed = 200 * 20
lemon_cost = 0.5
lemon_total = lemons_needed * lemon_cost
sugar_cost = 2
sugar_total = (sugar_needed - 3000) / 1000 * sugar_cost
total_cost = lemon_total + sugar_total
result = total_cost
return r... |
Alice had $80 in her savings account. She withdrew $20 to buy a gift for her friend. She then received $15 as a birthday present from her aunt and deposited it into her account. She also earned $10 from doing chores and kept it as cash. How much money did Alice have in total, including her savings account and cash? | def solve() -> int:
savings = 80
savings = savings - 20
savings = savings + 15
cash = 10
total = savings + cash
result = total
return result
|
Andrew can harvest 30 corn cobs, 12 pumpkins and 15 squash in a day. How many vegetables can he harvest for 4 days? | def solve() -> int:
vegetables_per_day = 30 + 12 + 15
total_vegetables = vegetables_per_day * 4
result = total_vegetables
return result
|
A car rental company charges $40 per day plus $0.25 per mile driven. If John rents a car for 5 days and drives 300 miles, how much does he have to pay? | def solve() -> int:
rental_days = 5
mileage = 300
daily_rental_cost = 40
mileage_cost_per_mile = 0.25
rental_cost = rental_days * daily_rental_cost
mileage_cost = mileage * mileage_cost_per_mile
total_cost = rental_cost + mileage_cost
result = total_cost
return result
|
Rachel drives 25 minutes to and from her music school every day. On the weekends, she spends 2 hours, each day, driving to her choir practice. How many hours does Rachel spend driving in total in a week? | def solve() -> int:
minutes_per_day = 25
hours_per_weekend_day = 2
minutes_per_weekday = minutes_per_day * 5
minutes_per_weekend = hours_per_weekend_day * 60 * 2
total_minutes_per_week = minutes_per_weekday + minutes_per_weekend
total_hours_per_week = total_minutes_per_week / 60
... |
The distance between two cities is 120 miles. If a car travels at a speed of 60 miles per hour, how long will it take for the car to arrive at the destination? | def solve() -> int:
distance = 120
speed = 60
time = distance / speed
result = f'It will take the car {time} hours to travel to the destination.'
result = time
return result
|
The price of 1 kg of apples is $2. If John buys 3.5 kg of apples, how much does he spend? | def solve() -> int:
amount = 3.5
price_per_kg = 2
total_price = amount * price_per_kg
result = total_price
return result
|
Taylor wants to purchase a smartphone for $300 and a case that costs 1/12 as much as the smartphone. If their friend also needs the same items, what will be the total amount they need to pay for both orders combined? | def solve() -> int:
smartphone_price = 300
case_price = smartphone_price / 12
total_price = (smartphone_price + case_price) * 2
result = total_price
return result
|
In a film premiere, each actor can bring their 3 guests. Eight producers and a quarter as many directors will also attend the premiere. If there are 80 actors, how many chairs must be prepared for the premiere? Samantha ran for 8 kilometers and then cycled for another 5 kilometers to the gym. She then ran all the way b... | def solve() -> int:
actors = 80
guests_per_actor = 3
total_attendees = actors * (guests_per_actor + 1) + 8 + (actors / 4)
chairs_needed = total_attendees
distance_ran = 8 + 8
result = chairs_needed, distance_ran
return result
|
A train travels 600km in 5 hours. If it maintains a constant speed, how far will it travel in 8 hours? | def solve() -> int:
speed = 600 / 5
time = 8
distance = speed * time
result = distance
return result
|
Katty has $50 and she wants to buy 4 shirts and 2 jeans. Each shirt costs $12 and each jean costs $20. How much money will she have left after the purchase? | def solve() -> int:
money = 50
shirts_cost = 12 * 4
jeans_cost = 20 * 2
total_cost = shirts_cost + jeans_cost
money_left = money - total_cost
result = money_left
return result
|
Amy is a cyclist who is training for a race. She rides her bike on a track that is 2.5 kilometers long. She completes one lap in six minutes. She wants to increase her speed by 10% every week. How many minutes will it take her to complete one lap in the fifth week of her training? | def solve() -> int:
length = 2.5
lap_time = 6
increase = 0.1
weeks = 5
speed_1 = length / lap_time
speed_5 = speed_1 * (1 + increase) ** (weeks - 1)
lap_time_5 = length / speed_5
result = lap_time_5
return result
|
If a car drives at 60 miles per hour for 2 hours, how many miles did it travel? | def solve() -> int:
speed = 60
time = 2
distance = speed * time
result = distance
return result
|
John buys 50 chairs for $25 each and sells them at a 15% higher cost. What is the total revenue earned by selling all the chairs? | def solve() -> int:
chairs_bought = 50
cost_per_chair = 25
selling_price = cost_per_chair * 1.15
total_revenue = chairs_bought * selling_price
result = total_revenue
return result
|
A child buys 3 boxes of crayons. Each box contains 24 crayons. How many crayons did the child buy? | def solve() -> int:
Number_of_boxes = 3
Crayons_per_box = 24
total_crayons = Number_of_boxes * Crayons_per_box
result = total_crayons
return result
|
Tom has a jar of 100 candies. Every year on his birthday, he fills the jar with 10 more candies. On his 16th birthday, he decides to eat one-third of his candies. How many candies are left in the jar? | def solve() -> int:
jar_of_candies = 100
candies_added_per_year = 10
birthday_age = 16
total_candies = jar_of_candies + (candies_added_per_year * (birthday_age - 1))
candies_eaten = total_candies // 3
candies_left = total_candies - candies_eaten
result = candies_left
... |
Thomas collected 100 coins. He painted 12 coins gold and 19 coins silver. He then divided the remaining coins equally into 5 groups, and painted them bronze, copper, brass, nickel, and aluminum. What is the difference between the number of silver and copper coins? | def solve() -> int:
coins_collected = 100
gold_coins = 12
silver_coins = 19
remaining_coins = coins_collected - gold_coins - silver_coins
coins_per_group = remaining_coins // 5
copper_coins = coins_per_group
silver_copper_difference = silver_coins - copper_coins
result = s... |
Olivia is organizing a charity event and selling raffle tickets. She sells 50 tickets to adults and 30 tickets to children. If 20 tickets are sold to both adults and children, what percentage of the total tickets sold were bought by adults? | def solve() -> int:
adult_tickets = 50
child_tickets = 30
common_tickets = 20
total_tickets_sold = adult_tickets + child_tickets - common_tickets
percentage_adult_tickets = (adult_tickets / total_tickets_sold) * 100
result = percentage_adult_tickets
return result
|
There are 15 students in a class. Each student receives 8 coins. How many coins are distributed among the 15 students? | def solve() -> int:
total_students = 15
total_coins = total_students * 8
result = total_coins
return result
|
Student: Two dogs found 7 boxes, each with 360 apples. The dogs then each took an equal number of apples and create 10 boxes with the same number of apples in each box. How many apples were in each box after the two dogs completed the task? | def solve() -> int:
box_1 = 360
box_2 = 360
box_3 = 360
box_4 = 360
box_5 = 360
box_6 = 360
box_7 = 360
total_apples = box_1 + box_2 + box_3 + box_4 + box_5 + box_6 + box_7
apples_per_box = total_apples / 10
result = apples_per_box
return result
|
Pedro sold 6 bags of oranges and 8 baskets of strawberries at the market. Each bag of oranges has 15 oranges and each basket of strawberries has 20 strawberries. He sold each orange for $0.50 and each strawberry for $0.25. How much money did Pedro make in total? | def solve() -> int:
oranges_sold = 6 * 15
strawberries_sold = 8 * 20
money_from_oranges = oranges_sold * 0.50
money_from_strawberries = strawberries_sold * 0.25
total_money = money_from_oranges + money_from_strawberries
result = total_money
return result
|
Emma is building a bookshelf. She has completed 6 shelves and wants to add 4 more. If each shelf requires 5 planks of wood, how many planks of wood will she need for the entire bookshelf? | def solve() -> int:
shelves_completed = 6
shelves_to_add = 4
planks_per_shelf = 5
total_planks_needed = (shelves_completed + shelves_to_add) * planks_per_shelf
result = total_planks_needed
return result
|
Student: There are 100 students in a school on Monday. Each day, 10% of the students transfer to other schools, and 50 students transfer to this school. How many students are in the school on Wednesday? | def solve() -> int:
students_on_monday = 100
transfer_out_each_day = 0.1
transfer_in_each_day = 50
students_on_tuesday = students_on_monday - (students_on_monday * transfer_out_each_day) + transfer_in_each_day
students_on_wednesday = students_on_tuesday - (students_on_tuesday * transfer_out_each_day... |
Question X: Jane has two bags. One bag contains 70 balls and the other contains 90 balls. She takes out 20 balls from each bag and puts it into another bag. What is the average number of balls in all three bags? | def solve() -> int:
bag1 = 70
bag2 = 90
remove = 20
bag1 = bag1 - remove
bag2 = bag2 - remove
bag3 = remove * 2
total_balls = bag1 + bag2 + bag3
bags = 3
average_balls = total_balls // bags
result = f'{average_balls}'
result = average_balls
return result
|
Samantha is 4 inches taller than Kaylee, who is 7 inches shorter than Logan. If Owen is 68 inches tall and has the same height as Logan, what is the average height of the four people? | def solve() -> int:
logan_height = 68
kaylee_height = logan_height - 7
samantha_height = kaylee_height + 4
owen_height = logan_height
average_height = (logan_height + kaylee_height + samantha_height + owen_height) / 4
result = average_height
return result
|
Student: Tom and his friends got a bundle of 10 chocolates. He shared 1/4 of the chocolates with the other 3 friends, kept 1/2 of the chocolates and gave away the rest. How many chocolates did Tom get? | def solve() -> int:
chocolates = 10
shared = chocolates * 1/4
kept = chocolates * 1/2
given_away = chocolates - shared - kept
result = kept
return result
|
Ben buys 3 shirts and 2 pants from a store that has a 20% discount on all items. The original price of each shirt is 25 dollars and the original price of each pant is 35 dollars. How much money does Ben save by buying from the store? | def solve() -> int:
shirts = 3
shirt_price = 25
pants = 2
pant_price = 35
discount = 0.2
original_price = shirts * shirt_price + pants * pant_price
discounted_price = original_price * (1 - discount)
savings = original_price - discounted_price
result = savings... |
Carlos and Dani are painting a mural for their art class. Carlos paints 3 square meters per hour for 5 consecutive hours, then he slows down to 2 square meters per hour for another 4 hours. Dani paints 4 square meters per hour for 3 consecutive hours, then she speeds up to 6 square meters per hour for another 3 hours. ... | def solve() -> int:
carlos_first = 3 * 5
carlos_second = 2 * 4
carlos_total = carlos_first + carlos_second
dani_first = 4 * 3
dani_second = 6 * 3
dani_total = dani_first + dani_second
total = carlos_total + dani_total
result = total
return result
|
A store has a sale with a 20% discount on all items. If a shirt originally costs $25, what is the new sale price? | def solve() -> int:
original_price = 25
discount = 0.2
new_price = original_price * (1 - discount)
result = new_price
return result
|
A recipe calls for 2/3 cups of sugar and makes 20 cookies. How much sugar will be needed to make 50 cookies? | def solve() -> int:
sugar_per_cookie = 2/3
cookies_to_make = 50
total_sugar_needed = sugar_per_cookie * cookies_to_make / 20
result = total_sugar_needed
return result
|
A grocery store sold 5 cartons of milk at $10 each. How much money did the grocery store make from the sale of the milk? | def solve() -> int:
cartons_of_milk = 5
price_per_carton = 10
total_revenue = 0
total_revenue = cartons_of_milk * price_per_carton
result = total_revenue
return result
|
Amy and her six friends went to a candy store and bought some candy. Each of them spent a different amount of money, but they all bought the same type of candy that cost $0.25 each. Amy spent $2.25, Bella spent $2.00, Chloe spent $1.75, Danny spent $2.50, Eric spent $1.50, Fiona spent $2.25, and Greg spent $2.00. How m... | def solve() -> int:
money = [2.25, 2.00, 1.75, 2.50, 1.50, 2.25, 2.00]
candies = 0
for amount in money:
candies = candies + (amount / 0.25)
result = candies
return result
|
A group of friends ordered 3 pizzas to share. Each pizza has 8 slices, and they want to divide the slices evenly. If there are 4 friends in the group, how many slices will each friend get? | def solve() -> int:
pizzas = 3
slices_per_pizza = 8
friends = 4
slices_per_friend = (pizzas * slices_per_pizza) // friends
result = slices_per_friend
return result
|
Brad works for 6 hours and earns $18 an hour plus a bonus of $12. What is his total pay for the day? | def solve() -> int:
hours_worked = 6
hourly_rate = 18
bonus = 12
total_pay = hours_worked * hourly_rate + bonus
result = total_pay
return result
|
John has 30 pencils, which is 5 times the number of pencils that Sarah has. How many pencils does Sarah have? | def solve() -> int:
john_pencils = 30
sarah_pencils = john_pencils / 5
result = sarah_pencils
return result
|
If the perimeter of a square is 32cm, what is the length of each side? | def solve() -> int:
perimeter = 32
side_length = perimeter/4
result = side_length
return result
|
A grocery store ordered 200 pounds of apples and 300 pounds of bananas. If the price of 1 pound of apples is $1 and the price of 1 pound of bananas is $0.50, how much did the grocery store spend on buying these fruits? | def solve() -> int:
total_cost = (200*1) + (300*0.50)
result = f'${total_cost}'
result = total_cost
return result
|
A store has an initial inventory of 100 items. Each day, 15 items are sold. How many days will it take until the store runs out of inventory? | def solve() -> int:
inventory = 100
sell_per_day = 15
days = inventory // sell_per_day
result = days
return result
|
Ella is a gardener. She can work in the garden for 5 hours a day. Over 4 days, she used the maximum gardening time twice. On two days she worked for only 2 hours a day and for 3 hours on the next day. How many hours did Ella work in her garden during those 4 days? A woman buys a designer dress from a luxury store at a ... | def solve() -> int:
max_hours = 5 * 2
min_hours = 2 * 2 + 3
total_hours = max_hours + min_hours
original_price = 300
discount = 0.15
credit_note = 20
final_price = (original_price - credit_note) * (1 - discount)
result = total_hours, final_price
return result
|
The ratio of the sides of two similar triangles is 3:4. If the area of the smaller triangle is 54 sq. cm, what is the area of the larger triangle? | def solve() -> int:
area_larger_triangle = (4/3)**2 * 54
result = area_larger_triangle
return result
|
James invested $2500 in a mutual fund that grows at an annual rate of 8%. How much money will he have after 5 years? | def solve() -> int:
principal = 2500
rate = 0.08
time = 5
amount = principal * (1 + rate) ** time
result = amount
return result
|
Student: Ben has 45 apples. He shared them evenly with his 6 family members. How many apples did each family member receive? | def solve() -> int:
num_apples = 45
num_family_members = 6
apples_per_family_member = num_apples // num_family_members
remainder = num_apples % num_family_members
total_apples_per_family_member = apples_per_family_member + remainder
result = total_apples_per_family_member
return result
|
Some possible questions are: Lennon has 5 marbles in his pocket. He gives away one marble to each of his 3 friends. Then he buys 2 more marbles from the store. How many marbles does Lennon have left in his pocket? | def solve() -> int:
marbles = 5
marbles = marbles - 3
marbles = marbles + 2
result = marbles
return result
|
Denise is planning a birthday party for her friend and needs to buy some supplies. She needs 12 balloons that cost $0.50 each, 2 packs of candles that cost $1.25 each, and a cake that costs $15. She also wants to buy some gift cards for her friend, each worth $10. She has a budget of $50. How many gift cards can she bu... | def solve() -> int:
balloon = 0.50
candle = 1.25
cake = 15
gift_card = 10
supplies_cost = 12 * balloon + 2 * candle + cake
remaining_budget = 50 - supplies_cost
number_of_gift_cards = remaining_budget // gift_card
result = number_of_gift_cards
return result
|
If a recipe calls for 2 and 1/4 cups of flour and you want to make half the recipe, how many cups of flour do you need? | def solve() -> int:
flour = 2.25
half_recipe = 0.5
flour_needed = flour * half_recipe
result = flour_needed
return result
|
David plans to save $50 per week for the whole year. How much has he saved in the first 100 days of the year? | def solve() -> int:
per_week_savings = 50
savings_first_100_days = per_week_savings * 14
result = savings_first_100_days
return result
|
If a sweater costs $25 and is on sale for 20% off, how much will it cost? | def solve() -> int:
discount = 25 * 0.2
total_cost = 25 - discount
result = total_cost
return result
|
A supermarket sells 200 apples, 150 bananas, and 100 oranges in a day. If they plan to offer a 10% discount on all fruits next week, how much money will they lose in revenue? | def solve() -> int:
daily_sales = 200 + 150 + 100
weekly_sales = daily_sales * 7
price_per_fruit = 1.5
discounted_price_per_fruit = 1.35
weekly_sales_with_discount = (200*discounted_price_per_fruit) + (150*discounted_price_per_fruit) + (100*discounted_price_per_fruit)
lost_revenue = weekly_sal... |
Chris has 15 socks. He loses 3 of them and then buys 7 more. Later, he gives 2 to his cousin. How many socks does Chris have now? | def solve() -> int:
socks = 15
socks -= 3
socks += 7
socks -= 2
result = socks
return result
|
7. Jen has a bag of apples containing 55 apples. She gives away 11 apples. How many apples are left in the bag? | def solve() -> int:
num1 = 55
num2 = 11
left_apples = num1 - num2
result = left_apples
return result
|
Student: A 30 meter long rope is cut into two pieces in the ratio of 4:3. Find the length of each piece. | def solve() -> int:
length = 30
ratio_1 = 4
ratio_2 = 3
length_1 = length * (ratio_1 / (ratio_1 + ratio_2))
length_2 = length * (ratio_2 / (ratio_1 + ratio_2))
result = length_1, length_2
return result
|
A store offers a discount of 20% on all items. If a customer buys 3 items worth $150, $200, and $250, what is the total cost after the discount? | def solve() -> int:
price1 = 150
price2 = 200
price3 = 250
discount = 0.2
total_cost = (price1 + price2 + price3) * (1 - discount)
result = total_cost
return result
|
The perimeter of a square is 32 cm. What is the length of each side? | def solve() -> int:
perimeter = 32
side_length = perimeter / 4
result = side_length
return result
|
Cindy wants to bake a cake for her friend's birthday. She needs 3 cups of flour, 2 cups of sugar, 4 eggs, and 1 cup of milk. She has 5 cups of flour, 3 cups of sugar, 6 eggs, and 2 cups of milk in her kitchen. How many of each ingredient does she need to buy from the store? | def solve() -> int:
flour_difference = 3 - 5
sugar_difference = 2 - 3
eggs_difference = 4 - 6
milk_difference = 1 - 2
flour_needed = max(flour_difference, 0)
sugar_needed = max(sugar_difference, 0)
eggs_needed = max(eggs_difference, 0)
milk_needed = max(milk_difference, 0)
re... |
Jerry spent 1/4 of his monthly salary on rent, which was $210. How much was his monthly salary? | def solve() -> int:
fraction_spent_on_rent = 1/4
rent_amount = 210
total_salary = rent_amount / fraction_spent_on_rent
result = total_salary
return result
|
Albert, Amy and Amanda can lift a combined weight of 286 pounds. Albert can lift four times as much as Amy, and Amy can lift 8 pounds more than 6 times the amount that Amanda can lift. How much can Albert lift? | def solve() -> int:
albert = 286
amy = albert / 4
amanda = amy / 6 + 8
albert = albert - amy - amanda
result = albert
return result
|
A car can travel 30 miles per gallon of gas. If gas costs $3.50 per gallon, how much will it cost to travel 200 miles? | def solve() -> int:
mpg = 30
distance = 200
cost_per_gallon = 3.5
gallons_needed = distance / mpg
total_cost = gallons_needed * cost_per_gallon
result = total_cost
return result
|
A company earned $10,000 in January, lost $5,000 in February, and earned $7,500 in March. What is the total profit or loss of the company in those 3 months? | def solve() -> int:
profit_jan = 10000
profit_feb = -5000
profit_mar = 7500
total_profit = profit_jan + profit_feb + profit_mar
result = total_profit
return result
|
Student: Lucy has a bag containing black, white and red socks. She needs to pick a pair of socks, and both socks must match. If the bag contains 3 black, 4 white and 5 red socks, what is the probability of picking a pair of white socks? | def solve() -> int:
black_socks = 3
white_socks = 4
red_socks = 5
total_socks = black_socks + white_socks + red_socks
probability_white_socks = white_socks / total_socks * 100
result = probability_white_socks
return result
|
Alice bought a shirt that costs $25. During the sale season, she gets 30% off. How much did she save? | def solve() -> int:
price = 25
discount = 30/100
saved_amount = price * discount
result = saved_amount
return result
|
John buys a 10-ounce smoothie every morning on the way to his gym. He drinks one-quarter of the smoothie during his workout. When he finishes his workout, he drinks another one-half of the smoothie. He forgets to drink any more of his smoothie once he gets to work, and when he remembers his smoothie, he only drinks 1/3... | def solve() -> int:
smoothie_size = 10
workout_portion = smoothie_size / 4
remaining_smoothie = smoothie_size - workout_portion
post_workout_portion = remaining_smoothie / 2
remaining_smoothie -= post_workout_portion
remaining_smoothie -= 1/3
result = remaining_smoothie
return resul... |
May wants to make a mixture of 150ml of sugar and water in the ratio 4:7. Calculate the number of cups of water she needs. | def solve() -> int:
ml_mixture = 150
ratio_sugar_water = 4/7
cup_mixture = ml_mixture / 250
cups_water = cup_mixture * (ratio_sugar_water / (1-ratio_sugar_water))
result = cups_water
return result
|
Ethan is making a lined pouch. The pouch has a front and back portion that each measures 12 inches by 8 inches, and two side panels that each measure 6 inches by 8 inches. How many square inches of fabric does Ethan need? | def solve() -> int:
front_back_length = 12
front_back_width = 8
side_length = 6
side_width = 8
front_back_area = front_back_length * front_back_width
side_area = side_length * side_width
total_area = 2 * front_back_area + 2 * side_area
result = total_area
return result... |
3. Edna wants to buy 10 boxes of mangoes for her family reunion. Each box of mangoes costs $28.75 and she also needs to pay a delivery fee of $20. How much will she need to pay in total? | def solve() -> int:
no_of_boxes = 10
cost_of_boxes = 28.75
delivery_fee = 20
cost_for_all_boxes = no_of_boxes * cost_of_boxes
total_cost = cost_for_all_boxes + delivery_fee
result = total_cost
return result
|
A librarian shelved 15 books on Monday. Each day she shelved 5 more books than the previous day. How many books did the librarian shelve by Wednesday? | def solve() -> int:
monday_books = 15
tuesday_books = monday_books + 5
wednesday_books = tuesday_books + 5
total_books = monday_books + tuesday_books + wednesday_books
result = total_books
return result
|
Student: Tina studies for 4 hours everyday and 5 days a week. She then decides to increase her studying time by 150%. How many hours does she study a week now? | def solve() -> int:
original_hours = 4
days_per_week = 5
increase_percentage = 150
original_total_hours = original_hours * days_per_week
increase_hours = original_total_hours * (increase_percentage / 100)
result = original_total_hours + increase_hours
return result
|
A club has 35 members. 20% of the members are women, how many female members are there? | def solve() -> int:
total_members = 35
percent_women = 0.2
women_members = int(percent_women * total_members)
result = women_members
return result
|
9. Kim and Ellie are making paintings for an art show. Kim has 12 canvases and Ellie has 15 canvases. They decide to trade so that they each have the same number of canvases. How many canvases will each person have after the trade? | def solve() -> int:
total_canvases = 12 + 15
canvases_per_person = total_canvases // 2
result = canvases_per_person
return result
|
There are 14 red balls and 20 yellow balls in a bag. If 2 balls are drawn randomly, what is the probability that one ball is red and one ball is yellow? | def solve() -> int:
total_balls = 34
first_red = 14/34
first_yellow = 20/34
second_red = 13/33
second_yellow = 20/33
prob = (first_red * second_yellow) + (first_yellow * second_red)
result = prob
return result
|
A rectangular field has a length of 30 meters and a perimeter of 80 meters. Calculate the width of the field. | def solve() -> int:
perimeter = 80
length = 30
width = (perimeter / 2) - length
result = width
return result
|
A container tank is 6/8 full. Kasen removes 55% of the volume of the water in the tank and then fills it with 25% of the remaining water volume. Calculate the final volume of water in the tank. | def solve() -> int:
volume = 0.75 * 8
volume = volume * 55 / 100
volume = volume * 25 / 100
result = 8 - volume
return result
|
Joe wants to buy a new laptop that costs $1200. He has saved $750. How much more does he need to save to afford the laptop? | def solve() -> int:
total_price = 1200
amount_saved = 750
remaining_amount = total_price - amount_saved
result = round(remaining_amount, 2)
return result
|
Rachel just completed a book club card. For every 12 books read, she gets a free additional book. She has received 4 free books already. She is 2 books away from another free one. How many books has she read in total? | def solve() -> int:
books_read = 12 * 4 + 2
result = books_read
return result
|
Anna has some books. She has 5 more fiction books than non-fiction books and 2 more mystery books than fiction books. If she has 12 non-fiction books, how many mystery books does she have? | def solve() -> int:
non_fiction_books = 12
fiction_books = non_fiction_books + 5
mystery_books = fiction_books + 2
result = mystery_books
return result
|
During a marathon, a runner's pace increased by 1 minute every 5 miles. If they were running at a pace of 8 minutes per mile at mile 5, what was their pace at mile 20? | def solve() -> int:
mile_5_pace = 8
pace_increase = 1
mile_difference = 20 - 5
pace_at_mile_20 = mile_5_pace + (mile_difference // 5) * pace_increase
result = pace_at_mile_20
return result
|
Student: 4. | def solve() -> int:
a = 4
result = a * a
return result
|
There were 12 red and 8 blue balloons in a room. Some of the balloons popped, and then there were 3/4 as many red balloons and 1/2 as many blue balloons as before. How many balloons popped in total? | def solve() -> int:
red_before = 12
blue_before = 8
red_after = 3/4 * red_before
blue_after = 1/2 * blue_before
red_popped = red_before - red_after
blue_popped = blue_before - blue_after
total_popped = red_popped + blue_popped
result = total_popped
return result
|
ve and his friends are going to split a pizza that costs $18. If there are 4 of them, how much will it cost per person? | def solve() -> int:
pizza_cost = 18
num_people = 4
cost_per_person = pizza_cost/num_people
result = cost_per_person
return result
|
``` Emily has a bag of candy. She gives 15% of them to her sister and another 25% of the remainder to her friends. If she has 450 pieces of candy left, how many did she start with? | def solve() -> int:
total_candy = 450 / 0.6
candy_given_sister = 0.15 * total_candy
candy_left_1 = total_candy - candy_given_sister
candy_given_friends = 0.25 * candy_left_1
candy_left_2 = candy_left_1 - candy_given_friends
result = candy_left_2
return result
|
A group of friends order 3 medium pizzas at $12 each plus a delivery fee of $5. If each pizza is cut into 8 slices, how much would it cost per slice? | def solve() -> int:
pizza_cost = 12
delivery_fee = 5
number_of_pizzas = 3
slices_per_pizza = 8
total_cost = (pizza_cost * number_of_pizzas) + delivery_fee
total_slices = number_of_pizzas * slices_per_pizza
cost_per_slice = total_cost / total_slices
result = cost_per_slice
return resu... |
A phone company charges a monthly base fee of $20 and an additional fee of $0.05 per minute for calls made on their network. If a customer makes 200 minutes of calls in a month, what is their total monthly bill? | def solve() -> int:
minutes = 200
base_fee = 20
per_min_fee = 0.05
total_fee = base_fee + (per_min_fee * minutes)
result = total_fee
return result
|
A basket contains 25 apples and 30 oranges. What percentage of the basket is made up of oranges? | def solve() -> int:
num_apples = 25
num_oranges = 30
total_fruit = num_apples + num_oranges
orange_percentage = (num_oranges/total_fruit) * 100
result = orange_percentage
return result
|
A company's sales for the year were $420,000. If the sales increased by 25% the following year, what were the sales for the following year? | def solve() -> int:
sales = 420000
increase = 0.25
new_sales = sales * (1 + increase)
result = new_sales
return result
|
Michael made smoothies. He drank 2 smoothies and gave 4 to his roommates. His girlfriend came over and drank 2 smoothies. Then his two coworkers visited and drank 1 smoothie each. There were 3 smoothies left. How many smoothies did Michael make? | def solve() -> int:
smoothies_made = 2 + 4 + 2 + 1 + 1 + 3
result = smoothies_made
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.