question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A classroom has 28 desks. Each desk can seat 2 students comfortably. If there are 49 students, how many more desks are needed in the classroom? | def solve() -> int:
Desk_seats = 2
Num_desks = 28
Num_students = 49
Seats_available = Num_desks * Desk_seats
Seats_needed = Num_students
Desks_needed = (Seats_needed - Seats_available) // Desk_seats + ((Seats_needed - Seats_available) % Desk_seats > 0)
result = Desks_needed
return resul... |
Student: Karen had $25 to spare and decided to go to a candy store. She bought 3 bags of candy, each of which cost $5. How much money does Karen have left? | def solve() -> int:
karen_money = 25
candy_price = 5
num_bags = 3
total_cost = candy_price * num_bags
karen_money_left = karen_money - total_cost
result = karen_money_left
return result
|
It takes Ann 30 minutes to swim 1 mile with the current and then it takes her 45 minutes to swim back the same distance against the same current. What is her average speed in miles per hour? | def solve() -> int:
time1 = 30/60
time2 = 45/60
distance = 1
speed1 = distance/time1
speed2 = distance/time2
average_speed = (2*distance)/(time1 + time2)
result = average_speed
return result
|
Jenna wants to redecorate her living room. A 200 square foot new sofa set costs $1500 and a 50 square foot rug costs $750. All other decorations and furniture costs $30 per square foot. If Jenna plans to redecorate a 1000 square foot living room containing one new sofa set and two rugs, how much will it cost, in dollar... | def solve() -> int:
sofa_cost = 1500
sofa_size = 200
rug_cost = 750
rug_size = 50
other_cost = 30
living_room_size = 1000
total_sofa_cost = sofa_cost
total_rug_cost = rug_cost * 2
total_other_cost = (living_room_size - sofa_size - rug_size * 2) * other_cost
total_cost =... |
Student: Julia planted 91 tulips in her garden and it takes 3 tulips to make one bouquet. How many bouquets can get from her garden? | def solve() -> int:
tulips = 91
per_bouquet = 3
bouquets = tulips // per_bouquet
result = bouquets
return result
|
A pack of pencils contains 24 pencils. Eva gives away one third of the pencils to her friends and then buys another pack of the same size. How many pencils does Eva have now? | def solve() -> int:
pack = 24
Eva = pack - pack / 3
Eva = Eva + pack
result = Eva
return result
|
Containers are placed in a warehouse at even intervals to make storage more organized. If the first container is placed 2ft away from the wall, and the second container is placed 5ft away from the first container, how far away from the wall is the sixth container placed? | def solve() -> int:
first_container_distance = 2
second_container_distance = 5
sixth_container_distance = first_container_distance + (5 * (6 - 1))
result = sixth_container_distance
return result
|
A rectangular field has length 40m and width 30m. A farmer wants to put a fence around the field. A fence post will be placed every 4m. How many fence posts will the farmer need? | def solve() -> int:
length = 40
width = 30
post_gap = 4
length_posts = length // post_gap
width_posts = width // post_gap
fence_posts = (2 * length_posts) + (2 * width_posts)
result = fence_posts
return result
|
A chocolate factory produces 250 chocolate bars per hour and 175 chocolate truffles per hour. If they need to produce 2,250 chocolate bars and 1,750 chocolate truffles, how many hours will it take to produce them all? | def solve() -> int:
choc_bars_per_hour = 250
choc_truffles_per_hour = 175
total_choc_bars_needed = 2250
total_choc_truffles_needed = 1750
hours_for_choc_bars = total_choc_bars_needed / choc_bars_per_hour
hours_for_choc_truffles = total_choc_truffles_needed / choc_truffles_per_hour
... |
At a car wash, a basic wash costs $10 and a deluxe wash costs $15. A group of three cars get the deluxe wash and one car gets the basic wash. The rest of the customers only pay for the basic wash. If there were ten customers after the group of cars, how much money did the car wash make during the day? | def solve() -> int:
basic_wash_cost = 10
deluxe_wash_cost = 15
group_of_cars = 3
one_car = 1
rest_of_customers = 10
group_of_cars_cost = group_of_cars * deluxe_wash_cost
one_car_cost = one_car * basic_wash_cost
rest_of_customers_cost = rest_of_customers * basic_wash_cost
... |
David has a garden with 12 rows of 40 plants each. On the first 6 rows, there are only 35 plants. The remaining rows are all full. How many plants are there in total? | def solve() -> int:
rows = 12
plants_per_row = 40
plants_per_partial_row = 35
total_plants = (rows - 6) * plants_per_row + 6 * plants_per_partial_row
result = total_plants
return result
|
Rachel listens to audiobooks while using the stationary bike. She can cycle a distance of 5 miles in 25 minutes. She listens to two audiobooks, each lasting 3 hours. How many miles does she cycle? Ellie and Sam each have $1000 to invest. Ellie invests all of her money in cryptocurrency and triples her investment. Sam i... | def solve() -> int:
distance_per_minute = 5 / 25
total_time = 3 * 60
total_distance = distance_per_minute * total_time
ellie_money = 1000 * 3
sam_money = 1000 * 12 + 1000
difference = sam_money - ellie_money
result = total_distance, difference
return result
|
There are two animals: one is a bird, and the other is a snake. The bird speaks the truth 80% of the time, whereas the snake speaks the truth only 40% of the time. The two animals made the following statements: Bird: The snake is a liar Snake: The bird is telling the truth. What is the probability that the snake is lyi... | def solve() -> int:
bird_true_snake_true = 0.4 * 0.8
bird_true_snake_lie = 0.6 * 0.2
bird_lie_snake_true = 0.6 * 0.6
bird_lie_snake_lie = 0.4 * 0.4
total = (bird_true_snake_true + bird_true_snake_lie + bird_lie_snake_true + bird_lie_snake_lie)
lie_probability = (bird_true_snake_lie + bird_l... |
You have 6 coins with a total value of $1.05. Some coins are quarters and the rest are dimes. How many dimes do you have? | def solve() -> int:
total_coins = 6
total_value = 1.05
quarter_value = 0.25
dime_value = 0.10
quarter_qty = (total_value - (total_coins * dime_value)) / quarter_value
dime_qty = total_coins - quarter_qty
result = dime_qty
return result
|
A wheel has a diameter of 24 inches. What is the circumference of the wheel rounded to the nearest inch? | def solve() -> int:
from math import pi, ceil
diameter = 24
circumference = pi * diameter
rounded_circumference = ceil(circumference)
result = rounded_circumference
return result
|
Possible new questions and programs are: Mia sold some cupcakes at a bake sale. She made $5 for each chocolate cupcake and $3 for each vanilla cupcake. How many vanilla cupcakes did she sell if she made a total of $63 and sold 9 chocolate cupcakes? | def solve() -> int:
total = 63
chocolate = 9
total = total - 5 * chocolate
vanilla = total / 3
vanilla = int(vanilla)
result = vanilla
return result
|
Jack, Kate, and Leo are buying candy bars from a vending machine. Jack has three more candy bars than Kate, and Leo has twice as many candy bars as Jack. If Kate has 6 candy bars, how much money did they spend on candy bars if each candy bar costs $1.50? | def solve() -> int:
x = 6
y = x + 3
z = 2 * y
total = x + y + z
cost = 1.50
result = total * cost
return result
|
Out of the 480 fossils found in a dig, 30 percent are more than 1000 years old. How many fossils are 1000 years old or less? | def solve() -> int:
total_fossils = 480
num_old_fossils = (30/100) * total_fossils
num_young_fossils = total_fossils - num_old_fossils
result = num_young_fossils
return result
|
Student: Lily planted 9 flowers, Tom planted 3 more than Lily, and Ann planted half as many as Tom. How many flowers did they plant in total? | def solve() -> int:
lily_flowers = 9
tom_flowers = lily_flowers + 3
ann_flowers = tom_flowers / 2
total_flowers = lily_flowers + tom_flowers + ann_flowers
result = total_flowers
return result
|
A train traveling at a speed of 80 km/hr covering a distance of 600 km in total. Its first 400 km being covered at 60 km/hr, at what speed must the remaining distance of 200km be covered to obtain an overall average of 80 km/hr? | def solve() -> int:
distance = 600
distance1 = 400
distance2 = 200
speed1 = 60
average_speed = 80
total_time = distance / average_speed
time1 = distance1 / speed1
time2 = total_time - time1
speed2 = distance2 / time2
result = speed2
return result
|
Jacob is designing a park. The park measures 300 feet in length and 200 feet in width. Half of the park will be used for a lake, one-seventh of the remaining area will be used to create a picnic area, and the rest will be used for biking trails. What is the area of the biking trails section? | def solve() -> int:
length = 300
width = 200
total_area = length * width
lake_area = total_area / 2
remaining_area = total_area - lake_area
picnic_area = remaining_area / 7
biking_trails_area = remaining_area - picnic_area
result = biking_trails_area
return result
|
A book costs $10. It is on sale for 30% off. How much will the book cost after the sale? | def solve() -> int:
book_cost = 10
discount_percentage = 0.3
discounted_amount = book_cost * discount_percentage
sale_price = book_cost - discounted_amount
result = sale_price
return result
|
Amy's phone was on 35% charge when she started charging it. If it takes 1 hour 40 minutes to fully charge her phone, how long does it take for the phone to charge to 70%? | def solve() -> int:
starting_charge = 35
final_charge_needed = 70
charge_needed = final_charge_needed - starting_charge
full_charge_time = 100
one_percent_time = full_charge_time / 100
charge_time = charge_needed * one_percent_time
result = charge_time
return result
|
Student: 6. Ronald spilled 6 liters of paint. How many 1-liter cans should he fill to store all the paint? | def solve() -> int:
liters_spilled = 6
can_size = 1
cans_needed = liters_spilled // can_size
result = cans_needed
return result
|
A family wants to paint their home which is 2000 sq. ft. large. If a painter can paint 200 sq. ft. per hour, and his apprentice paints at twice his speed, how many total hours will it take them to finish painting the home if they paint 10 identical homes together? | def solve() -> int:
total_area = 2000 * 10
painter_speed = 200
apprentice_speed = 2 * painter_speed
total_speed = painter_speed + apprentice_speed
total_hours = total_area / total_speed
result = total_hours
return result
|
Student: Barry has 2000 oranges and wants to evenly distribute them between himself and 5 of his friends. How many oranges does each person get? | def solve() -> int:
oranges = 2000
num_friends = 5
total_people = num_friends + 1
oranges_per_person = oranges / total_people
result = oranges_per_person
return result
|
Ethan was fixing up his old car and bought one quart of oil and one set of spark plugs, which cost $20 respectively. How much did Ethan pay for the supplies? | def solve() -> int:
price_oil = 20
price_sparkplugs = 20
total_cost = price_oil + price_sparkplugs
result = total_cost
return result
|
Jason is cleaning his fish tank and can fit 50 fish in it, unless they are goldfish, which take up twice as much space as regular fish. He has already added 10 goldfish and 20 regular fish. How many regular fish can he fit into the remaining space in the fish tank? | def solve() -> int:
goldfish_space = 2
regular_fish_space = 1
total_fish_space = 50
goldfish = 10
regular_fish = 20
remaining_space = total_fish_space - (goldfish * goldfish_space) - (regular_fish * regular_fish_space)
result = remaining_space
return result
|
If John's revenue is 1/2 of what it used to be and David's income is now five times what John used to make, how much do they make together if John used to make $10,000? | def solve() -> int:
john_income = 10000
john_revenue = john_income / 2
david_income = 5 * john_revenue
total_income = john_income + david_income
result = total_income
return result
|
Anna is baking cupcakes for her friends. She needs four times as many eggs as cups of flour and 2 fewer cups of flour than cups of sugar. If she needs 16 eggs, how many cups of ingredients total does she need? | def solve() -> int:
f = 16 / 4
total = 6 * f + 2
result = total
return result
|
Felicia wants to buy a $100,000 penthouse. She has $500 in cash and will sell her 50 cherry trees, 25 oak trees, and 300 birch trees to finance the rest. She will earn $150 for each cherry tree, $250 for an oak tree, and $75 per birch tree. After buying the penthouse, how much money will Felicia have left? | def solve() -> int:
penthouse_price = 100000
cash = 500
cherry_trees = 50
oak_trees = 25
birch_trees = 300
cherry_tree_price = 150
oak_tree_price = 250
birch_tree_price = 75
total_earned = cherry_trees * cherry_tree_price + oak_trees * oak_tree_price + birch_trees * birch_tree_p... |
Student: Mary has 8 shirts, each with a print area of 75 square inches. She gives 2 shirts away. How many square inches of shirt print does she have left? | def solve() -> int:
shirt_num = 8
print_area = 75
shirt_num -= 2
result = shirt_num * print_area
return result
|
John has a bag with 75 marbles. He takes out 50% of the marbles and then puts back in half of what he took out. How many marbles does he now have in the bag? | def solve() -> int:
taken_out_marbles = 75*0.5
returned_marbles = taken_out_marbles/2
remaining_marbles = 75 - taken_out_marbles + returned_marbles
result = remaining_marbles
return result
|
Jill has a bag of 56 jelly beans. She decides to share them equally among her 7 friends. How many jelly beans will each friend receive? | def solve() -> int:
num_jellybeans = 56
num_friends = 7
jellybeans_per_friend = num_jellybeans / num_friends
result = jellybeans_per_friend
return result
|
Student: A recipe calls for 2 cups of sugar to make 24 cookies. If Sarah wants to make 72 cookies, how many cups of sugar does she need? | def solve() -> int:
cookies_needed = 72
sugar_needed = (cookies_needed / 24) * 2
result = sugar_needed
return result
|
Barbara needs a new Winch line for her Winch. She is currently using one line with a diameter of 6mm. Her Winch's line power rating is 500W. What is the minimum diameter line that she needs to buy that can provide the same power rating? | def solve() -> int:
line_power_rating = 500
old_line_diameter = 0.6
old_line_area = (3.14 * (old_line_diameter ** 2)) / 4
power_output_old = old_line_area * 40
power_output_new = line_power_rating
new_line_area = power_output_new / 40
new_line_diameter = (4 * ... |
A factory produced 5000 items, of which 10% were defective, and 80% of the items that were not defective passed the quality check. How many items passed the quality check? | def solve() -> int:
total_items = 5000
defective_items = 0.1 * total_items
good_items = total_items - defective_items
items_that_passed = 0.8 * good_items
result = items_that_passed
return result
|
Wendy went to the store and bought 8 doughnuts and 9 bags of chips. If the total cost was $19 and the doughnuts each cost $1.25, how much did each bag of chips cost? | def solve() -> int:
price_doughnut = 1.25
price_total = 19
total_items = 8 + 9
price_chip = price_total - (total_items * price_doughnut)
result = price_chip
return result
|
Maggie has 10 coins that are all dimes. How much money does Maggie have in total? | def solve() -> int:
num_coins = 10
coin_value = 0.1
total_money = num_coins * coin_value
result = total_money
return result
|
When Aria cleaned out her purse, she found 15 pennies, 12 nickels, and 8 dimes. How much money did she find? | def solve() -> int:
pennies = 15
nickels = 12
dimes = 8
total_money = (pennies * 0.01) + (nickels * 0.05) + (dimes * 0.10)
result = total_money
return result
|
san earns $15 per hour. She worked for 2 days of 6 hours each and 1 day of 4 hours. How much money will she earn? | def solve() -> int:
hourly_rate = 15
day1_hours = 6
day2_hours = 6
day3_hours = 4
salary = (day1_hours + day2_hours + day3_hours) * hourly_rate
result = salary
return result
|
A classroom has 30 students. If there are 24 chairs in the classroom, how many students will have to stand? | def solve() -> int:
total_students = 30
total_chairs = 24
students_to_stand = total_students - total_chairs
result = students_to_stand
return result
|
4. At the store, Ruth bought 4 tomatoes, 5 peppers, and 2 lemons. The tomatoes cost $2 each, the peppers cost $1.50 each, and the lemon cost $0.50 each. How much did she spend on her grocery shopping? | def solve() -> int:
tomatoes = 4
costTomatoes = 2
peppers = 5
costPeppers = 1.5
lemons = 2
costLemons = 0.5
result = (tomatoes*costTomatoes)+(peppers*costPeppers)+(lemons*costLemons)
return result
|
A closed rectangular container whose area is 1024 square inches has a length 4 inches longer than its width. If it has a height of 8 inches, what is its volume in cubic inches? | def solve() -> int:
area = 1024
height = 8
width = (area / height) ** 0.5
length = width + 4
volume = length * width * height
result = volume
return result
|
A party of 40 people ordered drinks. Two-sevenths of them ordered beer. Half of the remaining people ordered wine, and the rest ordered cocktails. How many people ordered cocktails? | def solve() -> int:
total_people = 40
beer_people = total_people * 2 / 7
remaining_people = total_people - beer_people
wine_people = remaining_people / 2
cocktail_people = remaining_people - wine_people
result = cocktail_people
return result
|
Amy has a bill of $75 and tipped 10%. If great tippers tip at least 18%, how many more cents than normal would Amy have to tip to be considered a great tipper? | def solve() -> int:
bill = 75
tip_percentage = 10
great_tip_percentage = 18
tip_amount = bill * tip_percentage / 100
great_tip_amount = bill * great_tip_percentage / 100
extra_tip_amount = great_tip_amount - tip_amount
result = extra_tip_amount * 100
return result
|
``` A truck can hold 120 boxes, and each box weighs 25 kilograms. A car can carry 80 boxes, and each box weighs 35 kilograms. What is the difference in weight capacity between the two vehicles? | def solve() -> int:
truck_capacity = 120 * 25
car_capacity = 80 * 35
capacity_difference = truck_capacity - car_capacity
result = capacity_difference
return result
|
At a sporting goods store, a soccer ball is priced at $20 but is $5 less when customers purchase a pair of soccer cleats. If Kevin buys 3 soccer balls and 2 pairs of soccer cleats, how much will he pay in total? | def solve() -> int:
soccer_ball_price = 20
cleats_price = soccer_ball_price - 5
num_soccer_balls = 3
num_cleats = 2
total_soccer_ball_cost = soccer_ball_price * num_soccer_balls
total_cleats_cost = cleats_price * num_cleats
total_cost = total_soccer_ball_cost + total_cleats_co... |
In a set of 50 markers, Liam wants to distribute them equally among himself and three friends. How many markers will each person get? | def solve() -> int:
markers = 50
num_friends = 3
total_people = num_friends + 1
markers_per_person = markers / total_people
result = markers_per_person
return result
|
A grocery store sells a box of cookies for $3.50. If a customer buys 2 boxes of cookies and 1 gallon of milk for $4.00, how much does the gallon of milk cost? | def solve() -> int:
cookie_price = 3.5
num_cookies = 2
cookie_total = cookie_price * num_cookies
total = 4
milk = total - cookie_total
result = milk
return result
|
Student: In a zoo, there are 32 monkeys. There are five more tigers than three times the number of monkeys. How many tigers are there in the zoo? | def solve() -> int:
monkeys = 32
tigers = 0
tigers = 3 * monkeys + 5
tigers = 3 * 32 + 5
tigers = 96 + 5
tigers = 101
result = tigers
return result
|
Calvin bought a laptop for $600 and a tablet for $300. He receives 10% discount for both items. How much did he pay in total? | def solve() -> int:
laptop_price = 600
tablet_price = 300
discounted_price = (laptop_price + tablet_price) * 0.9
result = discounted_price
return result
|
Result: $150 Joe had a total of 12 apples, but lost 3 during the day. How many apples does Joe have now? | def solve() -> int:
initial_apples = 12
lost_apples = 3
remaining_apples = initial_apples - lost_apples
result = remaining_apples
return result
|
In a classroom, 75% of the students passed the test and 30 failed. How many students passed? | def solve() -> int:
total_students = 100
failed_students = 30
passed_students = total_students - failed_students
passed_percentage = 75
passed_students = (passed_percentage/100) * total_students
result = passed_students
return result
|
A rectangular garden has a length of 12 feet and width of 8 feet. If a 2-foot-wide walkway is built around the garden, what is the total area of the walkway? | def solve() -> int:
length, width, walkway = 12, 8, 2
new_length = length + 2*walkway
new_width = width + 2*walkway
area_with_walkway = new_length * new_width
area_without_walkway = length * width
walkway_area = area_with_walkway - area_without_walkway
result = walkway_area
return resul... |
am works as a taxi driver and can drive a maximum of 300 kilometers per day. One week, Sam drove the maximum number of kilometers on Tuesday and Thursday. On Monday and Friday, he drove half of the maximum number of kilometers. On Wednesday, he drove one-fourth of the maximum number of kilometers. On Saturday and Sunda... | def solve() -> int:
max_km = 300
monday = max_km / 2
tuesday = max_km
wednesday = max_km / 4
thursday = max_km
friday = max_km / 2
saturday = max_km * 2 / 3
sunday = max_km * 2 / 3
total_km = monday + tuesday + wednesday + thursday + friday + saturday + sunday
max_week = m... |
John had 120 books but decided to sell 30. He then gave 10 books to one library and quadruple that to another library. If he loses 5 books, how many books does he have left? | def solve() -> int:
books = 120
books_sold = 30
books_given_to_library1 = 10
books_given_to_library2 = books_given_to_library1 * 4
books_lost = 5
books_left = books - books_sold - books_given_to_library1 - books_given_to_library2 - books_lost
result = books_left
return result
|
There are 60 students in a class. If three fifths of the students are girls, and two ninths of the girls have glasses, how many girls have glasses? | def solve() -> int:
girls = 60 * 3/5
glasses = girls * 2/9
result = int(glasses)
return result
|
5 friends went to a movie theater. They each bought a ticket and a popcorn. The ticket was 10% off and the popcorn was 30% off. The original price of the ticket was 8 dollars and the original price of the popcorn was 5 dollars. How much money did they spend in total? | def solve() -> int:
ticket_price = 8 * (1 - 0.1)
popcorn_price = 5 * (1 - 0.3)
movie_cost = ticket_price + popcorn_price
total_cost = movie_cost * 5
result = total_cost
return result
|
If a race is 4.2 kilometers long and a runner's pace is 6.5 minutes per kilometer, calculate how many minutes it will take for the runner to finish the race. | def solve() -> int:
race_length = 4.2
pace = 6.5
time = race_length * pace
result = time
return result
|
A car travels at a constant speed of 80 km/h. How long does it take to travel 320 km? | def solve() -> int:
time_in_hours = 320 / 80
result = time_in_hours
return result
|
If 5 shirts cost $75, how much does each shirt cost? | def solve() -> int:
total_cost = 75
number_shirts = 5
cost_per_shirt = total_cost/number_shirts
result = cost_per_shirt
return result
|
A pizza has 12 slices. Each slice has 4 pieces of pepperoni. Jim eats half of the pizza and gives 2 slices to his friend. How many pieces of pepperoni does Jim eat? | def solve() -> int:
slices_jim = 12 / 2 - 2
pepperoni_per_slice = 4
pepperoni_jim = slices_jim * pepperoni_per_slice
result = pepperoni_jim
return result
|
A cake recipe calls for 2 cups of flour, 1 cup of sugar, and 3 eggs. If Sarah wants to make 4 cakes, how much flour, sugar, and eggs will she need in total? | def solve() -> int:
flour_per_cake = 2
sugar_per_cake = 1
eggs_per_cake = 3
num_cakes = 4
total_flour = flour_per_cake * num_cakes
total_sugar = sugar_per_cake * num_cakes
total_eggs = eggs_per_cake * num_cakes
result = (total_flour, total_sugar, total_eggs)
return result
|
As chefs, Jan, Kim, and Lee have been preparing meals for customers over the week. Jan has prepared 150 meals for the week and Kim has prepared 20% less than Jan. Meanwhile, Lee has prepared 50% more than the number of meals Kim was able to. How many meals have they prepared for the entire week? | def solve() -> int:
jan = 150
kim = 0.8 * jan
lee = 1.5 * kim
total = jan + kim + lee
result = total
return result
|
Jake has 6 times as many pencils as Ava. Mia has 1/18 as many pencils as Jake. If Mia has 1 pencil, how many pencils does Ava have? | def solve() -> int:
mia = 1
jake = 18 * mia
ava = jake / 6
result = ava
return result
|
Frank wants to save up to buy a bike, which costs $400. He can save $5 a day by doing odd jobs. How many days will it take for him to save enough? | def solve() -> int:
bike_cost = 400
savings_per_day = 5
days = 0
savings = 0
while savings < bike_cost:
savings += savings_per_day
days += 1
result = days
return result
|
A circle has a radius of 12. Calculate the circumference of the circle. | def solve() -> int:
r = 12
pi = 3.14
circumference = 2 * pi * r
result = 75.36
return result
|
Student: Alice and Bob are saving money for a trip. Alice saves $15 every week and Bob saves $20 every week. They have already saved $200 together. If they need $500 for the trip, how many more weeks do they need to save? | def solve() -> int:
alice_savings = 15
bob_savings = 20
total_savings = 200
needed_savings = 500
total_savings_needed = needed_savings - total_savings
weeks_needed = total_savings_needed // (alice_savings + bob_savings)
result = weeks_needed
return result
|
The Snakes have 36 stickers in total. They want to divide them equally among themselves and their friends. If they have 4 friends, how many stickers will each person get? | def solve() -> int:
x = 36 / 6
result = x
return result
|
Amy had a lemonade stand that sold each cup for $0.5. She spent $8 on lemons, $4 on sugar, and $2 on cups. She sold 60 cups on the first day and 80 cups on the second day. How much money did she make in total? | def solve() -> int:
income = (60 + 80) * 0.5
expense = 8 + 4 + 2
profit = income - expense
result = profit
return result
|
A plumber can fix a leaky faucet in 45 minutes. If he can work at the same rate, how many faucets can he fix in 6 hours? | def solve() -> int:
time1 = 45/60
faucets1 = 1
time2 = 6
faucets2 = faucets1 / time1 * time2
result = faucets2
return result
|
Mrs. Wang grows vegetables in her farm. On Wednesday, she had 67 cabbages and 2.5 times more zucchinis. Today, she sold 12 cabbages and three times more zucchinis than the day before. How many zucchinis did she have initially if each cabbage costs $5 and each zucchini costs $3? | def solve() -> int:
cabbages = 0
zucchinis = 0
cabbages = 67 - 12
zucchinis = 2.5 * (67 - 12) + 3 * 12
result = zucchinis
return result
|
Pam spent $18.45 for a book, $8.96 for a pen, and $13.29 for a notebook. How much did she spend in total? | def solve() -> int:
book_cost = 18.45
pen_cost = 8.96
notebook_cost = 13.29
total_cost = book_cost + pen_cost + notebook_cost
result = total_cost
return result
|
Mr. Smith and Mr. Brown both walked up the mountain. Mr. Smith went at a speed of 5 steps per hour, and Mr. Brown went at a speed of 3 steps per hour more than Mr. Smith. If it took Mr. Smith 4 hours to reach the top, how many steps did Mr. Brown take? | def solve() -> int:
steps_taken_smith=5*4
steps_taken_brown=steps_taken_smith+3*4
result = steps_taken_brown
return result
|
Adam runs an average of 8 miles a day. His sister runs 1.5 times as much as Adam does. Due to fatigue, for every mile Adam's sister runs, she rests for 6 minutes. How many hours does Adam's sister rest in a week? | def solve() -> int:
adam_miles = 8
sister_miles = adam_miles * 1.5
rest_time = sister_miles * 6
week_rest_time = rest_time * 7
hour_rest_time = week_rest_time / 60
result = hour_rest_time
return result
|
Student: If a store sells a shirt for $20 that costs them $10 to produce, what is their profit margin as a percentage? | def solve() -> int:
cost = 10
price = 20
profit = price - cost
profit_margin = (profit / price) * 100
result = profit_margin
return result
|
A triangle has a base of 10 cm and a height of 8 cm. What is its area? | def solve() -> int:
base = 10
height = 8
area = 0.5 * base * height
result = area
return result
|
san gets paid $40 per hour up to a total of 45 hours, after which she gets paid one and a half times that amount per hour. If Susan works 60 hours in a week, how much does she get paid? | def solve() -> int:
hours_worked = 60
if hours_worked <= 45:
pay = hours_worked * 40
else:
extra_hours = hours_worked - 45
overtime_pay = extra_hours * (40 * 1.5)
pay = (45 * 40) + overtime_pay
result = pay
return result
|
Marcus is hosting a game night with his friends. The game night will have 10 tables. Each table needs a table runner ($12 to buy), 4 napkins ($1 each to buy), and a board game. Each board game costs $30. How much will the game night decorations cost? | def solve() -> int:
tables = 10
table_runner_cost = 12
napkins_cost = 1
board_game_cost = 30
total_table_runner_cost = tables * table_runner_cost
total_napkins_cost = tables * 4 * napkins_cost
total_board_game_cost = tables * board_game_cost
total_cost = total_table_runner_cost... |
A group of scouts goes hiking for two days. They hike a total of 32 km on the first day and 48 km on the second day. What was their average speed per hour for the entire trip if they hiked for 8 hours each day? | def solve() -> int:
total_distance = 32 + 48
total_time = 2*8
average_speed = int(total_distance/total_time)
result = average_speed
return result
|
David needs to take 3 vitamin E capsules per day, 2 omega-6 capsules per day, and four times as many vitamin K2 pills as vitamin E capsules each day. How many pills does David take in a week? | def solve() -> int:
vitamin_E_capsules = 3
omega_6_capsules = 2
vitamin_K2_pills = vitamin_E_capsules * 4
daily_total = vitamin_E_capsules + omega_6_capsules + vitamin_K2_pills
weekly_total = daily_total * 7
result = weekly_total
return result
|
If there are 8 spiders and 5 beetles, how many animal legs are in total? Emily walks up 6 flights of stairs. Each flight is 15 feet. If each step is 2 feet, how many steps does she climb up? | def solve() -> int:
spiders = 8
beetles = 5
spider_legs = spiders * 8
beetle_legs = beetles * 6
total_legs = spider_legs + beetle_legs
Emily_flights = 6
flight_length = 15
step_length = 2
total_steps = Emily_flights * (flight_length / step_length)
result ... |
If it takes 15 minutes to drive to work at 60 km/hour, what is the distance of the drive in kilometers? | def solve() -> int:
driveTime = 15/60
driveSpeed = 60
driveDistance = driveTime * driveSpeed
result = driveDistance
return result
|
Student: What is the sum of the interior angles of a polygon with 15 sides? | def solve() -> int:
n = 15
sum_of_interior_angles = (n - 2) * 180
result = sum_of_interior_angles
return result
|
Student: A group of 20 students scored an average of 80% on a quiz. If 5 students scored 100%, what was the average score of the remaining 15 students? | def solve() -> int:
num_students = 20
total_score = 80
num_100 = 5
total_100 = num_100 * 100
total_remaining = num_students * total_score - total_100
result = total_remaining / (num_students - num_100)
return result
|
Paula has a budget of $80 to buy some books. At the bookstore, she found a book she wants to buy for $15, but it's available as part of a bundle with two other books for $35. If she decides to buy the bundle, how much money will she have left from her budget? | def solve() -> int:
budget = 80
single_book_price = 15
bundle_price = 35
bundle_books = 3
total_single_books = budget // single_book_price
total_bundles = total_single_books // bundle_books
total_books = total_single_books + total_bundles * bundle_books
total_spent = total_bund... |
There are 6 slices of pizza available and 2 people to share them with. If they want to equally distribute the pizza, how many slices of pizza will each person get? | def solve() -> int:
slices_of_pizza = 6
num_of_people = 2
slices_per_person = slices_of_pizza / num_of_people
result = slices_per_person
return result
|
A cake recipe calls for 2 cups of flour for every 3 cups of sugar. If you want to make a cake using 6 cups of flour, how many cups of sugar do you need? | def solve() -> int:
flour_given = 2
sugar_given = 3
flour_wanted = 6
sugar_wanted = sugar_given / flour_given * flour_wanted
result = sugar_wanted
return result
|
Jessie spends a lot of time cooking. She walks 2 blocks to reach the grocery store, 15 blocks to the farmer's market, and finally 1 block to reach her house. If Jessie goes to the store twice daily, how many blocks does she walk in total each day? | def solve() -> int:
grocery_store = 2
farmers_market = 15
house = 1
total_blocks = (grocery_store + farmers_market + house) * 2
result = total_blocks
return result
|
Student: Mia went out to eat and ordered a meal for $14.99. She gave the waiter a $20 bill and asked for change. The waiter accidentally gave her $20 back instead of $5. How much did Mia overpay? | def solve() -> int:
meal_cost = 14.99
bill = 20
change = 20
difference = change - (bill - meal_cost)
result = difference
return result
|
Sophia is walking her two llamas and three alpacas in the countryside. How many pairs of legs are trekking through the grass? | def solve() -> int:
llamas = 2
alpacas = 3
llama_legs = 4
alpaca_legs = 4
total_llama_legs = llamas * llama_legs
total_alpaca_legs = alpacas * alpaca_legs
total_legs = total_llama_legs + total_alpaca_legs
result = total_legs
return result
|
Maria has a tank that contained 64 ounces of water. If she adds 69 ounces of water, how many ounces of water will the tank contain? | def solve() -> int:
original_ounces = 64
added_ounces = 69
total_ounces = original_ounces + added_ounces
result = total_ounces
return result
|
Emily bought a shirt for $30 and jeans for $50. If she has $100, how much money does she have left? | def solve() -> int:
shirt_price = 30
jeans_price = 50
total_money = 100
spent_money = shirt_price + jeans_price
remaining_money = total_money - spent_money
result = remaining_money
return result
|
A library has a collection of 10,000 books. Time, weather conditions, and other factors may cause the library to lose books. If the library loses 50 books per week, how many weeks will it take before the library has only half of its original collection left? | def solve() -> int:
books = 10000
lost_per_week = 50
half_books = books / 2
weeks = 0
while books > half_books:
books -= lost_per_week
weeks += 1
result = weeks
return result
|
The chess club is selling personalized chess boards to raise money for a tournament. They ordered 60 chess boards from an online store, each costing $15. They paid $120 for shipping and handling. They charged $25 for each chess board with a name engraved on it. If they sold all the chess boards, how much profit did the... | def solve() -> int:
total_cost = 60 * 15 + 120
total_revenue = 60 * 25
profit = total_revenue - total_cost
result = profit
return result
|
Amanda wants to buy some candies for her friends. She knows that each candy costs 25 cents and each friend wants 3 candies. She also needs to pay 10% sales tax on the total cost of the candies. How much money does Amanda need to buy candies for 12 friends? | def solve() -> int:
candy_with_tax = 0.25 * 1.1
three_candies_with_tax = candy_with_tax * 3
cost_for_12_friends = three_candies_with_tax * 12
cost_for_12_friends = round(cost_for_12_friends, 2)
result = cost_for_12_friends
return result
|
Ben spends 1/8 of his day playing outside and 5/6 of the time left on practicing music. How many minutes does he spend practicing music each day? | def solve() -> int:
total_minutes_in_a_day = 24 * 60
playing_minutes = total_minutes_in_a_day * (1/8)
time_left = total_minutes_in_a_day - playing_minutes
practicing_minutes = time_left * (5/6)
result = practicing_minutes
return result
|
John needs to save up $1000 to buy a new computer. He can save up $40 per week. How many weeks does he need to save up for the new computer? | def solve() -> int:
savings_goal = 1000
weekly_savings = 40
weeks_needed = savings_goal // weekly_savings
result = weeks_needed
return result
|
A bar of chocolate measuring 12 inches is divided equally among 4 people. How long is each person's portion in centimeters if 1 inch is equal to 2.54 centimeters? | def solve() -> int:
chocolate_length = 12
portion_length = chocolate_length / 4 * 2.54
result = portion_length
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.