question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
If a 1kg block of cheese needs to be cut into 9 equal pieces, how much will each piece weigh? | def solve() -> int:
total_weight = 1
number_of_pieces = 9
weight_per_piece = total_weight/number_of_pieces
result = weight_per_piece
return result
|
A train travels 300 km in 4 hours. How fast is the train traveling in km/hour? | def solve() -> int:
distance = 300
time = 4
speed = distance / time
result = speed
return result
|
Sarah bakes 3 cakes, each taking 1 hour to bake. She then takes a break for 15 minutes. How much time does she spend baking the remaining 2 cakes? | def solve() -> int:
num_cakes = 3
time_per_cake = 1
break_time = 15
break_time_hours = break_time / 60
total_time = num_cakes * time_per_cake + break_time_hours
remaining_cakes = num_cakes - 2
time_remaining = remaining_cakes * time_per_cake
result = time_remaining
... |
A student answered 32 out of 40 questions correctly on a test. What percentage of the questions did the student answer correctly? | def solve() -> int:
num_correct = 32
total_questions = 40
percent_correct = (num_correct / total_questions) * 100
result = percent_correct
return result
|
A company has sold 5,000 products in the first quarter of the year. If the number of products sold per month increases by 20% for the next 7 months, how many products will the company have sold by the end of the year? | def solve() -> int:
q1 = 5000
months = 7
increase = 20/100
per_month = q1/3 * (1 + increase)
next_7_months = per_month * months
total = q1 + next_7_months
result = total
return result
|
Personal trainer Chris is working with a group of 12 clients. Three-quarters of the clients are capable of standard workouts, while the rest have injuries that require modified workouts that take 30% longer to complete. If it takes Chris 30 minutes to complete a standard workout session, how long, in minutes, will it t... | def solve() -> int:
total_clients = 12
standard_clients = total_clients * 0.75
modified_clients = total_clients - standard_clients
standard_time = 30
modified_time = standard_time * 1.3
total_standard_time = standard_clients * standard_time
total_modified_time =... |
If John bikes at a constant speed of 10 miles per hour, he can finish a 50-mile race in how many hours? | def solve() -> int:
distance = 50
speed = 10
time = distance / speed
result = time
return result
|
A box contains 12 red balls, 8 blue balls, and 5 green balls. What is the probability of drawing a blue or red ball? | def solve() -> int:
total_balls = 25
red_balls = 12
blue_balls = 8
green_balls = 5
probability = (red_balls + blue_balls) / total_balls
result = probability
return result
|
Mike is trying to empty his pool. He can remove 100 liters of water every day, but 40 liters of water seeps back in every night. If his pool has 800 liters of water, how many days will it take for Mike to remove all of the water? | def solve() -> int:
pool_water = 800
water_removed_per_day = 100
water_seeped_back_per_night = 40
days = 0
while pool_water > 0:
pool_water -= water_removed_per_day
pool_water += water_seeped_back_per_night
days += 1
result = days
return result
|
Student: Bob has 16 apples. He eats 1/4 of the apples. How many apples does Bob have left? | def solve() -> int:
apples = 16
eaten = apples * 1/4
result = apples - eaten
return result
|
The average age of three siblings is 14 years old. The youngest sibling is 8 years old. How old are the other two siblings combined? | def solve() -> int:
average_age = 14
youngest_sibling = 8
combined_age = (average_age * 3) - youngest_sibling
result = combined_age - youngest_sibling
return result
|
Mary is baking a cake that requires 1/2 cup of sugar. If she wants to make 4 cakes, how many cups of sugar does she need? | def solve() -> int:
cups_of_sugar_per_cake = 1/2
num_of_cakes = 4
total_cups_of_sugar = cups_of_sugar_per_cake * num_of_cakes
result = total_cups_of_sugar
return result
|
A family goes to a restaurant. They order a pizza that costs $12. Then, they order some drinks that are 2 times as expensive as the pizza. Later, they order some desserts that are 3 times as expensive as the drinks. If the family spends $84 on dinner, what is the cost of one dessert? | def solve() -> int:
pizza = 12
drinks = 2 * pizza
desserts = 3 * drinks
total_cost = pizza + drinks + desserts
cost_of_one_dessert = desserts / 3
result = cost_of_one_dessert
return result
|
A ceiling fan rotates 300 times in 2 minutes. What is its speed in revolutions per minute (RPM)? | def solve() -> int:
RPM = 300/2
result = RPM
return result
|
Alex has 15 blue marbles and 9 red marbles. She wants to split them evenly into 3 different bags. How many blue marbles should be in each bag? | def solve() -> int:
total_marbles = 15 + 9
marbles_per_bag = total_marbles // 3
result = marbles_per_bag
return result
|
If a bakery sells 12 dozen cupcakes per day and each dozen costs $10, how much money does the bakery earn from selling cupcakes in a week? | def solve() -> int:
num_cupcakes = 12 * 12
cost_per_dozen = 10
weekly_revenue = num_cupcakes * cost_per_dozen * 7
result = weekly_revenue
return result
|
Mary received a total of $40 for 7 days of work. How much money did Mary make in one day? | def solve() -> int:
total_money = 40
number_of_days = 7
earnings_per_day = total_money / number_of_days
result = earnings_per_day
return result
|
A store has 20 chocolate bars, of which 5 are milk chocolate, 10 are dark chocolate, and 5 are white chocolate. If two bars are picked at random, what is the probability that both bars are not milk chocolate? | def solve() -> int:
total_bars = 20
milk_bars = 5
non_milk_bars = total_bars - milk_bars
prob_not_milk_1 = non_milk_bars / total_bars
prob_not_milk_2 = (non_milk_bars - 1) / (total_bars - 1)
prob_both_not_milk = prob_not_milk_1 * prob_not_milk_2
result = prob_both_not_milk
return result
|
Ben has 1/3 more than what Amelia currently has, minus 4. How many seashells does Ben have? | def solve() -> int:
amelia = 40 - 15
ben = amelia * 4 / 3 - 4
result = ben
return result
|
Sarah exercised for 63 minutes last week. If she plans to exercise for 20 minutes a day this week, how much more will she exercise this week compared to last week? | def solve() -> int:
last_week_exercise = 63
daily_exercise = 20
this_week_exercise = daily_exercise * 7
difference = this_week_exercise - last_week_exercise
result = difference
return result
|
Four employees received bonuses for their work performance. The first employee, Sarah, received a bonus of $500 more than the second employee, John. John's bonus was 75% of the third employee's bonus. If the third employee's bonus was $1000, how much money did the four employees receive in total? | def solve() -> int:
second_employee_bonus = 1000 * 0.75
sarah_bonus = second_employee_bonus + 500
total_bonus = second_employee_bonus + sarah_bonus + 1000
result = total_bonus
return result
|
A rectangular prism has a length of 8 cm, a width of 6 cm, and a height of 4 cm. What is its surface area? | def solve() -> int:
length = 8
width = 6
height = 4
surface_area = 2 * (length*width + length*height + width*height)
result = surface_area
return result
|
A music band consisted of 10 members, with two new members. Each experienced member was paid 1/7 times more than the new members. If the new members were paid $18 per hour for a 45-hour workweek, calculate the total combined monthly earnings of the experienced band members. | def solve() -> int:
new_members_pay = 18 * 45
experienced_members_pay = new_members_pay * 7/6
total_experienced_members_pay = experienced_members_pay * 8
result = total_experienced_members_pay / 12
return result
|
Student: In a town, there are seven primary schools. Six of them can teach a maximum of 250 students at a time, and the remaining one can teach 350 students at a time. How many students at a time in total, can these seven primary schools teach? | def solve() -> int:
schools = 7
capacity_1 = 250
capacity_2 = 350
total_capacity = 0
total_capacity = capacity_1 * 6 + capacity_2
result = total_capacity
return result
|
A cannonball is fired horizontally with a velocity of 200 m/s. If the horizontal distance travelled by the cannonball is 6 km, how long was it in the air? | def solve() -> int:
velocity = 200
distance = 6000
time = distance / velocity
result = time
return result
|
A family reunion is taking place and 12 family members want to share some pizza. If the adults want 2 slices each and the kids want 1 slice each, with an extra slice set aside for anyone who is extra hungry, how many 8-slice pizzas should they order? | def solve() -> int:
adults = 12
kids = 12
slices_per_adult = 2
slices_per_kid = 1
extra_slice = 1
slices_per_pizza = 8
total_slices_needed = (adults * slices_per_adult) + (kids * slices_per_kid) + extra_slice
pizzas_needed = total_slices_needed // slices_per_pizza
if total_... |
A recipe needs 3/4 cups of sugar for each cup of flour. If the recipe requires 2 cups of flour, how many cups of sugar are needed? | def solve() -> int:
flour = 2
sugar_per_flour = 3/4
sugar_needed = flour * sugar_per_flour
result = sugar_needed
return result
|
A car travels 240 miles in 4 hours. Its speed during the first 3 hours was 60 mph. What was its speed during the fourth hour? | def solve() -> int:
d1 = 180
d2 = 60
t2 = 1
t1 = 3
s = d1 / t1
s2 = d2 / t2
result = s2
return result
|
A shipping company delivers 400 packages every day. On Monday, 30% of the packages are delivered successfully. On Tuesday, half of the remaining packages are damaged. The next day, 20 packages are returned due to incorrect addresses. What is the total number of packages left undelivered? | def solve() -> int:
num_packages_delivered = 400
num_packages_delivered_monday = num_packages_delivered * 0.3
num_packages_delivered_tuesday = (num_packages_delivered - num_packages_delivered_monday) * 0.5
num_packages_delivered_wednesday = num_packages_delivered - num_packages_delivered_monday - num_pa... |
Student: Kamiah is 6 years old. In 8 years, her brother could be twice her age then. How old is he now? | def solve() -> int:
kamiah_age = 6
brother_age_in_8_years = kamiah_age * 2
brother_age_now = brother_age_in_8_years - 8
result = brother_age_now
return result
|
A rectangle has a length of 12 inches and a width of 8 inches. What is the perimeter of the rectangle? | def solve() -> int:
length = 12
width = 8
perimeter = 2 * (length + width)
result = perimeter
return result
|
A soccer team loses 3 points every game they lose and gains 1 point for every game that they win. If the team won 8 games and lost 3 games, what is their total score? | def solve() -> int:
points_lost = 3
points_gained = 1
num_wins = 8
num_losses = 3
total_score = (points_gained * num_wins) - (points_lost * num_losses)
result = total_score
return result
|
In a baking competition, four contestants made cakes. Rachel made three times as many cakes as did Tina. Tina made 4 more cakes than did Leah, and Leah made half the number of cakes that Alice made. If Alice made 14 cakes, how many cakes were made in total? | def solve() -> int:
alice_cakes = 14
leah_cakes = alice_cakes * 0.5
tina_cakes = leah_cakes + 4
rachel_cakes = tina_cakes * 3
total_cakes = alice_cakes + leah_cakes + tina_cakes + rachel_cakes
result = total_cakes
return result
|
A store has 250 apples to split equally among 10 baskets. How many apples will be in each basket? | def solve() -> int:
total_apples = 250
total_baskets = 10
apples_per_basket = total_apples // total_baskets
result = f'{apples_per_basket}'
result = apples_per_basket
return result
|
Mark charges a fee of $50 per day for the first 3 days and then $30 per day for every day after that. How much did it cost for him to look for an item for 7 days? | def solve() -> int:
days = 7
if days <= 3:
cost = days * 50
else:
cost = 3 * 50 + (days - 3) * 30
result = cost
return result
|
John is taking a language course that lasts for 16 weeks. The course consists of 3 two-hour classes and 1 four-hour class each week. In addition, John must spend 3 hours each week working on grammar exercises. How many hours will he spend on this course? | def solve() -> int:
weeks = 16
two_hour_classes = 3
four_hour_classes = 1
grammar_hours = 3
class_hours = (2 * two_hour_classes) + (4 * four_hour_classes)
total_hours = class_hours + grammar_hours
total_course_hours = total_hours * weeks
result = total_... |
Omar is planning a road trip with his friends. He rented a car that costs $50 per day and $0.25 per mile. He also needs to pay $12 for tolls and $40 for gas. He has a budget of $300 and he wants to maximize the distance he can travel. How many days can he rent the car for if he drives 120 miles per day? | def solve() -> int:
cost_per_day = 50 + 0.25 * 120 + 12 + 40
days = 300 // cost_per_day
result = days
return result
|
There are 12 socks in a drawer, 7 of them are black, 2 of them are white and the rest are brown. If Lily randomly picks a sock from the drawer, what is the probability that it's a black sock? | def solve() -> int:
total_socks = 12
black_socks = 7
white_socks = 2
brown_socks = total_socks - black_socks - white_socks
probability_black = black_socks / total_socks
result = probability_black
return result
|
Student: John pays $40 for a pair of shoes that costs $50 before sales. What is the percentage discount? | def solve() -> int:
price_before_sales = 50
price_after_sales = 40
discount = price_before_sales - price_after_sales
percentage_discount = (discount / price_before_sales) * 100
result = percentage_discount
return result
|
Possible math questions and programs: John has 12 stickers. He trades 3 stickers with his friend Lisa for 5 marbles. He then buys 7 more stickers with his allowance. How many stickers does John have now? | def solve() -> int:
john_stickers = 12
john_marbles = 0
john_stickers = john_stickers - 3
john_marbles = john_marbles + 5
john_stickers = john_stickers + 7
result = john_stickers
return result
|
Mason is excited for his 18th birthday, which is coming up soon. He will be twice as old as he was when he got his first job. His grandparents give him $25 for every year old he is. How much money will they give him? | def solve() -> int:
age_when_got_first_job = 16
current_age = 18
money_per_year = 25
money_given = (current_age - age_when_got_first_job) * money_per_year
result = money_given
return result
|
A construction worker needs to build a 50-foot long fence. The fence will be made up of 10 planks, each 5 feet long. How many planks will be left if he completes the fence? | def solve() -> int:
total_length = 50
plank_length = 5
planks_needed = total_length / plank_length
planks_left = planks_needed % 10
result = planks_left
return result
|
Student: Kevin, a plumber, earns a basic salary of $1800 per month and a variable rate of $25 per hour for each job he does. Last month, he did 20 jobs and spent an average of 3 hours on each job. He also paid $300 for his tools and $400 for his gas. He invested 50% of his remaining earnings in a mutual fund. How much ... | def solve() -> int:
basic_salary = 1800
variable_rate = 25
jobs_done = 20
hours_spent = 3
tools_cost = 300
gas_cost = 400
total_salary = basic_salary + jobs_done * hours_spent * variable_rate - tools_cost - gas_cost
mutual_fund_investment = total_salary * 0.5
annual_interest_rate = 0... |
A bag contains 20 marbles and some beads. Later, the same number of marbles and beads are taken out of the bag. If only 6 marbles and 4 beads remain in the bag, how many items were in the bag at first? | def solve() -> int:
marbles = 6
beads = 4
total_items = marbles + beads
initial_items = total_items * 2
result = initial_items - 6 - 4
return result
|
Student: A train is moving at a speed of 60 miles per hour. If the train has to travel 240 miles, how long will it take to reach its destination? | def solve() -> int:
speed = 60
distance = 240
time = distance / speed
result = time
return result
|
In the last game of the season, Rachel ran 2 kilometers. Her brother ran 3 times as much distance as Rachel did in every game he played during his two years on the track team. Every year, the track team has 20 games. How far have the two siblings run altogether if Rachel also ran 25 kilometers in earlier games? | def solve() -> int:
rachel_distance_last_game = 2
rachel_distance_total = 25
brother_distance_per_game = 3 * rachel_distance_last_game
brother_distance_total = 2 * 20 * brother_distance_per_game
total_distance = rachel_distance_total + rachel_distance_last_game + brother_distance_total
... |
Student: A jeweller sells bracelets for $50 and necklaces for $60. How much do 12 bracelets and 8 necklaces cost? | def solve() -> int:
bracelet_price = 50
necklace_price = 60
bracelet_quantity = 12
necklace_quantity = 8
bracelet_cost = bracelet_price * bracelet_quantity
necklace_cost = necklace_price * necklace_quantity
total_cost = bracelet_cost + necklace_cost
result = total_cost
return result... |
Ela is sent to collect firewood with her brother and Houston. Ela and her brother collect a total of 28 pounds of firewood while Houston collected 12 pounds. What is the total firewood collected by all three of them? | def solve() -> int:
total_firewood_collected_by_Ela_and_brother = 28
firewood_collected_by_Houston = 12
firewood_collected_combined = total_firewood_collected_by_Ela_and_brother + firewood_collected_by_Houston
result = firewood_collected_combined
return result
|
A marathon runner completed a 26 mile race in 3 hours and 45 minutes. If the runner maintains the same pace, how long will it take to complete a 13 mile race? | def solve() -> int:
hours = 3
minutes = 45
total_minutes = hours * 60 + minutes
pace = total_minutes / 26
new_race_distance = 13
new_race_time = pace * new_race_distance
result = f'{int(new_race_time // 60)} hours and {int(new_race_time % 60)} minutes'
return result
|
John is building a stage for his community theater. Each side of the stage is 10 feet high, 12 feet wide, and 16 feet long. The sides will be made of 1.5-foot wide planks. If John buys lumber in 20-foot-long boards, planning to cut some of them for the shorter lengths he'll need, how many 20-foot long planks will he ne... | def solve() -> int:
height = 10
width = 12
length = 16
plank_width = 1.5
side_length = (height * 2) + (width * 2)
planks_needed = side_length / plank_width
total_planks_needed = planks_needed * 2
twenty_foot_planks_needed = total_planks_needed / 20
result = t... |
A 2000 meter long train travels at a constant speed for a total of 2 minutes. What is the train's speed in kilometers per hour? | def solve() -> int:
speed_in_kmph = 2000/(2/60)/1000*60
result = speed_in_kmph
return result
|
Emily had 20 books. She gave 30% of her books to her friend. How many books did she give away? | def solve() -> int:
books = 20
percent_given = 30
books_given = books * (percent_given/100)
result = books_given
return result
|
If 3 apples cost $3, how much would 5 apples cost? | def solve() -> int:
apple_cost = 3/3
total_cost = 5*apple_cost
result = total_cost
return result
|
There are 15 girls and 20 boys in a class. What percent of the class consists of girls? | def solve() -> int:
total_students = 15 + 20
num_girls = 15
percent_girls = (num_girls / total_students) * 100
result = percent_girls
return result
|
A company manufactured 500 toys. The toys were distributed equally among 10 stores. After a month, the company requested each store to return 25 toys. How many toys does each store have now? | def solve() -> int:
toys_manufactured = 500
num_stores = 10
toys_per_store = toys_manufactured / num_stores
toys_returned = 25
toys_per_store_now = toys_per_store - toys_returned
result = toys_per_store_now
return result
|
Student: A lottery requires 5 numbers to be chosen out of 60. If the order of the numbers do not matter, how many possible combinations are there? | def solve() -> int:
numbers_to_choose = 5
total_numbers = 60
result = total_numbers ** numbers_to_choose
return result
|
If John cleans and dries 40 plates and 15 bowls and stacks 30 plates and 10 bowls, how many dishes are left for him to stack? | def solve() -> int:
plates_cleaned = 40
bowls_cleaned = 15
plates_stacked = 30
bowls_stacked = 10
total_plates = plates_cleaned - plates_stacked
total_bowls = bowls_cleaned - bowls_stacked
dishes_left = total_plates + total_bowls
result = dishes_left
return result... |
Meredith has $5000 that she wants to save for a down payment on a house. She has a savings account that earns 5% interest each year. How much money will she have in 5 years? | def solve() -> int:
initial_balance = 5000
interest_rate = 0.05
time_years = 5
future_balance = initial_balance * (1 + interest_rate) ** time_years
result = future_balance
return result
|
Student: There are 5 cars in a parking lot, each car has 4 tires. How many tires are there in total? | def solve() -> int:
cars = 5
tires_per_car = 4
tires = cars * tires_per_car
result = tires
return result
|
Eric knows that the distance between his office and the hardware store is 3 kilometers, while the distance between the hardwareSophie is a baker. She bakes 10 loaves of bread every day. However, every two days, she donates 4 loaves to a charity. If she started with 50 loaves, after how many days will she have a total o... | def solve() -> int:
distance_office_hardware_store = 3
distance_hardware_store_sophie = 5
total_distance = distance_office_hardware_store + distance_hardware_store_sophie
days = 0
loaves = 50
while loaves < 100:
days += 1
loaves += 10
if days % 2 == 0:
... |
Student: Jack needs to drink 8 glasses of water per day to stay healthy. If each glass of water is 8 ounces, how many ounces of water does he need to drink each day? | def solve() -> int:
num_glasses = 8
ounces_per_glass = 8
total_ounces = num_glasses * ounces_per_glass
result = total_ounces
return result
|
8. Emma is visiting Florida for 3 days and her hotel costs $80 per night. She also bought tickets to Disney for $90. How much did she spend in total for this trip? | def solve() -> int:
hotel_cost = 80
tickets_cost = 90
nights_stayed = 3
total_cost = (hotel_cost * nights_stayed) + tickets_cost
result = total_cost
return result
|
In a car racing competition, James and Alex are competing for a trophy. The total distance they have to cover is 100 km. James finished the race completing 8 km more than Alex, who drove at one-half the speed for the first 20 km and twice the speed for the remainder of the race. How much distance did Alex drive before ... | def solve() -> int:
james_distance = 100/2 + 4
alex_distance = 20/2 + (100-20)*2
james_time = james_distance/80
alex_time = alex_distance/40
time_before_james_finished = james_time - alex_time
distance_before_james_finished = time_before_james_finished * 40
result = ... |
A refrigerator running for five hours every day would consume 2.5 kilowatts. How many kilowatts would it consume if it was used for 3 hours a day for 6 days? | def solve() -> int:
hours_per_day = 3
days = 6
total_hours = hours_per_day * days
kilowatts_per_hour = 2.5 / 5
total_kilowatts = total_hours * kilowatts_per_hour
result = total_kilowatts
return result
|
Every Saturday, Emma jogs 6 miles around her neighborhood. She takes a different route every time. On Sundays, she bikes 12 miles in the outskirts of the town. If she does this for 3 consecutive weekends, how many miles will she have covered in total? | def solve() -> int:
saturday_jog = 6
sunday_bike = 12
total_miles = (saturday_jog + sunday_bike) * 3
result = total_miles
return result
|
A grocery store sold a total of 356 fruit baskets this week. Some were small, some were medium, and some were large. The number of small and large baskets combined was 241. If they sold 19 medium baskets, how many large baskets did they sell? | def solve() -> int:
total_baskets = 356
medium_baskets = 19
small_large_baskets = 241
large_baskets = total_baskets - medium_baskets - small_large_baskets
result = large_baskets
return result
|
ve is 6 years older than Ken. In 11 years, Steve will be 46 years old. What is the sum of their present ages? | def solve() -> int:
n = 11
age1 = 46 + n
age2 = age1 - 6
result = age1 + age2
return result
|
Tyler has $40. He spends $15 on a game and then earns $10 for mowing the lawn. How much money does he have now? | def solve() -> int:
money = 40
game = 15
earning = 10
result = money - game + earning
return result
|
Leo sells lemonade for $0.50 per cup. He spends $15.00 on lemons, sugar, and cups. If he sells 120 cups of lemonade, how much profit does he make? | def solve() -> int:
revenue = 120 * 0.50
result = revenue - 15.00
return result
|
In a class of 25 students, 16 students have a pet, and 7 students have a dog. What percentage of students have a pet that is not a dog? | def solve() -> int:
total_students = 25
pet_students = 16
dog_students = 7
non_dog_pet_students = pet_students - dog_students
percentage = (non_dog_pet_students / total_students) * 100
result = percentage
return result
|
John has 3 more pencils than twice the number of erasers he has. If John has 17 pencils, how many erasers does he have? | def solve() -> int:
pencils = 17
erasers = (pencils - 3) / 2
result = erasers
return result
|
Lisa is baking cookies for a party. She has a recipe that makes 24 cookies with 2 cups of flour, 1 cup of sugar, 0.5 cup of butter, and 1 teaspoon of baking powder. She decides to double the recipe to make 48 cookies. How much of each ingredient does she need? | def solve() -> int:
flour = 2
sugar = 1
butter = 0.5
baking_powder = 1
factor = 2
new_flour = flour * factor
new_sugar = sugar * factor
new_butter = butter * factor
new_baking_powder = baking_powder * factor
result = {"flour": new_flour, "sugar": new_sugar, "butter... |
``` A rectangular prism has a volume of 48 cubic units. If the length of one side is 4 units, what is the height of the prism? ``` #Step 1: Determine the equation to solve for the height #V = 48, L = 4, W =? , H =? | def solve() -> int:
V = 48
L = 4
W = V/L
H = V/(L*W)
result = H
return result
|
Sam has a lemonade stand and sells each cup of lemonade for $0.75. He spends $0.25 for each lemon, $0.1 for each cup of sugar, and $0.05 for each cup of water. He uses one lemon, one cup of sugar, and four cups of water to make eight cups of lemonade. If he sells 40 cups of lemonade and pays $2 for renting the stand, h... | def solve() -> int:
revenue = 40 * 0.75
lemon_cost = 0.25 * (40 / 8)
sugar_cost = 0.1 * (40 / 8)
water_cost = 0.05 * (40 / 2)
total_cost = lemon_cost + sugar_cost + water_cost
profit = revenue - total_cost - 2
result = profit
return result
|
The ratio of the length to the width of a rectangle is 4:3. If the area of the rectangle is 75 square meters, what is the length of the rectangle? | def solve() -> int:
area = 75
ratio = 4/3
width = (area/ratio)**0.5
length = width*ratio
result = length
return result
|
am is working at a vegetable stand. He has 100 tomatoes and it takes him 3 minutes to bag one tomato. How many tomatoes can Sam bag in 40 minutes? | def solve() -> int:
number_of_tomatoes = 100
minutes_for_aming_one_tomato = 3
minutes_available = 40
result1 = minutes_available/minutes_for_aming_one_tomato
result2 = result1 * number_of_tomatoes
result = result2
return result
|
Student: Jane bought a shirt that cost $25 and pants that cost $35. If she received a discount of $15, what was the percentage discount she received on her purchase? | def solve() -> int:
shirt = 25
pants = 35
discount = 15
original_total = shirt + pants
final_total = original_total - discount
percentage_discount = (discount / original_total) * 100
result = percentage_discount
return result
|
A ticket to enter a museum costs $8 for adults and $4 for children. If a group of 10 adults and 5 children visited the museum, how much money would the group spend in total? | def solve() -> int:
adult_ticket_price = 8
child_ticket_price = 4
num_adults = 10
num_children = 5
total_cost = (num_adults * adult_ticket_price) + (num_children * child_ticket_price)
result = total_cost
return result
|
Nine years ago, Samantha was five times as old as Rachel. If Rachel will be 30 in three years, how old is Samantha now? | def solve() -> int:
rachel_age = 30 - 3
samantha_age_nine_years_ago = 5 * (rachel_age - 9)
samantha_age = samantha_age_nine_years_ago + 9
result = samantha_age
return result
|
If a train travels 280 miles in 7 hours, how long will it take to travel 560 miles? | def solve() -> int:
distance = 560
speed = 280 / 7
time_in_hours = distance / speed
result = time_in_hours
return result
|
Mia and her friend Ava are playing a game of ping pong. Mia wins the first round with 21 points, while Ava scores 3/5 as many points as Mia. In the second round, Ava scores 7 more points than Mia. If Mia scored 4/5 as many points as she did in the first round, how many points did the two score in the game? | def solve() -> int:
mia_first_round = 21
ava_first_round = mia_first_round * 3/5
ava_second_round = mia_first_round + 7
mia_second_round = mia_first_round * 4/5
total_score = mia_first_round + ava_first_round + mia_second_round + ava_second_round
result = total_score
... |
A bottle of orange juice has a volume of 1 liter. If the density of the juice is 1.05 g/mL, how much does the bottle weigh in kilograms? | def solve() -> int:
volume = 1
density = 1.05
weight_in_g = volume * 1000 * density
weight_in_kg = weight_in_g / 1000
result = weight_in_kg
return result
|
Mia bakes an average of 4 cakes a week. Her mother bakes 3 times as many cakes as Mia does. Because her sister is so tired from helping her mother, for every cake Mia bakes, her sister rests for 20 minutes. How many hours does her sister rest in a week? | def solve() -> int:
mia_cakes = 4
mother_cakes = mia_cakes * 3
total_cakes = mia_cakes + mother_cakes
sister_rest_time = mia_cakes * 20
sister_rest_hours = sister_rest_time / 60
total_sister_rest_hours = sister_rest_hours * total_cakes
result = total_sister_rest... |
Bob has four times as many marbles as Jane, and Jane has half as many marbles as Sarah. If Sarah has 24 marbles, how many marbles does Bob have? | def solve() -> int:
marbles_sarah = 24
marbles_jane = marbles_sarah * 2
marbles_bob = marbles_jane * 4
result = marbles_bob
return result
|
Lucy has 15 books and no bookshelves. Each bookshelf can hold 6 books. How many bookshelves will she need to buy to hold all of her books? | def solve() -> int:
total_books = 15
books_per_shelf = 6
shelves_needed = total_books/books_per_shelf
rounded_shelves = int(shelves_needed + 0.9)
result = rounded_shelves
return result
|
There are 24 students in a classroom. If each student has 4 pencils, how many pencils are there in total? | def solve() -> int:
num_students = 24
pencils_per_student = 4
total_pencils = num_students * pencils_per_student
result = total_pencils
return result
|
There were 15 kids in a class. 3 new students join, but then 5 moved away. How many kids are in the class now? | def solve() -> int:
kids = 15
kids += 3
kids -= 5
result = kids
return result
|
am has 8 stickers and Tom has 12 stickers. They decide to exchange some stickers so that they both have the same number. How many stickers should they exchange? | def solve() -> int:
sam = 8
tom = 12
difference = tom - sam
exchange = difference / 2
result = exchange
return result
|
Maria is admiring a bridge. At the same time, the bridge and Maria are casting shadows - the bridge of 80 meters and Maria of 2 meters. Maria is 1.3 meters tall. What is the height of the bridge? | def solve() -> int:
bridge_length = 80
maria_height = 1.3
maria_shadow_length = 2
bridge_height = (maria_height * bridge_length) / maria_shadow_length
result = bridge_height
return result
|
Andrew had 240 marbles and he gave 20 to his little sister and 55 to his best friend. If he wants to divide the rest of the marbles equally between himself and his three cousins, how many marbles will each person get? | def solve() -> int:
marbles = 240
marbles_given_to_sister = 20
marbles_given_to_friend = 55
remaining_marbles = marbles - marbles_given_to_sister - marbles_given_to_friend
marbles_per_person = remaining_marbles / 4
result = marbles_per_person
return result
|
A flower shop wants to make a bouquet using 15 roses and 25 carnations. If a rose costs $1.5 and a carnation costs $0.5, how much does the bouquet cost? | def solve() -> int:
rose_cost = 1.5
carnation_cost = 0.5
total_cost = (15 * rose_cost) + (25 * carnation_cost)
result = total_cost
return result
|
Student: A recipe calls for 2 cups of flour and makes 12 cookies. If you want to make 36 cookies, how many cups of flour are needed? | def solve() -> int:
cookies_needed = 36
cookies_per_cup = 12
cups_of_flour = cookies_needed / cookies_per_cup
result = cups_of_flour
return result
|
Here are some possible questions and python programs: Jess and Kim were sharing a pizza that had 16 slices. They ate 4 slices each and gave 2 slices to their friend Leo. Then they decided to cut the remaining slices in half and eat some more. Jess ate 3 half-slices and Kim ate 4 half-slices. How many half-slices of piz... | def solve() -> int:
slices = 16 - 4 - 4 - 2
half_slices = slices * 2
half_slices = half_slices - 3 - 4
result = half_slices
return result
|
Julie has 4 dozen bananas in the grocery store. Yan has 2 times the amount of bananas Julie has. Li has 1/3 of the bananas Yan has. How many bananas do they have altogether? | def solve() -> int:
bananasJulie = 4
bananasYan = bananasJulie * 2
bananasLi = bananasYan / 3
result = bananasJulie + bananasYan + bananasLi
return result
|
A store is having a buy-one-get-one-half-off promotion on shoes. If a pair of shoes originally costs $60, what is the final price after the promotion is applied? | def solve() -> int:
original_price = 60
discount = 0.5
final_price = original_price * (1 + discount / 2)
result = f'<<<{final_price}>>>'
result = final_price
return result
|
A store sells pencils for $0.50 each and erasers for $1 each. If a customer buys 5 pencils and 2 erasers, what is the total cost of the purchase? | def solve() -> int:
pencil_cost = 0.50
eraser_cost = 1
num_pencils = 5
num_erasers = 2
total_cost = (pencil_cost * num_pencils) + (eraser_cost * num_erasers)
result = total_cost
return result
|
Terry mows lawns for $35 each weekday and sells pies for $25 each weekend. If he puts away 35% of his earnings, how long will it take him to save $300? | def solve() -> int:
earnings = 35 * 5 + 25 * 2
savingsGoal = 300
percentageToSave = 0.35
numWeeks = savingsGoal / (earnings * percentageToSave)
result = numWeeks
return result
|
The budget for the school's field trip is 4,500 dollars. If the cost is split equally among the 30 students going, how much money, in dollars, will each student have to pay for the field trip? | def solve() -> int:
budget = 4500
num_students = 30
cost_per_student = budget / num_students
result = cost_per_student
return result
|
4. Hannah’s cake cost her 22 dollars. If she spends 12 dollars on ingredients, how much will be left over? | def solve() -> int:
total_cost = 22
ingredient_cost = 12
remaining = total_cost - ingredient_cost
result = remaining
return result
|
The first and the second of three consecutive odd integers sum up to 64. Find the third integer. | def solve() -> int:
third_integer = 43
result = third_integer
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.