question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
In a jar of 100 jellybeans, 30% of the jellybeans are red and 50% are yellow. How many jellybeans are not red or yellow? | def solve() -> int:
jellyCount = 100
redCount = jellyCount * 0.3
yellowCount = jellyCount * 0.5
otherCount = jellyCount - redCount - yellowCount
result = otherCount
return result
|
A group of 4 friends go out for dinner and the total bill is $200. If they decide to split the bill evenly with tip included, and each friend has $50, how much tip did they leave? | def solve() -> int:
total_bill = 200
num_friends = 4
bill_per_person = total_bill/num_friends
friend_money = 50
tip = bill_per_person - (total_bill/num_friends)
result = tip
return result
|
Mike and Sue are saving money together for a trip. They have saved $150 in total. If Sue has saved twice as much as Mike, how much money has Sue saved? | def solve() -> int:
total_money = 150
mike_money = total_money / 3
sue_money = mike_money * 2
result = sue_money
return result
|
Student: 3. At the beginning of the day there were 56 chairs in a classroom. If Clara adds 21 chairs and James removes 14 chairs and Victoria adds exactly half of the number of chairs that Clara added. How many chairs are in the classroom by the end of the day? | def solve() -> int:
start_chairs = 56
clara_chairs = 21
james_chairs = 14
victoria_chairs = clara_chairs / 2
end_chairs = start_chairs + clara_chairs - james_chairs + victoria_chairs
result = end_chairs
return result
|
Dave is a delivery person. His van has 6 brown packages, 7 purple packages, and 8 pink packages. If the pink packages can carry 10 books, which is half as much as what the purple packages can carry, and the brown packages can carry 3 times as much as the purple packages, how many books can all the packages carry togeth... | def solve() -> int:
brown_packages = 6
purple_packages = 7
pink_packages = 8
purple_capacity = 2 * pink_packages
brown_capacity = 3 * purple_capacity
pink_capacity = 10
total_books = (brown_packages * brown_capacity) + (purple_packages * purple_capacity) + (pink_packages * pink_cap... |
George rounds 91.8 to the nearest whole number. What is the result? | def solve() -> int:
number = 91.8
result = round(number)
return result
|
A 10-foot plank is divided into 5 equal parts. How long is each part in inches? | def solve() -> int:
plank_length = 10 * 12
num_parts = 5
part_length = plank_length / num_parts
result = part_length
return result
|
Student: John harvested 600 oranges and 780 apples from his orchard. If he sells each orange for $1 and each apple for $3, how much money can John earn by selling all his harvest? | def solve() -> int:
oranges = 600
apples = 780
price_orange = 1
price_apple = 3
total_earning = oranges * price_orange + apples * price_apple
result = total_earning
return result
|
Student: Mark went grocery shopping and bought 2 pounds of ground beef for $4 per pound, 1 pound of chicken for $3 per pound, 1 box of pasta for $2, and 2 cans of tomato sauce for $1 each. If he had a 5% off coupon, how much did Mark pay in all? | def solve() -> int:
ground_beef = 2
ground_beef_price = 4
chicken = 1
chicken_price = 3
pasta = 1
pasta_price = 2
tomato_sauce = 2
tomato_sauce_price = 1
coupon = 0.05
total_cost = ground_beef * ground_beef_price + chicken * chicken_price + pasta * pasta_price + tomato_s... |
The sum of four consecutive odd integers is 424. What is the largest number? | def solve() -> int:
fourth_num = int((424/4)+(2/2))
result = fourth_num+2
return result
|
On Monday, Lily swam 20 laps in the pool and then swam 3 times the amount on Tuesday. On Wednesday, she swam half the amount of laps she swam on Monday. How many laps did Lily swim in total during these three days? | def solve() -> int:
monday_laps = 20
tuesday_laps = 3 * monday_laps
wednesday_laps = monday_laps / 2
total_laps = monday_laps + tuesday_laps + wednesday_laps
result = total_laps
return result
|
A jug has a capacity of 1.5 liters. If I fill it up with water to the maximum level, how much water is in the jug? | def solve() -> int:
capacity = 1.5
water_amount = capacity
result = water_amount
return result
|
Possible math questions and python programs: Anna, Ben, Carla, and David like to read books. Anna's book has 100 more pages than Ben's book. Carla's book has half as many pages as Ben's book, and David's book has 1/4 as many pages as Carla's book. If Ben's book has 300 pages, how many pages do they read in total? | def solve() -> int:
ben = 300
anna = ben + 100
carla = ben / 2
david = carla / 4
total = anna + ben + carla + david
result = total
return result
|
A pizza parlor has pizza pies of two sizes. A large pizza costs $12 and a small pizza costs $8. The other night, 3 large pizzas and 5 small pizzas were sold. How much money was earned from pizza sales? | def solve() -> int:
large_cost = 12
num_large = 3
small_cost = 8
num_small = 5
total_sales = (large_cost * num_large) + (small_cost * num_small)
result = total_sales
return result
|
am is saving money for his trip to Europe and starts a savings account. At the end of each month, he deposits $100 into his account. If he does this for 1 year, how much money has he saved? | def solve() -> int:
monthly_deposit = 100
months_in_year = 12
total_savings = monthly_deposit * months_in_year
result = total_savings
return result
|
Noah bought 10 apples and 4 oranges at the supermarket. Each apple cost $0.5, and each orange cost $0.8. He also bought 12 cookies at $0.25 each. How much did Noah spend in total? | def solve() -> int:
apples = 10
apple_cost = 0.5
oranges = 4
orange_cost = 0.8
cookies = 12
cookie_cost = 0.25
total_cost = (apples * apple_cost) + (oranges * orange_cost) + (cookies * cookie_cost)
result = total_cost
return result
|
A store has 50 shirts, and Michael buys 12. If his friend buys thirty times the total number of shirts left in the store, what's 15% of his friend's shirts? | def solve() -> int:
store_shirts = 50
michael_buys = 12
shirts_left = store_shirts - michael_buys
friend_buys = shirts_left * 30
fifteen_percent = friend_buys * 0.15
result = fifteen_percent
return result
|
There are 135 crullers in a bakery. If Jim took away 36 crullers, how many crullers remained in the bakery? | def solve() -> int:
n = 135
j = 0
r = 0
j = 36
r = 99
result = r
return result
|
Juanita has a total of 12 books. She wants to distribute them equally between 3 shelves. How many books will be on each shelf? | def solve() -> int:
total_books = 12
total_shelves = 3
books_per_shelf = total_books // total_shelves
result = books_per_shelf
return result
|
A park has a capacity of 200 people and 120 of them are already in it. If 60% of the people in the park are adults, how many children are there? | def solve() -> int:
capacity = 200
people_in_park = 120
adult_percentage = 60
adults_in_park = people_in_park * (adult_percentage / 100)
children_in_park = people_in_park - adults_in_park
result = capacity - people_in_park + children_in_park
return result
|
Eva is trying to save up for a trip and is able to save $50 a week. She wants to go on the trip in three months. How much will she have saved up for the trip at that point? | def solve() -> int:
weeks = 3 * 4
total_amount = 50 * weeks
result = total_amount
return result
|
Aiden and Ava are siblings. Aiden is 5 years old and Ava is 7 years old. When will their ages add up to 20 years? | def solve() -> int:
aiden_age = 5
ava_age = 7
total_age = aiden_age + ava_age
years_passed = 0
while total_age < 20:
aiden_age += 1
ava_age += 1
years_passed += 1
total_age = aiden_age + ava_age
result = years_passed
return result
|
A car travelled 375 kilometers in 5 hours. If the speed of the car increased by 5 kilometers per hour, how long would it take for the car to travel 500 kilometers at the new speed? | def solve() -> int:
distance = 500
speed = 375 / 5
new_speed = speed + 5
time = distance / new_speed
result = time
return result
|
Tom and Rachel were assigned to clean the pool every day for 2 hours for 8 weeks. However, Tom caught the flu and couldn't work for 1 week. If there are 7 days in a week, how many hours did Rachel work during the 8 weeks? | def solve() -> int:
hours_per_day = 2
total_weeks = 8
sick_weeks = 1
actual_weeks = total_weeks - sick_weeks
rachel_week_hours = hours_per_day * 7
total_hours = rachel_week_hours * actual_weeks
result = total_hours
return result
|
Tessa collected 18 seashells, 15 rocks, and 9 starfish on the beach. Sam collected 12 seashells, 18 rocks, and 6 starfish. How many more items, in percentage, did Tessa collect than Sam? | def solve() -> int:
tessa_total = 18 + 15 + 9
sam_total = 12 + 18 + 6
difference = tessa_total - sam_total
percentage = (difference / sam_total) * 100
result = percentage
return result
|
Jake has 750 marbles that he is seperating into 8 groups. How many marbles should be in each group? | def solve() -> int:
marble_amount = 0
total_marbles = 750
while marble_amount * 8 < total_marbles:
marble_amount += 1
result = marble_amount
return result
|
Student: Alice buys a box of 24 chocolates for $36 and sells each chocolate for $2. She also buys a pack of 12 cookies for $18 and sells each cookie for $2.5. How much money does she earn if she sells all the chocolates and 9 cookies? | def solve() -> int:
chocolates = 24
chocolate_cost = 36
chocolate_price = 2
cookies = 12
cookie_cost = 18
cookie_price = 2.5
cookies_sold = 9
total_cost = chocolate_cost + cookie_cost
total_revenue = chocolates * chocolate_price + cookies_sold * cookie_price
profit = total... |
Maria was walking on a treadmill at a speed of 4 miles per hour. She decided to increase the speed by 20% every minute. There was a fan on the ceiling above her, spinning at a constant rate of 60 revolutions per minute. There was a fly on one of the blades of the fan, and when Maria increased the speed of the treadmill... | def solve() -> int:
treadmill_speed = 4
treadmill_increase = 0.2
fly_speed = 60
fly_increase = 0.1
fan_blade = 3
conversion = 0.0113636
fly_speed_mph = fly_speed * conversion * fan_blade * 2
treadmill_speed_final = treadmill_speed * (1 + treadmill_increase) ** 3
... |
Liam and Mia want to buy a birthday cake for Mia’s brother. The cake costs $20 and they want to give the baker a 20% tip. How much money should Liam and Mia bring in total? | def solve() -> int:
cake_price = 20
tip_percentage = 0.2
tip = cake_price * tip_percentage
result = cake_price + tip
return result
|
Mike wants to buy a shirt. The shirt costs $25, and there is a 10% discount. How much money will he pay for the shirt? | def solve() -> int:
original_price = 25
discount = 0.1
final_price = original_price * (1-discount)
result = final_price
return result
|
Student: - Gina has $120; Harry has $72; Ina has $48. Gina owes Harry $36. Harry owes Ina $24. Ina owes Gina $48. When all debts are paid, how much will Gina and Ina have together in dollars? | def solve() -> int:
gina = 120
harry = 72
ina = 48
gina -= 36
harry -= 24
ina -= 48
result = gina + ina
return result
|
The sum of three consecutive odd numbers is 63. What are the three numbers? | def solve() -> int:
total_sum = 63
a = (total_sum - 3) / 3
b = a + 2
c = b + 2
result = (a, b, c)
return result
|
Student: A shopkeeper bought a watch for $200 and sold it for $260. What is the profit percentage earned? | def solve() -> int:
cost_price = 200
selling_price = 260
profit = selling_price - cost_price
profit_percentage = (profit/cost_price) * 100
result = profit_percentage
return result
|
ix schools participated in a book drive. Lincoln Elementary donated 60 books; Washington Elementary donated three times the number of books than Lincoln Elementary; Adams Elementary donated 40 fewer books than Washington Elementary; Jefferson Middle donated half the number of books than Lincoln Elementary; Madison Midd... | def solve() -> int:
lincoln = 60
washington = 3 * lincoln
adams = washington - 40
jefferson = lincoln / 2
madison = jefferson + 10
monroe = 2 * madison
total = lincoln + washington + adams + jefferson + madison + monroe
result = total
return result
|
A bakery sells loaves of bread for $4 each and muffins for $2 each. They have a loyalty card that gives you a free muffin for every three loaves of bread you buy. How much do you spend if you buy 9 loaves of bread and 6 muffins with the loyalty card? | def solve() -> int:
bread = 4
muffin = 2
loyalty = 3
loaves = 9
muffins = 6
no_card = (bread * loaves) + (muffin * muffins)
free_muffins = loaves // loyalty
with_card = (bread * loaves) + (muffin * (muffins - free_muffins))
result = with_card
return result
|
Alice has a savings of $5000.. She invested this amount into four bank accounts with the following interest rates per year: 3%, 4%, 5% and 6% which correspond to the four bank accounts. Calculate the total interest she will earn for one year. | def solve() -> int:
savings = 5000
rate_1 = 0.03
rate_2 = 0.04
rate_3 = 0.05
rate_4 = 0.06
interest_1 = savings * rate_1
interest_2 = savings * rate_2
interest_3 = savings * rate_3
interest_4 = savings * rate_4
total_interest = interest_1 + interest_2 + interest_3 + interest... |
There are 5 boxes with 50 apples in each box. If each apple costs 25 cents, how much money will it cost to buy all the apples? | def solve() -> int:
boxes = 5
apples_per_box = 50
cost_per_apple = 0.25
total_apples = boxes * apples_per_box
total_cost = total_apples * cost_per_apple
result = total_cost
return result
|
A factory that makes 300 toys per day wants to reduce its waste by 15% in the next quarter. How many toys should the factory make per day in the next quarter to achieve this? | def solve() -> int:
current_production = 300 * 90
target_production = current_production * 0.85
difference = current_production - target_production
reduced_toys = difference / 90
reduced_toys = int(reduced_toys)
result = reduced_toys
return result
|
Ria has 8 pens, 6 pencils, and 4 erasers. She gives half of her pens, one-third of her pencils, and one-fourth of her erasers to her brother. How many items does Ria have left? | def solve() -> int:
pens = 8
pencils = 6
erasers = 4
frac_pens = 1/2
frac_pencils = 1/3
frac_erasers = 1/4
pens_given = pens * frac_pens
pencils_given = pencils * frac_pencils
erasers_given = erasers * frac_erasers
items_left = pens - pens_given + pencils - pencils_given + ... |
Emily is constructing 12 tables with 10 drawers in each table, and 15 chairs with 2 cushions in each chair. She charges $10 per drawer and $5 per cushion. What is the total earning of Emily? | def solve() -> int:
tables = 12
drawers_per_table = 10
chairs = 15
cushions_per_chair = 2
drawer_price = 10
cushion_price = 5
total_drawers = tables * drawers_per_table
total_cushions = chairs * cushions_per_chair
earning_drawers = total_drawers * drawer_price
earning_c... |
acey purchased a bond for $40000 and she received a 5% coupon rate per year until the bond expired in 12 years. How much money did she receive when the bond expired? | def solve() -> int:
initial_investment = 40000
coupon_rate = 5
time = 12
coupon_payment = initial_investment * coupon_rate / 100
total_payment = coupon_payment * time
result = total_payment
return result
|
A retail store has 150 employees, each earning $15 per hour, working 8 hours a day, seven days a week, 5 weeks a month. In December, the number of customers increased, and the store hired 75 more employees. How much money does the retail store pay in total per month after the new hires? | def solve() -> int:
num_employees = 150
wage = 15
hours_per_day = 8
days_per_week = 7
weeks_per_month = 5
total_hours_per_employee = hours_per_day * days_per_week * weeks_per_month
total_num_employees = num_employees + 75
total_pay_per_month = total_num... |
Possible questions and programs are: A box of chocolates is marked down by 25% for a clearance sale. If the original price of the box was $18, how much does Jake pay for it? | def solve() -> int:
discount_rate = 25 / 100
original_price = 18
sale_price = original_price * (1 - discount_rate)
result = sale_price
return result
|
Sarah makes $1200 from her job every week. If she saves 30% of her income each week, how much does she save every month? | def solve() -> int:
income_week = 1200
savings_week = income_week * 0.3
savings_month = savings_week * 4
result = savings_month
return result
|
Gary takes 45 minutes to bike to work, but it takes him an hour and fifteen minutes to bike back home. If he bikes at an average speed of 15 mph on his way to work, what speed does he average on the ride back home? | def solve() -> int:
time_to_work = 45
time_to_home = 75
average_speed_to_work = 15
time_to_work = time_to_work / 60
time_to_home = time_to_home / 60
distance_to_work = average_speed_to_work * time_to_work
average_speed_to_home = distance_to_work / time_to_home
result ... |
If George earns $12000 per quarter and has to pay 12% in taxes, how much will he have left after taxes for the year? | def solve() -> int:
income_per_quarter = 12000
tax_rate = 0.12
taxes_per_quarter = income_per_quarter * tax_rate
take_home_pay_per_quarter = income_per_quarter - taxes_per_quarter
take_home_pay_per_year = take_home_pay_per_quarter * 4
result = take_home_pay_per_year
return result
|
Alex's blender can blend up to 2 cups of fruit at a time. If 3 bananas weigh the same as 5 strawberries, and he has 40 bananas and 30 strawberries to blend, how many loads of blending does he need to do? | def solve() -> int:
banana_weight = 40 * 3
strawberry_weight = 30 * 5
total_weight = banana_weight + strawberry_weight
loads_of_blending = total_weight // 2
result = loads_of_blending
return result
|
Emily needs some new furniture for her apartment. She bought a couch for $500.00, a chair for $200.00, and a coffee table for $150.00. The store was offering a 25% discount on all furniture. Emily also had a 10% off coupon for the entire purchase. How much did Emily pay for her new furniture? | def solve() -> int:
couch_price = 500.00
chair_price = 200.00
table_price = 150.00
discount = 0.25
coupon = 0.10
total_price = couch_price + chair_price + table_price
discounted_price = total_price * (1 - discount)
final_price = discounted_price * (1 - coupon)
result =... |
A shelf is to be used for a book display. If each book is 1 foot wide and they must have at least 0.5 feet between them or the wall, how many books can be displayed on the shelf that is 24 feet long? | def solve() -> int:
shelf_length = 24
book_width = 1
gap_width = 0.5
available_width = shelf_length - 2 * gap_width
number_of_books = available_width // book_width
result = number_of_books
return result
|
Jenny loves to explore her city. Starting from her house, she walks 2 miles to the nearest park. Once she reaches the park, she walks along a river for 12 miles. She then makes a right turn and walks five times the distance she has covered so far to reach the busy market. In the end, Jenny walks halfway back the distan... | def solve() -> int:
home_to_park = 2
park_to_market = 12
round_trip = park_to_market * 2
total_distance = home_to_park + round_trip + round_trip/2
result = total_distance
return result
|
Luisa and Daisy went to the arcade. Luisa played 4 games and Daisy played twice as many. How many games did Daisy play in total? | def solve() -> int:
number_of_games_Luisa = 4
number_of_games_Daisy = number_of_games_Luisa * 2
result = number_of_games_Daisy
return result
|
Student: A room has dimensions 4 meters by 6 meters. A new carpet is being installed which costs $30 per square meter. What is the total cost of the carpet? | def solve() -> int:
length = 4
width = 6
area = length * width
cost_per_sqm = 30
total_cost = area * cost_per_sqm
result = total_cost
return result
|
A group of three cars are driving to different destinations, each with a different number of people. The first car has 3 passengers, the second has 4 passengers, and the third has 2 passengers. If an empty car can go 90 MPH, but each passenger slows it down by 4 MPH, what is the average speed of the three cars? | def solve() -> int:
car1_passengers = 3
car2_passengers = 4
car3_passengers = 2
empty_car_speed = 90
passenger_speed_reduction = 4
car1_speed = empty_car_speed - (car1_passengers * passenger_speed_reduction)
car2_speed = empty_car_speed - (car2_passengers * passenger_speed_reductio... |
A chef spills 5 tablespoons of oil every time while frying. If there are 3 teaspoons in a tablespoon and the chef needs to fry 10 dishes, how many teaspoons of oil will he have to use? | def solve() -> int:
tablespoons_spilled = 5
teaspoons_in_tablespoon = 3
dishes_to_fry = 10
teaspoons_spilled = tablespoons_spilled * teaspoons_in_tablespoon
teaspoons_used = teaspoons_spilled * dishes_to_fry
result = teaspoons_used
return result
|
Kim and Leo are saving money to buy a bike. The bike costs $200. Kim has $80 and Leo has $50. They agree to save $10 each week from their allowance. How many weeks will it take for them to have enough money to buy the bike? | def solve() -> int:
bike_cost = 200
kim_money = 80
leo_money = 50
weekly_saving = 10
number_of_weeks = (bike_cost - (kim_money + leo_money)) / (weekly_saving * 2)
result = number_of_weeks
return result
|
Alison spent 8 hours studying for a math test. She started studying at 7:00 pm and finished at 3:00 am. How many hours have elapsed? | def solve() -> int:
start_hour = 19
end_hour = 3
hours_elapsed = (end_hour + (24 - start_hour))
result = hours_elapsed
return result
|
A car dealership sold 120 cars this week, which is 20% more than the previous week. How many cars were sold in the previous week? | def solve() -> int:
current_week_sales = 120
percent_increase = 0.20
previous_week_sales = current_week_sales / (1 + percent_increase)
result = previous_week_sales
return result
|
Student: Rachel is saving up for a vacation and needs to save 200 dollars. She saves 20 dollars each week after her expenses that are 60 dollars each week. How many weeks it will take her to save enough? | def solve() -> int:
expenses_per_week = 60
savings_per_week = 20
total_savings_needed = 200
weekly_savings_after_expenses = savings_per_week - expenses_per_week
weeks_needed = total_savings_needed / weekly_savings_after_expenses
result = weeks_needed
return result
|
A car has a fuel efficiency of 20 miles per gallon. If it has a fuel tank of 16 gallons, how far can it travel before it needs to be refueled? | def solve() -> int:
fuel_efficiency = 20
fuel_tank_capacity = 16
distance_travelled = fuel_efficiency * fuel_tank_capacity
result = distance_travelled
return result
|
Grandpa John has a $2000 bill that he wants to break into smaller bills so he could give them to his friends. He wants to change 2/5 of the money into $10 bills while the rest into $50 bills. How many pieces of bills will Grandpa John have in all? | def solve() -> int:
total_money = 2000
fraction = 2/5
ten_bill = total_money * fraction
fifty_bill = total_money - ten_bill
ten_bill_pieces = ten_bill / 10
fifty_bill_pieces = fifty_bill / 50
total_pieces = ten_bill_pieces + fifty_bill_pieces
result = total_pieces
... |
Student: Jeannie can run a marathon in 3 hours 45 minutes. How many miles did she run in this time? | def solve() -> int:
time_in_hours = 3
time_in_minutes = 45
total_time_in_minutes = time_in_hours * 60 + time_in_minutes
total_time_in_hours = total_time_in_minutes / 60
distance = 26.2 * total_time_in_hours
result = distance
return result
|
Liam needs to reach the airport before 10:00 a.m. every day. He takes 40 minutes to reach the airport from his home. If he has to take a flight at 11:00 a.m. and he left his home at 9:30 a.m. Will he be able to catch the flight? | def solve() -> int:
time_to_reach_airport = 40
flight_time = 60
departure_time = 9 * 60 + 30
arrival_time = departure_time + time_to_reach_airport
if arrival_time <= (11 * 60):
result = "Yes, Liam will be able to catch the flight."
else:
result = "No, Liam will no... |
For every toy car that Jack buys, he needs 4 batteries. The toy car costs $10.00 and the batteries cost $3.00 per pack. Jack has a 15% off coupon for one pack of batteries. If Jack needs 8 toy cars, how much would it cost to buy the cars and the batteries? | def solve() -> int:
toy_car_cost = 10.00
battery_cost = 3.00
discount = 0.15
num_toy_cars = 8
num_batteries = num_toy_cars * 4
total_toy_car_cost = num_toy_cars * toy_car_cost
total_battery_cost = num_batteries * battery_cost
discounted_battery_cost = total_battery_cost - ... |
A box of cupcakes cost $20 and a bag of lollipops cost $12. If Heidi paid with $60, how many of each item did she purchase? | def solve() -> int:
cupcakes = 20
lollipops = 12
total_cost = 60
number_of_cupcakes = total_cost // cupcakes
number_of_lollipops = total_cost // lollipops
result = (number_of_cupcakes, number_of_lollipops)
return result
|
Molly has 48 buttons. She wants to divide the buttons into 8 piles with the same amount of buttons in each pile. How many buttons should be in each pile? | def solve() -> int:
buttonsTotal = 48
buttonsPerPile = buttonsTotal / 8
result = buttonsPerPile
return result
|
Eric wants to buy some candy bars from a vending machine. The candy bars cost 75 cents each and the machine only accepts quarters. Eric has a dollar bill and 4 quarters. How many candy bars can he buy and how much change will he get? | def solve() -> int:
cents = 100
cents = cents + 4 * 25
money = cents
cost = 75
candy_bars = money // cost
change = money % cost
result = (candy_bars, change)
return result
|
Ben is a babysitter who charges different rates depending on the time of the day. He charges $12 an hour from 9 am to 5 pm, $15 an hour from 5 pm to 9 pm, and $18 an hour from 9 pm to midnight. He works 4 hours on Monday, 6 hours on Tuesday, 5 hours on Wednesday, 3 hours on Thursday, and 7 hours on Friday. He works fro... | def solve() -> int:
times = [(9, 13), (11, 17), (14, 19), (9, 12), (16, 23)]
earnings = []
for t in times:
e = 0
for h in range(t[0], t[1]):
if h >= 9 and h < 17:
rate = 12
elif h >= 17 and h < 21:
rate = 15
else:
rate = 18
e = e... |
In a class of 25 students, 12 are boys and the rest are girls. What is the percentage of girls in the class? | def solve() -> int:
total_students = 25
boys = 12
girls = total_students - boys
percentage_of_girls = girls / total_students * 100
result = percentage_of_girls
return result
|
In Brazil, it costs $3 to plant a tree. Each tree can produce 10 pounds of oranges a year. Each pound of oranges can be sold for $0.5. How many trees does a farmer need to plant to make a profit of $1000 a year? | def solve() -> int:
cost_per_tree = 3
oranges_per_tree = 10
oranges_per_pound = 0.5
profit = 1000
revenue_per_tree = oranges_per_tree * oranges_per_pound
income_per_tree = revenue_per_tree - cost_per_tree
trees = profit / income_per_tree
result = trees
return result
|
Samantha can make brownies with 1 box of brownie mix for 16 brownies. If each box costs $3.00, and she makes brownies once a week for 26 weeks, how much does she spend on brownie mix? | def solve() -> int:
boxes_of_brownie_mix = 1
brownies_per_box = 16
cost_per_box = 3.00
weeks = 26
total_brownies = boxes_of_brownie_mix * brownies_per_box
total_cost = cost_per_box * boxes_of_brownie_mix * weeks
result = total_cost
return result
|
8. In a box, there are 12 boxes and each box has 15 items in it. How many items are there in total? | def solve() -> int:
boxes = 12
items_per_box = 15
total_items = boxes * items_per_box
result = total_items
return result
|
A runner jogs at a speed of 6 mph for the first 2 hours of his journey. How fast must he run for the next 4 hours to have an average speed of 8 mph for the whole trip? | def solve() -> int:
distance1 = 6 * 2
distance2 = (8 * 6) - distance1
required_speed = distance2 / 4
result = required_speed
return result
|
Jeff placed a box on a weighing scale which weighed 2 pounds. He then added enough marbles to make it double the weight and finally added another 3 pounds of toys. If he added enough dolls to triple the weight once more, what was the total weight of the box of toys, in pounds? | def solve() -> int:
scale_weight = 2
marbles_weight = scale_weight * 2
toys_weight = marbles_weight + 3
dolls_weight = toys_weight * 3
total_weight = scale_weight + marbles_weight + toys_weight + dolls_weight
result = total_weight
return result
|
Tyler had 420 marbles in a jar. He distributed them evenly into 6 bags. How many marbles were in each bag? | def solve() -> int:
total = 420
bags = 6
result = total//bags
return result
|
Mia has $600 deposited into her savings account, which earns 4% interest per year. How much money will Mia have in her savings account after one year? | def solve() -> int:
initial_balance = 600
interest_rate = 0.04
interest_earned = initial_balance * interest_rate
new_balance = initial_balance + interest_earned
result = new_balance
return result
|
Liam has five containers of juice. One container has 12 oz, one has 14 oz, one has 22 oz, one has 18 oz, and one has 9 oz. Liam pours the 9 oz container into the same container with the 14 oz container. He then pours the contents of the 12 oz container into a different container and then pours that container's contents... | def solve() -> int:
c1 = 12
c2 = 14
c3 = 22
c4 = 18
c5 = 9
temp = c5 + c2
c2 = temp
temp = c1
c1 = 0
temp += c2
c3 += temp
temp = c4
c4 = 0
c3 += temp
result = c3
return result
|
Student: Dan has played 10 soccer games and scored an average of 60 points each, if he wants to have an average of 70 in the season, what is the minimum number of points he needs to score in the remaining 6 games? | def solve() -> int:
total_games = 10
average_score = 60
target_average = 70
remaining_games = 6
total_score_so_far = total_games * average_score
target_total_score = remaining_games * target_average
needed_score = target_total_score - total_score_so_far
result = needed_score
return ... |
Diana rode her bike for 50 kilometers in 2 hours. What was the average speed of her bike in kilometers per hour? | def solve() -> int:
distance = 50
time = 2
average_speed = distance / time
result = average_speed
return result
|
Student: Tom went shopping and bought a pack of 24 crayons. He then used 15 of them in a project. How many crayons does he have left? | def solve() -> int:
crayons_bought = 24
crayons_used = 15
crayons_left = crayons_bought - crayons_used
result = crayons_left
return result
|
Student: A rectangular room is 10 feet long and 8 feet wide. What is the area of the room in square feet? | def solve() -> int:
length = 10
width = 8
area = length * width
result = area
return result
|
Student: Karen had $33 in her account. She went to the store and spent two-thirds of her money. She then gave 5 times as much as she spent to her friend. How much money did Karen give her friend? | def solve() -> int:
money_in_account = 33
money_spent = money_in_account * (2/3)
money_given = money_spent * 5
result = money_given
return result
|
Haley wants to throw a party for her friends, but first, she needs to pay her rent. The party will cost $1,000, and her rent is $500. If Haley has saved $200/month for 8 months, how much money will she have left after paying her rent? | def solve() -> int:
party_cost = 1000
rent = 500
savings_per_month = 200
num_of_months = 8
total_savings = savings_per_month * num_of_months
money_left = total_savings - rent
result = money_left
return result
|
Juan has a garden where he grows 1 pound of tomatoes and 1/2 pound of peppers per week. If he wants to feed his family of 5 with vegetables from his garden, how many pounds of each vegetable will he need to grow per week, and how much will it cost if tomato seeds are $2.50 per packet and pepper seeds are $1.50 per pack... | def solve() -> int:
tomatoes_per_week = 1
peppers_per_week = 1/2
total_veggies_per_week = tomatoes_per_week + peppers_per_week
family_size = 5
veggies_needed_per_week = total_veggies_per_week * family_size
tomato_seed_cost = 2.50
pepper_seed_cost = 1.50
total_seed_cost = (tomato_see... |
Possible new questions and programs are: Julie has 24 pencils in her backpack, and she wants to give some to her friends. She decides to give 2 pencils to each of her 5 friends, and then keep the rest for herself. How many pencils does Julie have left in her backpack? | def solve() -> int:
pencils = 24
pencils_given = 2 * 5
pencils_left = pencils - pencils_given
result = pencils_left
return result
|
Student: Miranda loves to bake cookies for her friends. On Monday she baked 24 cookies and gave away half of them. On Tuesday she baked twice as many cookies as she did on Monday and kept all of them. On Wednesday she baked 36 cookies and gave away three quarters of them. On Thursday she baked 12 cookies and ate four o... | def solve() -> int:
monday_cookies = 24
tuesday_cookies = monday_cookies * 2
wednesday_cookies = 36
thursday_cookies = 12
monday_left = monday_cookies / 2
tuesday_left = tuesday_cookies
wednesday_left = wednesday_cookies * (1/4)
thursday_left = thursday_cookies - 4
result = monday_le... |
John bought 4 items at a store. The first item cost $5, the second item cost $18, the third item cost $12 and the last item cost $9. If John had $50, how much money does he have left after buying these items? | def solve() -> int:
total_cost = 5 + 18 + 12 + 9
money_left = 50 - total_cost
result = money_left
return result
|
A room has a length of 10 feet, a width of 8 feet, and a height of 9 feet. What is the total surface area of the walls in square feet? | def solve() -> int:
length = 10
width = 8
height = 9
area1 = length * height
area2 = width * height
total_area = (area1 + area2) * 2
result = total_area
return result
|
Sophie watches her favorite show every night for 35 minutes but misses Thursday nights. If she watches every day of the week except Friday, how much time does she spend watching the show? | def solve() -> int:
minutes_per_episode = 35
days_watched_per_week = 6
minutes_watched_per_week = minutes_per_episode * days_watched_per_week
minutes_watched_per_week_without_thursday = minutes_watched_per_week - minutes_per_episode
total_minutes_watched = minutes_watched_per_week_without_thursday
... |
A recipe calls for 2 cups of flour to make 24 cookies. If you want to make 48 cookies, how many cups of flour do you need? | def solve() -> int:
cups_of_flour = 2
cookies = 24
desired_cookies = 48
cups_of_flour_needed = (cups_of_flour * desired_cookies) / cookies
result = cups_of_flour_needed
return result
|
Olivia's monthly salary is $7000, and she spends $1500 on rent, and $800 on groceries. If she wants to save $1000 every month, how much can she spend on travel expenses? | def solve() -> int:
monthly_salary = 7000
monthly_rent = 1500
monthly_groceries = 800
monthly_savings_goal = 1000
total_monthly_expenses = monthly_rent + monthly_groceries + monthly_savings_goal
monthly_travel_expenses = monthly_salary - total_monthly_expenses
result = monthly_travel_expense... |
Student: A factory produced 230 units in the first hour, and the production rate increased by 20% each subsequent hour. How many units were produced in the first four hours? | def solve() -> int:
units_produced_1st_hour = 230
units_produced_2nd_hour = units_produced_1st_hour * 1.2
units_produced_3rd_hour = units_produced_2nd_hour * 1.2
units_produced_4th_hour = units_produced_3rd_hour * 1.2
result = units_produced_1st_hour + units_produced_2nd_hour + units_produced_3rd_ho... |
A swimming pool has 6 times as many lap lanes as diving boards. If there are 30 lanes and diving boards in total, how many diving boards are there? | def solve() -> int:
lanes = 30
diving_boards = lanes / (6 + 1)
result = diving_boards
return result
|
Emma is saving money for her dream vacation. Every fortnight she puts $50 into her savings jar. When the jar is full, which takes 30 fortnights, Emma takes all the money out and transfers it to her bank account. She repeats this process 3 times. How much money did Emma transfer to her bank account in total? | def solve() -> int:
fortnights = 30
savings_per_fortnight = 50
jar_total = fortnights * savings_per_fortnight
repetitions = 3
total_transfer = jar_total * repetitions
result = total_transfer
return result
|
A school has a total of 30 desks. There are four times more desks in the first classroom than in the second classroom. How many desks are in each classroom? | def solve() -> int:
first_classroom = 0
second_classroom = 0
total_desks = 30
first_classroom = total_desks/ 5
second_classroom = total_desks / 4 - first_classroom
result = first_classroom, second_classroom
return result
|
A farmer decides to switch from growing wheat to growing corn. Previously, it cost them $200 to grow 50 bushels of wheat and they sell each bushel for $10. Now, it costs them $240 to grow 60 bushels of corn but they sell each bushel for $12. How much more profit do they make per month growing corn instead of wheat? | def solve() -> int:
wheat_cost = 200
wheat_bushels = 50
wheat_price = 10
corn_cost = 240
corn_bushels = 60
corn_price = 12
wheat_profit = (wheat_price * wheat_bushels) - wheat_cost
corn_profit = (corn_price * corn_bushels) - corn_cost
profit_difference = corn_profit - ... |
Student: Ella has 24 coloring books. She gives one third of them away and then gives half of the remaining books to her younger brother. How many books does Ella still have? | def solve() -> int:
books = 24
books = books - books/3
books = books - books/2
result = books
return result
|
If 6 girls can finish a job in 10 days, how many days will it take 3 girls to finish the same job? | def solve() -> int:
num_girls_1 = 6
days_1 = 10
num_girls_2 = 3
days_2 = (num_girls_1*days_1)/num_girls_2
result = days_2
return result
|
Julia spends 15 minutes reading a book every day. She reads 5 pages per minute. How many pages does she read in 10 days? | def solve() -> int:
reading_time = 15
reading_speed = 5
days = 10
total_pages = reading_time * reading_speed * days
result = total_pages
return result
|
Nina and her friends are playing a game with marbles. Nina has 12 marbles and she gives 3 to Alice and 2 to Bob. Then she wins 4 marbles from Alice and 2 marbles from Bob. She loses 5 marbles to Chris and 3 marbles to David. How many marbles does Nina have at the end? | def solve() -> int:
marbles = 12
marbles = marbles - 3 - 2
marbles = marbles + 4 + 2
marbles = marbles - 5 - 3
result = marbles
return result
|
Student: Eva is 4 years younger than Adam. Adam is 9 times as old as Jay. If Jay is 3, how old is Eva? | def solve() -> int:
eva_age = 0
adam_age = 0
jay_age = 3
adam_age = jay_age * 9
eva_age = adam_age - 4
result = eva_age
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.