question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A triangle has a base of 8cm and a height of 10cm. What is the area of the triangle? | def solve() -> int:
area = 0.5 * 8 * 10
result = area
return result
|
Possible questions and programs: Alice wants to bake some brownies for her friends. She needs 3 eggs, 1/4 cup of oil, and 1/2 cup of water for each batch of brownies. She has 9 eggs, 2 cups of oil, and 4 cups of water in her kitchen. How many batches of brownies can she make with what she has? | def solve() -> int:
eggs = 9
oil = 2
water = 4
eggs_per_batch = 3
oil_per_batch = 0.25
water_per_batch = 0.5
batches_with_eggs = eggs // eggs_per_batch
batches_with_oil = oil // oil_per_batch
batches_with_water = water // water_per_batch
batches = min(batches_with_eggs,... |
Jake sells lemonade for $0.25 per cup. He spends $5 to buy the ingredients and makes 50 cups of lemonade. He sells 40 cups and gives away the remaining 10 cups to his friends. How much profit did Jake make from selling lemonade? | def solve() -> int:
revenue = 40 * 0.25
cost = 5
profit = revenue - cost
result = profit
return result
|
How many days will it take to shovel 46,000 pounds of coal with 8 people? | def solve() -> int:
n_people = 8
coal_shoveled = 46000
coal_shoveled_1_person_1_day = coal_shoveled / n_people
time_days = coal_shoveled / coal_shoveled_1_person_1_day
result = time_days
return result
|
David goes on a weekend trip and stays in different apartments. The first 2 nights he stays in a budget apartment where he is charged $40 per night. The third and fourth nights he stays in a premium apartment where he shares expenses with his colleague, and they are charged $80 total per night. How much did David spend... | def solve() -> int:
budget_nights = 2
budget_price_per_night = 40
premium_nights = 2
premium_price_per_night = 80 / 2
budget_total = budget_nights * budget_price_per_night
premium_total = premium_nights * premium_price_per_night
total_cost = budget_total + premium_total
re... |
What is the median temperature of Wayupnorth, Canada over 4 days? | def solve() -> int:
day1 = -36
day2 = 13
day3 = -15
day4 = -10
temps = [day1, day2, day3, day4]
temps.sort()
middle = len(temps)//2
median_temp = temps[middle]
result = median_temp
return result
|
Charlie has 16 kilograms of apples. If he is packing them into sacks with a capacity of 4 kilograms each, how many sacks will he need? | def solve() -> int:
x = 16
y = 4
amount = 0
count = 0
while amount < x:
amount += y
count += 1
result = count
return result
|
During a running race, Bonnie passed 5 people in the first 15 minutes. If she maintained this speed for the entire race, which lasted 1 hour, how many people did she pass? | def solve() -> int:
minutes_passed = 15
total_time = 60
passed_per_min = 5
speed_maintained = passed_per_min / minutes_passed
total_passed = speed_maintained * total_time
result = total_passed
return result
|
The difference between the population of two countries, Country A and Country B, is 120000. If the population of Country A increases by 400% each year, and Country B decreases by 50% each year, how many years it will take for both countries to have the same population? | def solve() -> int:
difference = 120000
increase_rate = 400 / 100
decrease_rate = -50 / 100
country_a = 0
country_b = difference
years = 0
while country_a!= country_b:
country_a = round(country_a * (1 + increase_rate))
country_b = round(country_b * (1 + decrease_rat... |
A recipe calls for 2 1/4 cups of milk. If you only have a 1/2 cup measuring cup, how many times will you need to use it to measure the milk? | def solve() -> int:
milk_needed = 2.25
measuring_cup = 0.5
num_uses = milk_needed / measuring_cup
result = num_uses
return result
|
Mary can knit a sweater in 10 hours. If she works for 2 hours a day, how many days will it take her to complete the sweater? | def solve() -> int:
time_sweater = 10
time_per_day = 2
days = time_sweater/time_per_day
result = days
return result
|
Student: A rectangle has a width of 8cm and a perimeter of 26cm. Calculate the length of the rectangle. | def solve() -> int:
width = 8
perimeter = 26
length = (perimeter - 2*width)/2
result = length
return result
|
A car can travel 360 miles on a full tank of gas. The gas tank can hold 12 gallons of gas. The driver pays $2.5 per gallon of gas. How much does it cost the driver to travel 720 miles with the car? | def solve() -> int:
mpg = 360 / 12
gallons = 720 / mpg
cost = gallons * 2.5
result = cost
return result
|
A birthday cake costs $25 and is enough to feed 12 people. If Mr. Johnson is planning a birthday party with 30 guests, how many cakes must he order and how much will it cost in total? | def solve() -> int:
guests = 30
people_per_cake = 12
cakes = guests/people_per_cake
cost = cakes * 25
result = cost
return result
|
Student: Lisa can make a round trip journey to work in 7 hours. She travels to work at 60 miles/hour and returns home at 40 miles/hour. What is the distance between her home and work? | def solve() -> int:
speed_to_work = 60
speed_return = 40
total_time = 7
distance = (speed_to_work + speed_return) * total_time / 2
result = distance
return result
|
Lila had 20 stickers in her album and she wanted to fill it with 80 stickers. She bought a pack of 12 stickers every week and glued them to her album. She also traded some stickers with her friends and got 2 extra stickers every week. After how many weeks did she fill her album? | def solve() -> int:
stickers_start = 20
stickers_goal = 80
stickers_bought = 12
stickers_traded = 2
weeks = (stickers_goal - stickers_start) / (stickers_bought + stickers_traded)
result = weeks
return result
|
My rabbit, Hazel, has a fur coat with a unique pattern of spots on her body. Three-fifths of the spots are on her back and hind legs, one-sixth are on her head, and the remaining spots are located on her chest. If Hazel has 18 spots on her chest, how many spots does she have on her head? | def solve() -> int:
spots_total = 5/3 * 18 + 18
spots_head = spots_total / 6 - 18
result = spots_head
return result
|
Alex received a $6,000 bonus last year when his salary was $40,000. If his salary this year is $50,000, what percentage bonus will he receive this year? The number of students at a school is currently 500. Over the next 5 years, the student population is expected to increase by 25%, due to new enrolments. During the sa... | def solve() -> int:
bonus_last_year = 6000
salary_last_year = 40000
salary_this_year = 50000
percentage_increase = (salary_this_year - salary_last_year) / salary_last_year * 100
bonus_this_year = bonus_last_year * percentage_increase / 100
num_students = 500
for i in range(5):... |
A coffee shop sold 25 cups of coffee for $3 per cup. If they used 5 bags of coffee beans for the day and each bag costs $10, how much profit did the shop make? | def solve() -> int:
num_cups = 25
price_per_cup = 3
coffee_bags = 5
price_per_bag = 10
total_earnings = num_cups * price_per_cup
total_cost = coffee_bags * price_per_bag
profit = total_earnings - total_cost
result = profit
return result
|
Marcus has five cards with the labels D, E, F, G, H printed on them. D has a tag of 50, E has half the number D is tagged with, F has five times the number D is tagged with, G has the difference of tags between F and E and H has the total of the tags of D and G. Calculate the total of all the tagged numbers. | def solve() -> int:
tag_D = 50
tag_E = tag_D / 2
tag_F = 5 * tag_D
tag_G = tag_F - tag_E
tag_H = tag_D + tag_G
total_tags = tag_D + tag_E + tag_F + tag_G + tag_H
result = total_tags
return result
|
A recipe calls for 3/4 cups of flour for every 2 eggs used. If you want to make half the recipe using only one egg, how much flour do you need? | def solve() -> int:
eggs = 1
flour_per_egg = 3/4
flour_needed = eggs/flour_per_egg
result = flour_needed
return result
|
There are 15 students in a class. If the number of students increases by 5 every month, how many students will there be after 9 months? | def solve() -> int:
students_in_class = 15
increase_per_month = 5
months = 9
students_after_n_months = students_in_class + (increase_per_month * months)
result = students_after_n_months
return result
|
A train travels 60 miles in 1 hour. How many miles will it travel in 4.5 hours? | def solve() -> int:
distance = 60*4.5
result = distance
return result
|
Carlos has 48 marbles. He loses 8 of them and then wins 4 more in a game. He then gives away half of his marbles to his sister. How many marbles does he have left? | def solve() -> int:
marbles = 48
marbles = marbles - 8
marbles = marbles + 4
marbles = marbles // 2
result = marbles
return result
|
Ben collected 36 stamps from different countries and sorted them into 4 equal groups. He gave one group to his brother and traded another group for 12 more stamps from his friend. He then bought 8 more stamps from a shop and sorted them into 8 equal groups. He gave two groups to his sister and kept the rest. How many s... | def solve() -> int:
group_size = 36 // 4
left_after_trading = 36 - 2 * group_size + 12
total_after_buying = left_after_trading + 8
new_group_size = total_after_buying // 8
left_after_giving = total_after_buying - 2 * new_group_size
result = left_after_giving
retur... |
Here are some possible new questions and programs: Every weekday, Jake buys a $1.25 coffee and a $2.50 muffin from the cafeteria. On Saturdays, he splurges on a $5.00 latte and a $3.00 croissant from a nearby bakery. On Sundays, he makes his own breakfast at home. How much money does he spend on breakfast in 4 weeks? | def solve() -> int:
coffee = 1.25
muffin = 2.50
latte = 5.00
croissant = 3.00
weekday_breakfast = (coffee + muffin) * 5
weekday_breakfast_4weeks = weekday_breakfast * 4
saturday_breakfast = latte + croissant
saturday_breakfast_4weeks = saturday_breakfast * 4
total_... |
A rectangular room has a length of 12 meters and a width of 8 meters. What is the area of the room? | def solve() -> int:
length = 12
width = 8
area = length*width
result = area
return result
|
Daniel won three-fourths as many soccer games as his friend, Max. Max won 20 games. How many games did Daniel win? | def solve() -> int:
maxs_wins = 20
daniels_wins = maxs_wins * (3/4)
result = daniels_wins
return result
|
Peter has to paint a wall of 8 meters long. He has 2 buckets of paint, one with 10 liters and one with 5 liters. He can cover 5 square meters with 1 liter of paint. How many liters of paint will Peter need to cover the the whole wall? | def solve() -> int:
bucket_10l = 8*5/10
bucket_5l = 8*5/5 - bucket_10l
total_l = bucket_10l + bucket_5l
result = total_l
return result
|
A father has twice as many sons as daughters. If he has 8 daughters, how many sons does he have? Ellie spent $300 on clothes. Their value doubled and she sold 60% of them. What was the selling price of the clothes? | def solve() -> int:
daughters = 8
sons = 2 * daughters
result = sons
clothes_cost = 300
clothes_value = 2 * clothes_cost
selling_price = 0.6 * clothes_value
result = selling_price
return result
|
Student: A toy store has a sale on new toys offering 20% off. How much will Marcus have to pay for a toy that originally costs $25? | def solve() -> int:
original_cost = 25
discount_rate = 0.2
discount_amount = original_cost * discount_rate
final_cost = original_cost - discount_amount
result = final_cost
return result
|
A recipe calls for 2 cups of flour, 1 cup of sugar, and 3 eggs. If Danielle wants to triple the recipe, how many cups of sugar will she need? | def solve() -> int:
original_sugar = 1
multiplier = 3
new_sugar = original_sugar * multiplier
result = new_sugar
return result
|
Student: Lisa is selling some pears for $7 per kilogram. If she would reduce the price by $1 for every 2 kilograms of pears sold, how much would she earn from selling 10 kilograms of pears? | def solve() -> int:
price_per_kg = 7
discount = 1
kg_sold = 10
total_price = price_per_kg * kg_sold
discount_amount = discount * (kg_sold // 2)
total_earned = total_price - discount_amount
result = total_earned
return result
|
Ben is taking a road trip from Los Angeles to Miami, a total of 3,000 miles. If he drives for 10 hours straight each day and his car averages 55 miles per hour, how many days will it take him to reach Miami? | def solve() -> int:
total_distance = 3000
driving_hours_per_day = 10
average_speed = 55
total_driving_time = total_distance / average_speed
total_days = total_driving_time / driving_hours_per_day
result = round(total_days)
return result
|
Sarah is babysitting to raise money for a charity. She charges $7 per hour. The charity goal is $150. If she has already earned $56, how many more hours does she need to babysit to reach her goal? | def solve() -> int:
goal = 150
earned = 56
rate = 7
remaining = goal - earned
hours_needed = remaining / rate
result = hours_needed
return result
|
Four friends decided to split a pizza evenly. If the pizza has 8 slices, how many slices will each friend get? | def solve() -> int:
pizza_slices = 8
number_of_friends = 4
slices_per_friend = pizza_slices // number_of_friends
result = slices_per_friend
return result
|
``` A dice is rolled twice. What is the probability that the sum of the two rolls is greater than 9? | def solve() -> int:
num_ways_greater_than_nine = 4
total_outcomes = 6*6
prob_greater_than_nine = num_ways_greater_than_nine/total_outcomes
result = prob_greater_than_nine
return result
|
Sarah has 50 marbles. She gave 10% of her marbles to her cousin and then bought 20 more marbles. How many marbles does she have now? | def solve() -> int:
total_marbles = 50
marbles_given_away = total_marbles * 0.1
marbles_remaining = total_marbles - marbles_given_away
marbles_new = 20
marbles_final = marbles_remaining + marbles_new
result = marbles_final
return result
|
Bill wants to build a fence around his rectangular garden and also install a rectangular fish pond inside the garden. The garden measures 60 feet by 80 feet, and the pond measures 20 feet by 30 feet. Find the total length of the fence he needs. | def solve() -> int:
garden_length = 60
garden_width = 80
pond_length = 20
pond_width = 30
fencing_length = 2 * (garden_length + garden_width) + 2 * (pond_length + pond_width) - 4
result = fencing_length
return result
|
The population of a city is 80000. If the annual growth rate is 3%, what is the population after 5 years? | def solve() -> int:
population = 80000
growth_rate = 3 / 100
years = 5
new_population = population * (1 + growth_rate) ** years
result = new_population
return result
|
Maria has twice as much money as Mark. Together, they have $60. How much money does Maria have? | def solve() -> int:
maria_and_mark_total = 60
mark_share = 60 / 3
maria_share = 2 * mark_share
result = maria_share
result
return result
|
In a car race, the first car completes 5 laps in 65 minutes. The second car completes 6 laps in 78 minutes. Which car is faster and by how much? | def solve() -> int:
car1_laps = 5
car1_time = 65
car2_laps = 6
car2_time = 78
car1_speed = car1_laps / (car1_time/60)
car2_speed = car2_laps / (car2_time/60)
if car1_speed > car2_speed:
difference = car1_speed - car2_speed
else:
difference = car2_speed - car1_speed
re... |
arah is making a cake and needs to calculate how much butter she should use. The recipe calls for 2 cups of flour, 1 cup of sugar, 0.5 cups of butter, and 1 cup of milk. Sarah only wants to make half of the recipe and needs to know how much butter she should use. How much butter should Sarah use? | def solve() -> int:
flour = 2
sugar = 1
butter = 0.5
milk = 1
recipe_scale = 0.5
butter_needed = butter * recipe_scale
result = butter_needed
return result
|
Maria went grocery shopping for her family. She bought 3 apples for $1 each, 4 oranges for $1.50 each, and 5 bananas for $0.50 each. How much did she spend? | def solve() -> int:
apples_bought = 3
oranges_bought = 4
bananas_bought = 5
cost_of_apples = 1
cost_of_oranges = 1.5
cost_of_bananas = 0.5
total_cost = apples_bought * cost_of_apples + oranges_bought * cost_of_oranges + bananas_bought * cost_of_bananas
result = total_cost
... |
John has two bags. The first bag contains 36 marbles and the second bag contains 63 marbles. What is the total number of marbles? | def solve() -> int:
total_1 = 36
total_2 = 63
total = total_1 + total_2
result = total
return result
|
A pizza place charges $10 for a large pizza and $2 for each topping. How much does a large pizza with four toppings cost? | def solve() -> int:
base_cost = 10
topping_cost = 4 * 2
total_cost = base_cost + topping_cost
result = total_cost
return result
|
A store is 100 meters long and 50 meters wide. If there is 1 employee per 25 square meters, how many employees work at the store? | def solve() -> int:
length = 100
width = 50
area = length * width
employees_per_area = 1 / 25
total_employees = area * employees_per_area
result = total_employees
return result
|
Student: Maya ordered a pizza that costs $12 plus $1.5 for each topping. She chose 4 toppings on Wednesday and another 3 toppings on Friday. How much did she pay? | def solve() -> int:
pizza_cost = 12
topping_cost = 1.5
wednesday_cost = 4 * topping_cost + pizza_cost
friday_cost = 3 * topping_cost + pizza_cost
total_cost = wednesday_cost + friday_cost
result = total_cost
return result
|
Student: A normal watermelon plant produces 4 watermelons per season. Ben has crossbred watermelon plants that produce 6 watermelons per season, but each watermelon is 10% lighter. He has a field that is 50 plants by 80 plants. How many kilograms of watermelon does he produce in one season, if each normal watermelon we... | def solve() -> int:
normal_watermelons_per_plant = 4
crossbred_watermelons_per_plant = 6
weight_reduction = 0.1
normal_watermelon_weight = 5
field_length = 50
field_width = 80
crossbred_watermelon_weight = normal_watermelon_weight * (1 - weight_reduction)
normal_watermelons_in_field = no... |
If a store sells a shirt for $25 and makes a profit of 20% on each shirt sold, how much is the profit on one shirt? | def solve() -> int:
shirt_price = 25
profit_margin_percentage = 20
profit_per_shirt = shirt_price * (profit_margin_percentage / 100)
result = profit_per_shirt
return result
|
Fin is 28 pounds heavier than Gari. Gari is 12 pounds lighter than Harry. If Harry weighs 120 pounds, find the weight of Fin. | def solve() -> int:
weight_gari = 120 + 12
weight_fin = weight_gari + 28
result = weight_fin
return result
|
Jordan is hosting a movie marathon with his 4 roommates. Each roommate invited two friends to join. How many people will be at the movie marathon in total? | def solve() -> int:
roommates = 4
friends_per_roommate = 2
total_people = (roommates * friends_per_roommate) + roommates
result = total_people
return result
|
Student: The circumference of a wheel is 28 inches. Axel needs to paint 30 circles onto the wheel with a pen. Each circle requires one inch of space. How much extra space will he have in the wheel for his drawing? | def solve() -> int:
circumference = 28
num_circles = 30
circle_space = 1
total_circle_space = num_circles * circle_space
extra_space = circumference - total_circle_space
result = extra_space
return result
|
A rectangular garden is 10 m wide and has an area of 80 square meters. What is the length of the garden? | def solve() -> int:
area = 80
width = 10
length = area/width
result = length
return result
|
am has 16 cups of flour. He wants to make pancakes that require 3 cups of flour each. How many pancakes can Sam make? | def solve() -> int:
cups_flour = 16
cups_flour_per_pancake = 3
pancakes = cups_flour // cups_flour_per_pancake
result = pancakes
return result
|
Laura is traveling 1200 miles by bus at a speed of 40 miles per hour. How much faster must she travel to reduce her travel time by 5 hours? Ethan had 15 pencils and he gave an equal number of pencils to his 5 friends. When his teacher asked him for a pencil, Ethan realized he didn't have any left. So, in order to make ... | def solve() -> int:
distance = 1200
speed = 40
time = distance / speed
new_time = time - 5
new_distance = distance
new_speed = new_distance / new_time
ethan_pencils = 15
friends = 5
pencils_each = ethan_pencils / friends
teacher_pencils = pencils_each / 2
ethan_penc... |
Sarah had $75 and Alex had $45. If Sarah gave Alex $15, Alex would have more money than Sarah. But then Alex spent $10. How much more money does Sarah have than Alex now? | def solve() -> int:
sarah_money = 75
alex_money = 45
alex_money += 15
sarah_money -= 15
alex_money -= 10
difference = sarah_money - alex_money
result = difference
return result
|
A novel is 800 pages long. Henry reads twice as fast as the average speed while his friend, Olivia, reads at the average speed. If they both read eight novels together, how many pages did they read in total? | def solve() -> int:
novel_length = 800
henry_speed = 2
olivia_speed = 1
total_speed = henry_speed + olivia_speed
total_pages = novel_length * 8
total_time = total_pages / total_speed
henry_pages = henry_speed * total_time
olivia_pages = olivia_speed * total_time
t... |
Michael bought 5 notepads, each costing $2, and 6 pens, each costing $3. How much money did he pay in total? | def solve() -> int:
price_notepads = 2
number_notepads = 5
price_pens = 3
number_pens = 6
cost_notepads = price_notepads * number_notepads
cost_pens = price_pens * number_pens
cost_total = cost_notepads + cost_pens
result = cost_total
return result
|
Student: Tony has 36 apples. He gives away 25% of them to his friends. How many apples does he have left? | def solve() -> int:
apples = 36
percentage = 25
given_away = apples * (percentage/100)
result = apples - given_away
return result
|
Eva buys 3 books and 2 magazines at a bookstore. Each book costs 12 dollars and each magazine costs 4 dollars. She gets a 10 percent discount on the total purchase. How much does she pay? | def solve() -> int:
subtotal = (3 * 12) + (2 * 4)
discount = subtotal * 0.1
final_amount = subtotal - discount
result = final_amount
return result
|
Linda has a basket of 36 strawberries. She wants to make 6 equal servings of strawberries for her friends and herself. How many strawberries will be in each serving? | def solve() -> int:
total_strawberries = 36
strawberries_per_serving = total_strawberries / 6
result = strawberries_per_serving
return result
|
A store sells two types of products, Product A priced at $20 and Product B priced at $30. If the store made a total revenue of $9000 selling 300 products, how many of each product did they sell? | def solve() -> int:
total_sales = 9000
total_products = 300
productA = 120
productB = 180
result = (productA, productB)
return result
|
Alex went for a 45-minute bike ride every morning before work, and for 1 hour on Saturdays and Sundays. How many hours did he spend biking in a month with 28 days? | def solve() -> int:
minutes_per_day = 45
minutes_per_weekend_day = 60
days_in_month = 28
minutes_per_month = (minutes_per_day * (days_in_month - 2)) + (minutes_per_weekend_day * 2)
hours_per_month = minutes_per_month / 60
result = hours_per_month
return result
|
If a car travels at a speed of 60 km/h for the first hour and 80 km/h for the second hour, what is the average speed of the car for the entire 2 hour journey? | def solve() -> int:
distance1 = 60 * 1
distance2 = 80 * 1
total_distance = distance1 + distance2
total_time = 2
average_speed = total_distance / total_time
result = average_speed
return result
|
Emily wants to trim a wallpaper border along the ceiling that will be 2 inches wide. If her room is 10 feet by 12 feet, how long should the wallpaper border be? | def solve() -> int:
width_of_border = 2
length_of_room = 12
width_of_room = 10
length_of_room_in_inches = length_of_room * 12
width_of_room_in_inches = width_of_room * 12
perimeter_of_room = 2 * (length_of_room_in_inches + width_of_room_in_inches)
length_of_wallpaper_border... |
A rectangle has a length of 18 cm and a width of 12 cm. What is the area of the rectangle? How many squares of 3 cm by 3 cm can fit inside the rectangle? | def solve() -> int:
length = 18
width = 12
side = 3
area_rect = length * width
area_square = side ** 2
num_squares = area_rect / area_square
result = num_squares
return result
|
Sarah has 3 times as many apples as Ella, and Ella has 5 apples. How many apples do they have in total? | def solve() -> int:
apple_ella = 5
apple_sarah = 3 * apple_ella
total_apples = apple_ella + apple_sarah
result = total_apples
return result
|
Scott has 4 less toy cars than 5 times the number of toy trucks he has. If he has 36 toy cars, how many toy trucks does he have? | def solve() -> int:
toy_cars = 36
toy_trucks = (toy_cars + 4) / 5
result = toy_trucks
return result
|
A box of candy has 30 pieces. If it takes 3 pieces to make a treat, how many treats can be made with one box of candy? | def solve() -> int:
candy_per_box = 30
candy_per_treat = 3
num_treats = candy_per_box // candy_per_treat
result = num_treats
return result
|
During a swimming competition, Andrea swam 9 laps while her friend Brianna swam 3 laps less than half of Andrea's laps. How many laps did Brianna swim? | def solve() -> int:
andrea_laps = 9
brianna_laps = (andrea_laps / 2) - 3
result = brianna_laps
return result
|
A garden is 20 feet long and 10 feet wide. How many square feet of soil do they need to plant vegetables? | def solve() -> int:
length = 20
width = 10
area = length * width
result = area
return result
|
Aiden, Ava, and Scarlett have a joint video game collection. One of their friends is selling a rare video game for $150 on his website. Not wanting to miss such a rare opportunity, they have pooled all their money to buy the video game. Scarlett has $20. Ava has twice Scarlett’s money, but three times Aiden’s. How much... | def solve() -> int:
scarlett_money = 20
ava_money = 2 * scarlett_money
aiden_money = ava_money / 3
total_money = scarlett_money + ava_money + aiden_money
money_required = 150 - total_money
result = money_required
return result
|
Possible new questions and programs: Samira borrowed $6000 from her friend to buy a car. She agreed to pay back the loan with an annual interest rate of 5% compounded monthly. She will make equal monthly payments for 3 years. How much, in dollars, does Samira pay each month? | def solve() -> int:
r = 0.05 / 12
n = 3 * 12
P = round(6000 * (r * (1 + r)**n) / ((1 + r)**n - 1), 2)
result = P
return result
|
Olivia is counting her change. She has a total of $7 in quarters, dimes, and pennies. If she has 20 quarters and 80 pennies, how many dimes does she have? | def solve() -> int:
q = 20
p = 80
qp_value = (q * 25) + (p * 1)
total_value = 7 * 100
d_value = total_value - qp_value
d = d_value // 10
result = d
return result
|
Barbara bought a cake that is 16 inches in diameter. She ate 3 inches of the cake. The remaining cake is 3/4 the size of David's cake. Emily's cake is 2 inches smaller than David's cake. What is the diameter of Emily's cake? | def solve() -> int:
diameter_barbara = 16
eaten_cake = 3
remaining_cake = diameter_barbara - eaten_cake
davids_cake = remaining_cake / (3/4)
emilys_cake = davids_cake - 2
result = emilys_cake
return result
|
Mike is planning his gym budget. The membership fee is $150. It costs $5 for every personal training session, and Mike wants to take 10 sessions while his friend wants 30% more than that. What would be the cost of the gym membership if Mike's friend gets his way? | def solve() -> int:
membership_fee = 150
personal_training_cost = 5
mike_sessions = 10
friend_sessions = mike_sessions * 1.3
mike_cost = membership_fee + (personal_training_cost * mike_sessions)
friend_cost = membership_fee + (personal_training_cost * friend_sessions)
result = frie... |
Emma is going shopping with her friends. They leave their house at 3:00 pm and walk to the shopping mall at a speed of 3 miles per hour. After half an hour, Emma realizes that she forgot her money at home. Her friend Zoe, who was left behind in the house, drives to the mall at a speed of 35 miles per hour. When will Zo... | def solve() -> int:
distance = 3.0
emma_speed = 3.0
emma_time = 0.5
emma_distance = emma_speed * emma_time
remaining_distance = distance - emma_distance
zoe_speed = 35.0
zoe_time = remaining_distance / zoe_speed
arrival_time = 3.5 + zoe_time
re... |
Student: Carl purchased 28 kilograms of apples. He used one-third of them to make apple juice, one-sixth of the remaining apples to make apple pies and the rest for a fruit salad. How many kilograms of apples are left for the fruit salad? | def solve() -> int:
apples_purchased = 28
apples_juice = apples_purchased / 3
apples_remaining = apples_purchased - apples_juice
apples_pies = apples_remaining / 6
apples_salad = apples_remaining - apples_pies
result = apples_salad
return result
|
-Do not repeat the same question or use the same numbers. Answer: A group of students planted a tree in the school yard and marked its height as 6 feet. After one year, the tree grew by 1.5 feet, and after another year, it grew by 1.25 times the previous year's growth. How tall is the tree after two years? | def solve() -> int:
height = 6
growth_1 = 1.5
height = height + growth_1
growth_2 = 1.25 * growth_1
height = height + growth_2
result = height
return result
|
Maria has 16 birds, 12 cats and 6 dogs in her backyard. How many different combinations of 3 animals can she choose if her selection must include at least one cat and one dog? | def solve() -> int:
population = [16,12,6]
number_of_selections = 0
for total in range(3,sum(population)+1):
for birds in range(0, population[0]+1):
for cats in range(1, population[1]+1):
for dogs in range(1, population[2]+1):
if (birds+cats+dogs==total):
... |
Two friends, Alice and Bob, went to a restaurant and their bill was $45.00. They want to leave a 15% tip. How much will each person pay if they split the total equally? | def solve() -> int:
total_bill = 45.00
tip_percentage = 0.15
total_bill_plus_tip = total_bill * (1 + tip_percentage)
each_person_pays = total_bill_plus_tip / 2
result = each_person_pays
return result
|
If John had $25 this morning and spent $10 on breakfast and $3 on coffee, and then gave $5 to his sister, how much money does he have left? | def solve() -> int:
money_this_morning = 25
spent_on_breakfast = 10
spent_on_coffee = 3
given_to_sister = 5
money_left = money_this_morning - spent_on_breakfast - spent_on_coffee - given_to_sister
result = money_left
return result
|
If Justin and Ethan both save $1 every day for a week, and Ethan saves an extra $0.25 per day, how much more will Ethan have saved than Justin? | def solve() -> int:
justin_savings_per_day = 1
ethan_savings_per_day = 1.25
days_in_a_week = 7
justin_total_savings = justin_savings_per_day * days_in_a_week
ethan_total_savings = ethan_savings_per_day * days_in_a_week
difference = ethan_total_savings - justin_total_savings
... |
Student: Jack purchased 10 trousers for $24 each and 7 blouses for $19 each. What is the average cost of the clothing he bought? | def solve() -> int:
trousers = 10
blouses = 7
cost_trousers = 24
cost_blouses = 19
total_cost = trousers * cost_trousers + blouses * cost_blouses
result = total_cost / (trousers + blouses)
return result
|
Sophie and her friends went to three different stores to shop. They spent 45 minutes in the first store, 20 minutes less in the second store than the first, and twice as long in the third store than the first. Before the shopping, they spent 15 minutes getting ready and half as long as the time spent in the first store... | def solve() -> int:
first_store = 45
second_store = first_store - 20
third_store = first_store * 2
getting_ready = 15
sandwiches = first_store / 2
total_time = (first_store + second_store + third_store + getting_ready + sandwiches) / 60
result = total_time
return result
|
A box of candy costs $5.25. How much money do you need to buy 17 boxes? | def solve() -> int:
box_price = 5.25
num_boxes = 17
total_cost = box_price * num_boxes
result = total_cost
return result
|
A new computer costs $800. If a store offers a 10% discount and then adds a 7% sales tax, how much will the final price be? | def solve() -> int:
discounted_price = 800 * 0.9
price_with_tax = discounted_price * 1.07
result = price_with_tax
return result
|
John collected 60 baseball cards. Eight of them were duplicates and had to be thrown away. A third of the remaining baseball cards were traded with his friends. John decided to keep half of the uneaten baseball cards and gave the other half to his little brother. How many uneaten baseball cards did John have left? | def solve() -> int:
cards_collected = 60
duplicates = 8
remaining_cards = cards_collected - duplicates
traded_cards = remaining_cards / 3
uneaten_cards = remaining_cards - traded_cards
john_uneaten_cards = uneaten_cards / 2
result = john_uneaten_cards
return result
|
Sarah bought a bag of 24 oranges for $6. She sold each orange at 30 cents. What was her profit? | def solve() -> int:
cost_price = 6
total_oranges = 24
selling_price = 0.3*total_oranges
profit = selling_price - cost_price
result = profit
return result
|
Daniel bought a pack of 20 pencils for $3. He used 8 of them and gave 4 of them to his sister. He then sold the remaining pencils for $0.25 each. How much money did Daniel gain or lose from this transaction? | def solve() -> int:
left_pencils = 20 - 8 - 4
received_money = left_pencils * 0.25
difference = received_money - 3
result = difference
return result
|
John bought some apples for $2 each and some bananas for $1.5 each. If he spent $16 on the fruits and bought 6 more apples than bananas, how many bananas did he buy? | def solve() -> int:
total_spent = 16
price_apple = 2
price_banana = 1.5
total_apples = (total_spent / price_apple + 6) / 2
total_bananas = (total_spent / price_banana - 6) / 2
result = total_bananas
return result
|
Sofia is painting her house. She has five hours to complete the task, and the house has 10 rooms. In the first hour, Sofia paints 2 rooms. The second hour she paints 3 rooms. How many rooms will Sofia need to paint per hour to finish the job? | def solve() -> int:
total_rooms = 10
hours_left = 5
rooms_painted = 2 + 3
rooms_left = total_rooms - rooms_painted
hours_left_to_paint = hours_left - 2
rooms_per_hour = rooms_left / hours_left_to_paint
result = rooms_per_hour
return result
|
Bella had $12, then she earned $6 from a bake sale and spent $5 on a book and $2 on a candy bar. Her grandma sends her another $10 as a gift. How much money does Bella have left? | def solve() -> int:
bella = 12
bake_sale = 6
book = 5
candy = 2
gift = 10
earned = bella + bake_sale + gift
spent = book + candy
left = earned - spent
result = left
return result
|
David and his teammates went to the sports store. Jerseys cost $43.25 and shorts cost $22.75 less. They were given a 20% discount for buying more than 8 items. How much did they spend if they bought six jerseys and ten shorts? | def solve() -> int:
jersey_cost = 43.25
shorts_cost = jersey_cost - 22.75
num_jerseys = 6
num_shorts = 10
total_items = num_jerseys + num_shorts
subtotal = (jersey_cost * num_jerseys) + (shorts_cost * num_shorts)
discount = 0
if total_items > 8:
discount = 0.2 * subtotal
... |
At the Lemon Lemon Lemon Juice Shop, there are 4839 lemon juices, 1551 lime juices, and 10277 orange juices. How many total juices are available? | def solve() -> int:
juice_total = 0
juice_total = juice_total + 4839
juice_total = juice_total + 1551
juice_total = juice_total + 10277
result = 17667
return result
|
Mia has 12 apples. She lost 5 of them on Monday and her grandma gave her 7 more on Tuesday. On Wednesday, all of her apples were missing, so her uncle bought her 9 more. If Mia found all the lost apples, how many apples would she have now? | def solve() -> int:
apples = 12
apples -= 5
apples += 7
apples += 9
apples += 5
result = apples
return result
|
Michelle is budgeting her expenses for the month. She has $500 to spend on rent, $150 for utilities, and $200 for groceries. If she wants to save $200, how much can she spend on leisure activities? | def solve() -> int:
total_budget = 500 + 150 + 200 + 200
leisure_budget = total_budget - 850
result = leisure_budget
return result
|
If Jake walks 6 kilometers per day, how many kilometers does he walk in one week? | def solve() -> int:
distance_per_day = 6
num_days_week = 7
total_distance = distance_per_day * num_days_week
result = total_distance
return result
|
If a solution has 16 ounces of soda and 4 ounces of flavor, what is the ratio of the ounces of soda to flavor in the mixture? | def solve() -> int:
soda_ounces = 16
flavor_ounces = 4
ratio_soda_to_flavor = soda_ounces / flavor_ounces
result = ratio_soda_to_flavor
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.