question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Olivia wants to purchase a set of dumbbell plates. The first plate weighs 2.5 lbs, the second plate weighs 5 lbs, and the third plate weighs 10 lbs. What is the total weight of the dumbbell plate set? | def solve() -> int:
first_plate_weight = 2.5
second_plate_weight = 5
third_plate_weight = 10
total_weight = first_plate_weight + second_plate_weight + third_plate_weight
result = total_weight
return result
|
A car can drive 350 miles with a full gas tank. If it has already driven 150 miles and has used up 3/7 of its gas, how many miles can it drive with the remaining gas? | def solve() -> int:
distance = 350
driven = 150
gas_used = distance - driven
gas_remaining = 1 - 3/7
remaining_distance = gas_remaining * distance
result = remaining_distance
return result
|
An employee worked 40 hours in a week and received $560 in total. What is his hourly wage? | def solve() -> int:
hours_worked = 40
total_income = 560
hourly_wage = total_income / hours_worked
result = hourly_wage
return result
|
Alex is paid $18 an hour. If he works for 5 hours a day for 3 days, how much money will he earn? | def solve() -> int:
hourly_wage = 18
hours_per_day = 5
number_of_days = 3
total_hours = hours_per_day * number_of_days
total_pay = hourly_wage * total_hours
result = total_pay
return result
|
Student: Zoe has a collection of 228 pencils. 57 of them, Zoe bought for $3 each. Of the rest, 70% were bought for $2. All others had a price of $1 each. How much did Zoe spend on all the pencils in her collection? | def solve() -> int:
total_pencils = 228
pencils_3 = 57
pencils_2 = (total_pencils - pencils_3) * 0.7
pencils_1 = total_pencils - pencils_3 - pencils_2
cost_3 = pencils_3 * 3
cost_2 = pencils_2 * 2
cost_1 = pencils_1 * 1
total_cost = cost_3 + cost_2 + cost_1
result = total_cos... |
Student: A 30-meter long ribbon is divided into pieces, each 18 centimeters long. What is the total length of the ribbon pieces? | def solve() -> int:
ribbon = 30
piece = 0.18
pieces = ribbon // piece
total = pieces * piece
result = total
return result
|
Carla is baking a cake for her friend's birthday. She needs to buy some ingredients from the store, such as flour, sugar, eggs, butter, and frosting. The flour costs $4 per pound, the sugar costs $2.5 per pound, the eggs cost $3 per dozen, the butter costs $4 per pound, and the frosting costs $6 per jar. She needs 3 po... | def solve() -> int:
flour_cost = 3 * 4
sugar_cost = 2 * 2.5
eggs_cost = 4 / 12 * 3
butter_cost = 0.5 * 4
frosting_cost = 6
most_expensive = max(flour_cost, sugar_cost, eggs_cost, butter_cost, frosting_cost)
discounted = most_expensive * 0.9
total = flour_cost + sugar_cost + eggs_cost + b... |
Student: If a family of 4 can finish a pizza in 30 minutes, how long would it take for a family of 6 to finish the same pizza? | def solve() -> int:
num_people_1 = 4
time_1 = 30
num_people_2 = 6
pizza_per_minute = 1 / (num_people_1 * time_1)
time_2 = 1 / (num_people_2 * pizza_per_minute)
result = time_2
return result
|
How many days are there in 33 weeks? | def solve() -> int:
totalDays = 0
for i in range(33):
totalDays += 7
result = totalDays
return result
|
David has a jar full of coins consisting of quarters, dimes, and nickels. The jar has 47 coins. If the total value of the jar is $7.40, how many of each type of coin are in the jar? | def solve() -> int:
total_coins = 47
total_value = 7.4
for i in range(total_coins+1):
for j in range(total_coins-i+1):
k = total_coins - i - j
if 0.25*i + 0.10*j + 0.05*k == total_value:
result = (i, j, k)
return result
|
Tom went to the restaurant and ordered a salad, a burger, and a dessert. The restaurant charges $8 for a salad and $15 for a burger. Tom’s total bill was four times the cost of a salad. What was the cost of the dessert? | def solve() -> int:
salad_cost = 8
burger_cost = 15
total_bill = 4 * salad_cost
dessert_cost = total_bill - (salad_cost + burger_cost)
result = dessert_cost
return result
|
A class has 16 more than twice the number of boys as girls. If there are 12 girls in the class, how many boys are there in the class? | def solve() -> int:
girl_count = 12
boy_count = 16 + 2 * girl_count
result = boy_count
return result
|
If a team of 4 designers can complete a project in 60 days, how many more designers of the same skill level will be needed to complete the project in 45 days? | def solve() -> int:
team_size = 4
original_days = 60
new_days = 45
original_designers_needed = team_size
original_designers_per_day = original_designers_needed / original_days
new_designers_per_day = original_designers_per_day
new_designers_needed = new_designers_per_day * new_days... |
Student: A juice shop sells boxes with 8 apples for $19. How much will it cost to buy 3 boxes of apples? | def solve() -> int:
num_boxes = 3
cost_per_box = 19
total_cost = num_boxes * cost_per_box
result = total_cost
return result
|
David has always been interested in the business world. After high school, he went to college for 3 years to study business administration. He then completed an MBA program for 2 more years before opening his own business and running it for 4 years. How many years in total did David spend studying and running his busin... | def solve() -> int:
years_college = 3
years_MBA = 2
years_business = 4
total_years = years_college + years_MBA + years_business
result = total_years
return result
|
Lisa has a bag of 100 marbles, 60 of them are green and 40 of them are blue. If each green marble weighs 1 gram and each blue marble weighs 2 grams, what is the total weight of the marbles? | def solve() -> int:
green_marbles = 60
blue_marbles = 40
weight_of_green_marble = 1
weight_of_blue_marble = 2
total_weight = (green_marbles * weight_of_green_marble) + (blue_marbles * weight_of_blue_marble)
result = total_weight
return result
|
Harper has 16 nickels. She spends three-fourths of a dollar on a bracelet. How many cents does she have left? | def solve() -> int:
nickels = 16
nickel_value = 5
total_nickel_value = nickels * nickel_value
bracelet_cost = 0.75
bracelet_cost_cents = bracelet_cost * 100
remaining_cents = total_nickel_value - bracelet_cost_cents
result = remaining_cents
return resul... |
Last year, the amount Lani spent on clothes was $116 less than twice the amount her sister spent. If her sister spent $228, how much did Lani spend? | def solve() -> int:
lani_spent = 2 * 228 - 116
result = lani_spent
return result
|
Jasmine has two cats. Each cat needs 6 ounces of cat food, three times a day. How much cat food does Jasmine need for her cats for 4 days? | def solve() -> int:
cat_food_per_day = 6
number_of_cats = 2
number_of_feedings_per_day = 3
number_of_days = 4
total_cat_food_per_day = cat_food_per_day * number_of_cats * number_of_feedings_per_day
total_cat_food_needed = total_cat_food_per_day * number_of_days
result = tota... |
A pizza parlor charges $11.50 for a plain cheese pizza and $1.25 per topping. If a customer buys a pepperoni pizza with 3 additional toppings, how much will it cost? | def solve() -> int:
num_toppings = 3
topping_cost = 1.25
pizza_cost = 11.50
total_cost = pizza_cost + (num_toppings * topping_cost)
result = total_cost
return result
|
Jessica is collecting seashells on the beach. In the first hour she collects 30 seashells. During the next two hours she collects 40 seashells each time. During the fourth hour she collects 50 seashells. During the fifth hour her brother accidentally steps on some of them, so she loses 10 seashells. How many seashells ... | def solve() -> int:
hour1 = 30
hour2 = 40
hour3 = 40
hour4 = 50
hour5 = hour1 + hour2 + hour3 + hour4 - 10
result = hour5
return result
|
Alex has $27.50. He spends 30% of his money on a haircut and 50% of his money on a shirt. How much money does he have left? | def solve() -> int:
money = 27.50
haircut_percent = 30
shirt_percent = 50
haircut = (haircut_percent/100)*money
shirt = (shirt_percent/100)*money
total_spent = haircut + shirt
left = money - total_spent
result = left
return result
|
Rasheed sold his old smartphone for $500 while his friend Aisha made 50% of what he made by selling her laptop. What was the total amount of money they both made? | def solve() -> int:
rasheed_sale = 500
aisha_sale = rasheed_sale * 0.5
total_money = rasheed_sale + aisha_sale
result = total_money
return result
|
Mark has a rectangular swimming pool with the length of 10 feet and width of 5.5 feet. How many feet of fencing is Mark going to need to enclose the pool? | def solve() -> int:
length = 10
width = 5.5
fencing = (length + width) * 2
result = fencing
return result
|
John drives twice as fast as Jane. If Jane drives 60 mph, at what speed does John drive? | def solve() -> int:
jane_speed = 60
john_speed = jane_speed * 2
result = john_speed
return result
|
You are planning to paint a room that is 15 feet long, 12 feet wide and 8 feet high. If a gallon of paint covers an area of 350 square feet, how many gallons of paint do you need to buy? | def solve() -> int:
room_length = 15
room_width = 12
room_height = 8
coverage_per_gallon = 350
room_surface_area = 2 * (room_length * room_width + room_length * room_height + room_width * room_height)
gallons_of_paint_needed = room_surface_area / coverage_per_gallon
result = gallon... |
Sarah spent $300 on a coat and additional 5% of the coat's cost on accessories. If Sarah had twice as much before the purchase, how much did she have then? | def solve() -> int:
coat_cost = 300
accessories_cost = 0.05 * coat_cost
total_cost = coat_cost + accessories_cost
amount_before_purchase = 2 * total_cost
result = amount_before_purchase
return result
|
Lily uses 1 tablespoon of olive oil per serving of salad. If she eats 2 servings of salad per day and her olive oil bottle holds 16 tablespoons, how many days will she be able to use olive oil for her salads? | def solve() -> int:
olive_oil_per_serving = 1
servings_per_day = 2
olive_oil_bottle = 16
olive_oil_per_day = olive_oil_per_serving * servings_per_day
days_of_use = olive_oil_bottle // olive_oil_per_day
result = days_of_use
return result
|
Tyler has some bronze quarters. If he uses them in a shop, they are worth their normal value. If he melts them down, he could receive $75 per ounce. Each quarter weighs 1/6 of an ounce. How many times more money could he receive by melting them down rather than using them in a store? | def solve() -> int:
bronze_quarters = 100
value_per_quarter = 0.25
weight_per_quarter = 1/6
value_per_ounce = 75
total_value_using_quarters = bronze_quarters * value_per_quarter
total_weight = bronze_quarters * weight_per_quarter
total_value_melting_down = total_weight * value_per_ounce... |
A shipping company charges $5 per package for the first 100 packages, but only $3.50 per package for all additional packages. If a store ships 150 packages, how much will they save by using the reduced rate? | def solve() -> int:
first_hundred_packages = 100
additional_package_rate = 3.5
total_packages = 150
if total_packages <= first_hundred_packages:
total_cost = total_packages * 5
else:
remaining_packages = total_packages - first_hundred_packages
total_cost = (first_hundred_packages *... |
Possible questions and programs are: The width of a rectangle is 12 cm more than half the length. The perimeter of the rectangle is 120 cm. If the rectangle has a diagonal of 52 cm, calculate the area of the rectangle. | def solve() -> int:
from math import sqrt
x = 60 - 12
x = x - x/2
x = x * 2
x = 96
area = 96 * (96/2 + 12)
area = 6144
result = 6144
return result
|
How many slices of pizza can you buy with $18 if each slice costs $2? | def solve() -> int:
amount = 18
price_of_slice = 2
result = amount // price_of_slice
return result
|
In a gym, there were 30 members present on a particular day. The number of members increased to 50 on the second day with 10 members canceling their memberships. On the third day, the total number of members spiked to 100 with 20 members canceling their memberships. What's the total number of members present after the ... | def solve() -> int:
day1 = 30
day2 = 50 - 10
day3 = 100 - 20
total = day1 + day2 + day3
result = total
return result
|
- A school cafeteria served 36 pizzas for lunch. Each pizza had 8 slices. The students ate 3/4 of the total slices. The staff ate 1/8 of the remaining slices. How many slices were left after lunch? | def solve() -> int:
total_pizzas = 36
total_slices = total_pizzas * 8
students_slices = 0
staff_slices = 0
students_slices = total_slices * 3 / 4
slices_left = total_slices - students_slices
staff_slices = slices_left * 1 / 8
slices_left = slices_left - staff_slices
... |
James bought a 16-foot board to cut up into equal pieces for his woodworking project. If he cuts the board into 4-foot and 8-foot pieces, how many pieces will he end up with in total? | def solve() -> int:
board_length = 16
piece1_length = 4
piece2_length = 8
pieces_of_piece1 = board_length // piece1_length
remaining_length = board_length % piece1_length
pieces_of_piece2 = remaining_length // piece2_length
total_pieces = pieces_of_piece1 + pieces_of_piece2
... |
Daniel is on a diet. He can only consume 1200 calories each day. He ate a cup of yogurt with 150 calories for breakfast, and a salad with 200 calories for lunch. How many calories can Daniel afford to eat for dinner? | def solve() -> int:
calories_per_day = 1200
calories_breakfast = 150
calories_lunch = 200
calories_dinner = calories_per_day - calories_breakfast - calories_lunch
result = calories_dinner
return result
|
If x - y = 3 and x + y = 9, what are the values of x and y? | def solve() -> int:
x_minus_y = 3
x_plus_y = 9
x = (x_minus_y + x_plus_y)/2
y = (x_plus_y - x_minus_y)/2
result = f"{x}, {y}"
return result
|
Oliver and his sister are going to a baseball game. Tickets are $35 each. The processing fee is 20%. They will also have to pay $12 for parking and a $3 per person entrance fee. What is the total cost for Oliver and his sister to attend the game? | def solve() -> int:
ticket_price = 35
processing_fee_percentage = 0.20
parking_fee = 12
entrance_fee_per_person = 3
processing_fee = ticket_price * processing_fee_percentage
total_ticket_cost = ticket_price + processing_fee
total_entrance_fee = entrance_fee_per_person * 2
... |
John spends 6 hours fishing. In that time he catches a large fish that weighs 20 pounds. He also catches 4 smaller fish that weigh one-fifth as much each. How much fish does he catch per hour? | def solve() -> int:
hours_fishing = 6
large_fish_weight = 20
small_fish_weight = large_fish_weight / 5
total_fish_weight = large_fish_weight + (4 * small_fish_weight)
fish_caught_per_hour = total_fish_weight / hours_fishing
result = fish_caught_per_hour
return result
|
Student: John has 25 marbles. He gives 1/5 to his friend. How many marbles does his friend receive? | def solve() -> int:
marbles = 25
fraction = 1/5
friend_marbles = fraction * marbles
result = friend_marbles
return result
|
am has $50 and wants to buy a video game that costs $35. How much money will he have left after the purchase? | def solve() -> int:
money = 50
price = 35
money_left = money - price
result = money_left
return result
|
Lily and Max are painting a wall. Lily can paint the wall in 6 hours and Max can paint the wall in 4 hours. They work together for 2 hours and then Lily leaves. How long will it take for Max to finish the rest of the wall? | def solve() -> int:
lily_rate = 1 / 6
max_rate = 1 / 4
lily_2h = lily_rate * 2
max_2h = max_rate * 2
left = 1 - (lily_2h + max_2h)
max_time = left / max_rate
result = max_time
return result
|
Julia wants to bake cookies for her classmates. She can make 15 cookies with one batch of cookie dough. If she wants to make 60 cookies, how many batches of cookie dough does she need to make? | def solve() -> int:
cookies_per_batch = 15
total_cookies = 60
batches_needed = total_cookies // cookies_per_batch
result = batches_needed
return result
|
A car gets 10 kilometers per liter of gasoline. How many liters of gasoline is needed to travel a distance of 150 kilometers? | def solve() -> int:
distance_to_travel = 150
liters_gastype = 150/10
result = liters_gastype
return result
|
There are 18 students in a classroom and each student has 8 pencils. How many pencils are there in the classroom altogether? | def solve() -> int:
number_of_students = 18
pencils_of_each_student = 8
total_pencils = number_of_students * pencils_of_each_student
result = total_pencils
return result
|
A jar contains 45 marbles. If 12 are green, 16 are red, and the rest are blue, how many are blue? | def solve() -> int:
total_marbles = 45
green_marbles = 12
red_marbles = 16
result = total_marbles - green_marbles - red_marbles
return result
|
Student: Jack has 12 toy cars and wants to give an equal number of cars to each of his three friends. How many toy cars will each friend receive? | def solve() -> int:
cars = 12
friends = 3
cars_per_friend = cars // friends
result = cars_per_friend
return result
|
Maria bought twice as many pencils as erasers. If she had 100 erasers, how many pencils did she buy? | def solve() -> int:
erasers = 100
pencils = erasers * 2
result = pencils
return result
|
Student: Jack had 19 pencils and gave away one-third of the pencils to his friend. How many pencils does Jack have left? | def solve() -> int:
pencils = 19
fraction = 1/3
pencils_gave_away = fraction * pencils
pencils_left = pencils - pencils_gave_away
result = pencils_left
return result
|
Result: (20, 62.8318) An ice cream shop sells 3 flavors: vanilla, chocolate, and strawberry. If 40% of customers choose vanilla, 30% choose chocolate, and the rest choose strawberry, and the shop serves 500 customers a day, how many customers chose strawberry? | def solve() -> int:
total_customers = 500
vanilla_percent = 0.4
chocolate_percent = 0.3
strawberry_percent = 1 - vanilla_percent - chocolate_percent
strawberry_customers = strawberry_percent * total_customers
result = strawberry_customers
return result
|
Noah bought a pack of 24 pencils. He gave 3 pencils to each of his 5 friends. How many pencils does he have left? | def solve() -> int:
pencils_given = 5 * 3
pencils_left = 24 - pencils_given
result = pencils_left
return result
|
Mr. Williams earns $5,000 per month and wants to save 20% of his earnings to purchase a new laptop worth $2,000. How many months must he save to purchase the laptop? | def solve() -> int:
monthly_earnings = 5000
percentage_saved = 0.20
goal = 2000
amount_saved = monthly_earnings * percentage_saved
months_needed = goal / amount_saved
result = months_needed
return result
|
In a store, 4/7 of mobile phone cases are for iPhones, and 3/10 are for Samsung. The rest are for other models. If there are a total of 45 mobile phone cases, how many cases are for other models? | def solve() -> int:
total_cases = 45
iphones_cases = total_cases * (4/7)
samsung_cases = total_cases * (3/10)
others_cases = total_cases - (iphones_cases + samsung_cases)
result = others_cases
return result
|
1. Maria and Paul bought art supplies. Paul bought twice as much as Maria did. Unfortunately, Maria lost 8 pieces. If Paul bought 27 pieces, how many pieces do they have altogether? | def solve() -> int:
Marie_total = 27 / 2
Paul_total = 27 - Marie_total
Total = Paul_total + Marie_total - 8
result = Total
return result
|
Student: A movie theater had 1500 visitors on Wednesday and a 15% increase on Thursday. Calculate the total number of people who visited the movie theater over the two days. | def solve() -> int:
visitors_wednesday = 1500
percent_increase = 0.15
visitors_thursday = visitors_wednesday * (1 + percent_increase)
total_visitors = visitors_wednesday + visitors_thursday
result = total_visitors
return result
|
Student: A grocery store charges $2 for a bottle of water and $1.5 for a banana. If a customer bought 5 bottles of water and 7 bananas and paid $16, how much change did they receive if they paid with a $20 bill? | def solve() -> int:
water_price = 2
banana_price = 1.5
water_quantity = 5
banana_quantity = 7
total_cost = water_price * water_quantity + banana_price * banana_quantity
change = 20 - total_cost
result = change
return result
|
A puppy was born weighing 10 ounces. Two months later, it gained 60% of its weight, and then it weighed __ ounces. | def solve() -> int:
weight = 10
weight_gain_percentage = 60
weight_gain = (weight * weight_gain_percentage) / 100
final_weight = weight + weight_gain
result = final_weight
return result
|
A farmer has a rectangular garden that measures 8 feet by 10 feet. She wants to add a border of sunflowers around the garden that is 1 foot wide on all sides. What is the area of the sunflower border? | def solve() -> int:
garden_length = 8
garden_width = 10
border_width = 1
border_length = garden_length + 2 * border_width
border_width = garden_width + 2 * border_width
border_area = border_length * border_width - garden_length * garden_width
result = border_area
return result
|
A rectangle has a length of 10 units and a width of 5 units. What is the perimeter of the rectangle? | def solve() -> int:
length = 10
width = 5
perimeter = 2 * (length + width)
result = perimeter
return result
|
A recipe calls for 2/3 cups of sugar for 24 cookies. If you only want to make 12 cookies, how much sugar do you need? | def solve() -> int:
sugar_for_24 = 2/3
cookies = 12
sugar_per_cookie = sugar_for_24 / 24
total_sugar = round(sugar_per_cookie * cookies, 2)
result = total_sugar
return result
|
A pizza restaurant has 10 large pizzas. Each pizza is divided into 8 slices. If 3/5 of the pizza's slices have been sold, how many slices have been sold? | def solve() -> int:
total_slices = 10 * 8
sold_slices = total_slices * 3/5
result = sold_slices
return result
|
A student scored 75, 85, and 90 on her tests. If each test is weighted equally, what is her average score? | def solve() -> int:
test1 = 75
test2 = 85
test3 = 90
average = (test1 + test2 + test3) / 3
result = average
return result
|
Lily is making friendship bracelets for her friends, who are 8 in total. She needs 6 strands of yarn for each bracelet, and each strand is 12 inches long. She can buy a skein of yarn for $3.00, and each skein has 120 inches of yarn. How much will she spend on yarn? | def solve() -> int:
inches = 6 * 12 * 8
skeins = inches / 120
skeins = int(skeins + 1)
total_cost = skeins * 3.00
result = total_cost
return result
|
Jacob saves $100 every month and spends half of it on groceries. How much money does Jacob need to save every month so that he always has $1 more than what he started? | def solve() -> int:
savings = 100
groceries = savings / 2
end_amount = savings + 1
needed_savings = end_amount - groceries
result = needed_savings
return result
|
A carpenter needs to create a rectangular table top with a length of 5 feet and a width of 3 feet. If they charge $15 per square foot of wood used, how much will they charge for this table top? | def solve() -> int:
table_length = 5
table_width = 3
price_per_sqft = 15
table_area = table_length * table_width
total_cost = table_area * price_per_sqft
result = total_cost
return result
|
Student: A business invested $18,000, with a 7% annual interest rate. After three years, how much has been earned in total from the investment? | def solve() -> int:
principal = 18000
rate = 0.07
time = 3
total_amount = principal * (1 + rate) ** time
result = total_amount
return result
|
A student has 20 red marbles, 15 blue marbles, and 5 green marbles. If one marble is selected at random, what is the probability that it is blue? | def solve() -> int:
total_marbles = 20 + 15 + 5
probability_of_blue = 15 / total_marbles
result = probability_of_blue
return result
|
Student: A factory produced 20,000 cakes. 25% of them were burnt and had to be thrown away. Out of the remaining cakes, 60% were sold on the first day. How many cakes were left unsold? | def solve() -> int:
total_cakes = 20000
burnt_cakes = 0.25 * total_cakes
remaining_cakes = total_cakes - burnt_cakes
sold_cakes = 0.6 * remaining_cakes
unsold_cakes = remaining_cakes - sold_cakes
result = unsold_cakes
return result
|
Lily wants to make cookies for her friends. She has 120 grams of flour and 80 grams of sugar. She needs 10 grams of flour and 8 grams of sugar for each cookie. How many cookies can she make? | def solve() -> int:
flour_cookies = 120 // 10
sugar_cookies = 80 // 8
max_cookies = min(flour_cookies, sugar_cookies)
result = max_cookies
return result
|
Student: Alvin wants to buy only black marbles. If he buys 30 marbles, how many marbles does he need to buy more to get 50% black marbles? | def solve() -> int:
total_marbles = 30
black_marbles = 0
needed_marbles = total_marbles / 2 - black_marbles
result = needed_marbles - total_marbles
return result
|
Maria has a garden with 20 rows of strawberries, and each row has 25 plants. If she harvests 5 plants every day, how many days will it take her to harvest all the strawberries? | def solve() -> int:
rows = 20
plants_per_row = 25
plants_harvested_per_day = 5
total_plants = rows * plants_per_row
days = total_plants / plants_harvested_per_day
result = days
return result
|
Brian used 30 pencils for a project and has 32 more remaining. How many pencils does Brian have in total? | def solve() -> int:
pencils_total = 30 + 32
result = pencils_total
return result
|
A snake named Sammy has a beautiful diamond pattern on his skin. Two-thirds of the diamonds are located on his back, with one-fourth of the diamonds located on his tail and the remaining diamonds located on his head. If Sammy has a total of 48 diamonds, how many diamonds are located on his tail? | def solve() -> int:
back_diamonds = (2/3) * 48
tail_diamonds = (1/4) * 48
result = tail_diamonds
return result
|
Jenny needs a plumber to fix her sink. She pays $500 upfront. She then gets charged $60 per hour. The plumber has to work 18 hours in fixing time. It takes twice that long in finding the problem time. Her husband pays 35% of the fee. How much did Jenny pay? | def solve() -> int:
upfront_payment = 500
hourly_rate = 60
fixing_time = 18
finding_time = fixing_time * 2
total_time = fixing_time + finding_time
total_fee = upfront_payment + (hourly_rate * total_time)
husband_fee = total_fee * 0.35
jenny_fee = total_fee - husband_fee
result =... |
There are one fourth as many students as teachers in a classroom and 2 times as many desks as students. If the total number of people and desks are 75, how many teachers, students, and desks are there in the classroom? | def solve() -> int:
teacher = int(75/5)
student = teacher/4
desk = student*2
result = teacher + student + desk
return result
|
Mia has a bag of 60 candies. She likes to eat 4 candies every day after school, except on Fridays when she eats 6. Her sister likes to sneak 2 candies from the bag every day when Mia is not looking. How many candies are left in the bag after 8 days? | def solve() -> int:
candies = 60
mia_candies = 30
sister_candies = 16
candies = candies - mia_candies - sister_candies
result = candies
return result
|
A restaurant bill is $70.00. If you add 7% tax and a 20% tip, what is the total amount of the bill? | def solve() -> int:
bill = 70.00
tax_percent = 0.07
tip_percent = 0.20
total_tax = bill * tax_percent
total_tip = bill * tip_percent
total_bill = bill + total_tax + total_tip
result = total_bill
return result
|
Olivia is baking a cake and needs to measure the ingredients. She has a 250 ml cup and a 500 ml bowl. She needs 750 ml of flour, 375 ml of sugar, and 125 ml of oil. How many times does she need to use the cup and the bowl to measure the ingredients? | def solve() -> int:
result = 3 + 2
return result
|
Ben is doing a spelling test and a geography test on Tuesday. The spelling test has 20 words and he spells 85% of them correctly. The geography test has 15 questions and he answers 80% of them correctly. What is his average score on both tests as a percentage? | def solve() -> int:
spelling_score = 0.85 * 20
geography_score = 0.8 * 15
total_score = spelling_score + geography_score
average_score = (total_score / (20 + 15)) * 100
result = round(average_score, 2)
return result
|
Tom drives a car that can go 32 miles per gallon. He drives 45 miles to work every day and gas costs him 3.70 per gallon. How much does he spend on gas per week? | def solve() -> int:
miles_per_gallon = 32
miles_to_work = 45
gas_cost = 3.70
days_worked_per_week = 5
result = miles_to_work*miles_per_gallon*days_worked_per_week/gas_cost
return result
|
Jason has 9 candies. Linda gives Jason twice the number he already has. Jason then gives Linda back three-quarters of his new total plus 1. How many candies does Jason have now? | def solve() -> int:
candies = 9
candies = candies + (2 * candies)
candies = candies - ((3/4) * candies) + 1
result = candies
return result
|
James collects 28 stamps and Lily collects 84 stamps. What percentage of the stamps did James collect? | def solve() -> int:
total_stamps = 28 + 84
james_percentage = 28 / total_stamps * 100
result = james_percentage
return result
|
Nine years ago, Jacob was seven times the age of his niece. In 2 years, his niece will be 13. How old is Jacob now? | def solve() -> int:
niece_age_2_years_later = 13
jacob_age_9_years_ago = 7 * (niece_age_2_years_later - 2)
jacob_age_now = jacob_age_9_years_ago + 9
result = jacob_age_now
return result
|
Student: Eliza had 96 petals from the rose garden. She counted them out and noticed 8 were missing. She went back and found 16 new petals. How many petals does she have now? | def solve() -> int:
petals_original = 96
petals_missing = 8
petals_new = 16
petals_total = petals_original - petals_missing + petals_new
result = petals_total
return result
|
Malik is 42 and his wife Farah is 36 years old. Their son, Omar was born when Farah was 24. How old was Malik when he became a father? | def solve() -> int:
malik = 42
farah = 36
omar = farah - 24
result = malik - omar
return result
|
Mia's garden is 400 square feet smaller than 5 times the size of Jaden's garden. If Mia's garden is 1200 square feet, how many square feet is Jaden's garden? | def solve() -> int:
mia_garden = 1200
jaden_garden = (mia_garden + 400) / 5
result = jaden_garden
return result
|
Maria deposited $1500 into a savings account that earns 3.5% interest annually. How much money will she have in her account after two years if she does not make any withdrawals? | def solve() -> int:
initial_deposit = 1500
interest_rate = 0.035
years = 2
final_amount = initial_deposit * (1 + interest_rate)**years
result = f'<<<{final_amount}>>>'
result = final_amount
return result
|
At a shoe factory, it takes 1 worker 12 minutes to finish a pair of shoes. However, when the trainee helps, they can finish 2 pairs of shoes in 20 minutes. Yesterday, the workers worked for 6 hours and the trainee worked for 2 hours. In total, they finished 160 pairs of shoes. How long does it take the trainee to finis... | def solve() -> int:
worker_time_per_pair = 12
worker_pairs_per_minute = 1/worker_time_per_pair
worker_and_trainee_pairs_per_minute = 2/20
total_worker_time = 6*60
total_trainee_time = 2*60
total_pairs = 160
worker_pairs = worker_pairs_per_minute * total_worker_time
tr... |
Student: Michael has 35 marbles. He gives 10 marbles to his sister and 12 marbles to his brother. How many marbles does he have left? | def solve() -> int:
marbles = 35
marbles = marbles - 10
marbles = marbles - 12
result = marbles
return result
|
- Mary bought a necklace for her birthday. She paid $80 for it. After three months, the value of the necklace increased by about 15%. Over the next six months, the value of the necklace decreased by 10% in value. How much is Mary's necklace worth after this time? | def solve() -> int:
value = 80
value = value + value * 0.15
value = value - value * 0.1
value = round(value, 2)
result = value
return result
|
In a toy factory, each machine produces 50 toys per hour. The factory produces a total of 1500 toys every day. If the factory runs for 8 hours each day, how many machines are there in the factory? | def solve() -> int:
toys_per_machine_per_hour = 50
total_toys_per_day = 1500
hours_per_day = 8
toys_per_day_per_machine = toys_per_machine_per_hour * hours_per_day
machines_in_factory = total_toys_per_day / toys_per_day_per_machine
result = machines_in_factory
return result
|
Sophia wants to build a doghouse. Each wall piece will be 4 feet high, 3 feet wide, and made of 1.5-foot wide planks. If Sophia buys lumber in 10-foot-long boards, how many 10-foot long planks will she need to construct 6 wall pieces? | def solve() -> int:
wall_height = 4
wall_width = 3
plank_width = 1.5
board_length = 10
num_wall_pieces = 6
plank_per_wall = (wall_height / plank_width) * (wall_width / plank_width)
total_planks = plank_per_wall * num_wall_pieces
num_boards = total_planks / (board_length / plank_widt... |
Michael has 250 pencils. His mom takes 20 pencils from him. Then he divides the remaining pencils equally between his 5 classmates. If Michael decides to take 3 pencils from each of his classmates, how many pencils will be left with each classmate? | def solve() -> int:
pencils = 250
mom_takes = 20
remaining_pencils = pencils - mom_takes
classmates = 5
pencils_per_classmate = remaining_pencils / classmates
pencils_taken_by_michael = 3
pencils_left_with_classmate = pencils_per_classmate - pencils_taken_by_michael
result = pencils_left... |
Grace gets paid 50 cents for every bottle she recycles. If she recycles 20 bottles, how much money will she earn? | def solve() -> int:
bottles_recycled = 20
earnings_per_bottle = 0.50
total_earnings = bottles_recycled * earnings_per_bottle
result = total_earnings
return result
|
Ava's pea protein powder has 16 grams of protein for every 2 scoops. Her sardines have 23 grams of protein per can. And her almonds have 6 grams of protein per 28 grams. If she has 2 scoops of pea protein powder, 2 cans of sardines, and 100 grams of almonds, how many grams of protein will she consume? | def solve() -> int:
pea_protein_per_scoop = 16/2
sardines_protein_per_can = 23
almonds_protein_per_gram = 6/28
total_pea_protein = pea_protein_per_scoop * 2
total_sardines_protein = sardines_protein_per_can * 2
total_almonds_protein = almonds_protein_per_gram * 100
total_protein_co... |
Mary baked 24 cupcakes and sold them for $2 each. She used 3 cups of flour, 2 cups of sugar, 4 eggs, and 1/2 cup of butter to make the cupcakes. She bought the flour for $0.50 per cup, the sugar for $0.75 per cup, the eggs for $0.25 each, and the butter for $1.50 per cup. How much profit did she make? | def solve() -> int:
revenue = 24 * 2
cost = 3 * 0.50 + 2 * 0.75 + 4 * 0.25 + 0.5 * 1.50
profit = revenue - cost
result = profit
return result
|
Lily has a jar of coins. She has 15 quarters, 20 dimes, and 30 nickels. How much money does she have in the jar in dollars? | def solve() -> int:
quarter = 0.25
dime = 0.1
nickel = 0.05
quarters = 15 * quarter
dimes = 20 * dime
nickels = 30 * nickel
result = quarters + dimes + nickels
return result
|
After the two climbers reached the summit, they descended to a glacier located at 2500 feet and camped for the night. If they travel at the same rate as their ascent, how many days did it take for them to reach the glacier? | def solve() -> int:
days_needed = (5000 - 2500) / 2000
result = days_needed
return result
|
Yvonne sold her old gadgets and earned a profit of $3400. If she kept 40% of the total profit, how much money did she make? | def solve() -> int:
total_profit = 3400
percent_kept = 0.4
total_amount_made = total_profit * (1 - percent_kept)
result = total_amount_made
return result
|
Liam has $800. He spends $300 on a laptop and then spends half of what's left on video games. How much money does he have left? | def solve() -> int:
liam_money = 800
laptop_cost = 300
liam_money = liam_money - laptop_cost
video_game_cost = liam_money / 2
liam_money = liam_money - video_game_cost
result = liam_money
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.