question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
``` A container ship can transport 20 containers in one trip. Each container can hold 200 boxes of shirts. If a store orders 6,000 boxes of shirts, how many trips will the ship need to make to deliver them? | def solve() -> int:
boxes_per_container = 200
num_boxes = 6000
containers_needed = num_boxes / boxes_per_container
trips_needed = containers_needed / 20
result = trips_needed
return result
|
A family bakes 35 pies in 6 days. How many pies will they bake in 18 days? | def solve() -> int:
totalPies = 35 * 3
result = totalPies
return result
|
A hotel charges $75 per night for a room. If a customer stays more than 6 nights, the rate drops to $60 per night. How much will it cost a customer to stay for 10 nights? | def solve() -> int:
cost_first_six = 6 * 75
cost_final_four = 4 * 60
total_cost = cost_first_six + cost_final_four
result = total_cost
return result
|
Sophia is packing lunchboxes for her 4 children, who all have different tastes. Each lunchbox contains a sandwich, a fruit salad, a bottle of water, a snack, and a note. She can make a sandwich in 5 minutes. A fruit salad takes her 10 minutes to prepare. Each water bottle takes her 2 minutes to fill. A snack takes her ... | def solve() -> int:
sandwich_time = 5
fruit_salad_time = 10
water_bottle_time = 2
snack_time = 5
note_time = 1
total_time = (sandwich_time + fruit_salad_time + water_bottle_time + snack_time + note_time) * 4
result = total_time
return result
|
``` A package of 24 pencils costs $2.40. How much will it cost to buy 72 pencils? | def solve() -> int:
price = 2.4
units = 24
new_units = 72
unit_price = price / units
total_price = new_units * unit_price
result = total_price
return result
|
Mark borrows $120 from his friend. He gives back $5 more than half the amount he borrowed. How much money did Mark give back? | def solve() -> int:
amount_borrowed = 120
amount_given_back = amount_borrowed/2 + 5
result = amount_given_back
return result
|
The ratio of boys to girls in a classroom is 3:5. If there are 24 boys in the classroom, calculate the total number of students in the classroom. | def solve() -> int:
boys_ratio = 3
girls_ratio = 5
boys = 24
total_students = (boys / boys_ratio + girls_ratio) * boys_ratio
result = total_students
return result
|
Ken makes 3/7's the salary that Lily makes. Lily makes $5500 per month. How long will it take Ken to make the same amount of money that Lily does in 8 months? | def solve() -> int:
lily_salary = 5500
ken_salary = (3/7) * lily_salary
ken_salary_8_months = ken_salary * 8
result = ken_salary_8_months
return result
|
A survey looks at the opinion of 40 employees in a certain company, and 10% of them oppose issuing a new policy. How many people agree with the policy? | def solve() -> int:
total_employees = 40
employees_opposing = 10/100 * total_employees
employees_agreeing = total_employees - employees_opposing
result = employees_agreeing
return result
|
Some possible math questions and programs are: Rob and his dad went fishing for two days. They caught 8 fish on the first day and 6 fish on the second day. They sold each fish for $5. They also bought some bait and snacks that cost them $12 and $8 respectively. How much money did they make from the fishing trip? | def solve() -> int:
total_fish = 8 + 6
revenue = total_fish * 5
cost = 12 + 8
profit = revenue - cost
result = profit
return result
|
Mike and Kevin are planning a party for 60 people. At the store, they buy 3 dozen donuts for $12.75 and 4 dozen cupcakes for $15.50. What was the total cost for the donuts and cupcakes? | def solve() -> int:
number_of_donuts = 3
price_of_donuts = 12.75
number_of_cupcakes = 4
price_of_cupcakes = 15.50
total_cost = (number_of_donuts * price_of_donuts) + (number_of_cupcakes * price_of_cupcakes)
result = total_cost
return result
|
Student: A train started from a station and travel with a speed of 60 km/h, another train started from the same station but traveled in the opposite direction (i.e. down the line) with a speed of 80 km/h. After how many hours will the trains be 560 km apart? | def solve() -> int:
speed_1 = 60
speed_2 = 80
distance = 560
relative_speed = speed_1 + speed_2
time = distance / relative_speed
result = time
return result
|
If there are 50 toys in a box and Rachel wants to share them with her siblings in the ratio of 1:4, with Rachel's ratio being 4, how many toys did she get? | def solve() -> int:
toys_in_box = 50
total_ratio = 1 + 4
rachel_ratio = 4/total_ratio
rachel_toys = rachel_ratio * toys_in_box
result = rachel_toys
return result
|
A collection of books contains 48 books, divided into 12 equal stacks. How many books are there per stack? | def solve() -> int:
num_books = 48
num_stacks = 12
books_per_stack = num_books/num_stacks
result = books_per_stack
return result
|
A school wants to hold a charity event. They need to raise $5000 to donate to a local charity. If they have already raised $3000, and they charge $10 per ticket, how many more tickets do they need to sell to reach their goal? | def solve() -> int:
money_needed = 5000
money_raised = 3000
cost_per_ticket = 10
tickets_needed = (money_needed-money_raised)/cost_per_ticket
result = int(tickets_needed)
return result
|
Emily is doing laundry for three days. In January, February, and March, she washes 1/4 load of laundry in the morning, and another 1/4 load in the afternoon. How many loads of laundry will she wash in all three days? | def solve() -> int:
january_morning_load = 1/4
january_afternoon_load = 1/4
february_morning_load = 1/4
february_afternoon_load = 1/4
march_morning_load = 1/4
march_afternoon_load = 1/4
total_loads = (january_morning_load + january_afternoon_load + february_morning_load + february_after... |
Lily is making hair accessories out of red, yellow and blue flowers. There are five times as many yellow flowers as red flowers and two more than six times as many blue flowers as yellow flowers. If there are 8 red flowers, how many flowers are there in total? | def solve() -> int:
red_flowers = 8
yellow_flowers = 5 * red_flowers
blue_flowers = 6 * yellow_flowers + 2
total_flowers = red_flowers + yellow_flowers + blue_flowers
result = total_flowers
return result
|
If a recipe calls for 2 cups of flour to make 12 cookies, how many cups of flour are needed to make 24 cookies? | def solve() -> int:
cups_per_cookie = 2 / 12
cookies_needed = 24
flour_needed = cups_per_cookie * cookies_needed
result = flour_needed
return result
|
A bartender is mixing a drink with 2 parts orange juice, 1 part vodka, and a splash of grenadine. If the drink is 9 ounces, how much orange juice should he use? | def solve() -> int:
drink_size = 9
orange_juice_ratio = 2 / 3
orange_juice_amount = orange_juice_ratio * drink_size
result = orange_juice_amount
return result
|
Student: Water is filling a tank at a rate of 450 liters per hour and draining out of the tank at a rate of 300 liters per hour. If the tank was already 1/4 full when the water started rushing in and the process was ongoing for 5 hours, how much water will the tank hold? | def solve() -> int:
rate_in = 450
rate_out = 300
initial_level = 0.25
duration = 5
water_in = rate_in * duration
water_out = rate_out * duration
net_water = water_in - water_out
result = initial_level + net_water
return result
|
Student: How many hours are in 750 megawatts? | def solve() -> int:
megawatts = 750
hours = megawatts * 1000 / 3600
result = hours
return result
|
If a car travels at 60 miles per hour, how many hours will it take to travel 240 miles? | def solve() -> int:
speed = 60
distance = 240
time = distance / speed
result = time
return result
|
Nadia's class had 18 students at the start of the term, but 5 students dropped out before the midterm exams. After the exams, 10 new students joined the class. However, 1/4 of the students in Nadia's class failed the final exams and had to repeat the term. How many students were in Nadia's class at the end of the term? | def solve() -> int:
students = 18 - 5 + 10
failed = students / 4
passed = students - failed
result = passed
return result
|
A florist can make 12 flower arrangements in 3 hours. How long would it take the florist to make 20 flower arrangements at this constant rate? | def solve() -> int:
arrangements = 20
speed = 12/3
time = arrangements/speed
result = time
return result
|
A bookshelf has space for 500 books. If each book is 1.5 inches thick and 30 books are already on the shelf, how much space is left in inches? | def solve() -> int:
book_space = 500
current_books = 30
book_thickness = 1.5
space_left = (book_space - current_books) * book_thickness
result = space_left
return result
|
Student: In a bag, there are 20 jacks and 30 marbles. What percentage of the items in the bag are marbles? | def solve() -> int:
jacks = 20
marbles = 30
total_items = jacks + marbles
percentage_marbles = marbles / total_items * 100
result = percentage_marbles
return result
|
If 1 kg of apples costs $4 and 1 kg of oranges costs $3, and a fruit basket contains 5 kg of apples and 4 kg of oranges, how much does the fruit basket cost? | def solve() -> int:
apples_cost_per_kg = 4
oranges_cost_per_kg = 3
apples_weight = 5
oranges_weight = 4
total_cost = (apples_cost_per_kg * apples_weight) + (oranges_cost_per_kg * oranges_weight)
result = total_cost
return result
|
Anna had 80 cookies in her jar. She baked 16 more cookies and then ate 20% of them. How many cookies does she have left in her jar? | def solve() -> int:
cookies_after_baking = 80 + 16
cookies_eaten = cookies_after_baking * 0.2
cookies_left = cookies_after_baking - cookies_eaten
result = cookies_left
return result
|
amantha left her house for a tennis game, and realized she forgot something 5 minutes after departing. She went back and arrived at the house 3 minutes later. It took her 2 more minutes to get to the tennis court. How many minutes late was she for the game? | def solve() -> int:
time_to_tennis_court = 2
time_spent_backtracking = 5 + 3
total_late_time = time_to_tennis_court + time_spent_backtracking
result = total_late_time
return result
|
A can contains 50 ml of juice. If each glass of juice contains 200 ml, how many glasses can be filled from one can? | def solve() -> int:
can_volume = 50
glass_volume = 200
num_glasses = can_volume / glass_volume
result = num_glasses
return result
|
Two numbers x and y are such that x = 3y and x + y = 80. Find the value of x and y. | def solve() -> int:
x_plus_y = 80
y = x_plus_y/4
x = 3*y
result = (x,y)
return result
|
A garden is 20 meters long and 10 meters wide. If a walkway of uniform width is constructed around the garden, and it has an area of 360 square meters, what is the width of the walkway? | def solve() -> int:
garden_length = 20
garden_width = 10
walkway_area = 360
a = 1
b = 15
c = -90
x1 = (-b + (b**2 - 4*a*c)**0.5) / (2*a)
x2 = (-b - (b**2 - 4*a*c)**0.5) / (2*a)
if x1 > 0:
walkway_width = x1
else:
walkway_width = x2
result = walkway... |
An aquarium has a rectangular base that measures 100cm by 60cm. It also has a height of 50cm. What is the volume of water the aquarium can hold? | def solve() -> int:
length = 100
width = 60
height = 50
volume = length * width * height
result = volume
return result
|
A rectangular field measures 30 meters by 50 meters. If the field has a path of uniform width around it that occupies 7% of the total area of the rectangular field, what is the width of the path? | def solve() -> int:
length = 30
width = 50
area = length * width
additional_path_area = 0.07 * area
new_area = area + additional_path_area
new_width = new_area / length
path_width = new_width - width
result = path_width
return result
|
There are 24 people in the classroom. If each person has 2 apples, how many apples are there in total? | def solve() -> int:
total_apples = 24 * 2
result = total_apples
return result
|
Alice bought a company's stock at $25. If the stock went up by 10% for one week, then rose 6% the next week and fell 4.5% the week after, what would Alice's total return over the three week period be? | def solve() -> int:
price_initial = 25
percentage_change_1 = 0.10
percentage_change_2 = 0.06
percentage_change_3 = -0.045
price_1 = price_initial * (1 + percentage_change_1)
price_2 = price_1 * (1 + percentage_change_2)
price_3 = price_2 * (1 + percentage_change_3)
gain = price_3 - price... |
Student: Sarah is planning to go on a road trip. If she drives 60 miles per hour for 5 hours and then increases her speed to 75 miles per hour for the rest of the trip, how long will it take her to travel a total of 600 miles? | def solve() -> int:
speed1 = 60
time1 = 5
speed2 = 75
distance = 600
distance1 = speed1 * time1
distance2 = distance - distance1
time2 = distance2 / speed2
total_time = time1 + time2
result = total_time
return result
|
Mia has 48 marbles in her jar. She also wins 6 marbles in a game every day. If Mia loses 4 marbles in a game every 3 days and gives away 2 marbles to her sister every 4 days, after 16 days how many marbles will Mia have in her jar? | def solve() -> int:
marbles = 48
won = 6
lost = 4
given = 2
days = 16
for i in range(days):
marbles += won
if (i + 1) % 3 == 0:
marbles -= lost
if (i + 1) % 4 == 0:
marbles -= given
result = marbles
return result
|
There are three numbers. The first number is four times the second number and the third number is three times the second number. The sum of these three numbers is 140. What are the three numbers? | def solve() -> int:
num2 = 20
num1 = 4 * num2
num3 = 3 * num2
sum_nums = num1 + num2 + num3
result = sum_nums
return result
|
A pizza is cut into 12 slices. Anna eats 2 slices, Ben eats 3 slices, and Chris eats 1 slice. How many slices are left? | def solve() -> int:
pizza_slices = 12
pizza_slices = pizza_slices - 2 - 3 - 1
slices_left = pizza_slices
result = slices_left
return result
|
David is shopping for groceries. He has $50 to spend. He buys 4 different items: bread, milk, cheese, and eggs. Bread costs $2, milk costs $3, cheese costs $5, and eggs cost 50 cents each. He wants to buy as many eggs as possible and spend all the money. How many eggs can David buy? | def solve() -> int:
bread_cost = 2
milk_cost = 3
cheese_cost = 5
egg_cost = 0.5
total_money = 50
max_breads = total_money // bread_cost
max_milks = total_money // milk_cost
max_cheeses = total_money // cheese_cost
max_eggs = (total_money - max_breads * bread_... |
Jasmine bakes 7 pies. She cuts each pie into 8 slices. How many total slices did she make? | def solve() -> int:
pies = 7
slices_per_pie = 8
total_slices = pies * slices_per_pie
result = total_slices
return result
|
A car travels at an average speed of 60 kilometers per hour for 3 hours and 20 minutes. How far does the car travel in kilometers? | def solve() -> int:
time = 3 + 20/60
speed = 60
distance = speed*time
result = distance
return result
|
Ava is packing cupcakes to sell at the bake sale. She has 80 cupcakes and wants to put them in boxes. Each box can hold 6 cupcakes. How many boxes does she need to buy? | def solve() -> int:
cupcakes = 80
cupcakes_per_box = 6
boxes = cupcakes // cupcakes_per_box
result = boxes
return result
|
A team of 6 athletes went on a training retreat. Only 2 of them signed up for the bungee jumping activity which cost $15 per person. All of them used the sauna (at $8 per person). On their way back, they each bought a protein shake (each shake costs $10). How much did they spend altogether? | def solve() -> int:
athletes = 6
bungee_jumpers = 2
bungee_jumping_cost = 15
sauna_cost = 8
protein_shake_cost = 10
total_bungee_jumping_cost = bungee_jumpers * bungee_jumping_cost
total_sauna_cost = athletes * sauna_cost
total_protein_shake_cost = athletes * protein_shake_cost
... |
On Thursday, a florist bought 20 bunches of roses and 15 bunches of tulips. Each bunch of roses had 12 roses and each bunch of tulips had 9 tulips. She sold all the roses at $2.5 each and all the tulips at $1.8 each. What is the total amount of money that she made? | def solve() -> int:
total_roses = 20 * 12
total_tulips = 15 * 9
money_from_roses = total_roses * 2.5
money_from_tulips = total_tulips * 1.8
total_money = money_from_roses + money_from_tulips
result = total_money
return result
|
san and Tracy each had different numbers of candies. Susan had 10 fewer candies than Tracy. If Susan had 12 candies, how many candies did Tracy have? | def solve() -> int:
susan_candies = 12
tracy_candies = susan_candies + 10
result = tracy_candies
return result
|
A librarian has 30 books. The first 8 books are fiction and have 200 pages each. Another 8 books are non-fiction and have 300 pages each, and the remaining books each have half the number of pages as the first 2 groups of books. If a reader borrows twice the total number of pages of the first 2 groups of books, how man... | def solve() -> int:
books = 30
fiction_books = 8
non_fiction_books = 8
fiction_pages = 200
non_fiction_pages = 300
remaining_books = books - fiction_books - non_fiction_books
remaining_pages = (fiction_pages + non_fiction_pages) / 2
total_pages = (fiction_books * fiction_p... |
A pizza shop sells two sizes of pizzas: small and large. A small pizza has 6 slices, and a large pizza has 10 slices. The price of a small pizza is $8, and the price of a large pizza is $12. A group of friends orders 3 small pizzas and 2 large pizzas. They eat 4/5 of the slices, and share the rest equally among themsel... | def solve() -> int:
small_slices = 3 * 6
large_slices = 2 * 10
total_slices = small_slices + large_slices
eaten_slices = total_slices * 4/5
left_slices = total_slices - eaten_slices
small_cost = 3 * 8
large_cost = 2 * 12
total_cost = small_cost + large_cost
cost_per_slice = total_cos... |
Rita makes 15 bracelets every day. She uses 30 beads and 10 inches of string for each bracelet. Beads cost $0.05 each and string costs $0.1 per inch. How much does she spend on materials in a year if she makes bracelets 7 days a week and there are 52 weeks in a year? | def solve() -> int:
bracelets_per_day = 15
beads_per_bracelet = 30
string_per_bracelet = 10
bead_cost = 0.05
string_cost = 0.1
days_per_week = 7
weeks_per_year = 52
beads_per_day = bracelets_per_day * beads_per_bracelet
bead_cost_per_day = beads_per_day * bead_cost
... |
If a rectangle has width 5 cm and length 10 cm, what is the perimeter and area of the rectangle? | def solve() -> int:
width = 5
length = 10
perimeter = (2*width)+(2*length)
area = width*length
result = (perimeter, area)
return result
|
Michael is preparing a breakfast buffet and wants to make sure there is enough juice for everyone. He plans to make 1 glass of juice for each guest and has invited 30 friends over. One of his friends is diabetic and will bring their own beverage. Another friend is allergic to citrus fruits and won't drink any juice. Ju... | def solve() -> int:
num_guests = 30
num_juice_drinkers = num_guests - 2
num_juice_glasses = num_juice_drinkers * 1
num_juice_packs = num_juice_glasses // 12 + (num_juice_glasses % 12 > 0)
result = num_juice_packs
return result
|
A small shop sells decorative items. A set of four coasters costs 8 dollars, and a set of three candles costs 12 dollars. If Sarah wants to buy 6 sets of coasters and 4 sets of candles, how much will she have to pay? | def solve() -> int:
coasters_price = 8
candles_price = 12
coasters_sets = 6
candles_sets = 4
total_price = coasters_price * coasters_sets + candles_price * candles_sets
result = total_price
return result
|
A small pizza costs $8. If a large pizza is twice as big as a small pizza and costs $16, which pizza is the better deal? | def solve() -> int:
s = 8
l = 16
if l/2 < s:
result = "Large pizza is a better deal"
else:
result = "Small pizza is a better deal"
return result
|
Zoe is trying to outrun a swarm of killer bees to get to a screened-in porch which is too small for the bees to follow her. Zoe has a 1000 feet lead, but the bees can sting her if they get within 100 feet of her. If Zoe runs at a pace of 25 feet per second and the bees fly at a pace of 30 feet per second, how many seco... | def solve() -> int:
zoe_lead = 1000
zoe_pace = 25
bees_pace = 30
time_to_reach = zoe_lead / (bees_pace - zoe_pace)
result = time_to_reach
return result
|
4. Josh bought 6 lemons from the grocery store and 6 more from the farmer's market, he had to pay 16.45 for all 12 lemons. How much did each lemon cost? | def solve() -> int:
total_amount_paid = 16.45
total_no_of_lemons = 6+6
cost_for_one_lemon = total_amount_paid/total_no_of_lemons
result = cost_for_one_lemon
return result
|
The perimeter of a square is twice the perimeter of a rectangle. If the perimeter of the rectangle is 36 cm, what is the perimeter of the square? | def solve() -> int:
rectangle_perimeter = 36
square_perimeter = 2 * rectangle_perimeter
result = square_perimeter
return result
|
John deposit $5000 into a savings account that earns 6% annual interest rate, compounded monthly. If John keeps the money in the account for 3 years, what will be the total balance in the account after 3 years? | def solve() -> int:
initial_deposit = 5000
yearly_interest_rate = 0.06
compounded_periods = 12
duration_years = 3
total_periods = compounded_periods * duration_years
interest_rate_per_period = yearly_interest_rate / compounded_periods
total_balance = initial_deposit * (1 + interest_rate_per_... |
4. John has a garden that needs to be watered 2 times a week from June to September and just once a week from October to May. What is the average number of times that John waters his garden in a month? | def solve() -> int:
num_months = 12
June_Sep_freq = 2
Oct_May_freq = 1
Total_freq = (num_months - 4) * Oct_May_freq + 4 * June_Sep_freq
result = Total_freq/num_months
return result
|
Todd bought a toy for $30 and gave a $3 discount. How much did Todd pay for the toy? | def solve() -> int:
Price_of_toy = 30
Discount = 3
Final_price = Price_of_toy - Discount
result = Final_price
return result
|
A recipe for a cake requires 4 cups of flour for every 3 eggs. If you want to make a cake with 12 cups of flour, how many eggs do you need? | def solve() -> int:
flour = 4
eggs = 3
required_flour = 12
required_eggs = required_flour // flour * eggs
result = required_eggs
return result
|
A train traveling at 60 kilometers per hour (km/h) travels for 3 hours. How far does it travel? | def solve() -> int:
speed = 60
time = 3
distance = speed * time
result = distance
return result
|
The area of a square has a side length of 10 cm. What is the perimeter of the square? | def solve() -> int:
side_length = 10
perimeter = 4*side_length
result = perimeter
return result
|
A car gets 25 miles per gallon (mpg) and has a 12-gallon tank. If gas costs $3.50 per gallon and the car is driven for 150 miles, how much will it cost to fill up the gas tank and drive the 150 miles? | def solve() -> int:
gas_cost = 3.5 * 12
miles_per_tank = 25 * 12
num_fill_ups = 150 // miles_per_tank + 1
total_cost = gas_cost * num_fill_ups
result = total_cost
return result
|
A farmer has 24 eggs. He sells one-fourth of them at the market, then he gives one-sixth of the remaining eggs to his neighbor, and keeps the rest for himself. How many eggs does he keep? | def solve() -> int:
eggs_left = 24 - 6
eggs_neighbor = eggs_left // 6
eggs_left = eggs_left - eggs_neighbor
result = eggs_left
return result
|
Jane made a tray of lasagna with 35 servings. She had one serving for lunch and dinner every day for a week. Her son's friends came over and ate six servings. How many servings of lasagna are left? | def solve() -> int:
tray_servings = 35
jane_week_servings = 14
son_friends_servings = 6
total_consumed = jane_week_servings + son_friends_servings
servings_left = tray_servings - total_consumed
result = servings_left
return result
|
On Monday Mary had 80 flowers. On Tuesday she gave away 5/8 of her flowers. On Wednesday she bought 18 flowers. On Thursday she gave away half of what she bought on Wednesday. How many flowers does Mary have on Thursday? | def solve() -> int:
flowers = 80
flowers = flowers - flowers * 0.625
flowers = flowers + 18
flowers = flowers - flowers * 0.5
result = flowers
return result
|
A store sells 12 products per hour. How many products would it sell in 5.5 hours at this constant rate? | def solve() -> int:
hours = 5.5
products_per_hour = 12
total_products = hours * products_per_hour
result = total_products
return result
|
san spends 4 hours a week pruning the hedge mazes. It takes her 3 hours and 15 minutes to rake the gravel, 2 hours to mow the grass, and 45 minutes to refill the gravel pathways. How long has Susan spent gardening the hedge mazes over the course of 7 weeks? | def solve() -> int:
hours_hedge_mazes = 4
hours_rake_gravel = 3 + 15/60
hours_mow_grass = 2
hours_refill_gravel = 45/60
num_weeks = 7
total_hours = (hours_hedge_mazes + hours_rake_gravel + hours_mow_grass + hours_refill_gravel)*num_weeks
result = total_hours
return result
|
Leo is 40 years old, and he is the oldest cousin in his family. His cousin Mia is one-third his age, and his cousin Noah is 10 years older than Mia. How old is Noah? | def solve() -> int:
leo = 40
mia = leo / 3
noah = mia + 10
result = noah
return result
|
Nathan runs 7 miles every Tuesday, Thursday, and Saturday. Then he runs four times as far as he ran on Tuesday every Monday and Wednesday. How many miles will he run in a month with 2 weeks? Sophie is sending out invitations for her wedding. It costs her $2 per invitation to send them by mail. She has 10 guests on the ... | def solve() -> int:
tues_thurs_sat = 7
mon_wed = 4 * tues_thurs_sat
month = 2 * (4 * tues_thurs_sat * 3 + 2 * mon_wed)
result = month
num_invitations = 10 + 15
cost_per_invitation = 2
total_cost = num_invitations * cost_per_invitation
result2 = total_cost
return result
|
Student: A pizza has 8 slices, of which 3 are cheese and the rest are pepperoni. A person eats 2 slices at random. What is the expected number of cheese slices that the person eats? | def solve() -> int:
slices = 8
cheese = 3
pepperoni = slices - cheese
prob_cheese = cheese / slices
result = prob_cheese * 2
return result
|
Student: Amy has $30. She spends $10 on shoes, $8 on a shirt, and $7 on snacks. How much does she have left? | def solve() -> int:
amount = 30
amount = amount - 10
amount = amount - 8
amount = amount - 7
result = amount
return result
|
A car travels 60 km in 1 hour and 30 minutes. What is the speed of the car in km/hour? | def solve() -> int:
time_in_hours = 1.5
speed = 60 / time_in_hours
result = speed
return result
|
A driver drove his car at a speed of 60 mph for the first 4 hours and at a speed of 50 mph for the remaining distance. If he drove a total of 350 miles, then what is the total time taken by him? | def solve() -> int:
speed_1 = 60
duration_1 = 4
speed_2 = 50
distance = 350
time_1 = duration_1
distance_1 = speed_1 * time_1
distance_2 = distance - distance_1
time_2 = distance_2 / speed_2
total_time = time_1 + time_2
result = total_time
return result
|
Rachel can gather rocks in a field that is 7 square yards. Her cousin Alex can gather rocks in an area that is 56 square yards. What is the ratio of the area Alex can gather rocks in compared to Rachel? | def solve() -> int:
rachel_area = 7
alex_area = 56
ratio = alex_area / rachel_area
result = ratio
return result
|
Emma works at a restaurant and earns $2 plus 18% commission for every customer she serves. If she served 9 customers, how much did Emma make altogether? | def solve() -> int:
earning_per_customer = 2
commission = 0.18
num_customer =9
total_earning = earning_per_customer * num_customer + commission * earning_per_customer * num_customer
result = total_earning
return result
|
A field hockey team played 20 games and won 12 of them. What fraction of the games did they win? | def solve() -> int:
num_games = 20
num_wins = 12
win_ratio = num_wins / num_games
result = win_ratio
return result
|
Tom started with 30 Pokemon cards. He traded in 8 cards for a new holographic card and then earned another 10 cards from a competition. He then lost 3 cards on his way home. How many Pokemon cards does Tom have now? | def solve() -> int:
cards = 30
cards -= 8
cards += 10
cards -= 3
result = cards
return result
|
Bella has 50 stickers. She gives one-fourth of them to her friend and two-sevenths of the remaining stickers to her brother. How many stickers does she have left? | def solve() -> int:
friend_stickers = 50 / 4
left_stickers = 50 - friend_stickers
brother_stickers = left_stickers * (2 / 7)
result = left_stickers - brother_stickers
return result
|
A car travels 180 miles in 3 hours. What is its average speed in miles per hour? | def solve() -> int:
distance_traveled = 180
time_taken = 3
result = distance_traveled / time_taken
return result
|
Jane wants to bake a dozen cookies, but she only has 8 chocolate chips. If she also wants to add in 5 raisins per cookie, how many raisins does she need to buy in total? | def solve() -> int:
cookies = 12
chocchips = 8
raisinspercookie = 5
totalraisins = cookies*raisinspercookie - chocchips
result = totalraisins
return result
|
A bicycle has a wheel diameter of 70 cm. How many times does the wheel rotate when the bicycle travels 1.4 km? | def solve() -> int:
circumference = 70 * 3.14
number_of_rotations = 1.4 * 100 * 100 / circumference
result = round(number_of_rotations)
return result
|
In a dance competition, Emily's team scores 8.5 from one judge, 9.2 from another judge, and 9.6 from a third judge. What is Emily's team's average score? | def solve() -> int:
score1 = 8.5
score2 = 9.2
score3 = 9.6
average_score = (score1 + score2 + score3) / 3
result = average_score
return result
|
Elena needs to replace 18 light bulbs in her house, 8 in the attic, 4 in the kitchen, and 6 in the bedroom. The bulbs come in packs of 6. How many packs will Elena need to buy in total? | def solve() -> int:
attic_bulbs = 8
kitchen_bulbs = 4
bedroom_bulbs = 6
total_bulbs = attic_bulbs + kitchen_bulbs + bedroom_bulbs
packs_needed = (total_bulbs + 5) // 6
result = packs_needed
return result
|
ally had 33 books to give away to her brothers and sisters. She gave away 8 books in January, 6 books in February, and 5 books in March. She gave away the remaining books with 3 in April and 2 in May. How many more books did Sally give away in the busiest month compared to the slowest month? | def solve() -> int:
books_jan = 8
books_feb = 6
books_march = 5
books_april = (33 - books_jan - books_feb - books_march) / 2
books_may = (33 - books_jan - books_feb - books_march - books_april)
busiest_month = max(books_march, books_april)
slowest_month = min(books_march, books_a... |
Sarah wants to lose 8 pounds before her new workout class starts. She starts tracking her calories and doing more strength training. Sarah burns 2,200 calories a day by doing intense strength training. If there are 3,800 calories in a pound of body fat, how many days will it take for her to lose 8 pounds if she sticks ... | def solve() -> int:
burned_per_day = 2200
calories_in_pound = 3800
pounds_to_lose = 8
calories_eaten_per_day = 1300
calories_deficit_per_day = calories_eaten_per_day - burned_per_day
calories_deficit_per_pound = calories_in_pound
calories_deficit_to_lose = calories_deficit_per_pound * p... |
John has 3 turtles, 2 young ones and 1 adult. He has 9 lettuce leaves. Each small turtle needs 1/2 a lettuce leaf per day. The adult turtle needs 1 lettuce leave per day. How many additional lettuce leaves does John need to buy to feed all the turtles for 6 days? | def solve() -> int:
small_turtles = 2
adult_turtle = 1
lettuce_leaves = 9
days = 6
total_small_turtle_leaves = small_turtles * (1/2) * days
total_adult_turtle_leaves = adult_turtle * 1 * days
total_leaves_needed = total_small_turtle_leaves + total_adult_turtle_leaves
additional... |
Lucas owns a small grocery store that charges $1.50 per apple. Two days ago, he sold 30 apples. Yesterday, he sold five more apples than what he sold the previous day. Today, he sold thrice the amount he sold two days ago. How much money did Lucas make for three days? | def solve() -> int:
apples_two_days_ago = 30
apples_yesterday = apples_two_days_ago + 5
apples_today = 3 * apples_two_days_ago
total_money = (apples_two_days_ago + apples_yesterday + apples_today) * 1.50
result = total_money
return result
|
The sum of three consecutive odd integers is 69. What are the integers? | def solve() -> int:
x = (69-3)/3
int1 = x-2
int2 = x
int3 = x+2
result = (int1, int2, int3)
return result
|
Sarah goes to the gym for an hour each day to improve her fitness level. This week, she went to the gym on Tuesday, Thursday, and Saturday. On Thursday, she spent 25 minutes on the treadmill. On Saturday, she spent three times as long on the weight machines as on Tuesday. How long did she spend on the weight machines o... | def solve() -> int:
gym_time = 60
tuesday = 0
thursday = 25
saturday = 0
total_time = (gym_time * 3) - thursday
saturday = total_time / 4
tuesday = (total_time - saturday) / 2
result = tuesday
return result
|
Student: A store owner has 50 items and each item costs $5. If the storeowner sells all the items, how much profit will he make? | def solve() -> int:
number_of_items = 50
price_per_item = 5
total_cost = number_of_items * price_per_item
total_profit = total_cost * 0.8
result = total_profit
return result
|
Ava wants to bake at least 60 cupcakes for her sister's birthday party. She baked 5 cupcakes on the first day. If she bakes twice the number of cupcakes every day, how many cupcakes would she have baked by the end of the week? | def solve() -> int:
total_cupcakes = 5
days = 7
for day in range(2, days+1):
cupcakes_baked = 2 * total_cupcakes
total_cupcakes += cupcakes_baked
total_cupcakes -= 5
result = total_cupcakes
return result
|
A family of 4 eats 2 meals a day for 7 days. If they use 3 plates per meal, how many plates will they need in total for the week? | def solve() -> int:
num_people = 4
num_meals_per_day = 2
num_days = 7
num_plates_per_meal = 3
total_num_meals = num_people * num_meals_per_day * num_days
total_num_plates = total_num_meals * num_plates_per_meal
result = total_num_plates
return result
|
A recipe serves 6 people but you want to make it for 12 people. If you use 2 cups of flour to make the recipe for 6 people, how many cups of flour do you need to make the recipe for 12 people? | def solve() -> int:
serving = 6
required_serving = 12
flour_for_6 = 2
flour_for_12 = (flour_for_6*required_serving)/serving
result = flour_for_12
return result
|
Mrs. Hirano fills 5 liters of water in an empty 6 liter tank. What is the total amount of water in the tank? | def solve() -> int:
volume_original_tank = 6
volume_filled_tank = 5
total_volume = volume_original_tank + volume_filled_tank
result = total_volume
return result
|
Student: A building has five floors, with 20 rooms on each floor. If 90 percent of the rooms in the building are rented at $500/month, how much rental income will the owner of the building receive each year? | def solve() -> int:
floors = 5
rooms = 20
rented_rate = 0.9
rent = 500
rented_rooms = floors * rooms * rented_rate
monthly_income = rented_rooms * rent
yearly_income = monthly_income * 12
result = yearly_income
return result
|
A rectangular garden is 15 feet long and 12 feet wide. How many square feet does the garden cover? | def solve() -> int:
area = 15*12
result = area
return result
|
A room measures 12 feet by 14 feet and it has a rectangular rug on the floor that measures 8 feet by 10 feet. How many square feet of uncovered floor is there in the room? | def solve() -> int:
room_length = 12
room_width = 14
rug_length = 8
rug_width = 10
rug_area = rug_length*rug_width
room_area = room_length*room_width
uncovered_area = room_area-rug_area
result = uncovered_area
return result
|
A grocery store has 18 boxes of apples, each containing 36 apples. If they sell 80% of the boxes, how many apples are left in the store? | def solve() -> int:
total_boxes = 18
apples_per_box = 36
percentage_sold = 80
boxes_sold = total_boxes * percentage_sold / 100
apples_sold = boxes_sold * apples_per_box
apples_left = total_boxes * apples_per_box - apples_sold
result = apples_left
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.