question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Jim runs a business. He rents out one table for $3 and one chair for $2 each day. If he rented out a total of 12 tables and 16 chairs, how much income did he receive? | def solve() -> int:
cost = 0
quantity_table = 12
quantity_chair = 16
price_table = 3
price_chair = 2
cost = (quantity_table * price_table) + (quantity_chair * price_chair)
result = cost
return result
|
Kevin is a boy who likes to collect coins and has 120 coins in his piggy bank. Kevin's sister, who is a dancer, has 25 coins more than him. How much money do the two siblings have in their coins, if each coin is worth 5 cents? | def solve() -> int:
kevin_coins = 120
sister_coins = kevin_coins + 25
kevin_value = kevin_coins * 0.05
sister_value = sister_coins * 0.05
result = kevin_value + sister_value
return result
|
Samantha has only watched 4 movies this month. Nathan has watched 5 times as many movies as Samantha this month, and Lucy has watched 15 more movies than Nathan. If Samantha wants to watch as many movies as Lucy and plans to watch a movie every other night, how many nights would it take Samantha to achieve her goal? | def solve() -> int:
samantha_movies = 4
nathan_movies = samantha_movies * 5
lucy_movies = nathan_movies + 15
nights = (lucy_movies - samantha_movies) * 2
result = nights
return result
|
A group of fish were caught in a net. Every minute, the number of fish would double. After seven minutes, there were 128 fish on the boat. How many fish were caught to begin with? | def solve() -> int:
minutes = 7
final_fish = 128
initial_fish = final_fish / (2 ** minutes)
result = initial_fish
return result
|
Possible questions and programs: Four friends decide to split a pizza equally. Each slice of pizza costs $2.50. If they pay with a $20 bill and get 10% off for being students, how much change will they get back? | def solve() -> int:
pizza_cost = 2.50
pizza_slices = 4
bill = 20
discount = 0.1
total_cost = pizza_cost * pizza_slices * 4
total_cost = total_cost * (1 - discount)
change = bill - total_cost
result = change
return result
|
Rachel had 30 marbles, but then found 9. John has 1/2 more than what Rachel currently has, plus 3. How many marbles does John have? | def solve() -> int:
rachel_marbles = 30
found_marbles = 9
rachel_total_marbles = rachel_marbles + found_marbles
john_marbles = rachel_total_marbles + (rachel_total_marbles * 1/2) + 3
result = john_marbles
return result
|
Student: A basketball player made 75% of his free throw shots last season. If he attempted 200 free throw shots, how many did he make? | def solve() -> int:
attempts = 200
percentage = 0.75
shots_made = attempts * percentage
result = shots_made
return result
|
A restaurant has 6 waitstaff who each work 8 hour shifts. If the restaurant is open for 12 hours per day, how many waitstaff are needed to ensure there is always someone working during open hours? | def solve() -> int:
waitstaff = 6
shift_hours = 8
open_hours = 12
total_work_hours = waitstaff * shift_hours
waitstaff_needed = open_hours / shift_hours
waitstaff_needed = int(waitstaff_needed) + 1
result = waitstaff_needed
return result
|
Bella has $25. She saves one-fourth of her money in a piggy bank. She spends half of the rest on a book. She then earns $5 from doing chores. How much money does she have now? | def solve() -> int:
m = 25
m = m - m/4
m = m - m/2
m = m + 5
result = m
return result
|
Liam has a garden that is 15 feet wide and 20 feet long. He wants to plant grass in the garden. If one bag of grass seeds covers 50 square feet, how many bags of grass seeds will he need to buy? | def solve() -> int:
width = 15
length = 20
area = width * length
bags_per_area = 1/50
total_bags = area * bags_per_area
result = total_bags
return result
|
Riley counts the number of pages she read every day in January. On the first day, she reads 20 pages, and each day she reads 5 more pages than the day before. How many pages did she read altogether in January assuming 31 days in the month? | def solve() -> int:
days = 31
pages_per_day = 20
total_pages = 0
for i in range(days):
total_pages += pages_per_day
pages_per_day += 5
result = total_pages
return result
|
Alice has 8 cupcakes and each cupcake has 3 cherries on top. She eats 2 cupcakes and gives 1 cupcake to her brother. How many cherries are left on the cupcakes? | def solve() -> int:
cherries_total = 8 * 3
cherries_eaten = 2 * 3
cherries_given = 1 * 3
cherries_left = cherries_total - cherries_eaten - cherries_given
result = cherries_left
return result
|
How much money will Joseph have in the hedge fund after three years and five months if he invested $1500 and contributed an additional $150 every month? | def solve() -> int:
pv = 1500
t = 3.5
pmt = 150
r = 0.10
future_value = pv*(1+r)**t + pmt*(((1 + r)**(t*12) - 1)/r)*12
result = future_value
return result
|
A baker is making cupcakes for a party. He has 5 trays that can hold 12 cupcakes each. He has already baked 3 trays of chocolate cupcakes and 2 trays of vanilla cupcakes. He wants to make some more strawberry cupcakes. How many strawberry cupcakes can he make without using more trays? | def solve() -> int:
chocolate_cupcakes = 3 * 12
vanilla_cupcakes = 2 * 12
total_cupcakes = chocolate_cupcakes + vanilla_cupcakes
cupcakes_per_tray = 12
total_tray_capacity = 5 * cupcakes_per_tray
strawberry_cupcakes = total_tray_capacity - total_cupcakes
result = strawberry_cu... |
The perimeter of a square is 32 meters. What is the length of one side of the square? | def solve() -> int:
perimeter = 32
side_length = perimeter / 4
result = side_length
return result
|
Sarah has a snake that grows at the rate of 1 foot every month. If the snake is currently 5 feet long, how long, in inches, will the snake be in 6 months? | def solve() -> int:
snake_length_feet = 5
growth_rate_feet_per_month = 1
months = 6
snake_length_inches = (snake_length_feet + growth_rate_feet_per_month * months) * 12
result = snake_length_inches
return result
|
In a charity event, each donor can bring their 3 family members. Twelve organizers and a sixth as many volunteers will also attend the charity event. If there are 60 donors, how many chairs must be prepared for the charity event? | def solve() -> int:
donors = 60
family_members = donors * 3
organizers = 12
volunteers = organizers / 6
total_people = donors + family_members + organizers + volunteers
chairs_needed = total_people
result = chairs_needed
return result
|
The length of a rectangle is 5 cm less than twice its breadth. If the perimeter of the rectangle is 54 cm, find the length of the rectangle. | def solve() -> int:
perimeter = 54
b = perimeter/2 - 5
l = 2*b - 5
result = l
return result
|
A bucket has 6 liters of water. If 2.5 liters are poured into a cup, then another 1.5 liters are poured into a bowl, how many liters of water are left in the bucket? | def solve() -> int:
num_liters = 6
num_liters -= 2.5
num_liters -= 1.5
result = num_liters
return result
|
Student: Tom has 12 apples and he gives 3 apples to each of his friends. If he has 5 friends, how many apples does he have left? | def solve() -> int:
tom_apples = 12
friends = 5
apples_per_friend = 3
total_apples_given = friends * apples_per_friend
tom_apples_left = tom_apples - total_apples_given
result = tom_apples_left
return result
|
Emily and Michael are art collectors. Emily collects paintings while Michael collects sculptures. Emily has 15 paintings and Michael has 45 sculptures. If the paintings are sold for $500 each and the sculptures are sold for $200 each, what is the difference in the amount of money they make in dollars? | def solve() -> int:
emily_paintings = 15
michael_sculptures = 45
painting_price = 500
sculpture_price = 200
emily_money = emily_paintings * painting_price
michael_money = michael_sculptures * sculpture_price
difference = emily_money - michael_money
result = difference... |
A coach divides a prize among his four athletes, Sean, Emma, Lucy, and Taylor, in the ratio 3:1:4:2. If Lucy gets $700, how much will Emma have left after buying a $100 gym kit? | def solve() -> int:
total_prize = 700
lucy_share = 4
emma_share = 1
gym_kit_cost = 100
total_shares = lucy_share + emma_share
one_share_value = total_prize / total_shares
emma_share_value = one_share_value * emma_share
amount_left = emma_share_value - gym_kit_cost
... |
Student: A hotel has 40 guests at the start of the summer season. During the season, the hotel received 19 more guests and had 17 check out. At the end of the season, how many guests were staying at the hotel? | def solve() -> int:
start_guests = 40
new_guests = 19
check_out = 17
end_guests = start_guests + new_guests - check_out
result = end_guests
return result
|
ve needs to buy 100 mini-pies for his store. Mini-pies are sold in packages of 15 with a cost of $3.99 per package. How much will Steve have to spend? | def solve() -> int:
cost = 3.99
num_pies = 100
num_packages = num_pies//15
remaining_pies = num_pies % 15
cost_of_packages = num_packages * cost
cost_of_remaining = remaining_pies * (cost/15)
result = cost_of_packages + cost_of_remaining
return result
|
Possible questions and programs: A recipe for chocolate cake requires 250 grams of flour, 200 grams of sugar, 150 grams of butter, and 100 grams of cocoa. How many grams of ingredients are needed to make 3 chocolate cakes? | def solve() -> int:
flour_per_cake = 250
sugar_per_cake = 200
butter_per_cake = 150
cocoa_per_cake = 100
flour_total = flour_per_cake * 3
sugar_total = sugar_per_cake * 3
butter_total = butter_per_cake * 3
cocoa_total = cocoa_per_cake * 3
ingredients_total = flour_total + sugar_total... |
A 10-pound bag of flour costs $5.50 and a large bag of sugar weighing 20 pounds costs 4 times as much as the bag of flour. If Samantha will buy 4 bags of flour and 3 bags of sugar, how much will it cost? | def solve() -> int:
flour_cost = 5.50
sugar_cost = 4*flour_cost
samantha_flour_bags = 4*flour_cost
samantha_sugar_bags = 3*sugar_cost
samantha_total_cost = samantha_flour_bags + samantha_sugar_bags
result = samantha_total_cost
return result
|
``` A store has 200 cans of soda. They sell 75% of the cans. How many cans are left at the store? | def solve() -> int:
total_cans = 200
sold_cans_percentage = 75
sold_cans = total_cans * (sold_cans_percentage/100)
leftover_cans = total_cans - sold_cans
result = leftover_cans
return result
|
Lee and Mai bought 12 pencils for $0.25 each and 8 erasers for $0.1 each. They used a coupon that gave them 10% off their total purchase. How much did they pay in total? | def solve() -> int:
pencil_cost = 12 * 0.25
eraser_cost = 8 * 0.1
total_cost = pencil_cost + eraser_cost
coupon_discount = total_cost * 0.1
final_cost = total_cost - coupon_discount
result = final_cost
return result
|
Student: Looki bought 2 boxes of chocolates. He gave one box to his mom, one box to his grandma, and 2 chocolates out of the second box to his siblings. Looki then split up the remaining chocolates in the second box among 4 of his friends. How many chocolates did each friend get? | def solve() -> int:
box1 = 2
box2 = 2
box2 = box2 - 2
friend_num = 4
chocolate_each = box2 // friend_num
result = chocolate_each
return result
|
To buy a new laptop for her online classes, Chloe needs to save $1500 in twelve weeks. If she saves $50 in the first week, how much should she save in the twelfth week, if she triples her savings every week? | def solve() -> int:
weeks = 12
initial_savings = 50
total_savings = 1500
common_ratio = total_savings / initial_savings
twelfth_week_savings = initial_savings * common_ratio ** (weeks - 1)
result = twelfth_week_savings
return result
|
A recipe for 32 cookies calls for 2 cups of flour. How much flour is needed to make only 16 cookies? | def solve() -> int:
flour_needed_for_32_cookies = 2
flour_needed_for_16_cookies = flour_needed_for_32_cookies / 2
result = flour_needed_for_16_cookies
return result
|
The cost of 1 dozen eggs is $3. If a person buys 4 dozens, how much money will the person spend? | def solve() -> int:
cost_per_dozen = 3
dozens = 4
total_cost = cost_per_dozen * dozens
result = total_cost
return result
|
Samantha bought two pizzas, a cherry pie, and a four-pack of brownies. The four-pack of brownies was three times more expensive than the pizzas, and one pizza was only 20% cheaper than the cherry pie. If the cherry pie cost $15, how much did Samantha pay for all her shopping? | def solve() -> int:
pizzas = 0
cherry_pie = 15
brownies = 0
pizza_cheaper = cherry_pie / 1.2
pizzas = pizza_cheaper * 2
brownies = pizzas * 3
total_cost = pizzas + cherry_pie + brownies
result = total_cost
return result
|
James spends 30% of his after-tax income on groceries. If his monthly grocery bill is $500 and he pays 20% of his gross income in taxes, how much does he make per month before taxes? | def solve() -> int:
grocery_bill = 500
tax_rate = 0.20
grocery_percentage = 0.30
after_tax_income = grocery_bill / grocery_percentage
total_income_before_taxes = after_tax_income / (1 - tax_rate)
result = total_income_before_taxes
return result
|
A carton of eggs has a capacity of 24 eggs. If there are 8 cartons of eggs, how many eggs are there in total? | def solve() -> int:
carton_capacity = 24
num_cartons = 8
total_eggs = carton_capacity * num_cartons
result = total_eggs
return result
|
As a kid, Jenny could solve a 25-piece puzzle in 10 minutes. Now that she is an adult, she can solve a 100-piece puzzle in 30 minutes. How many more pieces of puzzle than when she was a kid can Jenny solve now that she is an adult? | def solve() -> int:
kid_pieces = 25
kid_time = 10
adult_pieces = 100
adult_time = 30
kid_puzzle_per_minute = kid_pieces / kid_time
adult_puzzle_per_minute = adult_pieces / adult_time
extra_puzzle_per_minute = adult_puzzle_per_minute - kid_puzzle_per_minute
extra_puzzle = e... |
Emily drives her car to and from the gym, which is 8 miles away from her house. She has a 10-gallon gas tank and has 2 gallons left after the trip. How many miles per gallon does her car get? | def solve() -> int:
distance = 8 * 2
gas_used = 10 - 2
miles_per_gallon = distance / gas_used
result = miles_per_gallon
return result
|
A train travels 80 kilometers in 2 hours and 40 minutes. What is the average speed of the train in kilometers per hour? | def solve() -> int:
time_in_hours = 2 + (40/60)
speed = 80/time_in_hours
result = speed
return result
|
A restaurant offers a discount of 15% on all bills costing more than $50 and 20% on all bills costing more than $100. If a customer has a bill of $150, how much discount will they receive? | def solve() -> int:
bill = 150
if bill > 100:
discount = bill * 0.2
elif bill > 50:
discount = bill * 0.15
else:
discount = 0
result = discount
return result
|
A company produces twice as many widgets as another company. If the first company produces 600 widgets every day, how many widgets does the second company produce in a week? | def solve() -> int:
first_company_daily_production = 600
second_company_daily_production = first_company_daily_production * 2
second_company_weekly_production = second_company_daily_production * 7
result = second_company_weekly_production
return result
|
If Lily has 14 apples and Jack has 10 apples, and they decide to share it equally among their 5 friends, how many apples will each of them get, and how many will be remaining? | def solve() -> int:
lily_apples = 14
jack_apples = 10
total_friends = 5
total_apples = lily_apples + jack_apples
apples_per_friend = total_apples // total_friends
remaining_apples = total_apples % total_friends
result = f'{apples_per_friend} apples per friend, with {remaining_apple... |
Karen is making bracelets for her friends. She needs 8 beads for each bracelet, and she has 60 beads in total. She also has 12 clasps to attach the bracelets. How many bracelets can she make with the beads and clasps she has? | def solve() -> int:
beads = 60
beads_per_bracelet = 8
clasps = 12
bracelets_with_beads = beads // beads_per_bracelet
bracelets_with_clasps = clasps
bracelets = min(bracelets_with_beads, bracelets_with_clasps)
result = bracelets
return result
|
2. Lisa has 3000 pieces of Lego blocks. She picks 1/3 of them to make a specific model and the rest are used in a different project. How many Lego blocks did she use in the different project? | def solve() -> int:
total_blocks = 3000
picked_blocks = total_blocks / 3
remain_blocks = total_blocks - picked_blocks
result = remain_blocks
return result
|
A pet store had 150 aquarium fish to sell. If 70% of the customers bought 4 fish each, how many fish were left in the pet store? | def solve() -> int:
fish_in_store = 150
percent_customers = 70
fish_per_customer = 4
total_customers = (percent_customers / 100) * fish_in_store / fish_per_customer
total_fish_sold = total_customers * fish_per_customer
fish_left_in_store = fish_in_store - total_fish_sold... |
A box of crayons has 24 colored pencils. If 3 colored pencils break, what percentage of colored pencils remain? | def solve() -> int:
colored_pencils = 24
broken_pencils = 3
remaining_pencils = colored_pencils - broken_pencils
percentage_remaining = (remaining_pencils / colored_pencils) * 100
result = percentage_remaining
return result
|
Tom's student loans are currently in deferment. However, he plans to start repaying them soon. If he gets a raise of $3.50/hour and works 45 hours a week, but his student loan deferment is lifted and he has to pay back $90/month, how much more will he make a week? | def solve() -> int:
raise_per_hour = 3.50
hours_per_week = 45
loan_payment_per_month = 90
raise_per_week = raise_per_hour * hours_per_week
raise_per_month = raise_per_week * 4
extra_income_per_month = raise_per_month - loan_payment_per_month
extra_income_per_week = extra_income_per... |
Leo has 54 candies and he shares four ninths of them with his best friend. Emma has 40 candies and she shares one fifth of them with her siblings. How many candies do Leo and Emma have in total? | def solve() -> int:
leo_candies = 54
emma_candies = 40
leo_shared_candies = (4/9) * leo_candies
emma_shared_candies = (1/5) * emma_candies
total_candies = leo_candies + emma_candies + leo_shared_candies + emma_shared_candies
result = total_candies
return result
|
The Robinson family went to a carnival. They bought 40 tickets. They gave 10 tickets to their neighbor. How many tickets does the Robinson family have left? | def solve() -> int:
total_tickets = 40
tickets_given_away = 10
tickets_remaining = total_tickets - tickets_given_away
result = tickets_remaining
return result
|
At a park, there are 15 dogs and four times as many cats. Cats make up 80% of all the pets in the park. How many rabbits are there if they make up 10% of all pets? | def solve() -> int:
dogs = 15
cats = 4 * dogs
total_pets = dogs + cats
rabbits = total_pets * 0.1
result = rabbits
return result
|
A music store is selling guitars for $500.00. They're offering a special discount of 25% for students. If a group of four students each want their own guitar, how much will they save in total? If it takes Alex 15 minutes to wash each dish, 2 minutes to dry each dish, and there are 10 dishes to clean, how long will it t... | def solve() -> int:
guitar_price = 500.00
discount = 0.25
num_students = 4
total_savings = guitar_price * discount * num_students
washing_time_per_dish = 15
drying_time_per_dish = 2
num_dishes = 10
total_washing_time = washing_time_per_dish * num_dishes
total_drying_ti... |
Student: Sarah wants to buy a guitar that costs $400, but there is a 20% discount. The sales tax is 9%. How much will she have to pay? | def solve() -> int:
guitar_price = 400
discount_rate = 0.2
tax_rate = 0.09
discounted_price = guitar_price * (1 - discount_rate)
tax_amount = discounted_price * tax_rate
final_price = discounted_price + tax_amount
result = final_price
return result
|
Student: Grace bought 3 boxes of chocolates on Monday. On Tuesday she bought 5 times the quantity she bought on Monday. On Wednesday she bought 4 times the quantity she bought on Tuesday. How many boxes of chocolates did Grace buy in total on these three days? | def solve() -> int:
monday = 3
tuesday = monday * 5
wednesday = tuesday * 4
total = monday + tuesday + wednesday
result = total
return result
|
8) Tony owns 6 shoe stores. In total, he makes 350 sales on Monday, 400 sales on Tuesday, 550 sales on Wednesday, and 400 sales on Thursday. How many sales does Tony make in 4 days? | def solve() -> int:
total_sales = 0
monday_sales = 350
tuesday_sales = 400
wednesday_sales = 550
thursday_sales = 400
total_sales = monday_sales + tuesday_sales + wednesday_sales + thursday_sales
result = total_sales
return result
|
A teacher wants to increase the number of daily math problems from 10 to 50. On the first day, the teacher gave 2 math problems, and they gave five times this amount on the second day. How many more math problems do they need to give to reach their goal? | def solve() -> int:
initial_problems = 2
second_day_problems = 5 * initial_problems
daily_goal = 50
current_problems = initial_problems + second_day_problems
remaining_problems = daily_goal - current_problems
result = remaining_problems
return result
|
A recipe for a cake requires 240 g of flour, 120 g of sugar, and 80 g of butter. Amy wants to make 3/4 of the cake for her family. How much of each ingredient does she need? | def solve() -> int:
flour_needed = 3/4 * 240
sugar_needed = 3/4 * 120
butter_needed = 3/4 * 80
result = [flour_needed, sugar_needed, butter_needed]
return result
|
In a class with 30 students, the teacher assigned 60 homework assignments over the past month. If she assigned the same number of assignments for math as she did for English, and she assigned double the number of assignments for science as she did for math. How many assignments did the teacher assign for English? | def solve() -> int:
num_students = 30
total_assignments = 60
math_assignments = total_assignments / 4
science_assignments = math_assignments * 2
english_assignments = total_assignments - math_assignments - science_assignments
result = english_assignments
return result
|
Student: 5. If Ryland has already sold 30 packs of cookies and needs to sell a total of 75, how many more packs does he need to sell? | def solve() -> int:
sold_packs = 30
total_packs = 75
remaining_packs = total_packs - sold_packs
result = remaining_packs
return result
|
A book has a page count of 300 pages. If a reader reads 15 pages per day, how many days will it take for the reader to finish the book? | def solve() -> int:
days = 300/15
result = days
return result
|
Sarah takes 25 breaths per minute and inhales 2/3 liters of air to her lungs. What will be the total volume of air she inhales in 12 hours? | def solve() -> int:
breaths_per_minute = 25
inhale_volume = 2/3
minutes_per_hour = 60
hours = 12
breaths_per_hour = breaths_per_minute * minutes_per_hour
total_volume = breaths_per_hour * inhale_volume * hours
result = total_volume
return result
|
A year ago, John bought a phone for $600 which is now 3/4 times less expensive. What is the current price of the phone? Sophie decides to improve her swimming endurance. Her goal is to start by swimming 500 meters a day the first week, then spend the next six weeks swimming 100 meters more each week. How many meters is... | def solve() -> int:
original_price = 600
reduction_factor = 3/4
current_price = original_price * reduction_factor
first_week_distance = 500
weekly_increase = 100
total_distance = first_week_distance + (weekly_increase * 6)
average_daily_distance = total_distance / 7
result = cu... |
Alex has $950 and he wants to buy 4 books at different prices. One book costs $152 and another costs $87. If the other two books are the same price, how much does each of those two books cost? | def solve() -> int:
total_money = 950
book1_price = 152
book2_price = 87
remaining_money = total_money - book1_price - book2_price
num_other_books = 2
price_per_other_book = remaining_money / num_other_books
result = price_per_other_book
return result
|
Sue had $42.50 at the start of the week. Every day, she spent $5.25. How much money will she have left at the end of the week? | def solve() -> int:
start_money = 0
daily_spending = 0
total_spending = 0
for i in range(7):
total_spending += daily_spending
result = round(start_money - total_spending, 2)
return result
|
Student: 3. There are 10 times the number of windows in the school compared to the number of doors. If there are 80 windows in the school, calculate how many doors there are. | def solve() -> int:
windows = 80
doors = 0
doors = windows / 10
result = doors
return result
|
Student: Maria has 3 buckets of size 1 liter, 3 liter, and 5 liter. She completely fills the 1 liter bucket and pours it into the 3 liter bucket, then fills up the 1 liter again and pours it into the 3 liter bucket. Finally, she transfers the 3 liter to the 5 liter bucket. How much space, in liters, is left in the 5 li... | def solve() -> int:
bucket_1 = 1
bucket_3 = 3
bucket_5 = 5
bucket_3 = bucket_3 + bucket_1
bucket_3 = bucket_3 + bucket_1
bucket_5 = bucket_5 + bucket_3
result = bucket_5 - bucket_3
return result
|
Student: Marcus has a collection of rocks. He is arranging his rocks into sets of 5. If Marcus has 24 rocks in total, how many sets of rocks can he make? | def solve() -> int:
rocks = 24
set_size = 5
sets = rocks // set_size
result = sets
return result
|
If you have $1000 and deposit it into an account with an annual interest rate of 5%, what is the balance after one year if interest is compounded monthly? | def solve() -> int:
principal = 1000
interest_rate = 0.05/12
n_years = 1
n_compound = 12*n_years
amount = principal*((1+(interest_rate))**(n_compound))
result = round(amount, 2)
return result
|
``` The ratio of boys to girls in a school is 5:3. If there are 240 students in the school, how many boys are there? | def solve() -> int:
total_students = 240
boys_ratio = 5
girls_ratio = 3
total_ratio = boys_ratio + girls_ratio
boys = (boys_ratio/total_ratio)*total_students
result = boys
return result
|
A company pays its employees $12 per hour. An employee works 25 hours a week and receives a bonus of $100. If the employee works for 52 weeks in a year, how much is their yearly salary? | def solve() -> int:
hourly_pay = 12
weekly_hours = 25
bonus = 100
weeks_in_year = 52
weekly_salary = hourly_pay * weekly_hours + bonus
yearly_salary = weeks_in_year * weekly_salary
result = yearly_salary
return result
|
arah has 10 $1, 5 $5, and 2 $20 bills. Mike has 7 $10 and 4 $5 bills. How much more money does Sarah have than Mike? | def solve() -> int:
bill_1 = 10*1 + 5*5 + 2*20
bill_2 = 7*10 + 4*5
diff = bill_1 - bill_2
result = diff
return result
|
If it takes a singer 6 months to write and record an album of 12 tracks, how many more months will it take for another singer of equal ability to create an album of 15 tracks? | def solve() -> int:
tracks_per_album = 12
months_to_create_album = 6
tracks_needed = 15
months_to_create_additional_tracks = (tracks_needed - tracks_per_album) * (months_to_create_album / tracks_per_album)
result = months_to_create_additional_tracks
return result
|
Alex cooks for 180 minutes. He takes a break to wash his hands every 20 minutes and a break to taste his dish every 30 minutes. How many more hand-washing breaks does he take than tasting breaks? | def solve() -> int:
hand_washing_interval = 20
taste_break_interval = 30
total_cooking_time = 180
hand_washing_breaks = total_cooking_time // hand_washing_interval
taste_breaks = total_cooking_time // taste_break_interval
result = hand_washing_breaks - taste_breaks
return result
|
Jane received answers from 25% of her survey recipients. 1/5 of those included a coupon for 20% off. If she distributed $30 worth of coupons, how many people did she survey? | def solve() -> int:
percent_answered = 25
percent_coupon = 20
coupon_value = 30
percent_received_coupon = percent_answered / 100 * (1/5) * 100
total_received_coupon = percent_received_coupon / 100 * percent_coupon
coupon_per_person = coupon_value / total_received_coupon
t... |
A car travels 60 km in 45 minutes. What is its average speed in km/h? | def solve() -> int:
distance = 60
time = 45 / 60
average_speed = distance / time
result = average_speed
return result
|
Student: In a pizza contest, Johnny consumed 8 slices and Billy consumed 2 slices more than Johnny. If Tommy ate 3 boxes, where each box contains 10 slices, and each box costs $15, how much more did Tommy spend than Johnny and Billy together? | def solve() -> int:
johnny_slices = 8
billy_slices = johnny_slices + 2
tommy_boxes = 3
slices_per_box = 10
cost_per_box = 15
johnny_total = johnny_slices
billy_total = billy_slices
tommy_total = tommy_boxes * slices_per_box
johnny_cost = johnny_total * cost_per_box
billy_cost = b... |
Student: A toy store purchased 145 toy cars for $6 each. How much money did the toy store spend in total? | def solve() -> int:
toy_cars = 145
price = 6
total = toy_cars * price
result = total
return result
|
A coffee shop needs to order 1000 cups. Each cup costs $0.60. If they order more than 500, they get a discount of 8%. Additionally, they need to pay 5% tax on their order. How much will the cups cost? | def solve() -> int:
cup_cost = 0.60
num_cups = 1000
bulk_discount = 0.08
tax_rate = 0.05
sub_total = (cup_cost * num_cups) * (1 - bulk_discount)
total_cost = sub_total * (1+ tax_rate)
result = total_cost
return result
|
Student: A math competition has 15 boys and 25 girls. If 30% of boys and 40% of girls will make to the final round, how many finalists will be there? | def solve() -> int:
boys = 15
girls = 25
boy_rate = 0.3
girl_rate = 0.4
boy_finalists = boys * boy_rate
girl_finalists = girls * girl_rate
total_finalists = boy_finalists + girl_finalists
result = total_finalists
return result
|
Maria wants to buy a new guitar that costs $600. Her aunt gave her $200 towards the cost and Maria wants to earn the rest by doing chores. If Maria earns $15 for each chore she does, how many chores does she need to do to pay for the guitar? | def solve() -> int:
cost_of_guitar = 600
amount_given_by_aunt = 200
amount_to_earn = cost_of_guitar - amount_given_by_aunt
earning_per_chore = 15
number_of_chores = amount_to_earn / earning_per_chore
result = number_of_chores
return result
|
Grace has 8 notebooks and buys 3 more. She then gives away 2 notebooks to her friends. Later, she loses 1 notebook. How many notebooks does she have now? | def solve() -> int:
notebooks = 8
notebooks += 3
notebooks -= 2
notebooks -= 1
result = notebooks
return result
|
Adam works four days a week as a delivery person and earns a variable amount of tips every day. The past three days, he earned $30, $40, and $20. How much does he need to earn on the fourth day if he wants to make an average of $25 in tips per day? | def solve() -> int:
tip_day_1 = 30
tip_day_2 = 40
tip_day_3 = 20
tip_day_4 = (25*4) - (tip_day_1 + tip_day_2 + tip_day_3)
result = tip_day_4
return result
|
Student: Alexa wants to train for a 10K race. She plans to add 1/4 of a mile each week until she reaches a 6-mile run. How many weeks before the race should she start training if she can currently only run 1 mile? | def solve() -> int:
current_mile = 1
target_mile = 6
mile_increment = 0.25
weeks_needed = (target_mile - current_mile) / mile_increment
result = weeks_needed
return result
|
A hotel has 150 rooms. If each room has 2 beds, what is the total bed count? | def solve() -> int:
beds = 150 * 2
result = f'<<<{beds}>>>'
result = beds
return result
|
Student: Jake bakes 48 cookies in 4 batches. He eats 3 cookies from each batch and gives away half of the remaining cookies to his friends. How many cookies does he have left? | def solve() -> int:
cookies_baked = 48
batches = 4
cookies_eaten = 3 * batches
cookies_given_away = (cookies_baked - cookies_eaten) / 2
result = cookies_baked - cookies_eaten - cookies_given_away
return result
|
Student: Calvin has 132 pencil sharpeners. He decides to share 1/3 of his sharpeners with his brother Kevin and then Kevin gives him a fourth of his sharpeners. How many pencil sharpeners does Calvin have now? | def solve() -> int:
sharpeners = 132
sharpeners_given = sharpeners // 3
sharpeners_received = sharpeners_given // 4
result = sharpeners + sharpeners_received - sharpeners_given
return result
|
A pizza pie is divided into 12 equal slices. If five-eighths of these slices are eaten, how many slices are left? | def solve() -> int:
eaten = 12 * 5/8
left = 12 - eaten
result = left
return result
|
A book has 256 pages and the font size is 12. If each page has 30 lines and each line has 50 characters, how many characters are in the entire book? | def solve() -> int:
book_pages = 256
lines_per_page = 30
chars_per_line = 50
chars_per_book = book_pages * lines_per_page * chars_per_line
result = chars_per_book
return result
|
If a store sells oranges at $2 each, and 15 customers each buy 5 oranges, how much did the store earn in total? | def solve() -> int:
price_per_orange = 2
oranges_per_customer = 5
customers = 15
total_earned = price_per_orange * oranges_per_customer * customers
result = total_earned
return result
|
Bobby has 60 marbles and he gives away 20. If he then buys 40 more, how many marbles does he have now? | def solve() -> int:
bobby_marbles = 60
bobby_marbles -= 20
bobby_marbles += 40
result = bobby_marbles
return result
|
Oliver bought 11 mangoes and spent $35 equally for each mango. Tuesday, he will buy 4 times as many mangoes as he did on Monday. Friday, he will buy 5 times as many mangoes than he did on Monday. How much will Oliver spend on mangoes over these three days? | def solve() -> int:
no_of_mangoes_on_monday = 11
cost_on_monday = 35
no_of_mangoes_on_tuesday = no_of_mangoes_on_monday * 4
cost_on_tuesday = cost_on_monday * 4
no_of_mangoes_on_friday = no_of_mangoes_on_monday * 5
cost_on_friday = cost_on_monday * 5
result = co... |
A real estate agent charges a commission of 5% on the selling price of a house. If a house sells for $300,000, how much is the commission? | def solve() -> int:
selling_price = 300000
commission_rate = 0.05
commission = selling_price * commission_rate
result = commission
return result
|
A gardener gets paid $15 an hour and also earns $20 for every shrub she prunes and $10 for every plant she waters. Of her 8-hour shift, she spends 3 hours pruning shrubs and 2 hours watering plants. She prunes 5 shrubs and waters 10 plants. How much does she earn? | def solve() -> int:
hourly_wage = 15
shrubs_pruned = 5
plants_watered = 10
shrub_income = shrubs_pruned * 20
plant_income = plants_watered * 10
prune_time = 3
water_time = 2
total_income = hourly_wage * 8 + shrub_income + plant_income + prune_time * 15 + water_time * 15
result = tota... |
A box of crayons has enough crayons to color ten 8 inch by 11 inch coloring pages. If three pages are already colored, how many more pages can be colored with the remaining crayons? | def solve() -> int:
total_pages = 10
colored_pages = 3
page_width = 8
page_height = 11
page_area = page_width * page_height
total_area = total_pages * page_area
colored_area = colored_pages * page_area
remaining_area = total_area - colored_area
remaining_page... |
A bag of candy has 600 pieces. If the pieces are divided equally among 5 children, how many pieces does each child get? | def solve() -> int:
children = 5
pieces_per_child = 600 / children
result = pieces_per_child
return result
|
Student: A book costs $20. If you buy 5 books, you get a discount of 10%. How much would you have to pay to buy 5 books? | def solve() -> int:
book_cost = 20
num_books = 5
discount_rate = 0.1
total_cost = book_cost * num_books
discounted_cost = total_cost * (1 - discount_rate)
result = discounted_cost
return result
|
Max is making a pizza. The crust has 200 calories, the cheese has 70 calories per ounce, the pepperoni has 50 calories per slice, and the sauce has 25 calories per tablespoon. How many calories are in the pizza if Max uses 1 crust, 8 ounces of cheese, 12 slices of pepperoni, and 4 tablespoons of sauce? | def solve() -> int:
crust = 200
cheese = 70
pepperoni = 50
sauce = 25
total_crust = crust * 1
total_cheese = cheese * 8
total_pepperoni = pepperoni * 12
total_sauce = sauce * 4
total_pizza = total_crust + total_cheese + total_pepperoni + total_sauce
result = total_... |
Dennis has 30 balls. He gives away 9 balls and keeps the rest. How many balls does he have left? | def solve() -> int:
balls = 30
givenAway = 9
result = balls - givenAway
return result
|
David's dog got a cut that needed stitches. The visit cost $150 and his pet insurance covered $100. David also went to the dentist for a cleaning. His visit cost $80 and his insurance covered 80% of the cost. How much did David pay for both visits? | def solve() -> int:
visit1_cost = 150
visit1_insurance = 100
visit2_cost = 80
visit2_insurance = visit2_cost * 0.8
total_cost = visit1_cost + visit2_cost - visit1_insurance - visit2_insurance
result = total_cost
return result
|
Ryan bought 4 bottles of juice for $2 each. He also bought 5 bags of chips for $1 each. How much did Ryan spend in total? | def solve() -> int:
num_juice = 4
price_juice = 2
num_chips = 5
price_chips = 1
total_juice = num_juice * price_juice
total_chips = num_chips * price_chips
result = total_juice + total_chips
return result
|
A factory produces 100 boxes of soap daily. They start using a new machine that can increase their production by 35%. How many soap boxes will they produce in 7 days? | def solve() -> int:
soap_boxes_daily = 100
increase_percentage = 35
days = 7
increase_amount = soap_boxes_daily * increase_percentage / 100
soap_boxes_new_machine = soap_boxes_daily + increase_amount
soap_boxes_total = soap_boxes_new_machine * days
result = soap_boxes_total
ret... |
Rupert the Raccoon has an apple tree in his backyard and wants to make apple jelly. If he uses 25 apples for the jelly, how many cups of sugar does he need to use? | def solve() -> int:
number_of_apples = 25
sugar_for_each_apple = 1/3
sugar_needed = number_of_apples * sugar_for_each_apple
result = sugar_needed
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.