question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
It takes Mary 60 minutes to mow a lawn of 1000 square feet. If she mows 8 lawns over both Saturday and Sunday, how many hours does she spend mowing? | def solve() -> int:
time_for_each_lawn = 60/1000
total_time_for_both_days = (time_for_each_lawn * 8000) * 2
account_for_remaining_feet = (60/1000) * 1000
total_time_in_hours = (total_time_for_both_days+account_for_remaining_feet)/60
result = total_time_in_hours
return result
|
Evelyn drove 9 km during the first half hour and 20 km in the second half hour. How much distance did she drive during the two hours? | def solve() -> int:
distance_1hr = 9 + 20
total_distance = distance_1hr * 2
result = total_distance
print (result)
return result
|
In a survey of 500 people, 45% said they prefer eating vegetables over meat. How many people prefer eating vegetables? | def solve() -> int:
total_surveyed = 500
percentage_chose_vegetables = 45
people_prefer_veggies = (percentage_chose_vegetables / 100) * total_surveyed
result = people_prefer_veggies
return result
|
If Ali drinks 8 glasses of water every day, how many liters of water does he drink in a month, if each glass has 250 milliliters of water? | def solve() -> int:
milliliters_per_day = 8 * 250
milliliters_per_month = milliliters_per_day * 30
liters_per_month = milliliters_per_month / 1000
result = liters_per_month
return result
|
Gina works as a librarian. She works for 3 hours every day from Monday to Friday and 6 hours every Saturday and Sunday. If she earns $5 per hour and earns double on weekends, how much does she earn every week? | def solve() -> int:
monday_to_friday_hours = 3 * 5
weekend_hours = 6 * 2
total_hours = monday_to_friday_hours + weekend_hours
hourly_rate = 5
weekly_earnings = total_hours * hourly_rate
result = weekly_earnings
return result
|
On Saturday, a lemonade stand sold 150 cups of lemonade for $1 each. On Sunday, the price of each cup of lemonade was increased by 20%, but the number of cups sold was decreased by 30%. How much money did the lemonade stand make in total over the weekend? | def solve() -> int:
saturday_money = 150 * 1
sunday_price = 1 * 1.2
sunday_cups = 150 * 0.7
sunday_money = sunday_price * sunday_cups
total_money = saturday_money + sunday_money
result = total_money
return result
|
Sarah can mix 2 gallons of juice concentrate with 5 gallons of water to make 7 gallons of juice. If she has 20 gallons of water, how much juice concentrate does she need to make with all the water? Samantha started a new painting on the first day of the month. She painted 5 square inches every day and by the 14th day, ... | def solve() -> int:
total_water = 20
water_needed = 7
juice_concentrate_needed = 2
water_shortage = water_needed - total_water
juice_concentrate = (juice_concentrate_needed / 5) * water_shortage
days_passed = 14
canvas_coverage = 0.75
paint_per_day = 5
canvas_size = (d... |
Student: Kim went to a toy store and spent $450 on 5 toys. One toy was priced at $60, and another was priced at $90. If the remaining toys had the same price, how much was one of the other toys? | def solve() -> int:
total_cost = 450
toy1_cost = 60
toy2_cost = 90
remaining_toys = 5 - 2
remaining_cost = total_cost - (toy1_cost + toy2_cost)
remaining_cost_per_toy = remaining_cost / remaining_toys
result = remaining_cost_per_toy
return result
|
A rectangular garden has a length of 20 m and a width of 15 m. A fence is built around the garden, leaving a gap of 2 m for the gate. How much fencing material is needed for the fence? | def solve() -> int:
perimeter = (20 + 15) * 2
fencing_material = perimeter - 2
result = fencing_material
return result
|
Student: Rita has 60 pencils in which some are in 5 filled cases and 5 pieces are not in a case. Her sister brought 30 pieces of pencils. If all pencils must be placed in a case, how many more cases do they need? | def solve() -> int:
pencils_rita = 60
filled_cases = 5
pieces_not_in_case = 5
pencils_sister = 30
total_pencils = pencils_rita + pencils_sister
total_pieces_in_case = filled_cases * 5
pieces_not_in_case = total_pencils - total_pieces_in_case
cases_needed = pieces_not_in_case // 5
res... |
Sarah is redecorating her bedroom and needs to buy five sets of items, each consisting of a bed, dresser, nightstand, and lamp. The bed costs $1000, the dresser costs twice as much as the bed, the nightstand costs 1/4 as much as the dresser, and the lamp costs $25. What will be Sarah's total cost? | def solve() -> int:
bed_cost = 1000
dresser_cost = 2 * bed_cost
nightstand_cost = dresser_cost / 4
lamp_cost = 25
total_cost = 5 * (bed_cost + dresser_cost + nightstand_cost + lamp_cost)
result = total_cost
return result
|
The ratio of boys to girls in a classroom is 3:5. If there are 36 students in the classroom, how many girls are there? | def solve() -> int:
total_students = 36
ratio_bg = 3/5
num_girls = total_students * ratio_bg * 5
result = num_girls
return result
|
In a school excursion, each student must bring their own backpack and a water bottle. Fifteen teachers and a third as many tour guides will also attend the excursion. If there are 120 students, how many backpacks and water bottles must be prepared for the excursion? | def solve() -> int:
students = 120
teachers = 15
tour_guides = students / 3
total_people = students + teachers + tour_guides
backpacks = total_people
water_bottles = total_people
result = backpacks + water_bottles
return result
|
Ruth wants to know how many gallons are in 12 quarts. | def solve() -> int:
quarts = 12
gallons = quarts / 4
result = gallons
return result
|
Student: Ann bought 3 shirts that cost $12 each, and 1 pair of shoes that cost $25. How much money did Ann spend? | def solve() -> int:
shirts = 3
shirt_price = 12
shoes = 1
shoe_price = 25
shirt_cost = shirts * shirt_price
shoe_cost = shoes * shoe_price
total_cost = shirt_cost + shoe_cost
result = total_cost
return result
|
A teacher grades her students based on their participation (10%), homework (20%), quizzes (30%), and exams (40%). If a student has a participation grade of 85%, a homework grade of 92%, a quiz grade of 80%, and an exam grade of 76%, what is their final grade? | def solve() -> int:
participation_grade = 0.85
homework_grade = 0.92
quiz_grade = 0.80
exam_grade = 0.76
final_grade = participation_grade * 0.1 + homework_grade * 0.2 + quiz_grade * 0.3 + exam_grade * 0.4
result = final_grade
return result
|
A square plot's area is 225 sq m. What is the perimeter of the plot? | def solve() -> int:
area = 225
side = area ** 0.5
perimeter = 4 * side
result = f'<<<{perimeter}>>>'
result = perimeter
return result
|
Student: Mark has 7 fewer toys than Sarah. Chris has 4 times as many toys as Mark. If Sarah has 10 toys, how many total toys do they all own put together? | def solve() -> int:
mark_toys = 10 - 7
chris_toys = mark_toys * 4
total_toys = mark_toys + chris_toys + 10
result = total_toys
return result
|
A gym has 5 less than 6 times the number of treadmills as ellipticals. If there are 89 total machines, how many ellipticals are there? | def solve() -> int:
e = (89 + 5) / (6 + 1)
result = e
return result
|
If Danial's yearly bonus is the same percentage of his salary every year. He received a $7,500 bonus last year while earning $50,000. This year he earns $60,000, so how much will he earn when his total salary and bonus are combined? | def solve() -> int:
bonus_last_year = 7500
salary_last_year = 50000
salary_this_year = 60000
percentage_increase = (salary_this_year - salary_last_year) / salary_last_year
bonus_this_year = bonus_last_year * (1 + percentage_increase)
total_earnings = salary_this_year + bonus_this_year
... |
If David burns 300 calories by running 2 miles, how many calories will he burn by running 4 miles? | def solve() -> int:
distance1 = 2
distance2 = 4
calories1 = 300
calories2 = (distance2/distance1)*calories1
result = calories2
return result
|
Jake has 12 hours of free time on each day of the weekend. He wants to spend 80% of his time playing basketball and the rest of his time golfing. He can play 30 rounds of golf in an hour and wants to play for 90 rounds. How many hours will he need? | def solve() -> int:
weekend_hours = 12
basketball_percentage = 0.8
golf_percentage = 1 - basketball_percentage
golf_rounds_per_hour = 30
total_golf_rounds = 90
golf_hours = total_golf_rounds / golf_rounds_per_hour
total_hours = golf_hours / golf_percentage
basketball_hours = total_h... |
Alice and Bob are making cookies. Alice has 24 chocolate chips, while Bob has 18 raisins. They want to use the same number of chocolate chips and raisins in each cookie. How many cookies can they make? | def solve() -> int:
from math import gcd
cookies = gcd(24, 18)
chips = 24 // cookies
raisins = 18 // cookies
result = cookies
return result
|
John can buy 6 burgers or 2 pizzas for the same price. He bought 48 meals evenly split between burgers, pizzas, and hotdogs, and the price of 1 hotdog is $1.50. How much does 1 pizza cost if John's total bill was $72? | def solve() -> int:
burgers = 6
pizzas = 2
hotdogs = 48 - burgers - pizzas
hotdog_price = 1.50
total_bill = 72
pizza_price = (total_bill - (hotdogs * hotdog_price)) / pizzas
result = pizza_price
return result
|
Zoe is making a necklace with beads. She has 12 red beads, 18 blue beads, and 24 green beads. She wants to use all the beads and arrange them in a pattern that repeats every 9 beads. The pattern must start and end with a red bead. How many possible patterns can she make? | def solve() -> int:
groups = (12 + 18 + 24) / 9
first_last = (12 * 11) / (2 * 1)
remaining = (42 * 41 * 40 * 39 * 38 * 37 * 36) / (7 * 6 * 5 * 4 * 3 * 2 * 1)
patterns = first_last * remaining * groups
result = patterns
return result
|
A store has 300 apples and wants to sell them in bags with 12 apples each. How many apples will be left if the store sells all their bags? | def solve() -> int:
num_apples = 300
num_apples_per_bag = 12
num_bags = num_apples // num_apples_per_bag
num_leftover_apples = num_apples - (num_bags * num_apples_per_bag)
result = num_leftover_apples
return result
|
There were 40 performers and 60 audience members at a play. After intermission, 1/3 of the total number of people left. If 10 performers left, how many more audience members stayed at the play than performers? | def solve() -> int:
performers = 40
audience_members = 60
total_people = performers + audience_members
people_left = total_people / 3
remaining_performers = performers - 10
remaining_audience_members = total_people - people_left - remaining_performers
more_audience_member... |
A box costs $8 less than a ball. If a ball costs $16, find the total cost of both items. | def solve() -> int:
ball_cost = 16
box_cost = ball_cost - 8
total_cost = ball_cost + box_cost
result = total_cost
return result
|
David put $90 in a savings account that pays 6% interest annually. How much money will he have in the account after 3 years? | def solve() -> int:
x = 90
interest = 0.06
years = 3
result = x * (1 + interest) ** years
return result
|
In a certain restaurant, there are three times as many waiters as customers and five times as many tables as customers. How many waiters and tables in total are in the restaurant if the number of customers is 24? | def solve() -> int:
num_customers = 24
num_waiters = 24 * 3
num_tables = 24 * 5
result = num_waiters + num_tables
return result
|
A hair salon charges a "product usage fee" of 10% on all services, without disclosing this charge to customers. If Christine's total bill for a haircut was $40, how much did the salon charge her for the supposed product usage fee? | def solve() -> int:
total_bill = 40
product_usage_fee = total_bill * 0.1
result = product_usage_fee
return result
|
Kayla is baking cupcakes for a party. She makes 6 batches of chocolate cupcakes and 4 batches of vanilla cupcakes. Each batch of chocolate cupcakes uses 18 eggs and 12 ounces of flour. Each batch of vanilla cupcakes uses 15 eggs and 10 ounces of flour. If Kayla has 9 eggs and 8 ounces of flour left, how many eggs and o... | def solve() -> int:
eggs_chocolate = 18 * 6
flour_chocolate = 12 * 6
eggs_vanilla = 15 * 4
flour_vanilla = 10 * 4
eggs_used = eggs_chocolate + eggs_vanilla
flour_used = flour_chocolate + flour_vanilla
eggs_initial = eggs_used + 9
flour_initial = flour_used + 8
result = (eggs_initial,... |
Possible questions and programs: Alex bought a book and 3 pens from the bookstore. A pen costs $1.50 while a book is twice as expensive as a pen. He also bought a bookmark that costs 20% of the book price. How much did he spend in total? | def solve() -> int:
pen = 1.5
book = 2 * pen
bookmark = 0.2 * book
total = pen * 3 + book + bookmark
result = total
return result
|
A grocery store has a total of 25 aisles. If 40% of the aisles are for produce, and 20% of the aisles are for frozen foods, how many aisles are for other products? | def solve() -> int:
total_aisles = 25
produce_aisles = total_aisles * 0.4
frozen_aisles = total_aisles * 0.2
other_aisles = total_aisles - produce_aisles - frozen_aisles
result = other_aisles
return result
|
``` A toy store has 30 stuffed animals. If 20% of the stuffed animals are dogs and the remaining stuffed animals are cats, how many stuffed animals are cats? | def solve() -> int:
total_stuffed_animals = 30
percentage_of_dogs = 20
dogs = total_stuffed_animals * percentage_of_dogs / 100
cats = total_stuffed_animals - dogs
result = cats
return result
|
In a zoo, there are 4 times as many monkeys as lions. If there are 60 lions, how many bananas do the monkeys eat in a day, if each monkey eats 8 bananas and each lion eats 10 kg of meat? | def solve() -> int:
monkeys = 60 * 4
bananas = monkeys * 8
result = bananas
return result
|
In a basket of 130 apples, 25% are green, and a third of that number also have bites taken out of them. How many apples are green and have bites taken out of them? | def solve() -> int:
total_apples = 130
green_apples = total_apples * 0.25
bitten_green_apples = green_apples * (1/3)
bitten_green_apples = round(bitten_green_apples)
result = bitten_green_apples
return result
|
Rachel has a bag of beads and decides to use half of them to make necklaces for a fundraiser. She makes 30 necklaces. If each necklace uses 50 beads, how many beads did Rachel have originally? Sarah spent one-third of her weekly allowance on books and saved another half. If she now has $15 left, how much was her weekly... | def solve() -> int:
x = 2 * (1500 + 30 * 50)
result = f'<<<{x}>>>'
return result
|
8. Last night's symphony performance was a hit. Tickets for adults were priced at $45 while for children tickets were half the cost. A total of 148 adults and 40 children attended the show. What was the total revenue for the show? | def solve() -> int:
ticket_price_adults = 45
ticket_price_children = 22.5
num_adults = 148
num_children = 40
revenue_from_adults = ticket_price_adults * num_adults
revenue_from_children = ticket_price_children * num_children
result = revenue_from_adults + revenue_from_children
... |
A software service company provides a discount of 20% if the customer opts for an annual subscription instead of a monthly subscription. If the monthly rate is $100, how much does the client save when opting for the annual subscription? | def solve() -> int:
monthly_rate = 100
discount_rate = 0.2
months_in_year = 12
total_monthly_cost = monthly_rate * months_in_year
annual_cost = total_monthly_cost * (1 - discount_rate)
result = total_monthly_cost - annual_cost
result
return result
|
At a restaurant, there are 30 waiters. 10 percent of the waiters are new employees. 50 percent of the waiters have been working for more than 2 years. How many waiters have been working for less than 2 years? | def solve() -> int:
waiters = 30
new_employees = waiters * 0.10
experienced_waiters = waiters * 0.50
less_than_2_years = waiters - new_employees - experienced_waiters
result = less_than_2_years
return result
|
A toy store sells 120 teddy bears in a month. If they sell an average of 4 bears a day, how many days do they have to work in a month? | def solve() -> int:
teddy_bears_monthly = 120
teddy_bears_daily = 4
days_to_work = teddy_bears_monthly / teddy_bears_daily
result = days_to_work
return result
|
Julia has bought 36 chocolates and decided to give away some to her friends. Each of her friends receives 2 pieces of chocolates. How many friends will get the chocolates? | def solve() -> int:
total_chocolates = 36
chocolates_for_each_friend = 2
number_of_friends = total_chocolates // chocolates_for_each_friend
result = number_of_friends
return result
|
A laptop is initially priced at $1,000. After a 20% discount, there is a 6% sales tax. What is the final price of the laptop (rounded to the nearest hundredth)? | def solve() -> int:
discounted_price = 1000 * 0.8
final_price = discounted_price * 1.06
result = round(final_price, 2)
return result
|
Some possible questions and programs are: Alice makes a batch of lemonade. She uses 2 cups of sugar, 8 cups of water, and 1.5 cups of lemon juice. She fills 12 bottles with the lemonade. How much lemonade is left over in the pitcher, if each bottle can hold 10 ounces? | def solve() -> int:
sugar = 2 * 8
water = 8 * 8
lemon = 1.5 * 8
total = sugar + water + lemon
bottles = 12 * 10
leftover = total - bottles
leftover_cups = leftover / 8
result = leftover_cups
return result
|
Mary has 12 apples and gives 3 apples to each of her 4 friends. How many apples does she have left? | def solve() -> int:
initial_apples = 12
friends = 4
apples_per_friend = 3
apples_given = friends * apples_per_friend
apples_left = initial_apples - apples_given
result = apples_left
return result
|
The sum of three consecutive even integers is 126. What is the smallest of the three integers? | def solve() -> int:
middle_integer = 42
smallest_integer = middle_integer - 2
result = smallest_integer
return result
|
An animal shelter collected 15 bags of food on the first day and each day after the first it collected 4 more bags than the day before. If the shelter collected for 10 days, how many bags of food did they have in total? | def solve() -> int:
total_bags = 0
for day in range(1, 11):
total_bags = total_bags + (15 + (day - 1) * 4)
result = total_bags
return result
|
A gift box measures 5 inches by 3 inches by 2 inches. If the gift inside the box takes up half of the box's volume, how many cubic inches of space does the gift take up? | def solve() -> int:
length = 5
width = 3
height = 2
initial_volume = length * width * height
gift_volume = initial_volume / 2
result = f'<<<{gift_volume}>>>'
result = gift_volume
return result
|
The perimeter of a square is 16 cm. What is the length of each side of the square? | def solve() -> int:
perimeter = 16
side = perimeter/4
result = side
return result
|
David bought 120 apples yesterday and half as many today. How many apples does he need to sell tomorrow to get rid of all of them? | def solve() -> int:
yesterday_apples = 120
today_apples = yesterday_apples / 2
total_apples = yesterday_apples + today_apples
tomorrow_apples = total_apples - 120
result = tomorrow_apples
return result
|
If you have 24 pencils and want to divide them equally amongst 6 people, how many pencils will each person get? | def solve() -> int:
total_pencils = 24
people = 6
pencils_per_person = total_pencils / people
result = pencils_per_person
return result
|
Gail bought a pack of 11 red balloons and 7 blue balloons. What percentage of the balloons are red? | def solve() -> int:
red_balloons = 11
blue_balloons = 7
total_balloons = red_balloons + blue_balloons
percentage = (red_balloons/total_balloons)*100
result = percentage
return result
|
A bottle of juice contains 750 ml and costs $3. Ryan drinks 150 ml and pours the rest into 3 glasses of equal size. How much juice is in each glass and what is the unit price of the juice? | def solve() -> int:
juice_left = 750 - 150
juice_glass = juice_left / 3
unit_price = 3 / 750
juice_glass = round(juice_glass, 2)
unit_price = round(unit_price, 2)
result = (juice_glass, unit_price)
return result
|
sy wants to make cookies for a bake sale. The recipe requires 3/4 of a cup of sugar for every 2 cups of flour. If she has 10 cups of flour, how many cups of sugar does she need? | def solve() -> int:
flour_needed = 2
sugar_needed = 3/4
cups_of_flour = 10
cups_of_sugar = (cups_of_flour / flour_needed) * sugar_needed
result = cups_of_sugar
return result
|
A factory has 250 workers, 1/4 of them are on a break, 16% of the rest of them call in sick. How many workers are still at work? | def solve() -> int:
workers = 250
on_break = workers // 4
remaining = workers - on_break
sick = remaining * 0.16
result = remaining - sick
return result
|
Q9: Megan shared her dinner of 15 french fries with her brother. She gave him 5 fries and kept 10. How many fries did her brother have? | def solve() -> int:
total_number_of_fries = 15
fries_given_to_brother = 5
fries_kept_by_megan = total_number_of_fries - fries_given_to_brother
fries_had_by_brother = fries_given_to_brother
result = fries_had_by_brother
return result
|
A group of friends went to a restaurant and their total bill was $84. If the bill included a 15% tip, how much would each person pay if there were 6 friends in the group? | def solve() -> int:
bill_without_tip = 84/(1+0.15)
amount_per_person = bill_without_tip/6
result = amount_per_person
return result
|
A coffee shop sells coffee for $2.50 per cup. If they earn $500 in one day from coffee sales, how many cups did they sell? | def solve() -> int:
daily_earnings = 500
coffee_price = 2.5
num_cups_sold = daily_earnings / coffee_price
result = num_cups_sold
return result
|
Oliver has 14 toys. He gives away one fourth of his toys. How many toys does Oliver have left? | def solve() -> int:
toys_oliver = 14
toys_giveaway = toys_oliver // 4
toys_left = toys_oliver - toys_giveaway
result = toys_left
return result
|
Possible questions and programs: A car rental company charges $25 per day plus $0.10 per mile for renting a car. How much did John pay for renting a car for 3 days and driving 150 miles? | def solve() -> int:
daily_rate = 25
per_mile_rate = 0.10
days = 3
miles = 150
total_cost = daily_rate * days + per_mile_rate * miles
result = total_cost
return result
|
Amy has a jar of jelly beans. She estimates that there are 600 jelly beans in the jar. She gives away 1/5 of the jelly beans to her friend, and then eats 1/6 of the remaining jelly beans. She wants to share the rest of the jelly beans equally with her brother and sister. How many jelly beans does each of them get? | def solve() -> int:
give_away = 600 * 1 / 5
left = 600 - give_away
eat = left * 1 / 6
left_after_eat = left - eat
share = left_after_eat / 3
result = share
return result
|
If a box of chocolates cost $10 and you have $25, how many boxes of chocolates can you buy? | def solve() -> int:
chocolate_price = 10
available_funds = 25
num_chocolates = available_funds // chocolate_price
result = num_chocolates
return result
|
A car's gas tank holds 16 gallons. If the car uses 2 gallons for each 15 miles, how far can the car travel on a full tank of gas? | def solve() -> int:
gas_tank = 16
fuel_efficiency = 15/2
distance = gas_tank * fuel_efficiency
result = distance
return result
|
Lisa is a landscaper who was hired to plant a client's garden. The garden has five rows of flowers, and twice as many columns of flowers as rows. The client wants each column of flowers to have a different type of flower, and each row to have the same type of flower. Each flower column needs 2 packets of flower seeds, ... | def solve() -> int:
rows = 5
columns = 2 * rows
flower_columns = columns
flower_rows = rows
packets_per_column = 2
packets_per_row = 6
seeds_per_packet = 50
total_packets = (flower_columns * packets_per_column) + (flower_rows * packets_per_row)
result = total_pack... |
A group of three friends bought a total of 24 concert tickets. The first friend bought 1/5 as many tickets as the second, and the second friend bought 2 times as many tickets as the third. How many tickets did the third friend buy? | def solve() -> int:
total_tickets = 24
second_friend_tickets = total_tickets / (1 + 1/5 + 2)
third_friend_tickets = second_friend_tickets / 2
result = third_friend_tickets
return result
|
If 12 out of every 25 cars in a parking lot are red and out of those red cars, 40% have tinted windows, how many red cars with tinted windows would you expect in a parking lot with 500 cars? | def solve() -> int:
fraction = 12/25 * 0.4
result = fraction * 500
return result
|
Between 8 am and noon, a thermometer on a porch registered temperature of 12, 14, 19, and 23 degrees Celsius. What was the average temperature for that period? | def solve() -> int:
temperature_values = (12, 14, 19, 23)
average_temp = sum(temperature_values)/len(temperature_values)
result = average_temp
return result
|
\n A school has 240 students and 12 teachers. Each teacher teaches 2 classes of 20 students each. The school wants to organize a field trip to a museum that charges $5 per student and $10 per teacher. How much will the school pay for the field trip in total, in dollars? | def solve() -> int:
classes = 240 / 20
students = classes * 20
teachers = classes / 2
student_cost = students * 5
teacher_cost = teachers * 10
total_cost = student_cost + teacher_cost
result = total_cost
return result
|
Nicholas saved $45 from January to June and saved $30 from July to December. How much less did Nicholas save from July to December than from January to June? | def solve() -> int:
savi_1 = 0
savi_2 = 0
for month in range(1,7):
savi_1 = savi_1 + 45
for month in range(7,13):
savi_2 = savi_2 + 30
diff = savi_1 - savi_2
result = diff
return result
|
If an egg carton holds 12 eggs, how many cartons are needed for 60 eggs? | def solve() -> int:
per_carton = 12
total_eggs = 60
cartons_needed = total_eggs // per_carton + int(total_eggs%per_carton > 0)
result = cartons_needed
return result
|
At the food store, Harris purchased 6 boxes of cereal at 2 dollars each and 3 bottles of juice at 4 dollars each. How much was the total amount that Harris paid? | def solve() -> int:
n_cereal_boxes = 6
cost_cereal = 2
n_juice_boxes = 3
cost_juice = 4
total_cost = (n_cereal_boxes * cost_cereal) + (n_juice_boxes * cost_juice)
result = total_cost
return result
|
Possible questions and programs are: A bakery sells cakes with 8 slices each. The bakery had 120 cakes in stock, but due to a power outage, they lost 15% of their cakes. They also sold 25% of the remaining cakes. How many slices of cake did the bakery have left? | def solve() -> int:
cakes = 120
slices = 8
cakes_lost = cakes * 0.15
cakes = cakes - cakes_lost
cakes_sold = cakes * 0.25
cakes = cakes - cakes_sold
slices_left = cakes * slices
result = slices_left
return result
|
Mrs. Rodriguez has 50 plants where 2/5 are cacti and the rest are ferns. Only three-fifths of those ferns bloom flowers. How many plants does Mrs. Rodriguez have that don't bloom flowers? | def solve() -> int:
cacti = 2/5 * 50
ferns = 50 - cacti
non_flowering_ferns = (2/5) * ferns
result = non_flowering_ferns
return result
|
A roller-coaster is moving through a circuit with many twists and turns. After a while, it must go through a loop that requires a total of 5 left-hand turns. After the 1st turn, it moves 7 meters. After the 2nd turn, it moves 10 meters. After the 3rd turn, it moves a little further and at the 5th turn, it immediately e... | def solve() -> int:
turn_1 = 7
turn_2 = 10
total_turns = 5
total_distance = 32
distance_after_3rd_turn = total_distance - turn_1 - turn_2 - (total_turns - 3) * 0
result = distance_after_3rd_turn
return result
|
A group of students sold 245 chocolate bars for a school fundraiser. If each chocolate bar sold for $2.50, how much money did they raise for their school? | def solve() -> int:
chocolate_bars = 245
price_per_bar = 2.50
total_money_raised = chocolate_bars * price_per_bar
result = total_money_raised
return result
|
If Carlos has twice as many apples as pears and has 24 fruits in total, how many pears does he have? | def solve() -> int:
result = 8
return result
|
Student: Sabrina had $45 in her account. She spent $20 on clothes and then she spent one tenth of what she spent on the clothes at a cafe. How much money is left in Sabrina's account? | def solve() -> int:
account = 45
clothes = 20
cafe = clothes / 10
spending = clothes + cafe
account = account - spending
result = account
return result
|
A class of 30 students took a math test. The average score of the class was 75. The teacher noticed that one student had entered the wrong name and score, and corrected it. The correct score of that student was 20 points higher than the entered score. What is the new average score of the class? | def solve() -> int:
class_size = 30
initial_average = 75
score_difference = 20
total_score = initial_average * class_size
corrected_score = total_score + score_difference
result = corrected_score / class_size
return result
|
A bookstore has 800 books. For three days, it sells half of its remaining stock each day. On the fourth day, it sells the remaining books. How many books were sold on the fourth day? | def solve() -> int:
books = 800
books_sold = 0
books_sold += books/2
books = books/2
books_sold += books/2
books = books/2
books_sold += books/2
books = books/2
books_sold += books
result = books_sold
return result
|
Emma has 15 bags of candy that she wants to split evenly among her 5 friends. If she decides to keep 3 bags for herself, how many bags will each friend get? | def solve() -> int:
bags_of_candy = 15
friends = 5
bags_kept = 3
bags_to_share = bags_of_candy - bags_kept
bags_per_friend = bags_to_share / friends
result = bags_per_friend
return result
|
The sum of three consecutive integers is 57. What are the three numbers? | def solve() -> int:
sum = 57
first_num = (sum - 3) / 3
second_num = first_num + 1
third_num = second_num + 1
result = (first_num, second_num, third_num)
return result
|
Student: The cafeteria sold 200 slices of pizza for $2.75 each. However, they had to pay the pizza company 35% of the total sales. How much profit did they make? | def solve() -> int:
total_sales = 200 * 2.75
amount_paid = total_sales * 0.35
profit = total_sales - amount_paid
result = profit
return result
|
Ethan needs 18 pencils for his new school year. Pencils come in packs of six and cost $1.20 per pack. If Ethan spends $2.40 on pencils, how many pencils will he have left over? | def solve() -> int:
pencils_needed = 18
pencils_per_pack = 6
cost_per_pack = 1.20
total_cost = 2.40
packs_bought = total_cost / cost_per_pack
pencils_bought = packs_bought * pencils_per_pack
pencils_left = pencils_bought - pencils_needed
result = pencils_left
return result
|
Tom has 9 more trading cards than twice the number of trading cards that Jerry has. Sheila has 5 times as many trading cards as Jerry. If Sheila has 60 trading cards, how many trading cards does Tom have? | def solve() -> int:
jerry_cards = 60/5
tom_cards = 2*jerry_cards + 9
result = tom_cards
return result
|
In a cooking competition, George made three times as many dishes as David, and David made 12 times as many dishes as Amelia. If Amelia made 9 dishes, how many did George make? | def solve() -> int:
Amelia_dishes = 9
David_dishes = Amelia_dishes * 12
George_dishes = David_dishes * 3
result = George_dishes
return result
|
If a bag of 20 candy bars costs $10, how much would it cost to buy 3 bags of candy bars? | def solve() -> int:
num_bags = 3
num_bars_per_bag = 20
cost_per_bag = 10
total_bars = num_bags * num_bars_per_bag
total_cost = num_bags * cost_per_bag
cost_per_bar = total_cost / total_bars
result = cost_per_bar
return result
|
Student: Maria bought a book for $18 and a notebook for 30% more than the book. She used a coupon that gave her 15% off the total purchase. How much did Maria pay for the book and the notebook? | def solve() -> int:
book_price = 18
notebook_price = book_price * 1.3
discount = 0.15
total_price = book_price + notebook_price
discounted_price = total_price * (1 - discount)
result = discounted_price
return result
|
Oliver has 20 stickers. On Mondays and Thursdays, he gives out 4 stickers each day, while on the other days of the week he only gives out 1 sticker each day. How many weeks does it take for Oliver to give out all of his stickers? | def solve() -> int:
stickers = 20
mon_thurs = 4
other_days = 1
weekly_total = (2 * mon_thurs) + (5 * other_days)
weeks = stickers // weekly_total
result = weeks
return result
|
Noah and two partners are to sell 120 tickets for a show. His partners each sell 37 tickets. How many tickets does Noah need to sell? | def solve() -> int:
total = 120
partners = 37 * 2
noah = total - partners
result = noah
return result
|
Mangoes have 200 calories and cost $1.80 each. If Lily has $10 and wants to get at least 800 calories, how many mangoes does she need to buy? | def solve() -> int:
mango_calories = 200
mango_cost = 1.80
lily_money = 10
lily_calories_needed = 800
mangoes_needed = lily_calories_needed // mango_calories
result = mangoes_needed
return result
|
Mark has a garden with a length of 15 meters and a width of 10 meters. If he covers the garden with grass, how many square meters of grass does he need? | def solve() -> int:
length = 15
width = 10
area = length * width
result = area
return result
|
A meal costs $20 and the tax rate is 7.5%. If Ana tipped twice the tax amount, how much did she pay in total? | def solve() -> int:
meal_cost = 20
tax_rate = 0.075
tax_amount = meal_cost*tax_rate
tip_amount = 2*tax_amount
total_cost = meal_cost + tip_amount + tax_amount
result = total_cost
return result
|
Eric is reading a book that has 300 pages. He reads 20 pages per day on weekdays, and 40 pages per day on weekends. He started reading the book on a Monday. On what day of the week will he finish the book? | def solve() -> int:
pages = 0
days = 0
while pages < 300:
if days % 7 in (0, 1, 2, 3, 4):
pages += 20
else:
pages += 40
days += 1
day_names = {0: "Monday", 1: "Tuesday", 2: "Wednesday", 3: "Thursday", 4: "Friday", 5: "Saturday", 6: "Sunday"}
day = day_names[days... |
McDonald's has 400 more than three times as many happy meals as Burger King, 30 less than twice as many Big Macs as Burger King, and 12 times as many straws as Burger King has for its restaurant service. If Burger King has a total of 700 Big Macs, how many happy meals does McDonald's have? | def solve() -> int:
burger_king_big_macs = 700
mcdonalds_happy_meals = 3 * burger_king_big_macs + 400
mcdonalds_big_macs = 2 * burger_king_big_macs - 30
burger_king_straws = burger_king_big_macs * 12
result = mcdonalds_happy_meals
return result
|
Charlie has 24 candy bars and each bar weighs 2 oz. If he gives away 6 bars, how many ounces of candy does he have left? | def solve() -> int:
total_bars = 24
weight_per_bar = 2
bars_given_away = 6
total_weight = total_bars * weight_per_bar
remaining_weight = total_weight - (bars_given_away * weight_per_bar)
result = remaining_weight
return result
|
Aria went to the bookstore with $50. She bought 3 books, each with a different price. The first book cost $12, and the second book cost 25% more than the first book. The third book cost 20% less than the second book. How much money did Aria have left after buying the books? | def solve() -> int:
first_book = 12
second_book = first_book * 1.25
third_book = second_book * 0.8
total_cost = first_book + second_book + third_book
money = 50
result = money - total_cost
return result
|
Lily, Ella, and Chloe went to a sandwich shop and ordered sandwiches. Lily got a chicken sandwich for $6, Ella got a turkey sandwich for $8, and Chloe got a veggie sandwich for $7. If they split a 16% tip for their entire order evenly, how much should each person contribute to the tip? | def solve() -> int:
lily_sandwich = 6
ella_sandwich = 8
chloe_sandwich = 7
total_sandwich_cost = lily_sandwich + ella_sandwich + chloe_sandwich
tip = total_sandwich_cost * 0.16
tip_per_person = tip / 3
result = tip_per_person
return result
|
A pharmacy sets a limit of 10 bottles of cough syrup per customer per day, and each bottle contains 4 ounces of liquid. If Peter is going to buy 6 bottles, and John is buying 3 bottles, how many more bottles can they buy and stay within the rule? | def solve() -> int:
limit = 10
peter_bottles = 6
john_bottles = 3
total_bottles = peter_bottles + john_bottles
remaining_bottles = limit - total_bottles
result = remaining_bottles
return result
|
A recipe calls for 2 cups of flour to make 12 cookies. If you want to make 36 cookies, how many cups of flour do you need? | def solve() -> int:
cookies_needed = 36
flour_needed = (2/12) * cookies_needed
result = flour_needed
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.