question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
At a petting zoo, Lily counted 50 goats, 40 rabbits, and 10 ponies. She also saw 5 times more chickens than ponies, a quarter as many lambs as goats, and four times as many ducks as the total number of rabbits and ponies. What was the total number of animals Lily counted at the petting zoo? | def solve() -> int:
goats = 50
rabbits = 40
ponies = 10
chickens = 5 * ponies
lambs = goats / 4
ducks = 4 * (rabbits + ponies)
total_animals = goats + rabbits + ponies + chickens + lambs + ducks
result = total_animals
return result
|
Student: A factory can produce 500 items in 8 hours. How many hours would it take to produce 1800 items? | def solve() -> int:
items_produced = 500
hours_taken = 8
items_required = 1800
hours_required = (items_required / items_produced) * hours_taken
result = hours_required
return result
|
Possible questions and programs are: Beth, Brianna and Ben all have chickens. Beth has 12 chickens. Brianna has 3 less than half as many chickens as Beth. Ben has 4 more than three times as many chickens as Brianna. How many chickens does Ben have? | def solve() -> int:
b = 12
br = b // 2 - 3
bn = 3 * br + 4
result = bn
return result
|
It takes 40 minutes to bake a cake and another 20 minutes to frost it. If one batch of cake batter can make 2 cakes but the frosting spatula can only frost 1 cake at a time, how long would it take for Sarah to finish baking and frosting 12 cakes? | def solve() -> int:
bake_time = 40
frost_time = 20
cakes_per_batch = 2
frosting_per_batch = 1
total_cakes = 12
batches_needed = total_cakes / cakes_per_batch
total_frosting_time = batches_needed * frost_time
total_baking_time = batches_needed * bake_time
total_time = total_... |
A cell phone company offers a plan that costs $20 per month for unlimited calls and text messages. If a customer wants to sign up for this plan for a year, how much does it cost in total? | def solve() -> int:
plan_price = 20
months_in_a_year = 12
total_price = plan_price * months_in_a_year
result = total_price
return result
|
If Tom can jump 9 inches higher than twice the height that his friend, Jerry, can jump and they jump a total of 39 inches, how high can Jerry jump? | def solve() -> int:
j = 10
result = j
return result
|
A physicist discovered three planets in one orbit. The physicist dated the first planet as 1000 years more recent than the second planet. The third planet was dated 9500 years older than the first planet. The fourth planet was five times as old as the third planet. If the physicist studied the fourth planet's atmospher... | def solve() -> int:
second_planet = 0
first_planet = second_planet - 1000
third_planet = first_planet + 9500
fourth_planet = third_planet * 5
fourth_planet_date = 5000000
second_planet_date = fourth_planet_date - fourth_planet + third_planet - first_planet - 1000
result = second_planet_... |
Student: A bacteria colony doubles in size every hour. If the colony has 1000 bacteria at noon, how many bacteria will it have at 4 pm? | def solve() -> int:
bacteria = 1000
bacteria = bacteria * 2
bacteria = bacteria * 2
bacteria = bacteria * 2
bacteria = bacteria * 2
result = bacteria
return result
|
Jenny is preparing a fruit platter for a party. 1/3 of the platter has watermelon, 60% has pineapple, and the rest has both watermelon and pineapple. If Jenny puts 8 pieces of pineapple in each pineapple serving and prepares 36 servings, how many pieces of pineapple does she need? | def solve() -> int:
watermelon_portion = 1/3
pineapple_portion = 0.6
both_portion = 1 - watermelon_portion - pineapple_portion
pineapple_servings = 36
pieces_per_serving = 8
total_pineapple_pieces = pineapple_servings * pieces_per_serving
result = total_pineapple_pieces / pine... |
Max had a collection of 50 stamps. He traded 8 stamps for new ones and then lost 15 stamps. His mother gave him twice as many stamps as he lost. How many stamps did Max have in the end? | def solve() -> int:
stamps = 50
traded = 8
lost = 15
given_by_mother = 2 * lost
stamps = stamps - traded - lost + given_by_mother
result = stamps
return result
|
A circle has a radius of 7 cm. Find the circumference and the area of the circle. | def solve() -> int:
radius = 7
pi = 22/7
circumference = 2*pi*radius
area = pi*(radius**2)
result = (circumference, area)
return result
|
A soccer team has 23 players. If each player plays 90 minutes in a game, how many minutes are played in total? | def solve() -> int:
num_players = 23
mins_per_player = 90
total_mins = num_players * mins_per_player
result = total_mins
return result
|
A restaurant has 30 tables that can each seat 4 people. On average, each table is fully occupied for 3 hours during lunchtime and 4 hours during dinnertime. The restaurant is open for 6 hours for lunch and 8 hours for dinner. How many customers does the restaurant seat on a typical day? | def solve() -> int:
total_customers = 30 * 4
customers_per_hour_lunch = total_customers / 3
customers_per_hour_dinner = total_customers / 4
total_customers_lunch = customers_per_hour_lunch * 6
total_customers_dinner = customers_per_hour_dinner * 8
total_customers_per_day = total_customers_lunch ... |
Student: The ratio of cherries to blueberries in a certain basket is 7:2. If there are 28 cherries in the basket, how many blueberries are there? | def solve() -> int:
cherries = 28
ratio_c = 7
ratio_b = 2
blueberries = cherries * ratio_b / ratio_c
result = blueberries
return result
|
Result: 180 A company has 50 employees and wants to give them all a $1000 bonus. If the total payroll including bonus cannot exceed $300,000, how many employees will miss out on the bonus? | def solve() -> int:
no_of_employees = 50
bonus_per_employee = 1000
total_payroll = 300000
total_bonus = no_of_employees * bonus_per_employee
no_of_emp_no_bonus = no_of_employees - (total_payroll - total_bonus) // bonus_per_employee
result = no_of_emp_no_bonus
return result
|
If the cost of 12 pens is $48, what is the cost of each pen? | def solve() -> int:
cost_per_pen = 48/12
result = cost_per_pen*1.0
return result
|
am has 18 dollars. He spends one-third of his money on books, one-sixth on pens and the rest on pencils. How much money does Sam have left? | def solve() -> int:
totalMoney = 18
moneyForBooks = totalMoney / 3
moneyForPens = totalMoney / 6
moneyForPencils = totalMoney - moneyForBooks - moneyForPens
result = moneyForPencils
return result
|
Michael is going on a road trip. He needs to get 10 gallons of gasoline for his car, which costs $2.70 per gallon. How much money will he need to prepare for the trip? | def solve() -> int:
numGallons = 10
pricePerGallon = 2.70
totalCost = numGallons * pricePerGallon
result = totalCost
return result
|
A car travels at an average speed of 50 miles per hour for 3 hours. How far does the car travel? | def solve() -> int:
speed = 50
time = 3
distance = speed * time
result = distance
return result
|
Ava has 7 times as many coins as Ben. Ben has a third as many coins as Cole. If Cole has 36 coins, how many coins does Ava have? | def solve() -> int:
c = 36
b = c / 3
a = 7 * b
result = a
return result
|
Adam spent $1000 on Google Ads. The ads brought 80 conversions to his website and 50% of those conversions bought something for $75. How much profit does Adam gain from Google Ads? | def solve() -> int:
ads_cost = 1000
conversions = 80
conversion_rate = 0.5
purchase_amount = 75
total_purchase = conversions * conversion_rate
profit = total_purchase * purchase_amount - ads_cost
result = profit
return result
|
Mary is twice the age of John. John is 10. How old is Mary? | def solve() -> int:
john = 10
mary = john*2
result = mary
return result
|
Lily wants to save up 25% of the cost of a $8,000 diamond ring for a down payment. She saves 10% of her $75,000 salary every month. How long will it take? Samantha drinks a can of energy drink that is 8 ounces every 3 hours for the 12 hours she is working. Twice a day she also drinks a can that is 15% larger than those... | def solve() -> int:
cost = 8000
down_payment = 0.25 * cost
monthly_savings = 0.1 * 75000
months = down_payment / monthly_savings
months = round(months + 0.5)
result = months
regular_can = 8
regular_rate = 1 / 3
larger_can = 1.15 * regular_... |
A cake recipe requires 1/4 cup of milk. If one gallon of milk costs $3.50 and there are 16 cups in one gallon, how much will the milk for this recipe cost? | def solve() -> int:
milk_gallon_cost = 3.5
milk_gallon_volume = 16
recipe_milk_volume = 0.25
recipe_milk_cost = (recipe_milk_volume / milk_gallon_volume) * milk_gallon_cost
result = recipe_milk_cost
return result
|
There are 3 bags of marbles. Bag 1 has 12 red marbles and 5 green marbles. Bag 2 has 8 red marbles and 7 blue marbles. Bag 3 has 6 green marbles and 4 blue marbles. How many marbles are there in total? | def solve() -> int:
bag1 = 12 + 5
bag2 = 8 + 7
bag3 = 6 + 4
total = bag1 + bag2+bag3
result = total
return result
|
Ava wants to buy 6 pairs of earrings that each cost 8 dollars, two necklaces that each cost 14 dollars and one bracelet that costs 25 dollars. If there are 4 quarters in a dollar, how much will Ava pay total, in quarters? | def solve() -> int:
earrings_cost = 8
necklace_cost = 14
bracelet_cost = 25
total_cost = (6 * earrings_cost) + (2 * necklace_cost) + bracelet_cost
total_quarters = total_cost * 4
result = total_quarters
return result
|
Student: Eric collected 5 times as many coins as Frank did. Frank collected half the number of coins as Gina did. How many coins did Eric and Frank collect altogether if Gina collected 120 coins? | def solve() -> int:
eric_coins = 0
frank_coins = 0
gina_coins = 120
frank_coins = gina_coins / 2
eric_coins = frank_coins * 5
total_coins = eric_coins + frank_coins
result = total_coins
return result
|
A gym has 40% treadmills, 30% weights, and the rest are benches. If there are 20 machines in the gym and each machine weighs 100 pounds, how much do all the benches in the gym weigh? | def solve() -> int:
treadmills = 0.4 * 20
weights = 0.3 * 20
benches = 20 - treadmills - weights
weight_per_bench = 100
total_weight_of_benches = benches * weight_per_bench
result = total_weight_of_benches
return result
|
Lisa has 80 dollars in her bank account. She deposits 15 dollars every month. She also withdraws 10 dollars every month for her phone bill. How much money will she have in her account after one year? | def solve() -> int:
net_change = 15 - 10
total_change = net_change * 12
final_balance = 80 + total_change
result = final_balance
return result
|
Mr. Johnson earns $600 a week. He spends $200 on groceries, $150 on bills, and $100 on gasoline every week. If he wants to save 10% of his earnings every week and $500 for a vacation in 4 months, how much money does he have left for miscellaneous uses after planning for these expenditures? | def solve() -> int:
earnings = 600
groceries = 200
bills = 150
gasoline = 100
vacation_savings = 500 / 16
savings = 0.1 * earnings
misc_expenses = earnings - groceries - bills - gasoline - savings - vacation_savings
result = misc_expenses
return result
|
There are 16 cupcakes in a box and half a dozen more donuts than cupcakes. How many baked goods are in the box? | def solve() -> int:
cupcakes = 16
donuts = cupcakes + 6
baked_goods = cupcakes + donuts
result = baked_goods
return result
|
Every four years a city hosts a marathon race in which runners from all over the world compete in. Over eight years, a total of 2544 athletes participated in the race. The number of athletes running in the race doubled every other year. How many athletes participated in the first marathon? | def solve() -> int:
years = 8
total_athletes = 2544
athletes_first_marathon = total_athletes / (2 ** (years // 2 - 1))
result = athletes_first_marathon
return result
|
**Question 6**: Roger was working on a project. He had 5 people helping him and they finished 4 tasks. How many tasks are left? | def solve() -> int:
total_tasks = 5
finished_tasks = 4
remaining_tasks = total_tasks - finished_tasks
result = remaining_tasks
return result
|
Receptionist Sarah is checking in 40 guests at a hotel. One-sixth of the guests have special requests, which add an extra minute to the check-in time. If it takes her 3 minutes to check in each guest without special requests, how long will it take Sarah to check in everyone? | def solve() -> int:
num_guests = 40
special_requests = num_guests / 6
regular_guests = num_guests - special_requests
time_per_regular_guest = 3
time_per_special_guest = time_per_regular_guest + 1
total_time = (regular_guests * time_per_regular_guest) + (special_requests * time_per_special_g... |
A crate of oranges, which weighs 30 kilograms, costs $45. If John sells it for $1.50 per kilogram, how much will be his profit? | def solve() -> int:
cost_price = 45
weight = 30
selling_price = 1.5
profit = (selling_price * weight) - cost_price
result = profit
return result
|
A pizza restaurant has 15 different types of pizzas. If each pizza has 8 slices, how many slices can be produced in total? | def solve() -> int:
total_pizza_types = 15
slices_per_pizza = 8
total_slices = total_pizza_types * slices_per_pizza
result = total_slices
return result
|
If Sarah has 3 times as many pencils as Tom and Tom has 8 pencils. How many pencils do they have together? | def solve() -> int:
Tom = 8
Sarah = Tom * 3
total_pencils = Tom + Sarah
result = total_pencils
return result
|
Katrina starts her workday at the bank at 8:00 a.m. She works there until 12:00 p.m., then takes a lunch break until 1:00 p.m. After lunch, she works for another five hours and then leaves. How many hours does Katrina spend at the bank? | def solve() -> int:
start_time = 8
end_time = 12
lunch_start = 12
lunch_end = 13
after_lunch_hours = 5
total_hours = (end_time - start_time) + (lunch_end - lunch_start) + after_lunch_hours
result = total_hours
return result
|
A company sells a product for $10 and they have a profit margin of 40%. What is the cost of making this product? | def solve() -> int:
selling_price = 10
profit_margin_percentage = 40
cost_of_making_product = selling_price / (1 + profit_margin_percentage/100)
result = cost_of_making_product
return result
|
A student has $100 to buy books. The student bought 4 books for $24 each. How much money does the student have left? | def solve() -> int:
start_amount = 100
book_cost = 24
number_books = 4
total_cost = book_cost * number_books
remaining_amount = start_amount - total_cost
result = remaining_amount
return result
|
A triangle has a height of 6 cm and a base of 8 cm. What is the area of the triangle? | def solve() -> int:
height = 6
base = 8
area = 0.5 * base * height
result = area
return result
|
If the area of a rectangular box is 80cm² and its width is 4/5 of its length, what is the width of the box? | def solve() -> int:
area = 80
length = area / (4/5)
width = (4/5) * length
result = width
return result
|
A student took a 20 question multiple choice test. Each correct answer is worth 5 points, each incorrect answer is worth -2 points, and each unanswered question is worth 0 points. They want to know the student's score if they answered 15 questions correctly, 2 questions incorrectly, and did not answer the rest. | def solve() -> int:
total_questions = 20
correct_answers = 15
incorrect_answers = 2
unanswered_questions = total_questions - correct_answers - incorrect_answers
score = correct_answers * 5 + incorrect_answers * -2 + unanswered_questions * 0
result = score
return result
|
A florist has 50 roses, 30 lilies and 20 daisies. If they sell 10 roses for $2, 5 lilies for $3, and 4 daisies for $1.5, how much total money did they make? | def solve() -> int:
roses_sold = 10
roses_price = 2
lilies_sold = 5
lilies_price = 3
daisies_sold = 4
daisies_price = 1.5
total_money = roses_sold * roses_price + lilies_sold * lilies_price + daisies_sold * daisies_price
result = f'<<<{total_money}>>>'
result = total_money
return... |
Jonah saved 75 cents last week. If he saved 3 times as much each week for the next 5 weeks, how much money will he have saved in 5 weeks? | def solve() -> int:
money_saved = 75
for i in range (1,5):
money_saved = money_saved + 3*75
result = money_saved
return result
|
James and Mary are packing for their beach trip. James has brought 2 pairs of flip flops and Mary has 4 in her bag. They will need to wear flip flops for 5 days. How many days will they have to share flip flops? | def solve() -> int:
james_flip_flops = 2
mary_flip_flops = 4
total_flip_flops = james_flip_flops + mary_flip_flops
days = 5
shared_flip_flops = total_flip_flops - (2 * days)
result = shared_flip_flops
return result
|
Sarah has 3 times as many apples as Emma does. If Sarah has 36 apples, how many apples do they have in total? | def solve() -> int:
sarah_apples = 36
emma_apples = sarah_apples / 3
total_apples = sarah_apples + emma_apples
result = total_apples
return result
|
A recipe calls for 2 1/2 cups of flour, but you only have a 1-cup measuring cup. How many times do you have to use the cup to measure out the flour? | def solve() -> int:
num_1cup_measurings = int(2.5//1)
result = num_1cup_measurings
return result
|
A supermarket charges $5 per pound of bananas bought. If Tom bought 3 pounds of bananas and paid for them, while Sarah bought 2 pounds of bananas and paid for them, how much did they pay for the bananas? | def solve() -> int:
price_per_pound = 5
tom_bananas = 3
sarah_bananas = 2
tom_cost = tom_bananas * price_per_pound
sarah_cost = sarah_bananas * price_per_pound
total_cost = tom_cost + sarah_cost
result = total_cost
return result
|
Giuseppe has a collection of 50 toy cars. He gives away 18 toy cars to his neighbor and 7 toy cars break. How many toy cars does he have left in his collection? | def solve() -> int:
toy_cars = 50
given_away = 18
broken = 7
remaining = toy_cars - given_away - broken
result = remaining
return result
|
Anna is 7 years younger than Mark. Mark is half of Emily's age. If Emily is 30, how old is Anna? | def solve() -> int:
age_mark = 30 / 2
age_anna = age_mark - 7
result = age_anna
return result
|
A car travels at a speed of 50 miles per hour. How much time will it take for the car to travel a distance of 200 miles? | def solve() -> int:
speed = 50
distance = 200
time = distance / speed
result = time
return result
|
A room has 6 windows and each window measures 2 feet by 3 feet. What is the total area for the 6 windows together? | def solve() -> int:
windows = 6
length = 2
width = 3
window_area = length * width
result = window_area * windows
return result
|
A classroom has 28 students and 7 teachers. If each teacher has 4 students, how many students are left in the classroom? | def solve() -> int:
num_teachers = 7
students_per_teacher = 4
total_teachers_students = num_teachers * students_per_teacher
total_students = 28
students_left = total_students - total_teachers_students
result = students_left
return result
|
Lily wants to make some bracelets. She has 36 beads of different colors. She uses 9 beads for each bracelet. How many bracelets can she make? | def solve() -> int:
beads = 36
beads_per_bracelet = 9
result = beads // beads_per_bracelet
return result
|
A student scored 80 on the first exam and 90 on the second exam. If the exams are weighted equally, what was the student's average score? | def solve() -> int:
exam1_score = 80
exam2_score = 90
average_score = (exam1_score + exam2_score) / 2
result = average_score
return result
|
Sam is having a party for 10 friends. He wants to buy pizza - each pizza can feed 4 people. A small pizza has 6 slices and a large pizza has 8 slices. Small pizzas cost $8 each and large pizzas cost $12 each. What is the minimum number of pizzas Sam has to buy, and how much would it cost? | def solve() -> int:
small_pizza_price = 8
small_pizza_slices = 6
small_pizza_size = 4
large_pizza_price = 12
large_pizza_slices = 8
large_pizza_size = 4
num_friends = 10
slices_needed = num_friends / small_pizza_size
small_pizzas_needed = slices_needed / small_pizza_slices
small_... |
Student: The winning team scored 4 times as many points as the losing team in the first quarter and 1.5 times as much points as the losing team in the second quarter. At the end of the third quarter, the winning team had half the number of points it had in the second quarter. If the total points the winning team scored... | def solve() -> int:
winning_first = 4 * 10
losing_first = 10
winning_second = 1.5 * losing_first
losing_second = losing_first
winning_third = winning_second / 2
losing_third = losing_second
winning_total = winning_first + winning_second + winning_third
winning_fourth = 75 - winning... |
If a car drives 60 miles per hour, how long will it take to drive 240 miles? | def solve() -> int:
distance = 240
speed = 60
time = distance/speed
result = time
return result
|
Mrs. Rodriguez arrives at her music class and finds only 2 students present at each of the 8 tables in the room. A few students are missing for different reasons. If 3 boys left to go to a doctor's appointment, and 4 times more students went to the nurse's office, and 3 groups of 5 students each joined the class, how m... | def solve() -> int:
students_per_table = 2
num_tables = 8
total_students_present = students_per_table * num_tables
boys_left = 3
students_to_nurse = 4 * boys_left
students_joined = 3 * 5
total_students = total_students_present - boys_left - students_to_nurse + s... |
In a hospital, there are 18 male and 22 female nurses. The hospital administration wants to assign each male nurse to a female nurse for a patient care unit. If it is possible, how many male and female nurses will not have a partner? | def solve() -> int:
male_nurses = 18
female_nurses = 22
min_nurses = min(male_nurses, female_nurses)
male_without_partner = male_nurses - min_nurses
female_without_partner = female_nurses - min_nurses
result = male_without_partner, female_without_partner
return result
|
A jewelry store has a sale of 20% off on all rings. If a customer purchased three rings worth $300 each, how much would she have saved during the sale? | def solve() -> int:
price_per_ring = 300
total_price = price_per_ring * 3
discount = 0.2 * total_price
result = discount
return result
|
Nathan has $24 more than Rob. If Rob has $36, how much money does Nathan have? | def solve() -> int:
rob = 36
nathan = rob + 24
result = nathan
return result
|
Henry wants to save up to buy a car that costs $5000. He earns $8 per hour walking dogs. How many hours per day does he need to work for a year to save up for the car? | def solve() -> int:
car_cost = 5000
hourly_earning = 8
days_per_year = 365
total_earning_per_year = hourly_earning * days_per_year
hours_per_day = car_cost / total_earning_per_year
result = hours_per_day
return result
|
Student: Ryan has 13 strawberries, 17 grapes and 6 bananas. What is the average cost of each piece of fruit if strawberries cost $1, grapes cost $3 and bananas cost $2? | def solve() -> int:
strawberries = 13
grapes = 17
bananas = 6
total_cost = (strawberries * 1) + (grapes * 3) + (bananas * 2)
total_fruits = strawberries + grapes + bananas
result = total_cost / total_fruits
return result
|
A book costs $12. The store owner decided to increase its price by 18% so that he could earn more profit. Few weeks had past but the book was still not sold. So, the owner decided to lower the price by 8%. By how much was the final price lower than the original price? | def solve() -> int:
original_price = 12
increase_percentage = 18
decrease_percentage = 8
price_after_increase = original_price + (original_price*increase_percentage/100)
price_after_decrease = price_after_increase - (price_after_increase*decrease_percentage/100)
result = original_price... |
Student: A store has a sale with a 10% discount on all items. If a jacket is originally $60, how much will it cost after the discount? | def solve() -> int:
original_price = 60
discount_rate = 0.1
discounted_price = original_price * (1 - discount_rate)
final_price = original_price - discounted_price
result = final_price
return result
|
David is selling lemonade at a fair. He has 10 liters of lemonade in a dispenser. He sells each cup of lemonade for 50 cents. Each cup holds 250 milliliters of lemonade. He also gives a free refill to every fifth customer. How much money will he make if he sells all the lemonade? | def solve() -> int:
lemonade = 10
cup_size = 0.25
cup_price = 0.5
free_refill = 5
cups = lemonade / cup_size
refills = cups // free_refill
paid_cups = cups - refills
money = paid_cups * cup_price
result = money
return result
|
If suzy has 40 pounds of chocolate and each chocolate bar weighs 0.25 pounds, how many more chocolate bars does she need to make 100 bars? | def solve() -> int:
chocolate_weight = 0.25
total_chocolate = 40
target_bars = 100
current_bars = total_chocolate / chocolate_weight
remaining_bars = target_bars - current_bars
result = remaining_bars
return result
|
**** Jack has to shop for clothing for his family. He buys 10 shirts at a cost of $20.00 each, 8 pairs of jeans at a cost of $30.00 each, and 4 coats at a cost of $75.00 each. How much does he spend in total? | def solve() -> int:
units_shirts = 10
cost_shirts = 20
units_jeans = 8
cost_jeans = 30
units_coats = 4
cost_coats = 75
total_cost = (units_shirts * cost_shirts) + (units_jeans * cost_jeans) + (units_coats * cost_coats)
result = total_cost
return result
|
Lily is mixing paints to create paintings for an art gallery. Each painting requires twice the amount of white paint as it does red paint. If each painting requires 8 red paint tubes and Lily has 192 paint tubes with equal amounts of red and white paint, how many paintings can she create? | def solve() -> int:
red_paint_tubes = 8
total_paint_tubes = 192
white_paint_tubes = total_paint_tubes / 2
paintings = white_paint_tubes / red_paint_tubes
result = paintings
return result
|
A rectangle has a length of 12 and a width of 5. What is the perimeter of the rectangle? | def solve() -> int:
perimeter = 2*(12+5)
result = perimeter
return result
|
Sarah purchased a shirt on sale for 25% off of the original price of $32.99. She also had a coupon for an additional 10% off the sale price. What was the final price she paid including a 6% sales tax? | def solve() -> int:
original_price = 32.99
discount = 0.25 * original_price
sale_price = original_price - discount
additional_discount = 0.1 * sale_price
subtotal = sale_price - additional_discount
tax = 0.06 * subtotal
total_cost = subtotal + tax
result = f'<<<{total_cost}>>>'
resul... |
John is buying a new bike that costs $120. If he gets paid $15 per hour and works 12 hours a week, how many weeks will it take him to save up enough money to buy the bike? | def solve() -> int:
bike_cost = 120
hourly_wage = 15
hours_per_week = 12
hours_to_save = bike_cost / hourly_wage
weeks_to_save = hours_to_save / hours_per_week
result = weeks_to_save
return result
|
Harper has a total of $2.80 in quarters, dimes, and nickels. If she has 8 quarters and 20 dimes, how many nickels does she have? | def solve() -> int:
q = 8
d = 20
qd_value = (q * 25) + (d * 10)
total_value = 280
n_value = total_value - qd_value
n = n_value // 5
result = n
return result
|
10. Charlotte wants to buy 12 pairs of socks. Each pair costs $3. How much does she need to pay in total? | def solve() -> int:
def price (x):
return x*3
pairs = 12
total = price(pairs)
result = total
return result
|
Rachel is growing her hair to donate it to a charity that makes wigs for individuals with hair loss due to chemotherapy. Her hair is currently 18 inches long. She needs to donate 24 inches to make a wig. She wants her hair to be 10 inches long after the donation. How much longer does she have to grow her hair? Samantha... | def solve() -> int:
hair_length = 18
donate_length = 24
desired_length = 10
length_to_grow = donate_length - desired_length
total_length_needed = donate_length - hair_length
cherries_needed = 15 + 20*0.5
cherries_left = 40 - cherries_needed
result = length_to_grow + cherri... |
Rachel has a straight-line plotter and a wavy-line plotter. She has to calibrate the wavy-line plotter seven times for every one time she calibrates the straight-line plotter. If she calibrates the straight-line plotter 21 times, how many times does she calibrate both plotters combined? | def solve() -> int:
straight_line_calibrations = 21
wavy_line_calibrations = straight_line_calibrations * 7
combined_calibrations = straight_line_calibrations + wavy_line_calibrations
result = combined_calibrations
return result
|
A restaurant has 50 tables and the probability that a table is vacant is 30%. A reservation is made for 12 people. What is the probability that the restaurant can accommodate the reservation? | def solve() -> int:
total_tables = 50
vacant_percent = 30
reserved_people = 12
vacant_tables = vacant_percent/100 * total_tables
probability_of_not_accommodating = 1
for i in range(1, reserved_people+1):
probability_of_not_accommodating *= (vacant_tables-i+1)/vacant_tables
probabilit... |
John wants to improve his basketball skills. He practices for 1 hour every day except for Sundays, when he spends 2 hours practicing. How many hours does he practice in a week? | def solve() -> int:
mon_to_sat = 1
sunday = 2
total_hours = (mon_to_sat * 6) + sunday
result = total_hours
return result
|
If a car travels 45 miles per hour for 3 hours, how far did it travel? | def solve() -> int:
speed = 45
time = 3
distance = speed * time
result = distance
return result
|
Alex went to a movie theater and bought two adult tickets for $12 each and four children's tickets for $6 each. He also bought two large popcorns for $8 and two large sodas for $5 each. If the theater charged a 10% tax on all purchases, how much did Alex spend in total? | def solve() -> int:
subtotal = 2*12 + 4*6 + 2*8 + 2*5
total = 1.10*subtotal
result = round(total, 2)
return result
|
A pool has a capacity of 16,500 gallons. If 3,300 gallons are removed, what percent of the original capacity does that represent? | def solve() -> int:
original_capacity = 16500
removed_gallons = 3300
percent_removed = (removed_gallons/original_capacity)*100
result = percent_removed
return result
|
Student: Sarah has 3 times as many marbles as Tom. If Tom has 20 marbles, how many marbles does Sarah have? | def solve() -> int:
tom_marbles = 20
sarah_marbles = 3 * tom_marbles
result = sarah_marbles
return result
|
A box contains 250 balls. If 60% of the balls are red, how many are not red? | def solve() -> int:
total_balls = 250
red_percentage = 0.6
red_balls = red_percentage * total_balls
non_red_balls = total_balls - red_balls
result = non_red_balls
return result
|
Malcolm has 4 jars of coins, each with 42 coins. How many coins has he collected in total? | def solve() -> int:
total = 0
for jar in range(4):
total += 42
result = total
return result
|
A train carrying 80 passengers and 25 staff members derailed. 4 passengers had to be taken to the hospital. Four times as many staff members were injured as passengers. What is the total number of people who can continue their journey? | def solve() -> int:
passengers = 80
staff_members = 25
passengers_injured = 4
staff_members_injured = 4 * passengers_injured
total_injured = passengers_injured + staff_members_injured
total_people = passengers + staff_members
people_continuing_journey = total_people - total_injured
... |
A rectangular pool is twice as long as it is wide, and its perimeter is 96 feet. How long is the pool? | def solve() -> int:
width = 96 / (2 + 2 * 2 ** 0.5)
length = 2 * width
result = length
return result
|
Mark has a coupon for 10% off his purchase. If he wants to buy a shirt that costs $30 and a pair of pants that cost $40, how much will he save with the coupon? | def solve() -> int:
shirt_cost = 30
pants_cost = 40
subtotal = shirt_cost + pants_cost
discount = subtotal * 0.1
result = discount
return result
|
If x varies jointly as y and z^3, and x = 12 when y = 2 and z = 1, what is x when y = 4 and z = 2? | def solve() -> int:
x = 12
y = 2
z = 1
k = x/(y*(z**3))
new_y = 4
new_z = 2
new_x = k*new_y*(new_z**3)
result = f'<<<{new_x}>>>'
result = new_x
return result
|
Kelly bought 5 necklaces at $4 each. She also bought earrings at $3 each. How many earrings did Kelly buy if she paid a total of $31 for the necklaces and earrings? | def solve() -> int:
necklace_cost = 4
earring_cost = 3
necklace_num = 5
total = 31
necklace_amount = necklace_cost * necklace_num
earring_amount = total - necklace_amount
earring_num = earring_amount / earring_cost
result = earring_num
return result
|
A pizza restaurant charges $10 for a small pizza with a diameter of 8 inches and $14 for a large pizza with a diameter of 12 inches. What is the cost per square inch for a small pizza and for a large pizza? | def solve() -> int:
small_price = 10
large_price = 14
small_radius = 8 / 2
large_radius = 12 / 2
small_area = 3.14 * small_radius ** 2
large_area = 3.14 * large_radius ** 2
small_price_per_square_inch = small_price / small_area
large_price_per_square_inch = large_price / large_area
r... |
If it takes 5 hours for a bird to fly 1200 miles, how long would it take for the bird to fly 1800 miles? | def solve() -> int:
distance1 = 1200
time1 = 5
rate = distance1/time1
distance2 = 1800
time2 = distance2/rate
result = time2
return result
|
A zoo has 50 animals. If half of the animals are monkeys and 1/3 of the remainder are lions, how many lions are there in the zoo? | def solve() -> int:
animals = 50
monkeys = animals / 2
lions = (animals - monkeys) / 3
result = lions
return result
|
A bag contains 80 sweets, of which 20 are chocolates and the rest are lollipops. What percentage of sweets are lollipops? | def solve() -> int:
lollipops = 80 - 20
percentage_lollipops = (lollipops / 80) * 100
result = percentage_lollipops
return result
|
A dress on sale costs $35, which is a 20% discount from the original price. What was the original price of the dress? | def solve() -> int:
discount_percentage = 0.2
discounted_price = 35
original_price = discounted_price / (1 - discount_percentage)
result = original_price
return result
|
If a factory was producing 2500 rolls of toilet paper per day and the demand increased by 30%, how much did the factory have to increase its production by? | def solve() -> int:
number_of_rolls = 2500
increase_percentage = 0.30
increased_number_of_rolls = number_of_rolls + (number_of_rolls * increase_percentage)
difference = increased_number_of_rolls - number_of_rolls
result = difference
return result
|
Jackie can bake 3 cakes in 2 hours. How long will it take her to bake 12 cakes? | def solve() -> int:
time_to_bake_1_cake = 2 / 3
time_to_bake_12_cakes = time_to_bake_1_cake * 12
result = time_to_bake_12_cakes
return result
|
If a square has a perimeter of 20 cm, what is the length of one of its sides? | def solve() -> int:
perimeter = 20
length_of_one_side = perimeter/4
result = length_of_one_side
return result
|
On a bake sale, 6 boxes of chocolate chip cookies are sold for 20 dollars. How much is one box of chocolate chip cookies? | def solve() -> int:
total_boxes = 6
cost = 20
price_per_box = cost / total_boxes
result = price_per_box
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.