question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A rectangular garden has dimensions of 10 feet by 6 feet. If you want to increase the area of the garden by 30%, what will be the new dimensions of the garden? | def solve() -> int:
original_area = 10 * 6
percent_increase = 0.3
new_area = original_area * (1 + percent_increase)
new_width = (new_area / 10)**0.5
new_length = new_area / new_width
result = (new_width, new_length)
return result
|
James was on a shopping spree for new furniture. He bought a sofa for $350.00, a bookshelf for $150.00, a coffee table for $75.00 and an armchair for $220.00. There was a store promotion: 25% off of the total purchase. How much did James spend in total after the discount? | def solve() -> int:
total_amount = 350 + 150 + 75 + 220
discount_percentage = 25
discount = (total_amount/100)*discount_percentage
result = total_amount - discount
return result
|
A recipe calls for 2/3 cups of sugar to make 12 cookies. How many cups of sugar will it take to make 27 cookies? | def solve() -> int:
cookies_needed = 27
cookies_given = 12
sugar_needed = 2/3
sugar_for_one_cookie = sugar_needed / cookies_given
sugar_for_all_cookies = sugar_for_one_cookie * cookies_needed
result = sugar_for_all_cookies
return result
|
A movie theater charges $12 per ticket. If a family of 4 went to the movies and paid $54 in total, how much money did they save if they had purchased a family package that costs $45? | def solve() -> int:
num_tickets = 4
ticket_price = 12
total_cost = 54
family_package_cost = 45
cost_without_package = num_tickets * ticket_price
amount_saved = cost_without_package - family_package_cost
result = amount_saved
return result
|
A group of friends went out to eat and the total cost of the meal was $80. If there were 4 friends in the group and they split the cost equally, how much did each friend pay? | def solve() -> int:
total_cost = 80
num_friends = 4
split_cost = total_cost / num_friends
result = split_cost
return result
|
Lisa is a sales representative who works at a company every day. It takes her 8 minutes to find parking and 3 minutes to walk to her desk. 2 days of the week she spends 1 hour on meetings and the other 3 days are less busy so she only spends 30 minutes per meeting. How much time does Lisa spend on these activities in a... | def solve() -> int:
parking_time = 8
walking_time = 3
meeting_time_busy = 60
meeting_time_less_busy = 30
total_time = (parking_time + walking_time) * 5
total_time += meeting_time_busy * 2
total_time += meeting_time_less_busy * 3
result = total_time
return result
|
Sarah can solve 20 math problems in 40 minutes. She needs to complete 100 math problems for her homework. How long will it take Sarah to complete her homework? | def solve() -> int:
problems_solved = 20
time_taken = 40
total_problems = 100
time_per_problem = time_taken / problems_solved
time_required = time_per_problem * total_problems
result = time_required
return result
|
A box of chocolates weighs 300 grams. How many boxes of chocolates can be shipped in a box with a weight capacity of 7 kilograms? | def solve() -> int:
boxes = 7000/300
result = f'<<<{boxes}>>>'
result = boxes
return result
|
Mia has $1.50 in dimes. If Mia gives 45 cents to her aunt, and three times as many cents to her brother as she gave to her aunt, how many dimes does Mia have left? | def solve() -> int:
dimes = 1.50 / 0.10
cents_given_to_aunt = 0.45
cents_given_to_brother = 3 * cents_given_to_aunt
remaining_dimes = dimes - (cents_given_to_aunt + cents_given_to_brother) / 0.10
result = remaining_dimes
return result
|
If a soccer team can score 4 goals in 90 minutes, how many minutes will it take them to score 10 goals? | def solve() -> int:
goals_per_minute = 4/90
minutes_for_10_goals = 10/goals_per_minute
result = minutes_for_10_goals
return result
|
Sarah buys 4 packs of pens at $3 each, 5 notebooks at $2 each, and 2 rulers at $1 each. If she has $25, what is the cost of each pen? | def solve() -> int:
pens_cost = 3
notebooks_cost = 2
rulers_cost = 1
total_items_cost = 4 * pens_cost + 5 * notebooks_cost + 2 * rulers_cost
amount_left = 25 - total_items_cost
cost_of_single_pen = amount_left / 4
result = cost_of_single_pen
return result
|
The world record for the longest time holding breath underwater is 24 minutes and 3 seconds. Anna, who just turned 32 this month, has a goal for tying the record. Her current record is 2 minutes and 30 seconds. She can add 20 seconds of record time per day. How old will she be when she achieves the world record? Emma s... | def solve() -> int:
current_record = 2 * 60 + 30
record_added_per_day = 20
time_needed = 24 * 60 + 3 - current_record
days_needed = time_needed / record_added_per_day
age_at_record = 32 + days_needed / 365
result = age_at_record
return result
|
Gertrude has 9 times as much money as George. If George has 270 dollars, how much money does Gertrude have? | def solve() -> int:
money_george = 270
money_gertrude = money_george*9
result = money_gertrude
return result
|
- Lisa wants to make lemonade and she needs to fill a pitcher with water and lemon juice. She has a faucet that can fill the pitcher at a rate of 0.5 liters per minute and a bottle of lemon juice that can pour 0.1 liters per minute. The pitcher has a capacity of 2 liters and she wants to make a lemonade that is 20% lem... | def solve() -> int:
pitcher = 0
water = 0
lemon = 0
time = 0
while pitcher < 2:
water += 0.5
lemon += 0.1
time += 1
pitcher = water + lemon
ratio = lemon / pitcher
if ratio > 0.2:
excess = (ratio - 0.2) * pitcher
lemon ... |
A factory produces 200 pens every hour. How many hours will it take for the factory to produce 5,000 pens? | def solve() -> int:
pens_per_hour = 200
total_pens = 5000
hours = total_pens / pens_per_hour
result = hours
return result
|
Student: If a car travels 260 miles in 4 hours, what is the car's average speed in miles per hour? | def solve() -> int:
distance = 260
time = 4
speed = distance / time
result = speed
return result
|
It takes a worker 7 hours to build a birdhouse. How many hours will it take two workers to build the same birdhouse? | def solve() -> int:
worker_hours = 7
num_workers = 2
total_hours = worker_hours / num_workers
result = total_hours
return result
|
Max is getting ready for a camping trip with his friends. He wants to know how many cans of beans to bring for everyone. There are 10 people in total: Max, his five friends, and their respective partners. They will be camping for 3 days and want to eat one can of beans per meal, which they have 3 times a day. How many ... | def solve() -> int:
num_people = 10
num_meals = 3
num_days = 3
total_meals = num_people * num_meals * num_days
cans_of_beans = total_meals
result = cans_of_beans
return result
|
A baker makes 16 loaves of bread and sells them for $4.50 each. He also makes 24 muffins and sells them for $1.50 each. His expenses for the ingredients and utilities are $40.00. How much profit does he make? | def solve() -> int:
loaves = 16
loaf_price = 4.50
muffins = 24
muffin_price = 1.50
expenses = 40.00
revenue = (loaves * loaf_price) + (muffins * muffin_price)
profit = revenue - expenses
result = profit
return result
|
A lemonade stand sells a cup of lemonade for $0.75 and a cookie for $0.25. In a sunny day, they sell 80 cups of lemonade and 50 cookies. In a cloudy day, they sell 50 cups of lemonade and 30 cookies. How much more money do they make in a sunny day than in a cloudy day? | def solve() -> int:
lemonade_price = 0.75
cookie_price = 0.25
sunny_lemonade = 80
sunny_cookie = 50
cloudy_lemonade = 50
cloudy_cookie = 30
sunny_lemonade_sales = lemonade_price * sunny_lemonade
sunny_cookie_sales = cookie_price * sunny_cookie
sunny_sales = sunny_lemonade_sales ... |
Student: Tom can mow 3 lawns in 4 hours. How long does it take him to mow 6 lawns? | def solve() -> int:
lawns = 6
time = 4
result = time * (lawns / 3)
return result
|
Student: Mia took a bus from her home to the library. The bus traveled at an average speed of 30/mph and took 40 minutes to reach the library. Mia then walked from the library to her friend's house at a speed of 4/mph and took 20 minutes. How many miles did Mia travel in total? | def solve() -> int:
bus_speed = 30
bus_time = 40
walk_speed = 4
walk_time = 20
bus_distance = bus_speed * (bus_time / 60)
walk_distance = walk_speed * (walk_time / 60)
total_distance = bus_distance + walk_distance
result = total_distance
return result
|
Fernando is preparing for a movie night with his family. He needs to have 5 snacks per each of his 20 family members. He has already made 1 dozen popcorn bags, 2 dozen cookies, and 3 dozen chips bags. How many more dozen snacks does he need to make? | def solve() -> int:
family_members = 20
snacks_per_member = 5
popcorn_bags = 1 * 12
cookies = 2 * 12
chips_bags = 3 * 12
total_snacks_needed = family_members * snacks_per_member
snacks_already_made = popcorn_bags + cookies + chips_bags
snacks_needed = total_snacks_needed -... |
A store offers a discount of 25% on all items. If an item originally costs $80, what is the discounted price? | def solve() -> int:
original_price = 80
discount = 0.25
discount_amount = original_price * discount
discounted_price = original_price - discount_amount
result = discounted_price
return result
|
A theme park sold 5,400 tickets on Monday. On Tuesday, they sold 60% more tickets than on Monday. How many tickets have been sold in total? | def solve() -> int:
monday_tickets = 5400
tuesday_tickets = monday_tickets * 1.6
total_tickets = monday_tickets + tuesday_tickets
result = total_tickets
return result
|
A box contained 750 pencils. If 30% of the pencils were red and the rest were blue, how many blue pencils were in the box? | def solve() -> int:
total_pencils = 750
red_pencils_percentage = 0.3
red_pencils = total_pencils*red_pencils_percentage
blue_pencils = total_pencils - red_pencils
result = blue_pencils
return result
|
A water tank can hold 2500 liters. If 2/5 of the tank is already full and 50 liters of water are added, how much more water is needed to fill the tank completely? | def solve() -> int:
tank_capacity = 2500
water_in_tank = 2/5 * tank_capacity
total_water = water_in_tank + 50
water_needed = tank_capacity - total_water
result = water_needed
return result
|
Student: A restaurant serves 120 customers in one day. If they serve the same number of customers every day, how many customers do they serve in a week? | def solve() -> int:
customers_per_day = 120
days_per_week = 7
customers_per_week = customers_per_day * days_per_week
result = customers_per_week
return result
|
A factory produces 3000 products in 8 hours. How long will it take to produce 5000 products at the same rate? | def solve() -> int:
products_1 = 3000
time_1 = 8
products_2 = 5000
rate = products_1 / time_1
time_2 = products_2 / rate
result = time_2
return result
|
If Samantha wants to use the same lipstick all weekdays and use two different lipsticks each day on weekends, how many lipsticks does she need for a week? | def solve() -> int:
weekdays = 5
weekends = 2
lipsticks_per_day = 1
lipsticks_needed = (weekdays * lipsticks_per_day) + (weekends * 2)
result = lipsticks_needed
return result
|
In a jar there are 150 cookies divided equally among 6 children. How many cookies has each child? | def solve() -> int:
cookies = 150
children = 6
result = cookies/children
print ("Each child has",result, "cookies.")
return result
|
Bob earns money by doing chores for his neighbors. He gets $5 for mowing a lawn, $3 for washing a car, and $2 for walking a dog. He also gets a $10 bonus if he does more than 10 chores in a week. Last week, he mowed 3 lawns, washed 4 cars, and walked 5 dogs. How much money did Bob earn last week? | def solve() -> int:
lawn_money = 5 * 3
car_money = 3 * 4
dog_money = 2 * 5
money = lawn_money + car_money + dog_money
chores = 3 + 4 + 5
if chores > 10:
money = money + 10
result = money
return result
|
Mia is baking cupcakes. She needs 2 eggs for every 12 cupcakes. She has 36 eggs in the fridge. How many cupcakes can she bake with the eggs she has? | def solve() -> int:
batches = 36 / 2
cupcakes = batches * 12
result = cupcakes
return result
|
Sophie and her sister Lily are saving money to buy a new laptop that costs $900. Sophie has saved $625 and Lily has saved only two-fifths of the cost of the laptop. They also want to buy a laptop bag that costs $50. How much money will they have left after buying the laptop and the bag? | def solve() -> int:
laptop_cost = 900
sophie_savings = 625
lily_savings = laptop_cost * 2/5
total_savings = sophie_savings + lily_savings
total_cost = laptop_cost + 50
money_left = total_savings - total_cost
result = money_left
return result
|
There are 325 students in a school. If 25 percent of the students are on the soccer team, how many students are not on the team? | def solve() -> int:
total_students=325
percent= 0.25
result = total_students*(1-percent)
return result
|
2. Marcos and Lucas are racing to a basketball court which is 8.5 miles away. Marcos runs at an average speed of 4 miles per hour and Lucas runs at an average speed of 3.5 miles per hour. Who reaches the basketball court first? | def solve() -> int:
d_marcos = 8.5
s_marcos = 4
d_lucas = 8.5
s_lucas = 3.5
t_marcos = d_marcos/s_marcos
t_lucas = d_lucas/s_lucas
if t_marcos<t_lucas:
result = 'Marcos reaches first'
else:
result = 'Lucas reaches first'
return result
|
John is a weightlifter who wants to consume at least 200g of protein per day. He had a chicken breast with 35g of protein for lunch, which was 20% of his daily requirement. He then ate some protein bars, each containing 10g of protein. If he exceeded his daily requirement by 75%, how many protein bars did he eat? | def solve() -> int:
daily_requirement = 200
lunch_protein = 35
lunch_percentage = 20
protein_bars = 0
total_protein_lunch = (lunch_protein * 100) / lunch_percentage
remaining_protein = daily_requirement - total_protein_lunch
max_bars = (remaining_protein * 100) / 75 / 10
... |
Emily has a jar of 80 marbles. She gave one-third to her sister, gave half of the remainder to her friend and kept 15 for herself. How many marbles did Emily have from the beginning? | def solve() -> int:
marbles = 80
sister_share = marbles / 3
remaining_marbles = marbles - sister_share
friend_share = remaining_marbles / 2
emily_marbles = friend_share + 15
result = emily_marbles
return result
|
The ratio of boys to girls in a classroom is 2 : 3. There are a total of 40 girls in the classroom. How many boys are there? | def solve() -> int:
total_ratio = 2 + 3
girls_ratio = 3 / total_ratio
boys_ratio = 2 / total_ratio
girls_number = 40
total_students = girls_number / girls_ratio
boys_number = total_students * boys_ratio
result = boys_number
return result
|
4. Alex ran at a speed of 10.5 km/h for 2.2 hours. How far did he run? | def solve() -> int:
speed = 10.5
time = 2.2
distance = speed * time
result = distance
return result
|
A person wants to take out a loan for $7,500 to pay for a vacation. The loan has an interest rate of 8% per annum, compounded monthly, over a term of 2 years. How much will they owe after the 2-year loan term? | def solve() -> int:
loan_amount = 7500
loan_years = 2
interest_rate = 0.08
loan_months = loan_years * 12
monthly_interest = interest_rate / 12
total_owed = (loan_amount * ((1 + monthly_interest) ** loan_months - 1)) / \
(monthly_interest * (1 + monthly_interest) ** loan_mon... |
There are 24 pencils in a box, and a quarter of them are red. There are 10 more blue pencils than red pencils. There are 6 less than double the number of yellow pencils as blue pencils. How many yellow pencils are in the box? | def solve() -> int:
red_pencils = 24 // 4
blue_pencils = red_pencils + 10
yellow_pencils = (blue_pencils * 2) - 6
result = yellow_pencils
return result
|
Kelly has $300 in her bank account. She spends 1/4 of her money on clothes. How much money does she have left in her bank account? | def solve() -> int:
money = 300
spending = money / 4
result = money - spending
return result
|
Tom solves 10 puzzles a day. In each of his first 16 days, he averaged 8 puzzles. If he has 24 days left, how many puzzles a day does he have to solve to bring his average for the month up to 12 puzzles a day? | def solve() -> int:
puzzles_first_16_days = 16 * 8
total_puzzles = 26 * 12
puzzles_left = total_puzzles - puzzles_first_16_days
puzzles_per_day = puzzles_left / 24
result = puzzles_per_day
return result
|
Lisa has twice as much money as Tom. If Tom has $50, how much money does Lisa have? | def solve() -> int:
money_tom = 50
money_lisa = money_tom * 2
result = money_lisa
return result
|
A classroom has 32 students. Each row has 8 seats. How many rows are there in the classroom? | def solve() -> int:
total_students = 32
seats_per_row = 8
rows = total_students / seats_per_row
result = rows
return result
|
Possible math questions and python programs: Sarah owns a pet store with 45 fish, 12 cats, and 18 dogs. She sold 20% of the fish and 25% of the cats to customers. Then she bought 10 more dogs and 5 more cats from a breeder. If 40% of the animals in the store are female, how many female animals are there in the store? | def solve() -> int:
fish = 45 - 0.2 * 45
cats = 12 - 0.25 * 12
animals = fish + cats + 18
animals = animals + 10 + 5
female = 0.4 * animals
female = round(female)
result = female
return result
|
Possible new questions and programs are: Sarah wants to buy a laptop that costs $1,200. She can pay $300 upfront and then pay the rest in 18 equal monthly installments. However, she also has to pay a service fee of $10 every month on top of the installment amount. How much will Sarah's monthly payments be? | def solve() -> int:
borrowed_amount = 1200 - 300
installment = borrowed_amount / 18
payment = installment + 10
result = payment
return result
|
A company has an initial stock of 1000 units. They received 200 units twice, and they sold 800 units. What is the current stock of the company? | def solve() -> int:
initial_stock = 1000
new_stock = 200
sold_stock = 800
current_stock = initial_stock + (new_stock * 2) - sold_stock
result = current_stock
return result
|
Sara contributed $5000 to an investment fund with an annual interest rate of 3%. How much will she have after 10 years if the interest is compounded annually? | def solve() -> int:
p = 5000
r = 0.03
t = 10
n = 1
A = p * ((1 + r/n)**(n*t))
result = A
return result
|
Lily got $400 as a prize for winning a dance competition. She decided to donate some of it to a charity. She donated $80 to a charity and spent $200 on clothes. How much money is still left with Lily? | def solve() -> int:
prize_money = 400
donation = 80
clothes_expense = 200
remaining_money = prize_money - donation - clothes_expense
result = remaining_money
return result
|
A classroom has 30 students who each receive a mark between 0 to 100. The average of the class is 65. What is the total of all marks combined? | def solve() -> int:
total_students = 30
class_average = 65
total_marks = total_students * class_average
result = total_marks
return result
|
Student: A recipe calls for 2 1/2 cups of flour, but you only have a 1/2 cup measuring cup. How many times do you need to fill the 1/2 cup measuring cup to measure out the correct amount of flour? | def solve() -> int:
flour_needed = 2.5
measuring_cup = 0.5
times_filled = flour_needed / measuring_cup
times_filled = int(times_filled + 0.5)
result = times_filled
return result
|
Martinez have 4 boxes filled with apples, each box contains 20 apples. How many apples Martinez have in total? | def solve() -> int:
boxes = 4
apples_per_box = 20
result = boxes * apples_per_box
return result
|
Student: An additional room is to be built at the back of a rectangular house with dimensions 8 m long and 9 m wide. The room is to be square and with dimensions 4 m each side. How many square meters of the house are left uncovered? | def solve() -> int:
length_house = 8
width_house = 9
length_room = 4
area_house = length_house * width_house
area_room = length_room * length_room
result = area_house - area_room
return result
|
Student: David wants to buy 4 shirts for $18 each and a belt for $25. If he has $110, how much money will he have left after making his purchase? | def solve() -> int:
num_shirts = 4
shirt_price = 18
belt_price = 25
total_shirt_price = num_shirts * shirt_price
total_cost = total_shirt_price + belt_price
change = 110 - total_cost
result = change
return result
|
Here are some possible questions and python programs: Maya sold 48 cupcakes at a bake sale. She made $3 for each cupcake. Ryan sold half as many cupcakes as Maya, but he charged $4 for each cupcake. How much more money did Maya make than Ryan? | def solve() -> int:
mayas_cupcakes = 48
mayas_price = 3
ryans_cupcakes = mayas_cupcakes / 2
ryans_price = 4
mayas_revenue = mayas_cupcakes * mayas_price
ryans_revenue = ryans_cupcakes * ryans_price
difference = mayas_revenue - ryans_revenue
result = difference
return result
|
Fruits are being packed in crates, with 12 fruits in each crate. If 3 crates are full, how many fruits are there? | def solve() -> int:
fruits_per_crate = 12
num_crates = 3
total_fruits = fruits_per_crate * num_crates
result = total_fruits
return result
|
A triangle has a base of 10.5 feet and a height of 8 feet. What is the area of the triangle, rounded to the nearest square foot? | def solve() -> int:
triangle_base_feet = 10.5
triangle_height_feet = 8
triangle_area_square_feet = round((triangle_base_feet * triangle_height_feet / 2), 0)
result = f'<<<{triangle_area_square_feet}>>>'
result = triangle_area_square_feet
return result
|
Emily ascends up 4 levels of stairs. Each level has 12 steps. She then climbs a wall that is half as high as a flight of stairs. Lastly, she climbs a ladder that is twice the height of the wall. How high did she climb in total? | def solve() -> int:
stairs = 4
steps_per_level = 12
wall_height = stairs * steps_per_level / 2
ladder_height = wall_height * 2
total_height = stairs * steps_per_level + wall_height + ladder_height
result = total_height
return result
|
``` A recipe for a healthy smoothie calls for 1 banana, 1 cup of berries, 2 cups of spinach, and 1 cup of almond milk. If a blender can hold up to 6 cups of liquid, what is the maximum number of smoothies that can be made at once in the blender? | def solve() -> int:
banana = 1
berries = 1
spinach = 2
almond_milk = 1
blender_capacity = 6
max_smoothies = blender_capacity // (banana + berries + spinach + almond_milk)
result = max_smoothies
return result
|
A Buzzy bee can buzz around the flowers at a speed of 4 feet per second, but it will stop and collect pollen at a speed of 1 foot per second. If a Buzzy bee buzzed for 6 seconds, then collected pollen for 10 seconds, then buzzed for another 6 seconds, how far, in feet, did the bee travel? | def solve() -> int:
buzz_speed = 4
collect_speed = 1
buzz_time = 6
collect_time = 10
buzz_distance = buzz_speed * buzz_time
collect_distance = collect_speed * collect_time
total_distance = buzz_distance + collect_distance
result = total_distance
return res... |
A recipe serves 4 people. You want to make the recipe for 12 people. How many times do you multiply all the ingredients by? | def solve() -> int:
people_recipe = 4
people_want = 12
times_multiply = people_want / people_recipe
result = times_multiply
return result
|
Q4: Marcus is 6 times the age of Bob right now. If Marcus is 24 years old, how old is Bob right now? | def solve() -> int:
age_marcus_now = 24
age_bob_now = age_marcus_now / 6
result = age_bob_now
return result
|
Q6: Bertha read 11 books, Diego read 15 books and Luca read 18 books. Diego and Luca read the same book and all three had read the same book as well. In total how many different books have Bertha, Diego and Luca read? | def solve() -> int:
bookList=[]
bookList.append(11)
bookList.append(15)
bookList.append(18)
sum = 0
for x in bookList:
sum = sum+x
sum = sum-3
result = sum
return result
|
A shopkeeper sold a fridge for $600, which was 20% more than the cost price. What was the cost price of the fridge? | def solve() -> int:
selling_price = 600
profit_percent = 20
cost_price = selling_price / (1 + profit_percent/100)
result = cost_price
return result
|
A plane must travel 2500 miles. If it already travelled 1000 miles, how many more miles does it have to travel? | def solve() -> int:
total_distance = 2500
distance_travelled = 1000
distance_left = total_distance - distance_travelled
result = distance_left
return result
|
A patient must take 3 pills per day for 14 days, and each pill costs $1.50. If the patient buys a 50-pill bottle of the medication for $30, how much money will the patient save compared to buying all the pills individually? | def solve() -> int:
num_pills_required = 3 * 14
num_pills_per_bottle = 50
cost_per_bottle = 30
cost_per_pill_individually = 1.5
cost_per_pill_in_bottle = cost_per_bottle / num_pills_per_bottle
total_cost_individual = num_pills_required * cost_per_pill_individually
total_cost_bottle = num_pil... |
Student: Lisa has 210 pieces of fruit. She bought 80 pieces for $0.70 each and the rest for $0.30 each. Find the total cost of all the fruit. | def solve() -> int:
num_of_fruit = 210
price_per_fruit_1 = 0.70
price_per_fruit_2 = 0.30
cost_1 = num_of_fruit * price_per_fruit_1
cost_2 = (num_of_fruit - 80) * price_per_fruit_2
total_cost = cost_1 + cost_2
result = total_cost
return result
|
Sophia can cook one-third of what her grandmother can. Her grandmother can cook 270 dishes. As Sophia improves her cooking skills, she can cook 20 more dishes than she previously could cook. Her grandmother increases by 30% and has reached the peak of 450 dishes. If Sophia can now cook half of what her grandmother can,... | def solve() -> int:
grandmother_dishes = 270
sophia_dishes = grandmother_dishes / 3
sophia_dishes += 20
grandmother_dishes *= 1.3
grandmother_dishes = 450
sophia_dishes = grandmother_dishes / 2
more_dishes = sophia_dishes - (grandmother_dishes / 3)
result = more_dishe... |
The school library has 375 books and the school bookstore has 600 books. How many books do the library and bookstore combined have? | def solve() -> int:
library_books = 375
bookstore_books = 600
result = library_books + bookstore_books
return result
|
Daniel wants to throw axes at a target. He throws 15 axes and hits the target 75% of the time. How many times does he hit the target? | def solve() -> int:
axes_thrown = 15
hit_percentage = 75
times_hit = axes_thrown * hit_percentage / 100
result = times_hit
return result
|
Carlos and Maria are selling lemonade at a stand. They buy 5 gallons of lemonade for $20 and sell each cup for $0.5. They have 100 cups in total and sell all of them. How much profit do they make and how much do they split equally? | def solve() -> int:
cups_sold = 100
price_per_cup = 0.5
revenue = cups_sold * price_per_cup
cost = 20
profit = revenue - cost
people = 2
profit_per_person = profit / people
result = (profit, profit_per_person)
return result
|
Ava and Lucas went on a shopping trip to gather supplies for their group project. They bought five packs of markers, two packs of pens, and nine spiral notebooks. If each student needs one marker, one pen, and one notebook, how many students can they supply? | def solve() -> int:
markers = 5
pens = 2
notebooks = 9
students = min(markers, pens, notebooks)
result = students
return result
|
A rectangular box has a length of 10 inches, a width of 8 inches, and a height of 6 inches. What is the volume of the box? | def solve() -> int:
length = 10
width = 8
height = 6
volume = length*width*height
result = volume
return result
|
She has already saved $15 from her allowance. She decides to do some chores for her neighbors and earns $5 for each chore. How many chores does she need to do to buy the shoes? | def solve() -> int:
money_needed = 45 - 15
chores = money_needed / 5
result = chores
return result
|
Student: 6. What is the combined weight of both puppies at the end of the year? | def solve() -> int:
puppy1_weight = 2
puppy2_weight = 2
puppy1_weight += 0.5 * 12
puppy2_weight += 0.5 * 12
result = puppy1_weight + puppy2_weight
return result
|
Student: John can fill a swimming pool in 6 hours. His assistant can fill the same pool in 8 hours. How long will it take to fill the pool if they work together? | def solve() -> int:
john_time = 6
assistant_time = 8
total_time = john_time + assistant_time
result = total_time
return result
|
A company earned a revenue of $5000 last year. If the revenue increased by 25% this year, what is the new revenue? | def solve() -> int:
previous_revenue = 5000
increase_percentage = 0.25
revenue_increase = previous_revenue * increase_percentage
new_revenue = previous_revenue + revenue_increase
result = new_revenue
return result
|
Michael has 7 cows. Each cow needs 4 bales of hay per month. Most of the hay is $50 per bale, but one organic bale costs double. How much does he spend on hay? | def solve() -> int:
cows = 7
bales_per_cow = 4
organic_bale_cost = 100
regular_bale_cost = 50
total_bales = cows * bales_per_cow
total_cost = (total_bales - 1) * regular_bale_cost + organic_bale_cost
result = total_cost
return result
|
Some possible questions and programs are: Alice wants to make lemonade for a party. She needs 2 cups of lemon juice and 4 cups of water for every gallon of lemonade. She has a 32-ounce bottle of lemon juice concentrate that makes 1 cup of lemon juice per 2 ounces of concentrate. How many gallons of lemonade can she mak... | def solve() -> int:
cups_of_juice = 32 / 2
gallons_of_lemonade = cups_of_juice / 6
result = round(gallons_of_lemonade, 2)
return result
|
A chocolate company sold 500 boxes of chocolates in a month. Each box contained 24 pieces of chocolate. If the company wants to donate 5% of the total chocolate pieces to charity, how many pieces of chocolate will be donated? | def solve() -> int:
num_boxes = 500
choc_per_box = 24
total_choc = num_boxes * choc_per_box
donation_percent = 5
donation_amount = total_choc * (donation_percent/100)
result = donation_amount
return result
|
An investor buys stock for $10,000 and sells it for $15,000 after 3 years. The capital gains tax rate is 20%. How much profit did the investor make after paying taxes? | def solve() -> int:
original_cost = 10000
sell_price = 15000
years = 3
tax_rate = 0.2
capital_gain = sell_price - original_cost
taxable_income = capital_gain*(1-tax_rate)
result = taxable_income
return result
|
Student: Ken has a farm with animals. He has 70 rabbits, 50% more foxes. Ken also has as many familydogs as one-fourth of foxes and rabbits in total. How many animals does Ken have on his farm? | def solve() -> int:
rabbits = 70
foxes = rabbits * 1.5
dogs = (rabbits + foxes) / 4
animals = rabbits + foxes + dogs
result = animals
return result
|
A company wants to purchase a new machine for manufacturing. The machine costs $100,000 with 5% annual interest if the payment is not made in full in the first 2 years. If they make a $20,000 down payment, and decide to pay the remaining amount over a period of 5 years, what will be their monthly payments? | def solve() -> int:
machine_cost = 100000
down_payment = 20000
loan_amount = machine_cost - down_payment
interest_rate = 0.05
loan_duration = 5
monthly_interest_rate = interest_rate / 12
number_of_payments = loan_duration * 12
monthly_payment = (loan_amount * monthly_interest_rate) / (1 ... |
Possible questions and programs are: Alexa has 10 marbles in her bag. She gives 3 to Ben and 4 to Chris. Then she finds 2 more marbles on the ground and puts them in her bag. How many marbles does Alexa have now? | def solve() -> int:
marbles = 10
marbles = marbles - 3 - 4
marbles = marbles + 2
result = marbles
return result
|
Ben has a coupon that gives him 15% off any purchase at a bookstore. He buys a book that costs $18, a notebook that costs $6, and a pen that costs $2. He also has to pay 8% sales tax on the total amount after the discount. How much does he pay in total? | def solve() -> int:
total = 18 + 6 + 2
discount = 0.15 * total
total_after_discount = total - discount
tax = 0.08 * total_after_discount
final = total_after_discount + tax
result = final
return result
|
Sarah has a charity fundraiser and wants to sell 200 tickets for $10 each. She sold 150 tickets but gave 25 tickets to her friends for free. How much money did she make? | def solve() -> int:
total_tickets = 200
ticket_price = 10
sold_tickets = 150
free_tickets = 25
sold_tickets = sold_tickets - free_tickets
total_money = sold_tickets * ticket_price
result = total_money
return result
|
Student: 5 of Tony's friends are going to his birthday party. Each of them will bring a gift. If the gifts are evenly split amongst the 5 friends, how many gifts will each of them bring? | def solve() -> int:
num_friends = 5
total_gifts = 5
gifts_each = total_gifts // num_friends
result = gifts_each
return result
|
A car travels 50 miles in 45 minutes. What is the average speed, in miles per hour, of the car? | def solve() -> int:
average_speed = 50 / (45/60)
result = average_speed
return result
|
A salmon is swimming upstream at a rate of 8 miles an hour and downstream at 6 miles an hour. What is the salmon's average speed? | def solve() -> int:
Upstream_speed = 8
Downstream_speed = 6
Average_speed = (Upstream_speed + Downstream_speed) / 2
result = Average_speed
return result
|
Mark wants to paint a total of 200 square feet in 4 days. He decides to paint 4 times daily, 12.5 square feet each time, every day. How many more square feet should he paint per day to actually achieve his goal? | def solve() -> int:
total_square_feet = 200
total_days = 4
paintings_per_day = 4
square_feet_per_painting = 12.5
square_feet_painted_per_day = paintings_per_day * square_feet_per_painting
square_feet_needed_per_day = total_square_feet / total_days
additional_square_feet_per_day = s... |
A store sells 4 types of candy bars for $1.10, $1.30, $1.50, and $1.70. If Sonya bought 2 of the $1.10 candy bars, 1 of the $1.30 candy bars, 3 of the $1.50 candy bars, and 2 of the $1.70 candy bars, what was her total bill? | def solve() -> int:
candy_bar_prices = [1.10, 1.30, 1.50, 1.70]
candy_bar_quantities = [2, 1, 3, 2]
total_bill = 0
for i in range(len(candy_bar_prices)):
total_bill += candy_bar_prices[i] * candy_bar_quantities[i]
result = total_bill
return result
|
``` A bag of marbles contains 12 red, 8 blue, and 6 green marbles. If you pick a marble at random, what is the probability that it is red? | def solve() -> int:
total_marbles = 12 + 8 + 6
red_marbles = 12
probability = red_marbles / total_marbles
result = probability
return result
|
A shipment consists of 12 boxes, where each box weighs 10kg. If the shipment's total weight must be less than 120kg to be eligible for a discount, how many boxes must be removed from the shipment? | def solve() -> int:
max_weight = 120
current_weight = 12 * 10
boxes_to_remove = (current_weight - max_weight) // 10
result = boxes_to_remove
return result
|
A car can travel 40 miles on a gallon of gas. If the car travels 150 miles per day, how many gallons of gas does it consume in a week? | def solve() -> int:
miles_per_gallon = 40
miles_per_day = 150
days_per_week = 7
miles_per_week = miles_per_day * days_per_week
gallons_per_week = miles_per_week / miles_per_gallon
result = gallons_per_week
return result
|
Peter has a habit of saving money. He saved $8 on the first day. He decided to save $2 more each day after. How much money would Peter have saved by the end of 10 days? | def solve() -> int:
initial_savings = 8
additional_savings = 2
days = 10
total_savings = 0
for day in range(1, days+1):
total_savings += initial_savings + additional_savings * (day-1)
result = total_savings
result
return result
|
The soccer team scored a total of 48 goals this season. The striker scored 20 goals, the midfielder scored 10 goals, the defender scored 8 goals, and the goalkeeper scored 10 goals. What is the average number of goals for each position? | def solve() -> int:
total_goals = 48
striker_goals = 20
midfielder_goals = 10
defender_goals = 8
goalkeeper_goals = 10
total_positions = 4
average_goals = total_goals / total_positions
result = average_goals
return result
|
A chair is 62 cm long. How many millimeters is this? | def solve() -> int:
length_cm = 62
mm_in_cm = 10
result = length_cm * mm_in_cm
return result
|
An online store offers a 20% discount for purchases over $50. If a customer pays $95 for an item, how much money did they save? | def solve() -> int:
original_price = 95
discount_percentage = 0.2
discount_threshold = 50
total_discount = 0
if original_price > discount_threshold:
total_discount = (original_price - discount_threshold) * discount_percentage
result = total_discount
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.