question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Student: Gina has 9 oranges and 7 apples in her basket. If the total weight of the basket is 4.9 kg, and an orange weighs 0.5 kg and an apple weighs 0.4 kg, how much does Gina's basket weigh without the fruits inside? | def solve() -> int:
oranges = 9
apples = 7
orange_weight = 0.5
apple_weight = 0.4
total_weight = oranges * orange_weight + apples * apple_weight
result = total_weight - oranges * orange_weight - apples * apple_weight
return result
|
Student: A pizza restaurant offers three sizes of pizzas: small for $8, medium for $12 and large for $16. If they sell 25 small, 15 medium and 10 large pizzas and make a profit of $300, what is the profit percentage? | def solve() -> int:
small_price = 8
medium_price = 12
large_price = 16
small_quantity = 25
medium_quantity = 15
large_quantity = 10
profit = 300
total_revenue = small_price * small_quantity + medium_price * medium_quantity + large_price * large_quantity
result = (profit / total_reven... |
Student: John bought 3 kg of carrots and 6 kg of onions. The total cost of carrots was $6. The onions were one and a half times more expensive than the carrots. How much did John pay for 1 kg of onions? | def solve() -> int:
carrots_kg = 3
onions_kg = 6
carrots_cost = 6
onions_cost = carrots_cost * 1.5
onions_cost_per_kg = onions_cost / onions_kg
result = onions_cost_per_kg
return result
|
A rectangular box has dimensions of 5 feet by 6 feet by 7 feet. What is the volume of the box in cubic feet? | def solve() -> int:
length = 5
width = 6
height = 7
volume = length * width * height
result = volume
return result
|
Jenny is going on a trip and wants to buy a backpack that costs $50. She also wants to get a travel pillow that costs 1/4 as much as the backpack. If her travel buddy Tyler asks her to buy the same items for him, how much will they spend in total? | def solve() -> int:
backpack_cost = 50
pillow_cost = backpack_cost / 4
total_cost = (backpack_cost + pillow_cost) * 2
result = total_cost
return result
|
There are three bags of marbles labeled J, K, and L with 80 marbles. There are four times as many marbles in bag J as in bag K, and bag K has 10 fewer marbles than bag L. How many marbles are in bag J? | def solve() -> int:
l = 80
k = l - 10
j = 4 * k
result = j
return result
|
If a rectangle has a length of 6cm and a perimeter of 22cm, what is the width of the rectangle? | def solve() -> int:
perimeter_of_rectangle = 22
length_of_rectangle = 6
width_of_rectangle = (perimeter_of_rectangle - 2 * length_of_rectangle) / 2
result = width_of_rectangle
return result
|
At the park, there were 90 eagles, 80 hawks, and 50 owls. There were 20 more eagles than owls and 10 times as many hawks as owls. How many birds were at the park? | def solve() -> int:
num_eagles = 90
num_hawks = 80
num_owls = 50
total_num = num_eagles + num_hawks + num_owls + (num_eagles - num_owls)*num_owls + (num_hawks/num_owls)*num_owls
result = total_num
return result
|
Lisa’s muffin recipe makes 24 muffins and calls for 3 cups of sugar. She only wants to make 6 muffins for herself. How much sugar will she need? | def solve() -> int:
muffins_recipe = 24
sugar_recipe = 3
muffins_wanted = 6
sugar_wanted = (sugar_recipe/muffins_recipe)*muffins_wanted
result = sugar_wanted
return result
|
Student: A car travels 40 miles in one hour. How far will the car travel in 2.5 hours? | def solve() -> int:
distance = 40
time = 2.5
result = distance * time
return result
|
Mia and Noah are playing a game of dice. Mia rolls a fair six-sided die and multiplies the result by 3. Noah rolls a fair eight-sided die and adds 2 to the result. If they both roll their dice once, what is the probability that Mia's score is higher than Noah's score? | def solve() -> int:
mia_outcomes = [3 * i for i in range(1, 7)]
noah_outcomes = [2 + i for i in range(1, 9)]
favorable = 0
for m in mia_outcomes:
for n in noah_outcomes:
if m > n:
favorable += 1
total = len(mia_outcomes) * len(noah_outcomes)
probability = fa... |
A gym has 300 members. Two rounds of promotions will be announced. For each round of promotion, 12% of the remaining members will upgrade to a higher membership. How much revenue will the gym earn from the upgraded memberships? | def solve() -> int:
total_members = 300
upgrade_percentage = 0.12
upgrade_round1 = int(total_members * upgrade_percentage)
remaining_members = total_members - upgrade_round1
upgrade_round2 = int(remaining_members * upgrade_percentage)
total_upgrades = upgrade_round1 + up... |
Jared needs to buy 2 shirts, one costs $25 and the other costs $45. He also needs to pay 8% sales tax. How much is he going to pay in total? | def solve() -> int:
sales_tax = 0.08
shirt1 = 25
shirt2 = 45
total_cost = shirt1 + shirt2
tax_amount = total_cost * sales_tax
total_payment = total_cost + tax_amount
result = total_payment
return result
|
arah starts with $500 in her investment portfolio. After 1 year, it grows by 10%. She then withdraws $75 from her portfolio. After another year, her portfolio grows by 15%. What is her final portfolio worth after 2 years? | def solve() -> int:
portfolio = 500
growth1 = portfolio * 0.1
portfolio += growth1
portfolio -= 75
growth2 = portfolio * 0.15
portfolio += growth2
result = portfolio
return result
|
A car travels 120 miles in 2.5 hours. What is the speed of the car in miles per hour? | def solve() -> int:
distance = 120
time = 2.5
speed = distance / time
result = speed
return result
|
A company has 15 employees, and the average salary is $6000. If a new employee with a $10,000 salary is hired, what is the new overall average salary? | def solve() -> int:
num_employees = 16
old_salaries = 15 * 6000
new_salary = 10000
total_salaries = old_salaries + new_salary
new_avg = total_salaries / num_employees
result = new_avg
return result
|
A fisherman caught 230 lbs of fish. 45 lbs were used as bait and 35 lbs were given to his friends. The fisherman sold the rest in packages of 2 lbs and made a profit of $276. What was the selling price of one 2 lbs package? | def solve() -> int:
total_fish = 230
bait = 45
friends = 35
remaining_fish = total_fish - bait - friends
profit = 276
packages_sold = remaining_fish / 2
price_per_package = profit / packages_sold
result = price_per_package
return result
|
3. Kenneth's teacher gave him a dollar for earning a star for his excellent work in class today. If each star entitles him to 20 cents, how many stars did Kenneth earn today? | def solve() -> int:
reward = 1
star_value = 0.2
stars_earned = reward / star_value
result = stars_earned
return result
|
Possible new questions are: Lisa is a baker. She needs to make 12 loaves of bread, 8 muffins, and 6 pies for a bakery order. Each loaf of bread takes 15 minutes to knead, 45 minutes to rise, and 25 minutes to bake. Each muffin takes 10 minutes to prepare, and 20 minutes to bake. Each pie takes 20 minutes to prepare, an... | def solve() -> int:
bread_time = 15 + 45 + 25
muffin_time = 10 + 20
pie_time = 20 + 40
order_time = bread_time + max(muffin_time, pie_time)
result = order_time
return result
|
Student: If Mia's mother is currently 4 times her age and in 11 years she'll be 3 times her age, what is Mia's age now? | def solve() -> int:
mother_age = 0
mia_age = 0
mother_age = 4 * mia_age
mother_age = 3 * (mia_age + 11)
mia_age = (mother_age / 3) - 11
result = mia_age
return result
|
If there are 24 candies in the bag and Keisha has twice as many candies as Lila, how many candies does Lila have? | def solve() -> int:
lila_candies = 24 / 3
result = lila_candies
return result
|
am sells lemonade at a stand for $0.5 per cup. He buys the lemons, sugar, and cups from a store for $0.2, $0.1, and $0.05 per cup, respectively. He pays $10 for renting the stand per day. He sells an average of 120 cups per day. How much profit does he make in a week (7 days)? | def solve() -> int:
cost = 0.2 + 0.1 + 0.05
cost = cost * 120 + 10
revenue = 0.5 * 120
profit = revenue - cost
profit = profit * 7
result = profit
return result
|
Kim has 14 books she needs to put on her book shelf. If she has 5 bookshelves, how many books should go on each shelf? | def solve() -> int:
num_of_books = 14
num_of_shelves = 5
num_of_books_per_shelf = num_of_books // num_of_shelves
result = num_of_books_per_shelf
return result
|
Four dogs have eaten 24 donuts altogether. One of them ate 3 donuts, the second one ate 1 donuts, and the third ate 6 donuts. How many donuts did the fourth dog eat? | def solve() -> int:
a = 24
b = 3
c = 1
d = 6
result = a - (b + c + d)
return result
|
A box of crayons contains 8 colors. A pack of crayons that costs $3 has 32 colors. How much would you need to spend if you wanted to buy enough packs of crayons to have 120 colors? | def solve() -> int:
colors_per_box = 8
colors_per_pack = 32
desired_colors = 120
packs_needed = desired_colors / colors_per_pack
total_cost = packs_needed * 3
result = total_cost
return result
|
Tony, Steve, and Bruce have a total of 150 pencils. Tony has 30 fewer pencils than Bruce. If Steve has 20 pencils, how many pencils does Tony have? | def solve() -> int:
total_pencils = 150
steve_pencils = 20
x = (total_pencils - steve_pencils - 30) / 2
result = x
return result
|
A rectangle is 8 cm wide and has a perimeter of 30 cm. What is its length? | def solve() -> int:
width = 8
perimeter = 30
length = (perimeter - 2*width)/2
result = length
return result
|
John has $1000 in his bank account. He spends 25% on rent and then another 30% of what is left on groceries. How much money does he have left? | def solve() -> int:
bank_account = 1000
rent = bank_account * 0.25
remaining_money = bank_account - rent
groceries = remaining_money * 0.3
result = remaining_money - groceries
return result
|
A jellyfish grows at a rate of 12% per day. If it currently weighs 4 ounces, how much will it weigh in 5 days? | def solve() -> int:
growth_rate = 0.12
current_weight = 4
num_days = 5
final_weight = current_weight * (1 + growth_rate) ** num_days
result = final_weight
return result
|
John weighs 12 pounds less than Jane. Jane weighs 25 pounds more than Jamie. If Jamie weighs 150 pounds, what is the average weight for the three of them? | def solve() -> int:
jamie_weight = 150
jane_weight = jamie_weight + 25
john_weight = jane_weight - 12
average_weight = (jamie_weight + jane_weight + john_weight) / 3
result = average_weight
return result
|
During a hike, Alice saw 12 birds and 8 squirrels. If she bought 6 bird food bags, each costing $3, and 4 squirrels food bags, each costing $5, how much money did she spend in total? | def solve() -> int:
birds_num = 12
birds_bags = 6
birds_price = 3
squirrels_num = 8
squirrels_bags = 4
squirrels_price = 5
total_cost = (birds_bags * birds_price) + (squirrels_bags * squirrels_price)
result = total_cost
return result
|
Mary has been jogging in the morning for three days more than the number of days she exercises in the gym. If she exercised for 4 months in the gym at $40 per week, and is now jogging an additional thirty laps each day, determine the total amount of money spent on gym membership fees and any additional jogging expenses... | def solve() -> int:
gym_days = 4 * 30
jogging_days = gym_days + 3
gym_expenses = gym_days * 40
jogging_expenses = jogging_days * 30
total_expenses = gym_expenses + jogging_expenses
result = total_expenses
return result
|
Mandy has 40 pieces of candies. She wants to share them with her 5 friends equally. How many candies will each of them receive? | def solve() -> int:
candies = 40
friends = 5
candies_per_person = candies / friends
result = candies_per_person
return result
|
Dan bought a new piece of furniture for $425 and he was given a 15% discount. He then had to pay 6% tax. How much did Dan pay all together? | def solve() -> int:
price = 425
discount_percentage = 0.15
tax_percentage = 0.06
discounted_price = price * (1 - discount_percentage)
tax = discounted_price * tax_percentage
total_price = discounted_price + tax
result = total_price
return result
|
Student: Abigail needs to buy a new TV for her bedroom. The TV comes in 3 package options. Option A is $500 plus 6% tax, Option B is $300 plus 9% tax, and Option C is $600 plus 15% tax. If Abigail chooses Option A, what is the total cost of the TV? | def solve() -> int:
option_A = 500
option_B = 300
option_C = 600
tax_rate_A = 0.06
tax_rate_B = 0.09
tax_rate_C = 0.15
tax_A = option_A * tax_rate_A
total_A = option_A + tax_A
result = total_A
return result
|
Student: 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
|
Henry needs to paint his living room before he can have a party. The room is 12 feet high, 16 feet long, and 10 feet wide, and he wants to paint all four walls and the ceiling. If each can of paint covers 400 square feet and he plans to apply two coats of paint, how many cans of paint does he need to purchase? | def solve() -> int:
room_height = 12
room_length = 16
room_width = 10
can_coverage = 400
number_of_coats = 2
total_square_feet = 2 * room_height * (room_length + room_width)
cans_needed = total_square_feet * number_of_coats / can_coverage
result = cans_needed
return result
|
A donut shop sells a dozen donuts for $12. If you want to buy 3 donuts, how much will it cost? | def solve() -> int:
cost_per_dozen = 12
donuts_per_dozen = 12
desired_donuts = 3
cost_per_donut = cost_per_dozen / donuts_per_dozen
total_cost = cost_per_donut * desired_donuts
result = total_cost
return result
|
``` A company has 240 employees, and 1/6 of them are on vacation and 1/8 are sick. How many employees are present in the company? | def solve() -> int:
vacations = 240 * 1/6
sick = 240 * 1/8
present = 240 - vacations - sick
result = present
return result
|
A racecar had 200 fuel units before the race, where it burned all its fuel. In the first hour of the race, the car burned 3/5 of its fuel. In the second hour, it burned 10% of the remaining fuel. In the third hour, the car burned half the fuel it had left after two hours. How much fuel is left at the end of the third h... | def solve() -> int:
fuel_units = 200
burned_first_hour = fuel_units * 3/5
remaining_after_first_hour = fuel_units - burned_first_hour
burned_second_hour = remaining_after_first_hour * 10/100
remaining_after_second_hour = remaining_after_first_hour - burned_second_hour
burned_third_hour = remaini... |
Nicole and James want to buy a new laptop. The laptop costs $1000 and the software bundle costs an additional $200. How much money will they spend on the laptop and software package combined? | def solve() -> int:
laptop_cost = 1000
software_cost = 200
total_cost = laptop_cost + software_cost
result = total_cost
return result
|
- Maria is making a salad for a potluck. She needs to buy 2 pounds of lettuce that is $1.99 per pound, 1 pound of tomatoes that is $2.49 per pound, 0.5 pound of cheese that is $4.99 per pound, and 0.25 pound of nuts that is $7.99 per pound. She also needs to buy a bottle of dressing that is $3.99. How much is the salad... | def solve() -> int:
ingredients_cost = 2 * 1.99 + 1 * 2.49 + 0.5 * 4.99 + 0.25 * 7.99
salad_cost = ingredients_cost + 3.99
result = salad_cost
return result
|
Justin has 70 cents, Sarah has half a dollar and two dimes, Leo has two quarters and three nickels, and Lily has seven dimes and three pennies. How many cents do they have combined? | def solve() -> int:
justin_cents = 70
sarah_cents = 50
leo_cents = 2 * 25 + 3 * 5
lily_cents = 7 * 10 + 3
total_cents = justin_cents + sarah_cents + leo_cents + lily_cents
result = total_cents
return result
|
A store bought 20 erasers for $2.4 each and sold all of them at a rate of $3. Calculate the amount of profit made by the store. | def solve() -> int:
cost_per_eraser = 2.4
selling_price_per_eraser = 3
number_of_erasers = 20
total_cost = cost_per_eraser * number_of_erasers
total_profit = (selling_price_per_eraser - cost_per_eraser) * number_of_erasers
result = total_profit
return result
|
Student: A recipe calls for 2/3 cup of sugar. If Tom wants to make 5 times the original recipe, how many cups of sugar does he need? | def solve() -> int:
sugar_fraction = 2/3
scale = 5
sugar_amount = sugar_fraction * scale
result = sugar_amount
return result
|
If a recipe calls for 3/4 cups of sugar and you want to make four batches, how many cups of sugar do you need? | def solve() -> int:
sugar_per_batch = 3/4
num_batches = 4
total_sugar_needed = sugar_per_batch * num_batches
result = total_sugar_needed
return result
|
A car travels 350 miles on a full tank of gas. The tank can hold 15 gallons of gas. The gas costs $2.75 per gallon. How much does it cost to drive the car for 2100 miles? | def solve() -> int:
distance = 350
tank = 15
gas_price = 2.75
target = 2100
mileage = distance / tank
tanks = target / distance
cost = tanks * tank * gas_price
result = cost
return result
|
Ali and Ben are selling chocolate bars to raise money for their school trip. They bought 200 chocolate bars for $100 and sold each bar for $1.25. However, they had to pay a 10% commission to the store that allowed them to sell the bars on their premises. How much money did they make for their school trip? | def solve() -> int:
revenue = 1.25 * 200
commission = 0.1 * revenue
cost = 100
profit = revenue - commission - cost
result = profit
return result
|
Student: A grocery store sold 800 apples last week. The store sold twice as many red apples as green apples and half as many yellow apples as green apples. The red apples cost $0.50 each, the green apples cost $0.75 each, and the yellow apples cost $1.50 each. How much money did the store make from the apple sales? | def solve() -> int:
red_apples = 800 // 2
green_apples = 800 // 4
yellow_apples = 800 // 8
red_cost = red_apples * 0.50
green_cost = green_apples * 0.75
yellow_cost = yellow_apples * 1.50
total_cost = red_cost + green_cost + yellow_cost
result = total_cost
return result
|
Student: A triangle has a base of 10 cm and a height of 6 cm. What is the area of the triangle? | def solve() -> int:
base = 10
height = 6
area = 0.5 * base * height
result = area
return result
|
For every 12 cupcakes bought, a customer gets 4 free cupcakes. If Olivia wants to buy 60 cupcakes, how many cupcakes will she have in all? | def solve() -> int:
total_cupcakes = 60
set_cupcakes = 12
set_free_cupcakes = 4
sets_needed = total_cupcakes // set_cupcakes
total_free_cupcakes = sets_needed * set_free_cupcakes
total_cupcakes += total_free_cupcakes
result = total_cupcakes
return resul... |
Lucas goes to the gas station to fill up his car. The gas costs $3.25 per gallon. He spends $39. How many gallons of gas did he buy? | def solve() -> int:
gas_cost_per_gallon = 3.25
total_spent = 39
gallons_bought = total_spent / gas_cost_per_gallon
result = gallons_bought
return result
|
A store offers a discount of 20% for all items on clearance. If a $50 item is on clearance, what is its actual cost after the discount? | def solve() -> int:
item_price = 50
discount_percent = 20
discount_fraction = discount_percent/100
discounted_price = item_price - (discount_fraction * item_price)
result = discounted_price
return result
|
A rectangular plot of land measures 50 ft by 80 ft. If a 3-ft wide path is built around the plot, what is the area of the path? | def solve() -> int:
length = 80
width = 50
path_width = 3
outer_length = length + 2 * path_width
outer_width = width + 2 * path_width
inner_area = length * width
outer_area = outer_length * outer_width
path_area = outer_area - inner_area
result = path_area
return result
|
Amy collected 20 coins, 25 bills, and 40 vouchers for a total of $1337. Each coin is worth 1 dollar and each voucher is worth 10 dollars. How much money is in bills? | def solve() -> int:
total = 1337
coins = 20
vouchers = 40
bills = total - (coins + 10 * vouchers)
result = bills
return result
|
Using the previous scenario, the store decides to add an additional discount of $5 for items that cost over $100. What will be the final price of an item that originally costs $120? | def solve() -> int:
original_price = 120
discount_percent = 0.2
if original_price > 100:
discount_amount = (original_price * discount_percent) + 5
else:
discount_amount = original_price * discount_percent
sale_price = original_price - discount_amount
result = sale_price
retu... |
Greg's lemonade stand makes large cups that hold 12 ounces of lemonade. If greg made 16 cups of lemonade, how many ounces of lemonade did he make? | def solve() -> int:
total_ounces = 0
ounces_per_cup = 12
number_of_cups = 16
for i in range(number_of_cups):
total_ounces = total_ounces + ounces_per_cup
result = total_ounces
return result
|
Student: A hardware store charges $5 for every package of screws and $6 for every package of nails. If Alex bought 3 packages of screws and 2 packages of nails, how much did he spend? | def solve() -> int:
screws = 3
nails = 2
screws_cost = screws * 5
nails_cost = nails * 6
total_cost = screws_cost + nails_cost
result = total_cost
return result
|
arah's friend drives 450 miles in 8 hours. If her friend drives at a constant speed, what is her average speed in miles per hour? | def solve() -> int:
distance = 450
time = 8
average_speed = distance / time
result = average_speed
return result
|
John has 30 apples. He gives away 3 apples each to his 6 friends. How many apples are left with John? | def solve() -> int:
apples = 30
apples = apples - (3 * 6)
result = apples
return result
|
Here are some possible questions and programs: A pair of jeans costs $40 and is now sold at 30% off. A shirt costs $25 and is now sold at 15% off. How much will you pay if you buy 2 pairs of jeans and 3 shirts? | def solve() -> int:
original_price = (40 * 2) + (25 * 3)
jeans_discount = 40 * 0.3
jeans_price = 40 - jeans_discount
shirt_discount = 25 * 0.15
shirt_price = 25 - shirt_discount
discounted_price = (jeans_price * 2) + (shirt_price * 3)
saved = original_price - discounted_price
result = sa... |
What is the sum of the first 10 triangular numbers? | def solve() -> int:
n = 10
sum = 0
for i in range(1, n+1):
sum = sum + (i*(i+1))/2
result = sum
return result
|
A restaurant made 50 burgers for 25 customers. If each customer has 2 burgers, how many burgers are left? If Mark spent 15% of his salary on groceries, half of the remaining on his car loan, and deposited $300 in his savings, how much is his monthly salary? | def solve() -> int:
burgers_made = 50
customers = 25
burgers_per_customer = 2
total_burgers = burgers_made - (customers * burgers_per_customer)
salary = 300 / 0.15
remaining_salary = salary - 300
car_loan_payment = remaining_salary / 2
monthly_salary = car_loan_payment + 3... |
A bike messenger works 5 days a week and earns $8 each day. She wants to save up for a new set of tires that she expects to cost a total of $240. Currently, she has $40. How many weeks will it take for her to save enough money to buy the new tires? | def solve() -> int:
days_per_week = 5
earnings_per_day = 8
target_cost = 240
current_savings = 40
savings_per_week = days_per_week * earnings_per_day
weeks_needed = (target_cost - current_savings) / savings_per_week
result = weeks_needed
return result
|
Mia has to go to a friend's party which is 60 miles away from her home. Her car gets 30 miles per gallon and has a 10-gallon gas tank. How many times does she need to fill the gas tank completely to complete the round trip? Lucas turned 28 yesterday. Four years ago, he was five times the age of his younger brother Ryan... | def solve() -> int:
distance = 60
mpg = 30
tank_size = 10
round_trip = distance * 2
gas_needed = round_trip / mpg
fill_ups = gas_needed / tank_size
lucas_age = 28
ryan_age_4_years_ago = (lucas_age - 4) / 5
ryan_age = ryan_age_4_years_ago + 4
sister_age = ryan_age + 10
... |
Amy drives to and from school for 4 days. She drives 120 miles to school each day and drives back home at an average speed of 35 miles per hour. If it takes her an additional hour to drive on the last day, how many miles did she drive for the entire trip? | def solve() -> int:
distance1 = 120 * 4
speed = 35
total_time = 4 + 1
distance2 = total_time * speed
total_distance = distance1 + distance2
result = round(total_distance, 2)
return result
|
Olivia and her brother saved their allowance to buy a new video game. They saved $56 altogether. The game costs $24. How much money do they have left after buying the game? | def solve() -> int:
allowance = 56
game_cost = 24
money_left = allowance - game_cost
result = money_left
return result
|
Student: After school, Jack practices his instrument for 15 minutes every day for 30 days. How many minutes has Jack spent practicing his instrument in total? | def solve() -> int:
days = 30
minutes_per_day = 15
total_minutes = days * minutes_per_day
result = total_minutes
return result
|
A movie streaming service offers a monthly subscription fee of $10 and a pay-per-view rental fee of $3. If a subscriber watches 6 rented movies in a month, how much will they pay in total? | def solve() -> int:
subtotal = 10 + (6*3)
result = subtotal
return result
|
A recipe produces 24 cookies with 2 cups of flour. If you only have 1 cup of flour, how many cookies can you make? | def solve() -> int:
cookies_per_cup_of_flour = 24/2
flour_available = 1
cookies_possible = cookies_per_cup_of_flour*flour_available
result = cookies_possible
return result
|
In a certain store, there are 5 types of products: books, clothing, electronics, toys, and jewelry. There is a total of 10000 products in the store. Electronics make up 35% of all the products, and toys 10%. There are as many books as toys and jewelry put together. How many products are not books or jewelry? | def solve() -> int:
total_products = 10000
electronics_percentage = 0.35
toys_percentage = 0.1
electronics = total_products * electronics_percentage
toys = total_products * toys_percentage
books_jewelry = (total_products - electronics - toys) / 2
not_books_jewelry = total_prod... |
Student: If the perimeter of a rectangle is 70 and the width is half the length, what is the area? | def solve() -> int:
perimeter = 70
width = None
length = None
width_plus_length = perimeter / 2
length = perimeter / 3
width = length / 2
area = width * length
result = area
return result
|
7. A restaurant menu offers 5 dishes, each priced at $9. Joe orders 3 dishes from the menu. How much money does the restaurant earn from Joe's order? | def solve() -> int:
quantity = 3
price_each_dish = 9
total_price = quantity * price_each_dish
result = total_price
return result
|
The sum of two numbers is 30. The first number is twice the second. What are the two numbers? | def solve() -> int:
second = 30 / 3
first = second * 2
result = first + second
return result
|
Tommy wants to save $1000 by the end of the month. He saved $100 in the first week, $200 in the second week, and $250 in the third week. How much does he need to save in the last week to reach his goal? | def solve() -> int:
week1_savings = 100
week2_savings = 200
week3_savings = 250
goal = 1000
total_savings = week1_savings + week2_savings + week3_savings
remaining_savings = goal - total_savings
result = remaining_savings
return result
|
Student: A bookshelf can hold 30 books. If there are already 15 books on the bookshelf, how many more books can be added? | def solve() -> int:
capacity = 30
books = 15
books_to_add = capacity - books
result = books_to_add
return result
|
A three-digit number in base 10 is equal to 16 in base 8. What is the three-digit number? | def solve() -> int:
n_b10 = 0
for i in range(3):
n_b10 += 8 ** i
while n_b10>999:
n_b10 -= 8 ** 3
result = n_b10
return result
|
Lily needs to buy new notebooks for school. A package of 6 notebooks costs $12. If she has $36, how many packages of notebooks can she buy? | def solve() -> int:
money = 36
package_price = 12
num_packages = money // package_price
result = num_packages
return result
|
Grace had 80 pencils. She gave 1/4 of her pencils to her friend, used 1/5 of the remaining pencils, and then gave 1/2 of the remaining pencils to her sister. How many pencils did she have left? | def solve() -> int:
grace_pencils = 80
friends_pencils = grace_pencils * 1/4
grace_pencils = grace_pencils - friends_pencils
used_pencils = grace_pencils * 1/5
grace_pencils = grace_pencils - used_pencils
sister_pencils = grace_pencils * 1/2
grace_pencils = grace_pencils - sister_pencils
... |
Tyler has 50 soccer cards. He has one-third as many basketball cards as soccer cards. How many basketball cards does Tyler have? | def solve() -> int:
basketball = 0
soccer = 50
basketball = soccer // 3
result = basketball
return result
|
Leo has a fish tank that can hold 20 liters of water. He fills it with 15 liters of water and adds 5 goldfish. Each goldfish needs 2 liters of water to live comfortably. How much more water does he need to add to the tank to make the goldfish happy? | def solve() -> int:
capacity = 20
water = 15
goldfish = 5
water_per_goldfish = 2
water_needed = goldfish * water_per_goldfish
water_to_add = water_needed - water
result = water_to_add
return result
|
A car travels 120 miles in 2 hours. What is the average speed of the car in miles per hour? | def solve() -> int:
speed = 120/2
result = speed
return result
|
Student: A recipe for muffins requires 2 eggs, 1 cup flour, and 1/2 cup sugar. If Sam wants to make 12 muffins, how many eggs, cups of flour, and cups of sugar will he need in total? | def solve() -> int:
eggs_per_batch = 2
flour_per_batch = 1
sugar_per_batch = 1/2
batches = 12
eggs_total = eggs_per_batch * batches
flour_total = flour_per_batch * batches
sugar_total = sugar_per_batch * batches
result = (eggs_total, flour_total, sugar_total)
return result
|
Student: A room has a total area of 475 square feet. Mark wants to buy carpet for the entire room that costs $3 per square foot. How much does Mark need to spend for the carpet? | def solve() -> int:
area = 475
cost = 3
total_cost = area * cost
result = total_cost
return result
|
In a park, there are 30 benches, of which 10 are occupied and the rest are vacant. If 5 more benches are occupied, what percentage of the benches are vacant? | def solve() -> int:
total_benches = 30
occupied_benches = 10
vacant_benches = total_benches - occupied_benches
occupied_benches += 5
percentage_vacant = (vacant_benches / total_benches) * 100
result = percentage_vacant
return result
|
Tina is cleaning her fish tank. It takes her 45 minutes to clean the entire tank. She can clean each corner in 5 minutes. How many corners does her fish tank have? | def solve() -> int:
total_time = 45
time_per_corner = 5
num_corners = total_time // time_per_corner
result = num_corners
return result
|
A store is having a 20% off sale. If a shirt originally costs $25, how much does it cost during the sale? | def solve() -> int:
original_price = 25
discount_percent = 0.2
discount_amount = original_price * discount_percent
sale_price = original_price - discount_amount
result = sale_price
return result
|
Ria and her friends collected 28 shells together at the beach. Ria grabbed a one-third of the shells, and her friends equally split the remainders. How many shells did each of her friend get? | def solve() -> int:
shells = 28
ria_shells = shells // 3
left_shells = shells - ria_shells
result = left_shells / (shells // 3)
return result
|
Mrs. Rodriguez bought 3 rugs for $120 each and 4 tablecloths for $60 each. She got a 15% discount for all items she bought. How much does Mrs. Rodriguez pay in total? | def solve() -> int:
price_rugs = 120
price_tablecloths = 60
num_rugs = 3
num_tablecloths = 4
discount = 0.15
subtotal = (price_rugs * num_rugs) + (price_tablecloths * num_tablecloths)
total_discount = subtotal * discount
total_after_discount = subtotal - total_discount
result = total... |
Student: A family is planning a road trip. The total distance is 500 miles, and they need to fill up their gas tank every 250 miles. If gas costs $50 per fill-up, how much should they budget for gas expenses for the whole trip? | def solve() -> int:
distance = 500
fill_up_distance = 250
cost_per_fill_up = 50
num_fill_ups = distance // fill_up_distance
total_cost = num_fill_ups * cost_per_fill_up
result = total_cost
return result
|
Juan reads 50 pages of a book on weekdays and 15 pages on weekends. If it takes 6 weeks for Juan to finish his book, how many pages that book has? | def solve() -> int:
pages_per_day_weekdays = 50
pages_per_day_weekends = 15
weeks = 6
total_pages_weekdays = pages_per_day_weekdays * 7 * weeks
total_pages_weekends = pages_per_day_weekends * 2 * weeks
total_pages = total_pages_weekdays + total_pages_weekends
result = total_p... |
John has 24 candies. He gives 5 to his sister and 7 to his friend. How many candies does he have left? | def solve() -> int:
candies = 24
candies = candies - 5
candies = candies - 7
result = candies
return result
|
Tom needs to fence his rectangular garden. The garden is 10 feet longer than it is wide. The fence costs $5 per linear foot. If Tom has $800 to spend, what is the largest area he can fence in? | def solve() -> int:
width = (800/(5*2 + 10))*2
length = width + 10
area = width * length
result = area
return result
|
A shipping company sends 1000 packages in a day. If the company charges $10 per package and has a 5% discount for bulk shipping (for orders more than 200), calculate how much the company makes in a day. | def solve() -> int:
num_packages = 1000
price_per_package = 10
bulk_discount_rate = 5/100
bulk_threshold = 200
total_daily_revenue = num_packages * price_per_package
if num_packages > bulk_threshold:
total_daily_revenue = total_daily_revenue - (total_daily_revenue * bulk_discount_rate)
... |
Peter is a gardener. He needs to plant 20 rows of flowers. Each row requires 10 seeds. How many seeds does he need in total? | def solve() -> int:
rows = 20
seeds_per_row = 10
total_seeds = rows * seeds_per_row
result = total_seeds
return result
|
Michelle has 7 blue shirts and 11 red shirts. If she chooses to buy twice the number of green shirts as the number of blue shirts she has, and then discards one of the red shirts, how many shirts does she have in total? | def solve() -> int:
blue_shirts = 7
red_shirts = 11
green_shirts = 2 * blue_shirts
green_shirts_chosen = green_shirts
red_shirts_discarded = 1
total_shirts = blue_shirts + red_shirts + green_shirts_chosen - red_shirts_discarded
result = total_shirts
return result
|
Student: Faye is three times older than Oscar. If Oscar is 11, how old is Faye? | def solve() -> int:
oscar_age = 11
faye_age = oscar_age * 3
result = faye_age
return result
|
A car travels at a speed of 72 km/h. If the distance from point A to point B is 432 km away, how many hours will it take to travel from point A to point B? | def solve() -> int:
result = 36/5
return result
|
There are 24 cupcakes in a box. If 4 cupcakes are eaten and 8 cupcakes are given away, how many cupcakes are left in the box? | def solve() -> int:
cupcakes = 24
cupcakes -= 4
cupcakes -= 8
result = cupcakes
return result
|
William has a remaining balance on his home equity loan. Last month, he paid $600 and this month, he paid $50 more than that. If his total balance is $25,000, how much does he still owe? Lena swam for 4 hours to cover 6 km. If she keeps up the same pace, how many minutes will it take her to swim 18 km? | def solve() -> int:
last_month_payment = 600
this_month_payment = last_month_payment + 50
total_balance = 25000
remaining_balance = total_balance - last_month_payment - this_month_payment
distance = 18
time = (distance / 6) * 4 * 60
result = remaining_balance, time
return resul... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.