question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A small pond has 10 fish. Every day, two fish are added to the pond, and one fish is taken out. After how many days will the pond have 25 fish? | def solve() -> int:
fish = 10
days = 0
while fish < 25:
fish = fish + 2 - 1
days = days + 1
result = days
return result
|
Student: The ratio of students in a high school who pass all of their exams is 3:5. If there are 120 students in the school, how many of them fail at least one of their exams? | def solve() -> int:
pass_all = 120 * 3 / 8
fail_one = 120 - pass_all
result = fail_one
return result
|
John has a vegetable garden where he grows tomatoes. For every tomato he grows, he donates 4 new tomatoes to a soup kitchen. If he grew 300 tomatoes and donated 40% of them, how many tomatoes are left with him? | def solve() -> int:
num_tomatoes = 300
num_donated = 0.4 * num_tomatoes * 4
num_left = num_tomatoes - num_donated
result = num_left
return result
|
A right triangular pyramid has a square base. The altitude of the pyramid has length 10 cm, and length of each side of the base is 15 cm. Find the volume of the pyramid. | def solve() -> int:
base = 15
height = 10
area = base**2
volume = (1/3)*height*area
result = volume
return result
|
Mia and Alex went to a restaurant. They each ordered a salad for $7. Mia got a glass of wine for $9 and Alex got a beer for $5. They split an appetizer that cost $10. Alex also ordered a dessert for $6. If the tax is $. 40, and they split the bill evenly, how much money did Mia bring with her if they spent a total of $... | def solve() -> int:
salad_price = 7
wine_price = 9
beer_price = 5
appetizer_price = 10
dessert_price = 6
tax = 0.40
total_bill = salad_price + wine_price + beer_price + appetizer_price + dessert_price + tax
mia_share = total_bill / 2
mia_brought = mia_share - (salad_price +... |
Emily drives 10 minutes to the train station every morning, then spends 45 minutes on the train to work. If she works from home one day a week, how many minutes does she spend commuting in a 5-day work week? | def solve() -> int:
minutes_to_train_station = 10
minutes_on_train = 45
days_work_week = 5
commuting_time = (minutes_to_train_station + minutes_on_train) * (days_work_week - 1)
result = commuting_time
return result
|
If Chris can swim a mile with 40 laps, and Alex can swim the same distance with 50 laps. How many laps can they swim in total in an hour? | def solve() -> int:
chris_laps = 40
alex_laps = 50
total_laps = (60 / chris_laps) + (60 / alex_laps)
result = int(total_laps)
return result
|
Student: Leo wants to buy some books and DVDs online. He has a gift card worth $50 and a credit card that charges 15% annual interest. He orders 3 books at $15 each and 2 DVDs at $20 each. He pays with his gift card first and then with his credit card. How much does he still owe before interest? | def solve() -> int:
book_cost = 3 * 15
dvd_cost = 2 * 20
total_cost = book_cost + dvd_cost
gift_card_payment = 50
result = total_cost - gift_card_payment
return result
|
A toy store is having a sale where every toy is 50% off. If a toy originally costed $20, how much will the toy cost during the sale? | def solve() -> int:
regular_price = 20
discount = 0.50
sale_price = regular_price - (regular_price * discount)
result = sale_price
return result
|
Robert went to the electronics store and bought a laptop, a phone, a tablet, and a smartwatch. The tablet was 3 times as expensive as the phone, while the price of the laptop was 60% of the price of the smartwatch. The smartwatch was the most expensive and cost twice the price of the phone. If the smartwatch cost $800,... | def solve() -> int:
phone = 800/2/3
tablet = 3*phone
smartwatch = 800
laptop = 0.6*smartwatch
total_cost = phone + tablet + smartwatch + laptop
result = total_cost
return result
|
Student: Abby eats twice as much pineapple and half as much grape as banana. If a pineapple has 37 calories per cup, a banana has 30 calories per cup, and a grape has 18 calories per cup, how many total calories did she consume? | def solve() -> int:
pineapple_cups = 2
banana_cups = 1
grape_cups = 0.5
pineapple_calories = pineapple_cups * 37
banana_calories = banana_cups * 30
grape_calories = grape_cups * 18
total_calories = pineapple_calories + banana_calories + grape_calories
result = total_calories
return ... |
Student: David has 25 balloons. He gives away 7 balloons to his cousin. How many balloons does he have left? | def solve() -> int:
balloons = 25
balloons = balloons - 7
result = balloons
return result
|
Arnold bought 4 chocolates bars. He gave away 3 of the bars and afterwards bought 2 more. How many did Arnold have in the end? | def solve() -> int:
total_bars = 4
bars_given_away = 3
bars_bought = 2
result = total_bars - bars_given_away + bars_bought
return result
|
Mr. Lee discovered that 60% of his restaurant's customers prefer seafood to other menu items. If he served 200 customers yesterday, how many preferred something other than seafood? | def solve() -> int:
total_customers = 200
seafood_preference_percentage = 60
seafood_customers = total_customers * seafood_preference_percentage / 100
other_than_seafood_customers = total_customers - seafood_customers
result = other_than_seafood_customers
return result
|
Student: On a weekend, 24 families went to the park, and 3/8 of them rented bikes. How many bikes were rented in total, if each family rented 2 bikes? | def solve() -> int:
total_families = 24
bike_fraction = 3/8
bike_per_family = 2
bike_families = total_families * bike_fraction
total_bikes = bike_families * bike_per_family
result = total_bikes
return result
|
Nina baked some cookies. She gave 4 to Leo, then she gave one more than twice as many as she had given Leo to Mia, and then she gave 6 less than half as many to Liam as she had given to Mia. If Nina had 12 cookies left, how many cookies did she bake? | def solve() -> int:
leo = 4
mia = 2 * leo + 1
liam = (mia // 2) - 6
total = 12 + leo + mia + liam
result = total
return result
|
A grocery store sells chicken breasts for $5.50 per pound. If you need 3 pounds of chicken, how much will it cost? | def solve() -> int:
price = 5.50 * 3
result = price
return result
|
On Tuesday, Jack fed his cats a total of 5/6 of a 1-pound can of cat food. How many more ounces should Jack feed his cats to complete the 1-pound can? | def solve() -> int:
can_capacity = 16
can_filled = 5/6 * can_capacity
ounces_remaining = can_capacity - can_filled
result = 2.6666666666666665
return result
|
A circular park is enclosed by a low hedge made of shrubbery. The circumference of the park is 440 meters. A part of the hedge is damaged by monkeys and needs to be replanted. If the total length of the hedge is 100 meters, what length of hedge needs to be replanted? | def solve() -> int:
radius = 440 / (2 * 3.14159)
circumference = 2 * 3.14159 * radius
damaged_length = 100 - circumference
result = damaged_length
return result
|
A has 10 ice cream sticks, and Student B has 28 ice cream sticks. If they put the ice cream sticks together in a bowl with no distinction between the ones from student A and the ones from student B, what is the probability, expressed as a percentage rounded to the nearest integer, that a randomly picked ice cream stick... | def solve() -> int:
total_sticks = 10+28
student_A_sticks = 10
probability = (student_A_sticks/total_sticks)*100
result = round(probability)
return result
|
Ella has 4 times as many candies as Chloe. Chloe has 8 candies. How many candies does Ella have? | def solve() -> int:
num_chloe_candies = 8
num_ella_candies = 4*num_chloe_candies
result = num_ella_candies
return result
|
Student: On Monday, John ran 3km in 20 minutes. On Tuesday, he ran 4km in 25 minutes. What was John's average speed in km/min for the two days combined? | def solve() -> int:
distance_monday = 3
time_monday = 20
distance_tuesday = 4
time_tuesday = 25
total_distance = distance_monday + distance_tuesday
total_time = time_monday + time_tuesday
average_speed = total_distance / total_time
result = average_speed
return result
|
The distance between two cities is 150 km. A car traveled from one city towards the other at an average speed of 50 km/h. At the same time, another car started from the second city towards the first city at an average speed of 70 km/h. At what distance from the first city will they meet? | def solve() -> int:
distance = 150
speed1 = 50
speed2 = 70
total_speed = speed1 + speed2
time = distance/total_speed
distance_covered_by_car1 = speed1*time
result = distance_covered_by_car1
return result
|
Mike gets paid $120 per day for the first 5 days of a workweek, and then gets paid $200 per day for the rest of the days. How much will Mike get paid for a 10-day workweek? | def solve() -> int:
days_worked = 10
if days_worked <= 5:
pay = days_worked * 120
else:
overtime_days = days_worked - 5
pay = (5 * 120) + (overtime_days * 200)
result = pay
return result
|
If 5 tablespoons of flour can make 12 cookies, and almond flour can make thrice as many cookies per tablespoon as regular flour, then how many cookies can be made from a mixture of 2 tablespoons of flour and 1 tablespoon of almond flour? | def solve() -> int:
regular_flour_per_cookie = 12 / 5
almond_flour_per_cookie = regular_flour_per_cookie * 3
total_cookies = (2 * regular_flour_per_cookie) + (1 * almond_flour_per_cookie)
result = total_cookies
return result
|
Dana took a bus from Sydney to Canberra at 9:00 a.m. AEDT on Wednesday. She arrived in Canberra 4 hours later. If she took another bus from Canberra to Melbourne the same day at 3:00 p.m. AEDT and arrived in Melbourne at 9:00 p.m. AEDT, how long did her bus ride from Canberra to Melbourne take? | def solve() -> int:
total_time = 240 + 360
canberra_melbourne = 360
result = canberra_melbourne / 60
return result
|
Lily goes jogging 4 miles away from her home and then travels 3 miles to the swimming pool. She goes jogging four times a week and swimming twice a week. What is the car's mileage for the week? | def solve() -> int:
jogging_distance = 4
swimming_distance = 3
jogging_frequency = 4
swimming_frequency = 2
total_jogging_distance = jogging_distance * jogging_frequency
total_swimming_distance = swimming_distance * swimming_frequency
total_distance = total_jogging_distance + total... |
C) Ben is 16 years old, and his grandfather is 5 times his age. His father is 40% of grandfather's age, and his mother is 8 years younger than his father. How old will Ben's mother be when he is 25 years old? | def solve() -> int:
grandfather = 5 * 16
father = 0.4 * grandfather
mother = father - 8
diff = mother - 16
mother_age = 25 + diff
result = mother_age
return result
|
A rectangular prism has a length of 5 feet, a width of 3 feet, and a height of 4 feet. What is the volume of the prism in cubic feet? | def solve() -> int:
length = 5
width = 3
height = 4
volume = length * width * height
result = volume
return result
|
William sold oranges and apples to raise money for his school's winter sports teams. After adding up all of their earnings, he found out that they had made $400. The organization made $50 from oranges and the sales of apples are 3 times as much as the sales of oranges. Then, the sales for apples is $50 more than half o... | def solve() -> int:
oranges = 50
apples = oranges * 3 + 50 / 2
difference = 400 - oranges
total_apples = difference - apples
result = total_apples
return result
|
A store sells potatoes at $0.75 per pound. If a customer buys 15 pounds of potatoes, how much does the customer need to pay? | def solve() -> int:
potato_price = 0.75
potato_weight = 15
total_cost = potato_price * potato_weight
result = total_cost
return result
|
7. Nick is creating 5 pieces of art for an art show. He spends 2 hours creating each artwork and then he spends an additional 15 minutes putting the pieces together. How long does it take him to put the art pieces together? | def solve() -> int:
pieces = 5
timePerPiece = 2
assemblyTime = 15
totalTime = (pieces * timePerPiece + assemblyTime)
result = totalTime
return result
|
A 3600 cm long wire is cut into 180 pieces. 175 of the pieces are equally sized and the remaining pieces are 15cm each. Find the length of each of the equal pieces in millimeters. | def solve() -> int:
wire_length_cm = 3600
num_pieces = 180
equal_pieces = 175
remaining_pieces = num_pieces - equal_pieces
length_of_remaining_pieces_cm = 15
total_length_of_remaining_pieces_cm = remaining_pieces * length_of_remaining_pieces_cm
total_length_of_equal_pieces_cm = wire_len... |
Student: The length and width of a rectangular garden are in the ratio of 4:3. If the width is 24 feet, what is the area of the garden in square feet? | def solve() -> int:
length = 0
width = 24
length = width * (4/3)
area = length * width
result = area
return result
|
If a bookstore orders 350 books and they divide them evenly among 10 shelves, how many books will be on each shelf? | def solve() -> int:
books_ordered = 350
num_shelves = 10
books_per_shelf = books_ordered / num_shelves
result = books_per_shelf
return result
|
A school has 35 teachers and 420 students. If the ratio of teachers to students is 1:12, how many teachers are there in the school? | def solve() -> int:
ratio = 1+12
total_people = 35+420
teachers = 35/ratio * total_people
result = teachers
return result
|
Ben has 20 stickers. He gave 4 stickers to his sister and traded 3 stickers for 2 pencils. How many stickers, in total, does Ben have now? | def solve() -> int:
stickers = 20
stickers = stickers - 4
stickers = stickers - 3
stickers = stickers + 2
result = stickers
return result
|
At a concert, 70% of the tickets were sold before the day of the event. If there were 500 tickets available, how many were sold on the day of the event? | def solve() -> int:
tickets_available = 500
tickets_sold_before = 0.7 * tickets_available
tickets_sold_on_day = tickets_available - tickets_sold_before
result = tickets_sold_on_day
return result
|
A recipe calls for 2 cups of sugar and 3 cups of flour. How much flour is needed if 4 cups of sugar is used? | def solve() -> int:
sugar_needed = 2
flour_needed = 3
sugar_used = 4
flour_used = (flour_needed/sugar_needed) * sugar_used
result = flour_used
return result
|
A farmer harvested 80 kg of apples and 120 kg of oranges. He sold the apples for $2 per kg and the oranges for $1.5 per kg. He also paid $20 for transportation and $40 for packaging. How much money did he earn from the sale of the fruits? | def solve() -> int:
income = 80 * 2 + 120 * 1.5
expenses = 20 + 40
earnings = income - expenses
result = earnings
return result
|
If the store had 90 oranges, how many apples did the store buy? | def solve() -> int:
apples = 90 + 30
result = apples
return result
|
Emily has a budget of $100 for school supplies. She buys 5 notebooks for $2 each, 40 pencils for $0.50 each, and a calculator for $15. If she has $20 left in her budget, how much money did she spend on pencils? | def solve() -> int:
budget = 100
notebooks = 5
notebook_price = 2
pencils = 40
pencil_price = 0.5
calculator_price = 15
leftover = 20
total_spent = (notebooks * notebook_price) + (pencils * pencil_price) + calculator_price
spent_on_pencils = total_spent - leftover - (notebo... |
A football team has 14 players. If there are 11 players on the field during a game for each team, how many players are on the bench? | def solve() -> int:
total_players = 14
players_on_field = 11
players_on_bench = total_players - players_on_field
result = players_on_bench
return result
|
A recipe calls for 2/3 cups of flour for every 1/4 cup of sugar. If you have 5 cups of sugar, how many cups of flour do you need? | def solve() -> int:
sugar_cups = 5
flour_cups = (sugar_cups * (2/3)) / (1/4)
result = flour_cups
return result
|
Brian's car needs an oil change every 6000 miles. If he drives 12000 miles in one year, how many oil changes does he need for the year? | def solve() -> int:
mileage_between_oil_changes = 6000
total_miles_driven = 12000
oil_changes_needed = total_miles_driven/mileage_between_oil_changes
result = oil_changes_needed
return result
|
Mike has 8 marbles. He gave away 3 marbles to his friend. Then he found 5 marbles on the ground. How many marbles does he have now? | def solve() -> int:
marbles = 8
gave_away = 3
found = 5
total = marbles - gave_away + found
result = total
return result
|
If the area of a square is 196 sq. cm, what is the length of each side? | def solve() -> int:
area = 196
side_length = area**(1/2)
result = side_length
return result
|
Zoe is trying to increase her daily water intake and wants to drink more each day. On the first day, she drank 6 glasses of water. On the second day, she drank 8 glasses of water. On the third day, she drank 10 glasses of water. If she continues to increase her drinking by 2 glasses each day, how many days will it take... | def solve() -> int:
day1 = 6
day2 = 8
day3 = 10
total_glasses = day1 + day2 + day3
days = 3
while total_glasses < 24:
daily_increase = days - 2
glasses_today = day3 + daily_increase * 2
total_glasses += glasses_today
days += 1
result = days
... |
Student: John wants to buy a car that costs $25,000. He can put down 15% of the total cost as a downpayment. If he saves 10% of his $80,000 salary, how long will it take him to save up for the downpayment? | def solve() -> int:
car_cost = 25000
downpayment = car_cost * 0.15
salary = 80000
savings_rate = 0.1
time_to_save = downpayment / (salary * savings_rate)
result = time_to_save
return result
|
There are 24 marbles in a bag with 3 different colors in equal amounts. How many marbles are there of each color? | def solve() -> int:
total_marbles = 24
num_colors = 3
marbles_per_color = total_marbles / num_colors
result = marbles_per_color
return result
|
Daniel has a collection of stickers. He has 20 of them that are sports related, 8 of them that are cartoon related, and 5 of them that are sports and cartoon related. What percentage of the stickers are sports related? | def solve() -> int:
sports_related = 20
cartoon_related = 8
sports_and_cartoon_related = 5
total_stickers = sports_related + cartoon_related - sports_and_cartoon_related
percentage_sports_related = (sports_related / total_stickers) * 100
result = percentage_sports_related
... |
A rectangular pool is 10 meters long and 5 meters wide. If the pool is filled with water to a depth of 3 meters, how many cubic meters of water will the pool have? | def solve() -> int:
pool_length = 10
pool_width = 5
water_depth = 3
pool_volume = pool_length * pool_width * water_depth
result = pool_volume
return result
|
A store is having a sale: 30% off all items. If a shirt originally costs $20, what is the final price after the discount? | def solve() -> int:
price = 20
discount = 0.3
final_price = price * (1 - discount)
result = final_price
return result
|
A garden has a rectangular plot 30 meters long and 20 meters wide. What is the perimeter of this garden? | def solve() -> int:
length = 30
width = 20
perimeter = 2*(length + width)
result = perimeter
return result
|
A store offers a discount on shoes. If you buy 2 pairs of shoes at the regular price, you can get the third pair for 50% off. If a customer bought three pairs of shoes for $225, what is the regular price of a pair of shoes? | def solve() -> int:
num_pairs = 3
regular_price = 0
if num_pairs == 3:
regular_price = 2 * (225 / 3) / (1.5)
result = regular_price
return result
|
A car travels 120 miles in 2 hours at a constant speed. What is its average speed in miles per hour? | def solve() -> int:
distance = 120
time = 2
speed = distance / time
result = speed
return result
|
Michael starts running from Boston to Chicago, which is 500 miles. Michael runs 50 miles the first day. The next day he runs 20 miles less than half as much as he ran the first day. He runs 70 miles the third day. How many miles further does Michael have to run to be in Chicago? | def solve() -> int:
total_distance = 500
day1_distance = 50
day3_distance = 70
day2_distance = (day1_distance / 2) - 20
total_distance_ran = day1_distance + day2_distance + day3_distance
miles_left = total_distance - total_distance_ran
result = miles_left
return ... |
Emily went to the mall and bought some new clothes. She bought a pair of jeans for $25.00, a shirt for $15.00, and a sweater for $20.00. She had a 15% off coupon for the sweater. She also bought a pair of shoes for $30.00. If she paid with a $100 bill, how much change would Emily get back? | def solve() -> int:
jeans_price = 25.00
shirt_price = 15.00
sweater_price = 20.00
shoes_price = 30.00
coupon_percentage = 15
total_cost = jeans_price + shirt_price + sweater_price - (sweater_price * coupon_percentage / 100) + shoes_price
change = 100 - total_cost
result = chang... |
A man buys two pieces of wood. The first piece is 5 feet in length and the second piece is 6 feet in length. He cuts them into four equal sized pieces. How long is the each cut piece? | def solve() -> int:
first_length = 5
second_length = 6
total_length = first_length + second_length
result = total_length/4
return result
|
A triangle has a base of 6 and a height of 8. What is the area of the triangle? | def solve() -> int:
base = 6
height = 8
area = 0.5*base*height
result = area
return result
|
Mary had $1000. She used $250 to buy some fruit and vegetables. She then gave $150 to her friend as a gift. How much money does she have left? | def solve() -> int:
initial_amount = 1000
amount_for_groceries = 250
amount_for_gift = 150
amount_spent = amount_for_groceries + amount_for_gift
amount_left = initial_amount - amount_spent
result = amount_left
return result
|
Sarah needs to buy textbooks for her college classes. The bookstore offers a bundle of 5 books for $200. If Sarah needs 12 books, how much does each book cost? | def solve() -> int:
bundle_price = 200
bundle_quantity = 5
required_quantity = 12
cost_per_book = bundle_price / bundle_quantity
total_cost = cost_per_book * required_quantity
result = total_cost
return result
|
A piece of paper has a width of 8 inches. If it is folded in half lengthwise, what is the length of one of the halves of the paper? | def solve() -> int:
initial_width = 8
folded_width = initial_width/2
result = folded_width
return result
|
A water tank can be filled up by pipe A in 3 hours and can be emptied by pipe B in 4 hours. If the water tank is completely drained and then pipe A runs for 1 hour and then pipe B starts running, how long will it take both pipes to fill the tank? | def solve() -> int:
tank_volume = 1
rate_pipeA = tank_volume / 3
rate_pipeB = - tank_volume / 4
volume_remaining = tank_volume - rate_pipeA
time_to_drain = volume_remaining / rate_pipeB
total_time = 1 + time_to_drain
result = total_time
return result
|
Emma has to fill up her 12-gallon gas tank. She has already used 4 gallons of gas. If she fills up her tank with gas that costs $3.50 per gallon, how much will she spend on gas? | def solve() -> int:
gas_left = 12 - 4
cost_per_gallon = 3.50
total_cost = gas_left * cost_per_gallon
result = total_cost
return result
|
A restaurant has 5 tables, with 4 chairs at each table. If a chair costs $20, what will be the total cost of the chairs for all the tables? | def solve() -> int:
n_tables = 5
n_chairs_per_table = 4
price_per_chair = 20
total_cost = n_tables*n_chairs_per_table*price_per_chair
result = total_cost
return result
|
Dave starts with an amount of 14 coins and gives away half to his sister. He then buys an item resulting in his coins being halved. He then spends 4 coins. How many coins does he have left? | def solve() -> int:
coins = 14
coins = coins - (coins / 2)
coins = coins / 2
coins = coins - 4
result = coins
return result
|
A rectangular garden is 12 meters long and 8 meters wide. If a 1 meter wide walking path is built around the entire garden, what is the area of the walking path? | def solve() -> int:
garden_area = 12 * 8
path_area = (12+2)*(8+2) - garden_area
result = path_area
return result
|
A garden has a length of 30 meters and a width of 20 meters. If the length of one side of a square-shaped garden is 10 meters, how many square meters of land will be unused? | def solve() -> int:
garden_length = 30
garden_width = 20
square_garden_side = 10
square_garden_area = square_garden_side ** 2
total_garden_area = garden_length * garden_width
unused_land_area = total_garden_area - square_garden_area
result = unused_land_area
return result
|
-Use the current question as a reference Some possible math questions similar to the original one are: A car travels at a constant speed of 60 km/h for 40 minutes, then at 80 km/h for another 20 minutes. How many kilometers does the car cover in total during the trip? | def solve() -> int:
distance_at_60 = 60 * (40 / 60)
distance_at_80 = 80 * (20 / 60)
total_distance = distance_at_60 + distance_at_80
result = total_distance
return result
|
9. James buys some markers for $6.90 and some paper for $3.15. If he gives the cashier a $20 bill, how much change does he get and how many nickels and dimes does he receive? | def solve() -> int:
cost_markers = 6.90
cost_paper = 3.15
total = cost_markers + cost_paper
tendered = 20
change = tendered - total
nickels = change // 0.05
remaining_change = change - nickels * 0.05
dimes = remaining_change // 0.10
result = change, nickels, dimes
return result
|
Greg is 3 times as old as Helen. In 7 years, Greg will be 28 years old. What is the average of their present ages? | def solve() -> int:
greg_age = 28 - 7
helen_age = greg_age / 3
average = (greg_age + helen_age) / 2
result = average
return result
|
an has 2 times less gold than Jack, and 2 times more gold than Jane. Jane has 10 gold. How much gold do Sean, Jack, and Jane have in total? | def solve() -> int:
gold_sean = None
gold_jack = None
gold_jane = 10
gold_jack = gold_jane*2
gold_sean = gold_jack//2
total_gold = gold_sean + gold_jack + gold_jane
result = total_gold
return result
|
A zoo has 30 monkeys. Every week, 2 monkeys are transferred to another zoo. After 6 weeks, how many more monkeys were in the zoo before than after the transfer? | def solve() -> int:
monkeys_in_zoo_before = 30
monkeys_transferred_per_week = 2
weeks = 6
monkeys_transferred_total = monkeys_transferred_per_week * weeks
monkeys_in_zoo_after = monkeys_in_zoo_before - monkeys_transferred_total
more_monkeys_before_than_after = monkeys_in_zoo_before - m... |
Harper can swim twice as many laps as Olivia. If Olivia swims 8 laps, how many laps can Harper swim in 4 minutes? | def solve() -> int:
olivia_laps = 8
harper_laps = 2 * olivia_laps
harper_laps_per_minute = harper_laps / 4
harper_laps_in_4_minutes = harper_laps_per_minute * 4
result = harper_laps_in_4_minutes
return result
|
Amelia wants to create a small rock garden in her backyard. The garden will have 5 succulent plants that cost $4.00 per plant, 2 cactus plants that cost $5.00 per plant and 3 air plants that cost $2.50 per plant. How much will it cost to fill the rock garden? | def solve() -> int:
succulent_cost = 4.00
cactus_cost = 5.00
air_plant_cost = 2.50
succulent_quantity = 5
cactus_quantity = 2
air_plant_quantity = 3
total_cost = (succulent_cost * succulent_quantity) + (cactus_cost * cactus_quantity) + (air_plant_cost * air_plant_quantity)
... |
5. Mr. Li finds 100 coins, each worth $0.50. How much money does he have in total? | def solve() -> int:
price_of_coin = 0.50
ammount_coins = 100
result = price_of_coin * ammount_coins
return result
|
Lena wants to order 15 bouquets of flowers for her friends. Each bouquet costs $8. How much money does Lena have to spend to order all the bouquets for her friends? | def solve() -> int:
bouquet_cost = 8
num_bouquets = 15
total_cost = bouquet_cost * num_bouquets
result = total_cost
return result
|
A park is 150 meters long and 100 meters wide. What is the perimeter of the park? | def solve() -> int:
perimeter = 2*(150+100)
result = perimeter
return result
|
On Jessica's farm, each cow produces 30 liters of milk per day, each sheep produces 5 liters of milk per day, and each goat produces 3 liters of milk per day. If there are 10 cows, 20 sheep, and 25 goats on the farm, how many liters of milk does the farm produce in one day? | def solve() -> int:
cows = 10
sheep = 20
goats = 25
milk_per_cow = 30
milk_per_sheep = 5
milk_per_goat = 3
total_milk = (cows * milk_per_cow) + (sheep * milk_per_sheep) + (goats * milk_per_goat)
result = total_milk
return result
|
The Browns are putting in new floors for their living room. The room is in the shape of a rectangle and measures 5 m by 3 m. How much area, in square meters, do the Browns need to cover with the new floor? | def solve() -> int:
length = 5
width = 3
area = length * width
result = area
return result
|
Student: A bicycle costs $250. If Michael plans to buy 5 bicycles, how much money will he need in total? | def solve() -> int:
bicycle_cost = 250
number_of_bicycles = 5
total_cost = bicycle_cost * number_of_bicycles
result = total_cost
return result
|
A factory produces staplers using three different materials: plastic, aluminum, and steel. The ratio of plastic to aluminum is 2:3 and the ratio of aluminum to steel is 5:4. If the factory produces 48 staplers, how many of each material are being used to make the staplers? | def solve() -> int:
num_of_plastic = 0
num_of_aluminum = 0
num_of_steel = 0
num_of_aluminum = 48 / (2+3+5+4)
num_of_plastic = 2 * num_of_aluminum
num_of_steel = 4 * num_of_aluminum
num_of_plastic = round(num_of_plastic)
num_of_aluminum = round(num_of_aluminum)
num_of_stee... |
A group of aliens have invaded the Earth, population 2 billion. Every day, each alien abducts 100 more individuals, turning them into aliens. How many aliens are there after two months? | def solve() -> int:
population = 2000000000
abduction_rate = 100
days_in_two_months = 2 * 30
aliens = population
for day in range(days_in_two_months):
aliens += abduction_rate
result = aliens
return result
|
There are 60 cows in a farm. 25 percent of the cows are black and 20 percent of the black cows are female. How many female black cows are there? | def solve() -> int:
total_cows = 60
black_cows_percentage = 25
female_black_cows_percentage = 20
black_cows = total_cows * black_cows_percentage / 100
female_black_cows = black_cows * female_black_cows_percentage / 100
result = female_black_cows
return result
|
Tom knows that the length of a football field is 110 yards, while the width is 50 yards. Tom run across the width of the field. While he was at the other end, his coach calls him and asked him how much distance did he cover. What will Tom answer? | def solve() -> int:
length = 110
width = 50
distance_covered = width
result = distance_covered
return result
|
Possible questions and programs (the programs are just one way to write them, not necessarily the only or best way): Mary went to the bakery with $100. She bought 2 loaves of bread for $6 each, 4 croissants for $1.5 each, and a cake for $15. How much money did she have left? | def solve() -> int:
money = 100
bread_price = 6
bread_amount = 2
croissant_price = 1.5
croissant_amount = 4
cake_price = 15
total_cost = bread_price * bread_amount + croissant_price * croissant_amount + cake_price
remaining_money = money - total_cost
result = remaining... |
A gardener is planting 100 flowers in a garden. Each flower needs 2 liters of water per week. How many liters of water does the gardener need to water all the flowers for a week? | def solve() -> int:
flowers = 100
water_per_flower = 2
total_water = flowers * water_per_flower
result = total_water
return result
|
If 2 heavy washes, 6 regular washes, and 3 light washes with no bleached loads are needed, how many gallons of water will be needed for the total amount? | def solve() -> int:
total_heavy = 2 * 20
total_regular = 6 * 10
total_light = 3 * 2
total_extra_light_when_bleached = 0 * 2
result = total_heavy + total_regular + total_light + total_extra_light_when_bleached
return result
|
ara has 8 plates and 18 hats in her kitchen. If 4 of Sara's plates are ceramic and 9 of Sara's hats are wool, how many items does Sara have which are neither ceramic plates nor wool hats? | def solve() -> int:
num_plates = 8
num_hats = 18
plates_ceramic = 4
hats_wool = 9
plates_neither = num_plates - plates_ceramic
hats_neither = num_hats - hats_wool
result = plates_neither + hats_neither
return result
|
David has 20 marbles. He wants to give half of them to his brother and keep the other half. How many marbles will David keep? | def solve() -> int:
marbles = 20
keep = marbles/2
result = keep
return result
|
A pizza store makes 16 pizzas in one hour. How many pizzas will they make in 4.5 hours? In a box of crayons, two fifths of the crayons are green, and one third of the green crayons are fluorescent. If there are 90 fluorescent crayons, how many crayons are in the box? | def solve() -> int:
pizzas_per_hour = 16
hours = 4.5
total_pizzas = pizzas_per_hour * hours
crayons_in_box = 90
green_crayons = crayons_in_box * (2/5)
fluorescent_crayons = green_crayons * (1/3)
total_crayons = crayons_in_box / (1/3)
result = total_pizzas, total_crayo... |
Student: John has 4 guitars, each with 7 strings, and a certain number of harmonicas, each with 12 strings. If the total string count is 98 strings, how many harmonicas does John have? | def solve() -> int:
guitars = 4
harmonicas = 0
guitar_strings = 7
harmonica_strings = 12
total_strings = 98
harmonicas = (total_strings - (guitars * guitar_strings)) / harmonica_strings
result = harmonicas
return result
|
A florist is making bouquets for a wedding. If the florist has 40 flowers and each bouquet requires 7 flowers, how many bouquets can the florist make? | def solve() -> int:
flowers = 40
flowers_per_bouquet = 7
bouquets = flowers // flowers_per_bouquet
result = bouquets
return result
|
Julie has 15 pounds of butter in her fridge. She used 3 pounds to bake a cake and gave half of the remaining butter to her neighbor. If she needs 0.25 pounds of butter to make a batch of cookies, how many batches of cookies can Julie make? | def solve() -> int:
butter_in_fridge = 15
butter_used_for_cake = 3
butter_remaining = butter_in_fridge - butter_used_for_cake
butter_given_to_neighbor = butter_remaining / 2
butter_needed_for_cookies = 0.25
batches_of_cookies = butter_given_to_neighbor / butter_needed_for_cookies
result... |
Tom has 36 marbles. He gave 1/4 to Sarah and 1/3 to John. How many marbles does Tom have now? | def solve() -> int:
sarah_marbles = 36 * (1/4)
john_marbles = 36 * (1/3)
remaining_marbles = 36 - sarah_marbles - john_marbles
result = remaining_marbles
return result
|
- Ben is a landscaper and he charges $40 for each lawn he mows. His monthly expenses are $800 for equipment and gas and 35% of his earnings are paid for taxes and insurance. He will spend 10% of his earnings on home improvement and save the rest. How much does he spend and save if he mows 60 lawns a month? | def solve() -> int:
earnings = 40 * 60
expenses = 800
taxes_insurance = 0.35 * earnings
home_improvement = 0.1 * earnings
save = earnings - expenses - taxes_insurance - home_improvement
result = home_improvement, save
return result
|
Student: The length of a rectangle is twice the width. If the width is 5cm, what is the perimeter of the rectangle? | def solve() -> int:
width = 5
length = 2 * width
perimeter = 2 * length + 2 * width
result = perimeter
return result
|
Eric wants to purchase a set of weight plates. The first plate is 5 lbs, the second plate is 10 lbs, and the third plate is 25 lbs. What is the total weight of the weight plates? | def solve() -> int:
first_plate = 5
second_plate = 10
third_plate = 25
total_weight = first_plate + second_plate + third_plate
result = total_weight
return result
|
A store sells t-shirts for $12 and hats for $7. At the end of the day, the store has sold 25 t-shirts and 15 hats. How much money did the store make? | def solve() -> int:
tshirt_price = 12
hat_price = 7
tshirts_sold = 25
hats_sold = 15
total_sales = (tshirt_price * tshirts_sold) + (hat_price * hats_sold)
result = total_sales
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.