question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Student: If a store owner buys 10 t-shirts for a total of $75, how much does each t-shirt cost? | def solve() -> int:
total_cost = 75
num_tshirts = 10
cost_per_tshirt = total_cost / num_tshirts
result = cost_per_tshirt
return result
|
A blender can blend for 6 minutes on a full charge. If it takes 1.5 minutes to blend a smoothie, how many smoothies can be made with a full charge? | def solve() -> int:
blender_time = 6
smoothie_time = 1.5
smoothies_per_minute = 1 / smoothie_time
smoothies_per_charge = smoothies_per_minute * blender_time
result = int(smoothies_per_charge)
return result
|
Student: The sum of three consecutive even numbers is 66. What are the three numbers? | def solve() -> int:
num1 = 0
num2 = 0
num3 = 0
num1 = 2
num2 = 64 - 2
num3 = 64 - 4
result = num1 + num2 + num3
return result
|
A local farmer wants to make a new fence around his rectangular garden. The perimeter of the garden is 84 feet, and the length is 6 times the width. What is the area of the garden? | def solve() -> int:
perimeter = 84
width = perimeter / 18
length = 6 * width
area = length * width
result = area
return result
|
Possible new questions and programs are: Anna has 20 candies and she wants to share them equally with her four friends. However, before she can do that, she eats one candy every day. How many days can she eat candies before she has less than 15 candies left? | def solve() -> int:
candies = 20
friends = 4
candies_per_day = 1
target = 15
days = 0
while candies >= target:
days = days + 1
candies = candies - candies_per_day
result = days
return result
|
A swimming pool has 5 lanes and each lane can hold 5 swimmers. If there are 20 swimmers in the pool, how many more swimmers can get into the pool? | def solve() -> int:
total_swimmers = 20
total_lanes = 5
swimmers_per_lane = 5
swimmers_in_use = total_lanes * swimmers_per_lane
remaining_swimmers = total_swimmers - swimmers_in_use
result = int(remaining_swimmers)
return result
|
Grant bought 2 pairs of pants and 3 sweaters for $117 and got a 20% discount. How much did each item cost? | def solve() -> int:
pants_orig_price = 117 / (2+3)
discount = 0.2
pants_discount_price = pants_orig_price * (1-discount)
total_savings = 2 * pants_orig_price * discount
new_total_cost = 117 - total_savings
sweaters_orig_price = 117 / 3
sweaters_discount_price = sweaters_orig_price ... |
Ryan bought a package of 24 chocolates. 4 of them were caramels and the number of truffles was three times the number of caramels. The rest of the chocolates were nougats. If Ryan picks a chocolate at random, what is the percentage chance it will be a nougat? | def solve() -> int:
A = 4
B = 3*A
C = 24 - A - B
result = C/24 * 100
return result
|
A race track is being enclosed with a fence. Every 12 feet, a fence post is placed. The entire track is fenced except for a 48-foot-long starting line. How many fence posts will be placed around the track on both sides? | def solve() -> int:
track_length = 528
starting_line = 48
total_fence_length = track_length + starting_line
total_fence_posts = (total_fence_length // 12) + 1
one_side_posts = total_fence_posts // 2
result = one_side_posts
return result
|
Alice wants to have $18,000 in her savings account after 5 years. How much money she needs to deposit into an account now if the account earns 5% interest per year, compounded annually? | def solve() -> int:
principal = 18000
rate = 0.05
n = 1
t = 5
amount = principal*(1+rate/n)**(n*t)
deposit = principal - amount
result = deposit
return result
|
san drove a total of 360 miles in 6 hours. If she drove at a constant speed, how fast was she driving in miles per hour? | def solve() -> int:
time = 6
distance = 360
speed = distance / time
result = speed
return result
|
Luna bought a pack of pencils for $3.50 and a notebook for $5.25. She gave the cashier a $10 bill. If the cashier only has 3 quarters, 6 dimes and 2 nickels in their till, how many pennies will Luna get in change? | def solve() -> int:
pencils = 3.50
notebook = 5.25
total_cost = pencils + notebook
cash = 10
change = cash - total_cost
quarters = 3
dimes = 6
nickels = 2
change = change * 100
remaining_change = change - (quarters * 25) - (dimes * 10) - (nickels * 5)
result = remaining_chang... |
Jacob worked 60 hours over the course of two weeks. His hourly rate was $15 per hour. If he spent $550 on a new TV, how much money did he have left over after getting paid? | def solve() -> int:
hours_worked = 60
hourly_rate = 15
tv_cost = 550
total_earned = hours_worked * hourly_rate
money_left = total_earned - tv_cost
result = money_left
return result
|
Lily and Kyle have a lemonade stand. They sell each cup of lemonade for 50 cents and each cookie for 25 cents. They make 40 cups of lemonade and 24 cookies. They sell 3/4 of the lemonade and 2/3 of the cookies. How much money do they earn in total? | def solve() -> int:
lemonade_price = 0.5
cookie_price = 0.25
lemonade_made = 40
cookies_made = 24
lemonade_sold = lemonade_made * 3/4
cookies_sold = cookies_made * 2/3
lemonade_revenue = lemonade_sold * lemonade_price
cookie_revenue = cookies_sold * cookie_price
total_revenue = ... |
John had four times as many candies as Ben, who had seven fewer candies than Tom. After giving five candies to Tom, Ben had two candies left. How many candies did John have at the beginning? | def solve() -> int:
ben_candies = 2
tom_candies = ben_candies + 7
john_candies = 4 * ben_candies
john_candies -= 5
result = john_candies
return result
|
Lily found 6 times as many seashells as Blake who found 2. How many seashells did Lily find? | def solve() -> int:
blake_seashells = 2
lily_seashells = 6 * blake_seashells
result = lily_seashells
return result
|
If the sum of two angles is 90 degrees, what is the measure of each angle? | def solve() -> int:
total_angle = 90
angle1 = total_angle/2
angle2 = total_angle/2
result = angle1, angle2
return result
|
Normally, Alice can knit a sweater in 7 days. However, due to her office work, it takes her 10 days to finish knitting the sweater. How long would it take her to knit 2 sweaters with her busy work schedule? | def solve() -> int:
normal_days = 7
busy_days = 10
num_sweaters = 2
total_days = busy_days * num_sweaters
result = total_days
return result
|
Lisa had four times as many stickers as Lila, but Lisa gave away 12 stickers to her friends. Lila had 18 stickers and did not give any away. How many stickers did Lisa and Lila have left? | def solve() -> int:
x = 18
y = 4 * x
y = y - 12
total = x + y
result = total
return result
|
John went to the Taco Tuesday special at the local cantina and ate 10 tacos. If each taco was $2 and he had earned $50 that day, how much money does he now have? | def solve() -> int:
tacos = 10
price_of_taco = 2
money_earned = 50
math_answer = (tacos*price_of_taco) + money_earned
result = math_answer
return result
|
If the value of 6 necklaces is equal to the value of 7 bracelets, and 2 necklaces cost $60, how much does one bracelet cost? | def solve() -> int:
result = 25.71
return result
|
The length and breadth of a rectangular field are 40 meters and 25 meters respectively. What is its perimeter? | def solve() -> int:
length = 40
breadth = 25
perimeter = 2*(length + breadth)
result = perimeter
return result
|
Student: The area of a triangle is half the product of its base and height. If the base is 6 cm and the height is 10 cm, what is the area of the triangle? | def solve() -> int:
base = 6
height = 10
area = 0.5 * base * height
result = area
return result
|
Claire is making a photo album for her friend's birthday. Each page is 8 inches wide and 10 inches tall when laid flat. Claire needs to buy 12 pages of photo paper to make the album. How many square inches of paper does Claire need to buy? | def solve() -> int:
width = 8
length = 10
pages = 12
area_of_page = width * length
total_area = area_of_page * pages
result = total_area
return result
|
Student: Lily has 25 cupcakes in her bakery. She sells 17 cupcakes and then bakes 13 more. How many cupcakes does Lily have left in her bakery? | def solve() -> int:
cupcakes_initial = 25
cupcakes_sold = 17
cupcakes_baked = 13
cupcakes_left = cupcakes_initial - cupcakes_sold + cupcakes_baked
result = cupcakes_left
return result
|
A wagon is pulled by two horses. The first horse takes 6 hours to cover 120 miles and the second horse takes 8 hours to cover 240 miles. How much total time is needed for both horses to cover the whole distance? | def solve() -> int:
distance_1 = 120
distance_2 = 240
time_1 = 6
time_2 = 8
total_distance = distance_1 + distance_2
total_time = time_1 + time_2
result = total_time
return result
|
The average temperature in three cities is 25°C. City A is 5°C cooler than City B, and City C is 30°C. What is the temperature in City B? | def solve() -> int:
city_c_temperature = 30
average_temperature = 25
city_a_temperature = average_temperature - 5
city_b_temperature = (average_temperature * 3) - (city_a_temperature + city_c_temperature)
result = city_b_temperature
return result
|
The perimeter of a rectangle is 70cm. The length of the rectangle exceeds its breadth by 5cm. What are the dimensions of the rectangle? | def solve() -> int:
result = (15, 20)
return result
|
Bob is making skis and wants to know how much wax he needs to buy. He needs to coat the skis with wax and each ski is 12 inches wide and 4 feet in length. The wax covers 10 square feet per pound. | def solve() -> int:
width = 12/12
length = 4
coverage = 10
result = width * length / coverage
return result
|
Mr. Tom walks at a speed of 4 miles per hour for 30 minutes. If he runs for another 5 miles, rests for 15 minutes, and then covers the remaining distance of 10 miles on a bicycle at 12 miles per hour, what's the total time in minutes took to travel the whole journey? | def solve() -> int:
distance1 = 4*(30/60)
distance2 = 5
distance3 = 10
total_distance = distance1 + distance2 + distance3
time1 = 30
time2 = 15
time3 = (distance3/12)*60
total_time = time1 + time2 + time3
result = total_time
return result
|
Lisa is making bracelets for her friends. She has 60 beads of different colors, and she wants to use 12 beads for each bracelet. How many bracelets can she make? How many beads will she have left over? | def solve() -> int:
beads = 60
bracelet = 12
bracelets = beads // bracelet
leftover = beads % bracelet
result = (bracelets, leftover)
return result
|
If 12 students can complete a homework assignment in 6 hours, how long will it take 8 students to complete the same assignment? | def solve() -> int:
Num_students_1 = 12
Time_taken_1 = 6
Num_students_2 = 8
Time_taken_2 = (Num_students_1 * Time_taken_1) / Num_students_2
result = Time_taken_2
return result
|
You are saving to buy a car that costs $20,000. You want to save half of the money in 4 years, starting from today, by depositing a fixed amount of money every month in a savings account that yields 5% interest rate per annum, compounded monthly. How much should you save every month to reach your goal? | def solve() -> int:
future_value = 10000
months = 48
interest_rate = 0.05/12
monthly_savings = (future_value * (interest_rate)) / ((1 + (interest_rate)) ** months - 1) * (1 + (interest_rate))
result = round(monthly_savings,2)
return result
|
It takes 20 minutes to boil water and 1 minute per tea bag to steep tea once the water is boiled. How long does it take to steep 4 tea bags? | def solve() -> int:
boil_time = 20
tea_bags = 4
steep_time = boil_time + (tea_bags * 1)
result = steep_time
return result
|
She needs 12 cups of water, 2 cups of lemon juice, and 1.5 cups of sugar for each gallon of lemonade. She can buy water for $0.5 per gallon, lemon juice for $4 per quart, and sugar for $3 per 5-pound bag at the supermarket. How much does it cost her to make 3 gallons of lemonade? | def solve() -> int:
total_cost = 1.5 + 6 + 1.2
result = total_cost
return result
|
A pizza restaurant charges a flat rate of $10 for a pizza plus $0.50 per topping. How much would it cost for a pizza with 5 toppings? | def solve() -> int:
flat_rate = 10
toppings_cost_each = 0.5
toppings_needed = 5
total_cost = flat_rate + toppings_cost_each*toppings_needed
result = total_cost
return result
|
Student: A circle has a diameter of 10 cm. What is the circumference of the circle? | def solve() -> int:
diameter = 10
radius = diameter / 2
circumference = 2 * 3.14 * radius
result = circumference
return result
|
Student: 6. A group of boys and girls went on a picnic, there were 18 boys and the number of girls was thrice as many. How many girls were there? | def solve() -> int:
boys = 18
girls_factor = 3
girls = boys * girls_factor
result = girls
return result
|
Student: 10. Bob had 100 apples and bought 20 more. He ate 30% of them for lunch and gave away 25 apples. How many apples does Bob have left? | def solve() -> int:
apples_original = 100
apples_bought = 20
apples_eaten = (apples_original + apples_bought) * 0.3
apples_given_away = 25
apples_left = (apples_original + apples_bought) - apples_eaten - apples_given_away
result = apples_left
return result
|
``` A recipe requires 2 cups of butter and 3 cups of sugar to make 20 cookies. How much butter and sugar are required to make 50 cookies? | def solve() -> int:
butter_per_cookie = 2/20
sugar_per_cookie = 3/20
total_butter_required = butter_per_cookie*50
total_sugar_required = sugar_per_cookie*50
result = (total_butter_required, total_sugar_required)
return result
|
Tim and Hal are playing a card game and have 10 cardseach. If they divide the cards equally, how many cards does each person have? | def solve() -> int:
cards_per_person = 10 / 2
result = cards_per_person
return result
|
Lila is saving money for a new bike. She earns 10 dollars for every hour of babysitting. She babysits for 3 hours on Friday, 4 hours on Saturday, and 5 hours on Sunday. She spends 15 dollars on snacks and 20 dollars on a movie ticket. How much money does she have left after the weekend? | def solve() -> int:
hourly_rate = 10
friday_hours = 3
saturday_hours = 4
sunday_hours = 5
total_hours = friday_hours + saturday_hours + sunday_hours
total_earnings = total_hours * hourly_rate
snacks = 15
movie = 20
total_expenses = snacks + movie
remaining_money = total_earnings ... |
A marathon is 42 kilometers long. How many miles is that? | def solve() -> int:
km = 42
miles_per_km = 0.621371
miles = km * miles_per_km
result = miles
return result
|
A gardener needs to water a row of 45 plants. If he has a watering can that holds 4 cups of water, how many times does he need to refill the can to water all the plants once? | def solve() -> int:
plants = 45
can_capacity = 4
refills_needed = plants * 2 / can_capacity
result = refills_needed
return result
|
There are 24 cans of soda on a shelf. Each row can hold 6 cans. How many full rows of cans are there on the shelf? | def solve() -> int:
rows = 24 // 6
result = f'There are {rows} full rows of cans on the shelf.'
result = rows
return result
|
Lucy baked 16 pies and gave 5/16 of them away. How many pies does Lucy have left? | def solve() -> int:
pie_amount = 16 * (1/16)
pie_left = pie_amount - (5/16)
result = pie_left
return result
|
A gym membership costs $45 per month. If a customer buys a 6-month membership, they get a 10% discount. How much will they need to pay in total for the 6-month membership? | def solve() -> int:
monthly_cost = 45
total_months = 6
discount_percentage = 0.10
if total_months == 6:
discounted_price = (1 - discount_percentage) * monthly_cost * total_months
else:
discounted_price = monthly_cost * total_months
result = discounted_price
return result
|
A class has 30 students. If there is a 70% attendance rate, how many students will be absent? | def solve() -> int:
num_students = 30
attendance_rate = 70
absent_students = num_students - (num_students * (attendance_rate/100))
result = absent_students
return result
|
Ann bought 3 shirts at a store that costs $27 each. If she received 20% off the total price, how much money did she save? | def solve() -> int:
original_cost = 27 * 3
discount_percent= 0.20
discount = original_cost * discount_percent
saved = discount
result = saved
return result
|
A grocery store sells 8 packs of gum, with 15 pieces in each pack. If each piece has 2 grams of sugar, how many grams of sugar are in all of the gum? | def solve() -> int:
total_packs = 8
pieces_per_pack = 15
grams_per_piece = 2
total_sugar = total_packs * pieces_per_pack * grams_per_piece
result = total_sugar
return result
|
Wanda collected 50% more pieces of Halloween candy than her friend Jing, who collected 100 pieces. How many pieces of candy did Wanda collect? | def solve() -> int:
result = 150
jing = 100
percent = 0.5
wanda = jing + (jing * percent)
result = wanda
return result
|
A gym membership costs $30 per month but the gym offers a 15% discount if the customer pays for a year in advance. How much would a customer pay if he takes up the offer? | def solve() -> int:
monthly_cost = 30
annual_cost = monthly_cost * 12
discounted_amount = annual_cost * 0.85
result = discounted_amount
return result
|
A box contains 24 chocolates. If 9 chocolates are milk, 6 are dark, and the rest are white, what is the probability of picking a white chocolate at random? | def solve() -> int:
white = 24 - 9 - 6
probability_of_white = white / 24
result = probability_of_white
return result
|
Olivia was 63 inches tall last year. If she grew 9 inches more than her sister who grew 1 inch, how tall is Olivia now? | def solve() -> int:
olivia_last_year = 63
sister_growth = 1
olivia_growth = sister_growth + 9
olivia_now = olivia_last_year + olivia_growth
result = olivia_now
return result
|
A tank can hold 1000 liters of water. If the tank is already 85% full, how many more liters of water can it hold? | def solve() -> int:
tank_capacity = 1000
current_fill = 0.85
remaining_capacity = (1 - current_fill) * tank_capacity
result = remaining_capacity
return result
|
Student: In a shop, Gabby buys 4 boxes of chocolates. Reshma buys 8 boxes of chocolates, which is 2 times of what Gabby bought. Shannon buys 3/4th the number of boxes that Reshma buys. If Clive buys 5 boxes of chocolates, how many boxes of chocolates did they all buy in total? | def solve() -> int:
gabby = 4
reshma = 8
shannon = 3/4 * reshma
clive = 5
total = gabby + reshma + shannon + clive
result = total
return result
|
Ethan drives his car for 5 hours. He fills gas every hour at a cost of $20. How much money did he spend, in dollars? | def solve() -> int:
hours = 5
cost_per_hour = 20
total_cost = hours * cost_per_hour
result = total_cost
return result
|
A rollercoaster park has 12 rides. Each ride is approximately 2 minutes long. How long would it take for a person to ride each ride once? | def solve() -> int:
number_of_rides = 12
length_of_ride = 2
total_time = number_of_rides*length_of_ride
result = total_time
return result
|
Jack spent 30% of his monthly salary on rent, 20% on food, 25% on bills, and the remainder he saved. If his salary is $5000, how much did he save? | def solve() -> int:
salary = 5000
rent_percent = 30/100
food_percent = 20/100
bills_percent = 25/100
total_percent_spent = rent_percent + food_percent + bills_percent
percent_saved = 1 - total_percent_spent
amount_saved = percent_saved*salary
result = amount_saved
return result... |
Olivia has already spent $15 on 2 pounds of raspberries and half that much on a bag of lemons. If she has $45 in total and needs to pay $2.50 for transportation each way, what is the maximum number of apples she can buy for $1.80 each? | def solve() -> int:
raspberries_cost = 15
lemons_cost = raspberries_cost / 2
total_cost = 45
transportation_cost = 2.50
apple_cost = 1.80
remaining_money = total_cost - raspberries_cost - lemons_cost - (2 * transportation_cost)
max_apples = remaining_money // apple_cost
result ... |
During a charity event, John and Sarah want to wrap an equal number of gift boxes. Wrapping each box takes 5 minutes. John can wrap 4 boxes at a time, while Sarah can only wrap 3 boxes at a time. If John wraps 20 boxes, how many boxes should Sarah wrap to spend the same amount of time wrapping gift boxes? | def solve() -> int:
john_boxes = 20
john_time = john_boxes // 4 * 5
sarah_boxes = john_boxes * 3 // 4
sarah_time = sarah_boxes // 3 * 5
result = sarah_boxes
return result
|
A boat travels a distance of 240 miles in a river. During the first 80 miles, it travels at a speed of 20 miles per hour. During the next 120 miles, it travels at a speed of 30 miles per hour. During the last 40 miles, it travels at a speed of 40 miles per hour. How long does it take the boat to complete the journey? | def solve() -> int:
distance1 = 80
distance2 = 120
distance3 = 40
time1 = distance1/20
time2 = distance2/30
time3 = distance3/40
total_time = time1 + time2 + time3
result = total_time
return result
|
A farmer has 90 chickens and wants to divide them equally into 6 pens. How many chickens will be in each pen? | def solve() -> int:
chickens = 90
pens = 6
chickens_per_pen = chickens // pens
result = chickens_per_pen
return result
|
A pool has a capacity of 50,000 liters of water. If the pool is filled with 10 hoses, each hose expels 500 liters per hour. How long will it take the pool to be filled completely? | def solve() -> int:
pool_capacity = 50000
num_hoses = 10
water_per_hour = 500
water_per_second = water_per_hour / 3600
hours_to_fill = pool_capacity / (num_hoses * water_per_hour)
result = hours_to_fill
return result
|
A bag of gummy bears has 50 pieces. If Abe eats 10 pieces, what percentage of the bag did he eat? | def solve() -> int:
num_gummy_bears = 50
num_eaten = 10
percent_eaten = (num_eaten / num_gummy_bears) * 100
result = percent_eaten
return result
|
A train travels 300 kilometers in 4 hours. What is the average speed of the train in kilometers per hour? | def solve() -> int:
distance = 300
time = 4
average_speed = distance/time
result = average_speed
return result
|
Harriet went to the store to buy water for her camping trip. She bought 5 gallons at $1.50 per gallon and 1 liter at $0.50 per liter. How much did she pay in total? | def solve() -> int:
gallons_bought = 5
price_of_gallon = 1.50
liters_bought = 1
price_of_liter = 0.50
total_cost = gallons_bought * price_of_gallon + liters_bought * price_of_liter
result = total_cost
return result
|
You go out to dinner with 3 friends, each of you orders a $15 entree and you share a $25 bottle of wine. If the bill also includes a 8.5% tax and a 20% tip, what is the total cost of the meal? | def solve() -> int:
entree_cost = 15*4
wine_cost = 25
sub_total = entree_cost + wine_cost
tax = sub_total * 0.085
tip = sub_total * 0.2
total_cost = sub_total + tax + tip
result = total_cost
return result
|
John has 40 marbles, and he gives half of them to his friend Ben. Now John has twice as many marbles as Ben. How many marbles did Ben have at first? | def solve() -> int:
john_marbles = 40
ben_marbles = john_marbles/2
john_marbles = 2*ben_marbles
result = ben_marbles
return result
|
A store has a sale where all items are 20% off. If a shirt was originally $25, how much does it cost now? | def solve() -> int:
original_cost = 25
discount_percentage = 0.20
new_cost = original_cost - (original_cost * discount_percentage)
result = new_cost
return result
|
Jaden planted 7 apple trees. Each tree produced 49 apples. How many apples did Jaden have all together? | def solve() -> int:
trees = 7
apples = 49
amount = trees * apples
result = amount
return result
|
A chef gets 12% of the total sales from the catering business and 8% of the profits from the restaurant business. If the catering business made $10,000 in sales and the restaurant business made $5,000 in profits, how much did the chef earn? | def solve() -> int:
catering_sales = 10000
restaurant_profit = 5000
chef_sales_commission = 0.12 * catering_sales
chef_profit_commission = 0.08 * restaurant_profit
chef_earnings = chef_sales_commission + chef_profit_commission
result = chef_earnings
return result
|
A rectangular prism has a volume of 504 cubic units. The length of the prism is 6 units and the width is 7 units. Find the height of the rectangular prism. | def solve() -> int:
length = 6
width = 7
volume = 504
height = volume / (length * width)
result = f'The height of the rectangular prism is {height} units'
result = height
return result
|
Here are 10 possible math questions similar to the original one: An ice cream cone costs $2 and a scoop of ice cream costs $1. If Alex wants to buy 3 cones and 5 scoops of ice cream, and Ben wants to buy 4 cones and 6 scoops of ice cream, how much money do they need in total? | def solve() -> int:
cone_price = 2
scoop_price = 1
alex_cones = 3
alex_scoops = 5
ben_cones = 4
ben_scoops = 6
alex_cost = alex_cones * cone_price + alex_scoops * scoop_price
ben_cost = ben_cones * cone_price + ben_scoops * scoop_price
total_cost = alex_cost + ben_cost
result = t... |
In a class of 30 students, 15 play soccer, 10 play basketball, and 5 play both sports. How many students play only basketball? | def solve() -> int:
num_of_students = 30
soccer_players = 15
basketball_players = 10
both_sports_players = 5
only_basketball_players = basketball_players - both_sports_players
result = only_basketball_players
return result
|
A piece of cloth has a length that is two-thirds of its width. If the area of the cloth is 42 square feet, what is the length of the cloth? | def solve() -> int:
area = 42
width = (area * 3/2)**0.5
length = 2/3 * width
result = length
return result
|
In ten years, Paul will be 5 years younger than three times his daughter Jane's age. If Jane is currently 8 years old, how old is Paul? | def solve() -> int:
j = 8
p_10 = 3 * j - 5
p = p_10 - 10
result = p
return result
|
David has 41 pieces of candy and wants to divide them between 5 of his friends. How many pieces of candy will each friend get? | def solve() -> int:
divide = 41 / 5
result = divide
return result
|
A toy store sold 16 stuffed animals for $17.50 each, 3 boxes of board games for $21.00 each, and 18 individual cards for $0.50 each. How much money did the toy store make? | def solve() -> int:
price_stuffed_animals = 17.50 * 16
price_board_games = 21.00 * 3
price_cards = 0.50 * 18
total_revenue = price_stuffed_animals + price_board_games + price_cards
result = 434.0
return result
|
Alex and his friends are sharing a pizza with 12 slices. If Alex ate 3 slices and his friends each ate 2 slices, how many friends does Alex have? | def solve() -> int:
total_slices = 12
alex_slices = 3
friend_slices = 2
remaining_slices = total_slices - alex_slices
friend_count = remaining_slices // friend_slices
result = friend_count
return result
|
Jenny needs to fill her car with gas. The gas tank has a capacity of 50 liters and it's currently half empty. The petrol station charges $1.20 per liter of gas. How much will it cost to fill the gas tank completely? | def solve() -> int:
tank_capacity = 50
current_level = tank_capacity/2
cost_per_liter = 1.20
total_cost = (tank_capacity - current_level) * cost_per_liter
result = total_cost
return result
|
A amusement park sells two types of tickets: regular tickets cost $50 and VIP tickets cost $75. On a certain day, the park sold a total of 1000 tickets and made $55,000 in revenue. How many of each type of ticket did the park sell? | def solve() -> int:
num_regular_tickets = 0
num_vip_tickets = 0
regular_ticket_price = 50
vip_ticket_price = 75
total_tickets_sold = 1000
total_sales = 55000
for i in range(total_tickets_sold+1):
j = total_tickets_sold - i
if (regular_ticket_price*i)+(vip_ticket_price*j) == ... |
There were seven dogs in a park. One dog ran away and four dogs were adopted at the end of the day. How many dogs were left in the park? | def solve() -> int:
dogs_in_park = 7
dog_ran_away = 1
dogs_adopted = 4
dogs_left = dogs_in_park - dog_ran_away - dogs_adopted
result = dogs_left
return result
|
Cindy is making a quilt with different colored squares. She has 80 red squares, 60 blue squares, 40 green squares, and 20 yellow squares. She wants to arrange the squares in a pattern that repeats every 4 rows and every 5 columns. How many times will the yellow square appear in the quilt, if the quilt has 20 rows and 2... | def solve() -> int:
quilt_rows = 20
quilt_cols = 25
pattern_rows = 4
pattern_cols = 5
repeat_rows = quilt_rows // pattern_rows
repeat_cols = quilt_cols // pattern_cols
yellow = 1
total_yellow = yellow * repeat_rows * repeat_cols
result = total_yellow
return result
|
After a movie, Jude, Ryan and Zoe decided to split the cost for the tickets. Jude paid $5, Ryan paid $8, and Zoe paid $6. If they decide to split the cost evenly, how much should each pay? | def solve() -> int:
cost_jude = 5
cost_ryan = 8
cost_zoe = 6
total_cost = cost_jude + cost_ryan + cost_zoe
cost_each = total_cost/3
result = cost_each
return result
|
Kane has a total of $7.50 dollars in coins. This includes 4 quarters, 5 nickels, and 8 dimes. How much does Kane have in dimes? | def solve() -> int:
quarters = 4
nickels = 5
dimes = 8
quarters_value = 4 * 0.25
nickels_value = 5 * 0.05
dimes_value = 8 * 0.10
total = quarters_value + nickels_value + dimes_value
result = dimes_value
return result
|
An investor invested some money in 2 separate schemes: A and B. Scheme A will yield 15% of the capital within a year and scheme B will yield 40% of the capital within 2 years. If he invested $800 in scheme A and $500 in B, how much more money will he have in scheme B than in A after 2 years, provided he does not withdr... | def solve() -> int:
capital_in_A = 800
capital_in_B = 500
interest_in_A = 15/100 * capital_in_A
total_interest_in_A = interest_in_A
interest_in_B = 40/100 * capital_in_B
total_interest_in_B = interest_in_B
result = total_interest_in_B - total_interest_in_A
return result
|
Possible questions and programs: 8 seagulls on the beach share 24 fish among them. 4 pelicans eat 3 times as much as the seagulls. How many total fish were eaten? | def solve() -> int:
seagull_fish = 24 / 8
pelican_fish = seagull_fish * 3
total_fish = (seagull_fish * 8) + (pelican_fish * 4)
result = total_fish
return result
|
At the Honey Farm, customers pay a $2 entrance fee. The cost per jar of honey is $5. If Peter, Lucy, and Max paid $13 for their honey, how many jars of honey did they pick? | def solve() -> int:
entrance_fee = 2
cost_per_jar = 5
total_payment = 13
total_jars = (total_payment - entrance_fee) / cost_per_jar
result = total_jars
return result
|
Emma and Jacob decide to study for their biology test together. They have to read 8 chapters and solve 15 problems. They plan to dedicate 2.5 hours to each chapter and 15 minutes to each problem. If they can study for no more than 4 hours each day and take two 10-minute breaks per day, how many days should they plan to... | def solve() -> int:
chapters = 8
problems = 15
chapter_time = 2.5
problem_time = 0.25
daily_time = 4
break_time = 0.33
total_chapter_time = chapters * chapter_time
total_problem_time = problems * problem_time
total_study_time = total_chapter_time + total_problem_time
total_b... |
A bakery needs to make 144 cupcakes for a party. If each tray holds 24 cupcakes, how many trays does the bakery need to make? | def solve() -> int:
total_number_of_cupcakes = 144
cupcakes_per_tray = 24
number_of_trays = total_number_of_cupcakes // cupcakes_per_tray
result = number_of_trays
return result
|
Student: Sean has $1500 and he wants to spend 7/12 of his money on a new car. If the car costs $400, what percentage of his money will he have left? | def solve() -> int:
money = 1500
fraction_spent = 7/12
car_cost = 400
amount_spent = money * fraction_spent
money_left = money - amount_spent
percentage_left = (money_left / money) * 100
result = percentage_left
return result
|
Max uses 2 bags of potatoes to make a large batch of french fries. He uses half a bag of potatoes for a small serving of fries, or 1 bag of potatoes for a medium-sized batch. For his food truck on Friday, he needs to have 5 medium-sized batches of fries and 12 small servings of fries ready and cooked for customer order... | def solve() -> int:
medium_batches = 5
small_servings = 12
potatoes_for_medium = medium_batches * 1
potatoes_for_small = small_servings * 0.5
total_potatoes = potatoes_for_medium + potatoes_for_small
bags_of_potatoes = total_potatoes / 2
result = bags_of_potatoes
... |
Two numbers are such that the ratio between them is 2:3, and the sum of the numbers is 25. What is the greater number? | def solve() -> int:
total_sum = 25
ratio = 2/3
smaller_num = total_sum/(1+ratio)
greater_num = smaller_num * (1 + ratio)
result = greater_num
return result
|
A restaurant has 72 tables. Out of these, 6 are reserved for a party. What percentage of the tables are available for walk-ins? | def solve() -> int:
total_tables = 72
reserved_tables = 6
available_tables = total_tables - reserved_tables
percentage_available = (available_tables / total_tables) * 100
result = percentage_available
return result
|
Every 5 days, the number of cars in the parking lot quadruples. Currently, there are 10 cars in the parking lot. How many cars will there be in the parking lot in 25 days? | def solve() -> int:
days = 25
initial_cars = 10
quadruple_times = days // 5
final_cars = initial_cars * (4 ** quadruple_times)
result = final_cars
return result
|
A store has 500 shirts and wants to distribute them equally among 10 shelves. How many shirts will each shelf have? | def solve() -> int:
shirts = 500
shelves = 10
shirts_per_shelf = shirts / shelves
result = shirts_per_shelf
return result
|
A water tank can hold 5000 liters of water. If the tank is 80% full, how many liters of water are in the tank? | def solve() -> int:
capacity = 5000
percentage_full = 0.8
water = capacity * percentage_full
result = water
return result
|
The perimeter of a square is 32 cm. What is the length of one side of the square? | def solve() -> int:
perimeter = 32
side_length = perimeter / 4
result = side_length
return result
|
Jason is cycling at a speed of 25 km/hour in a straight line. However, he has to take a 30-degree turn, which reduces his effective speed to 20 km/hour. If he has to travel a distance of 60 km, how long will it take him to reach his destination? | def solve() -> int:
speed = 20
distance = 60
time = distance / speed
result = time
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.