question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Jenna is planning a party. The amount of invitations she sent out is equal to twice the amount of decorations she bought plus 5. If she sent out 85 invitations, how many decorations did she buy? | def solve() -> int:
invitations = 85
decorations = (invitations - 5) / 2
result = decorations
return result
|
Tina has 80 socks, and she gives away 45% of them. How many socks does Tina have left? | def solve() -> int:
initial_socks = 80
percent_given_away =.45
num_left = initial_socks*(1-percent_given_away)
result = num_left
return result
|
Amanda is trying to count the cats in her neighborhood, but they keep running away from her. She misses 10 cats that hide under cars and double-counts 2 that she thought were different. If Amanda thinks she counted 30 cats, how many are really there? | def solve() -> int:
result = 22
return result
|
If Jason works 40 hours a week at a rate of $10 per hour for the first 35 hours and $15 per hour for the last 5 hours, how much money does he make in a week? | def solve() -> int:
hours_worked = 40
rate_one = 10
rate_two = 15
money_made = ((hours_worked - 5) * rate_one) + (5 * rate_two)
result = money_made
return result
|
A baker makes 24 muffins and sells them for $1.50 each. The ingredients cost him $0.25 per muffin and the electricity costs him $0.10 per muffin. How much profit does he make from selling the muffins? | def solve() -> int:
revenue = 24 * 1.5
total_cost = 24 * (0.25 + 0.1)
profit = revenue - total_cost
result = profit
return result
|
A group of friends wants to go to a concert that costs $40 per ticket. However, if they buy 5 tickets at once, they get a $10 discount. How much will it cost for 7 people to go to the concert? | def solve() -> int:
original_price_per_ticket = 40
discounted_price_per_ticket = original_price_per_ticket - 10
num_tickets = 7
price_per_group_of_5 = discounted_price_per_ticket * 5
price_for_single_tickets = original_price_per_ticket * (num_tickets % 5)
total_price = (price_per_group_of_5 * (n... |
Student: A car travels 125 miles in 2.5 hours. What is the speed of the car in miles per hour? | def solve() -> int:
distance = 125
time = 2.5
speed = distance / time
result = speed
return result
|
Jerry is throwing a pizza party for 25 of his friends. He wants to make sure each person has at least 2 slices of pizza. Each pizza is sliced into 6 slices. How many pizzas does he need to order? | def solve() -> int:
num_friends = 25
min_slices_per_person = 2
slices_per_pizza = 6
total_slices_needed = num_friends * min_slices_per_person
num_pizzas_needed = total_slices_needed / slices_per_pizza
result = num_pizzas_needed
return result
|
Student: Mark bought a new car that has a 15 gallon gas tank. He has filled it up with 14.6 gallons of gas. How many gallons are left in the tank? | def solve() -> int:
tank_capacity = 15
gas_filled = 14.6
gas_left = tank_capacity - gas_filled
result = gas_left
return result
|
John has $50. He buys 2 shirts for $15 each and a pair of shoes for $20. How much money does he have left? | def solve() -> int:
shirt_cost = 15
shirts_bought = 2
shirts_total = shirt_cost * shirts_bought
shoes_cost = 20
total_cost = shirts_total + shoes_cost
starting_money = 50
money_left = starting_money - total_cost
result = money_left
return result
|
A coffee shop owner buys coffee beans for $5 per pound and sells it for $10 per pound. If the owner buys 50 pounds of coffee beans, how much profit will they make selling all the coffee beans? | def solve() -> int:
buying_price = 5
selling_price = 10
coffee_weight = 50
profit_per_pound = selling_price - buying_price
total_profit = profit_per_pound * coffee_weight
result = total_profit
return result
|
Here are some possible questions and programs: A bike costs $450 and a helmet costs $75. If a store offers a 10% discount on both items when bought together, how much would a customer save by buying them as a bundle? | def solve() -> int:
original_price = 450 + 75
discounted_price = 0.9 * original_price
saving = original_price - discounted_price
saving = round(saving, 2)
result = saving
return result
|
A company has 100 employees. 80% of the employees were able to attend the company party. Out of those who attended the party, 60% were male and the rest were female. How many female employees attended the party? | def solve() -> int:
employees = 100
attended_employees = employees * 0.80
male_employees = attended_employees * 0.60
female_employees = attended_employees - male_employees
result = female_employees
return result
|
Student: There are 6 red socks and 4 blue socks in a drawer. If Sam randomly selects 2 socks, what is the probability that he selects 2 red socks? | def solve() -> int:
red_socks = 6
blue_socks = 4
total_socks = red_socks + blue_socks
probability = red_socks / total_socks * (red_socks - 1) / (total_socks - 1)
result = probability
return result
|
Lisa's running track is 1,200 meters long. If she ran the first 2 laps in 85 seconds each, the 3rd and 4th lap in 70 seconds each, and the last 2 laps in 90 seconds each, what was her average speed in (m/s) for her entire run? | def solve() -> int:
track_length = 1200
lap1_time = 85
lap2_time = 85
lap3_time = 70
lap4_time = 70
lap5_time = 90
lap6_time = 90
total_time = lap1_time + lap2_time + lap3_time + lap4_time + lap5_time + lap6_time
average_speed = track_length / total_time
result = averag... |
A basketball team had a season win percentage of 60%. If they won 36 games, how many games did they play in total? | def solve() -> int:
win_percentage = 0.6
total_wins = 36
total_games = total_wins / win_percentage
result = total_games
return result
|
Sarah weighs 60 kg. She has two dumbbells, each weighing half her weight, and a weight vest weighing one quarter of her weight. How much total weight is she moving? | def solve() -> int:
dumbbell_weight = (1/2) * 60
weight_vest = (1/4) * 60
total_weight = (2 * dumbbell_weight) + weight_vest
result = total_weight
return result
|
Student: Mallory has a total of 66 pieces of stationery - 18 pencils, 8 erasers and 5 rulers. How many pens does Mallory have? | def solve() -> int:
pencils = 18
erasers = 8
rulers = 5
total = 66
pens = total - pencils - erasers - rulers
result = pens
return result
|
Jenna and her friends ice skated on a lake that was 1000 meters long. They skated 1/2 of the length, taking 20 minutes to do so. They rested for 10 minutes and then skated the remaining distance at the same speed. How long did it take them to complete the entire lake? Ava is estimating the number of apples on a tree. S... | def solve() -> int:
length_of_lake = 1000
distance_skated = length_of_lake / 2
time_taken = 20
rest_time = 10
speed = distance_skated / (time_taken / 60)
remaining_distance = length_of_lake - distance_skated
time_remaining = remaining_distance / speed
total_time = time_taken + rest_time ... |
9. Amber went to a store and purchased a phone, a tablet and a laptop for a total of $750. The phone costs $300, the tablet costs $250, and the laptop costs $200. How much change should Amber receive? | def solve() -> int:
total_cost = 300 + 250 + 200
amount_paid = 750
change = amount_paid - total_cost
result = change
return result
|
Megan has 16 ducks and she got 7 more ducks. How many ducks does Megan have now? | def solve() -> int:
number_of_ducks = 16
more_ducks = 7
total_ducks = number_of_ducks + more_ducks
result = total_ducks
return result
|
The ratio of boys to girls in a class is 3 to 5. If there are 36 girls, how many students are in the class? | def solve() -> int:
total_ratio = 3 + 5
boys_ratio = 3 / total_ratio
students_ratio = 36 / 5
total_students = students_ratio / boys_ratio
result = total_students
return result
|
A soccer ball was kicked off the ground with an initial upwards velocity of 20 meters per second. How long will it take for the ball to hit the ground, assuming no air resistance? | def solve() -> int:
velocity = 20
gravity = 9.8
time = velocity/gravity
result = time
return result
|
A car travels 240 miles with an average speed of 60 miles per hour. How much time does it take to complete the journey? | def solve() -> int:
distance = 240
speed = 60
time = distance / speed
result = time
return result
|
Kelly has 10 toys and gives 3 to her friend. Her friend gives her twice as many back. How many toys does Kelly have now? | def solve() -> int:
toys = 10
toys -= 3
toys += (3*2)
result = toys
return result
|
There are 5 more turtles than lizards, and 2 fewer than 3 times as many lizards as geckos. If there are 42 reptiles total, how many turtles are there? | def solve() -> int:
total_reptiles = 42
geckos = total_reptiles // (3+2+1)
lizards = 3 * geckos - 2
turtles = lizards + 5
result = turtles
return result
|
A pizza restaurant can make 8 pizzas in 30 minutes. How many pizzas can it make in 1 hour? | def solve() -> int:
num_pizzas_30min = 8
num_pizzas_60min = num_pizzas_30min * 2
result = num_pizzas_60min
return result
|
A company will produce 100,000 pencils in a month. The company spent $20,000 for the raw materials and $5,000 for the labor force. How much is the production cost per pencil? | def solve() -> int:
Pencil_production = 100000
Material_cost = 20000
Labor_cost = 5000
Total_cost = Material_cost + Labor_cost
Cost_per_pencil = Total_cost/Pencil_production
result = Cost_per_pencil
return result
|
Ethan wants to save up enough money to buy a video game that costs $60. He earns $10 per week from his allowance. How many weeks will it take for him to save enough to buy the game? | def solve() -> int:
allowance_per_week = 10
cost_of_game = 60
weeks_needed = cost_of_game / allowance_per_week
result = weeks_needed
return result
|
Megan and Riley shared 44 marbles equally. How many marbles did each of them get? | def solve() -> int:
number_marbles_to_share = 44
result = number_marbles_to_share / 2
return result
|
Madison and Emily went to the movies. Madison paid $8.50 for her ticket. Emily paid 20% more than Madison. How much did Emily pay? | def solve() -> int:
madison_ticket = 8.50
emily_ticket = madison_ticket * 1.20
result = emily_ticket
return result
|
A square room has a perimeter of 20 meters. What is the area of the room? | def solve() -> int:
perimeter = 20
side_length = perimeter/4
area = side_length * side_length
result = area
return result
|
Student: An office has collected a total of 96 used toners. It takes 8 used toners to make 1 toner recycling box. How many toner recycling boxes can be created with the used toners? | def solve() -> int:
total_toners = 96
toners_per_box = 8
num_boxes = total_toners // toners_per_box
result = num_boxes
return result
|
A delivery truck travels 150 miles in 3 hours. What is the truck's average speed in miles per hour (mph)? | def solve() -> int:
distance = 150
time = 3
avg_speed = distance / time
result = avg_speed
return result
|
Student: Ben started walking last month and he has grown 5.3 inches since then. Ben's sister Leah is 5.4 inches taller than him. How tall was Leah before Ben started to walk? | def solve() -> int:
ben_growth = 5.3
leah_advantage = 5.4
ben_previous = 36
ben_current = ben_previous + ben_growth
leah_current = ben_current + leah_advantage
leah_previous = leah_current - leah_advantage
result = leah_previous
return result
|
David is painting his bedroom. He needs to paint 4 walls that are each 10 feet long and 8 feet high. He can paint 50 square feet with one gallon of paint. One gallon of paint costs $25. How much money will he spend on paint if he wants to apply two coats of paint? | def solve() -> int:
wall_area = 10 * 8
total_area = wall_area * 4
paint_needed = total_area * 2 / 50
cost_of_paint = paint_needed * 25
result = round(cost_of_paint, 2)
return result
|
A company has 100 employees, and 30% of them work in the sales department. How many employees work in the sales department? | def solve() -> int:
total_employees = 100
sales_pct = 0.3
num_sales_employees = total_employees * sales_pct
result = num_sales_employees
return result
|
Student: Isaac has a piggy bank with 100 quarters, 80 dimes, 60 nickels, and 40 pennies. He wants to buy a video game that costs $59.99. How many more dollars does he need to save to buy the game? | def solve() -> int:
quarters = 100
dimes = 80
nickels = 60
pennies = 40
total_amount = quarters * 0.25 + dimes * 0.1 + nickels * 0.05 + pennies * 0.01
cost_of_game = 59.99
amount_needed = cost_of_game - total_amount
result = round(amount_needed)
return result
|
There are four buckets with different amounts of water. The first bucket has 10 liters of water, the second bucket has 12 liters of water, the third bucket has 15 liters of water, and the fourth bucket has 18 liters of water. Every 10 minutes, 2 liters of water are poured from the first bucket to the second, 3 liters o... | def solve() -> int:
water1 = 10
water2 = 12
water3 = 15
water4 = 18
for _ in range(3):
water1 = water1 - 2
water2 = water2 + 2
water2 = water2 - 3
water3 = water3 + 3
water3 = water3 - 4
water4 = water4 + 4
water4 = water4 - 5
water1 = water1 + 5
... |
A pack of 6 pencils contains 36 pieces of pencil leads. How many pencil leads are there in each pencil? | def solve() -> int:
num_pencils = 6
num_leads = 36
result = num_leads / num_pencils
return result
|
A restaurant’s chef can make 20 pizzas in an hour. If the restaurant is open for 6 hours every day, how many pizzas can the chef make in a week? | def solve() -> int:
pizzas_per_hour = 20
hours_per_day = 6
days_per_week = 7
pizzas_per_week = pizzas_per_hour * hours_per_day * days_per_week
result = pizzas_per_week
return result
|
Student: There are 12 cupcakes for $3.50. If Katherine only wants 3 cupcakes, how much will she pay? | def solve() -> int:
total_cupcakes = 12
total_price = 3.50
katherine_cupcakes = 3
price_per_cupcake = total_price / total_cupcakes
katherine_price = price_per_cupcake * katherine_cupcakes
result = katherine_price
return result
|
Peter is purchasing 40 boxes of oranges for his store. Each box contains 5 oranges and costs $3. If Peter also needs to buy 20 bags for $1 each, how much will the total cost be? | def solve() -> int:
price_box = 3
number_box = 40
number_orange = 5
price_bag = 1
number_bag = 20
total_cost = price_box*number_box*number_orange + price_bag*number_bag
result = total_cost
return result
|
- Ruby collects 24 seashells from the beach. She gives half of them to her sister and keeps the rest for herself. How many seashells does Ruby have? | def solve() -> int:
shells_given = 24 / 2
shells_kept = 24 - shells_given
result = shells_kept
return result
|
Ryan is building a bookshelf and needs to buy enough wood to complete the project. If the bookshelf is 5 meters long, 1 meter wide and 0.5 meters high, how many cubic meters of wood does Ryan need to buy? | def solve() -> int:
length = 5
width = 1
height = 0.5
volume = length * width * height
cubic_meters = volume
result = cubic_meters
return result
|
Emily has to spend $1.75 per gallon of gas for her car. Her car has a fuel efficiency of 30 miles per gallon. If she drives at a rate of 55 miles per hour, how much will it cost her to travel 250 miles? | def solve() -> int:
gas_price = 1.75
fuel_efficiency = 30
distance = 250
speed = 55
gas_needed = distance / fuel_efficiency
time = distance / speed
total_cost = gas_needed * gas_price
result = total_cost
return result
|
John bought a bag of candy costing $12.25 and a box of chocolates costing $5.50. If he gave the cashier $20, how much change did he receive? | def solve() -> int:
candy_cost = 12.25
chocolate_cost = 5.50
amount_given = 20
total_cost = candy_cost + chocolate_cost
change = amount_given - total_cost
result = change
return result
|
In a class of 25 students, 60% of them are girls. How many boys are there? | def solve() -> int:
total_students = 25
girls = total_students * 0.6
boys = total_students - girls
result = boys
return result
|
The cost of 1 shirt is $20. There is a discount of 15% on every shirt. What will be the cost of 10 shirts after the discount? | def solve() -> int:
shirt_cost = 20
discount = 0.15
num_of_shirts = 10
total_cost = (shirt_cost * num_of_shirts) * (1 - discount)
result = f'The cost of 10 shirts after the discount is ${total_cost}.'
result = total_cost
return result
|
A customer spends $56 on 4 items In a grocery store. If one of the items is on sale and costs 25% less, how much did the customer save? | def solve() -> int:
total_price_paid = 56
num_items = 4
sale_discount_percent = 25
price_per_item = total_price_paid/num_items
sale_discount_price = (price_per_item - ((sale_discount_percent/100) * price_per_item)) * 1
save_amount = sale_discount_price
result = save_amoun... |
Ben likes to drink coffee and he has a coffee maker that can make 8 cups of coffee at a time. He uses 10 grams of coffee beans and 150 milliliters of water per cup. He has 1 kilogram of coffee beans and 5 liters of water at home. How many times can he use his coffee maker before he runs out of either coffee beans or wa... | def solve() -> int:
coffee_beans_per_cup = 10
water_per_cup = 150
coffee_beans_per_coffee_maker = coffee_beans_per_cup * 8
water_per_coffee_maker = water_per_cup * 8
coffee_beans_at_home = 1000
water_at_home = 5000
times_with_coffee_beans = coffee_beans_at_home // coffee_beans... |
Marvin and Elizabeth bought some candy. In total they spent $18 and got 10 items. How much did each item cost? | def solve() -> int:
items = 10
totalCost = 18
eachItem = totalCost/items
result = eachItem
return result
|
You need 36 colored pencils for a project. You can buy a pack of 12 for $5. How much will it cost to buy all the colored pencils needed? | def solve() -> int:
colored_pencil_total = 36
colored_pencils_per_pack = 12
packs_needed = colored_pencil_total//colored_pencils_per_pack + 1
cost_per_pack = 5
total_cost = packs_needed * cost_per_pack
result = total_cost
return result
|
At Pizza Parlor, pizzas cost $15 each with a minimum order of 2 pizzas. If Max spent $45 on pizzas, how many extra pizzas did he order? | def solve() -> int:
cost_per_pizza = 15
minimum_order = 2
total_spent = 45
minimum_order_cost = cost_per_pizza * minimum_order
extra_pizzas_cost = total_spent - minimum_order_cost
extra_pizzas = extra_pizzas_cost // cost_per_pizza
result = extra_pizzas
print
... |
In a library, there are 540 books in the children’s section, 350 in the non-fiction section, and 220 in the other section. The librarian bought 100 new children’s books and 50 new non-fiction books. Then 1/4 of children’s books, 2/3 of non-fiction books, and 3/4 of other section books were borrowed. How many books were... | def solve() -> int:
children_books = 540
nonfiction_books = 350
other_books = 220
new_children_books = 100
new_nonfiction_books = 50
children_books += new_children_books
nonfiction_books += new_nonfiction_books
fraction_borrowed = 1/4
borrowed_children = children_books * fraction_bor... |
Adam is saving money and wants to calculate how much interest he will earn in one year. He knows he has $3,000 and earns 5% interest each year. How much interest will he earn in one year? | def solve() -> int:
initial_balance = 3000
interest_rate = 0.05
interest_earned = initial_balance * interest_rate
result = interest_earned
return result
|
A recipe calls for 2 cups of sugar to make 6 cookies. If you want to make 18 cookies, how many cups of sugar do you need? | def solve() -> int:
cookies_in_recipe = 6
sugar_in_recipe = 2
cookies_to_make = 18
sugar_per_cookie = sugar_in_recipe / cookies_in_recipe
total_sugar_needed = sugar_per_cookie * cookies_to_make
result = total_sugar_needed
return result
|
Carol bakes 12 cupcakes every hour for 4 hours. She sells them for $1.5 each. She spends $0.5 on ingredients for each cupcake. She wants to earn at least $100 from the sale. She decides to increase the price by $0.25 every hour. How many hours does she need to bake and sell cupcakes? | def solve() -> int:
p = 1.5
h = 4
profit = 0
while profit < 100:
profit = profit + 12 * (p - 0.5 + 0.25 * h)
h = h + 1
result = h
return result
|
On the fourth day, the number of fish-eaters increased by 300. How many birds were there on the fourth day? | def solve() -> int:
before_birds = 0
after_birds = 300
increase = 300
for i in range(3):
before_birds = after_birds
after_birds = after_birds * 2
result = before_birds + increase
return result
|
The average of four numbers is 20. If three of the numbers are 24, 15, and 18, what is the fourth number? | def solve() -> int:
average = 20
num1 = 24
num2 = 15
num3 = 18
sum_of_all_numbers = (average*4)
sum_of_first_three_numbers = num1+num2+num3
fourth_number = sum_of_all_numbers - sum_of_first_three_numbers
result = fourth_number
return result
|
At their fourth away game, Lola's team scored two points more than the score at the first away game. How many points did the team score at the first away game? | def solve() -> int:
fourth_away_points = 51
points_difference = 2
first_away_points = fourth_away_points - points_difference
result = first_away_points
return result
|
If a recipe asks for 2 cups of flour and 3 cups of sugar to make 8 cookies, how much flour and sugar will you need to make 24 cookies? | def solve() -> int:
flour_per_cookie = 0.25
sugar_per_cookie = 0.375
total_cookies = 24
flour_needed = flour_per_cookie * total_cookies
sugar_needed = sugar_per_cookie * total_cookies
result = (flour_needed, sugar_needed)
return result
|
Student: Jessie purchased 14 packages of pen. Each package contain 8 pens, and each pen weigh 0.15 ounces. How many ounces of pen did she buy? | def solve() -> int:
package = 14
pens_per_package = 8
weight_per_pen = 0.15
total_pens = package * pens_per_package
total_weight = total_pens * weight_per_pen
result = total_weight
return result
|
During the bowling tournament, Liam bowled 135, Tyler bowled 205, Sarah bowled 176, and Ava bowled 112. How many more pins did Tyler knock down than the other three bowlers combined? | def solve() -> int:
liam = 135
tyler = 205
sarah = 176
ava = 112
total_pins = liam + sarah + ava
tyler_difference = tyler - total_pins
result = tyler_difference
return result
|
Student: Alice and her father went on a cross-country skiing adventure. They skied at 7 miles per hour for 5 hours, stopped for lunch, and then continued at 6 miles per hour for 3 hours. The next day, they skied at 5 miles per hour for another 5 hours. In total, how far did they travel, in miles, during their skiing tr... | def solve() -> int:
speed1 = 7
time1 = 5
speed2 = 6
time2 = 3
speed3 = 5
time3 = 5
distance1 = speed1 * time1
distance2 = speed2 * time2
distance3 = speed3 * time3
result = distance1 + distance2 + distance3
return result
|
ara charges $15 to clean a window and 40% more to scrub the moulding. If she cleans 9 windows and scrubs 7 mouldings, how much money does she make? | def solve() -> int:
charge_for_window = 15
charge_for_moulding = 15 * 1.4
total_money_made_window = charge_for_window * 9
total_money_made_moulding = charge_for_moulding * 7
result = total_money_made_window + total_money_made_moulding
return result
|
A farm produces 8000 liters of milk daily. If the farm supplies milk to a dairy factory, which in turn processes and packages the milk for sale, and the farm receives $0.45 per liter of milk supplied, calculate the daily income of the farm from the sale of milk. | def solve() -> int:
milk_per_day = 8000
payment_per_liter = 0.45
total_payment = milk_per_day * payment_per_liter
result = total_payment
return result
|
A triangle has a base of 8 feet and a height of 6 feet. What is the area of the triangle in square feet? | def solve() -> int:
base = 8
height = 6
area = (base*height)/2
result = area
return result
|
``` A recipe calls for 2 cups of milk and 3 eggs to make 6 pancakes. How many cups of milk and eggs would you need to make 15 pancakes? | def solve() -> int:
milk_per_pancake = 2/6
eggs_per_pancake = 3/6
total_milk = milk_per_pancake * 15
total_eggs = eggs_per_pancake * 15
result = total_milk + total_eggs
return result
|
A teacher has 25 students in her class. She wants to divide them into 5 groups of equal size. How many students will be in each group? | def solve() -> int:
students_per_group = 25/5
result = students_per_group
return result
|
Student: Mike has rented a limousine for 6 hours for his wedding. If the hourly rate of the limousine is $90, what is the total cost of renting the limousine for Mike? | def solve() -> int:
hourly_rate = 90
rental_hours = 6
total_cost = hourly_rate * rental_hours
result = total_cost
return result
|
Tom has one more than five times as many shoes as Steve has. If Steve has two pairs of shoes, how many pairs of shoes does Tom have? | def solve() -> int:
steve_shoes = 2
tom_shoes = 5 * steve_shoes + 1
result = tom_shoes
return result
|
Sarah's cross country team runs 15 miles, 2 kilometers, and 3 laps. Their opponents run half the number of miles but triple the number of kilometers and double the number of laps. What is the total distance ran by both teams added together? | def solve() -> int:
miles = 15
kilometers = 2
laps = 3
opponent_miles = miles / 2
opponent_kilometers = kilometers * 3
opponent_laps = laps * 2
total_distance = miles + opponent_miles + (kilometers + opponent_kilometers) / 1.609 + laps + opponent_laps
result = total_distan... |
A beekeeper has 15 hives, and each hive has 20 bees. Each bee has 6 legs and 2 wings. How many legs and wings does the beekeeper need to count? | def solve() -> int:
num_hives = 15
num_bees = 20
bee_legs = 6
bee_wings = 2
total_legs = num_hives * num_bees * bee_legs
total_wings = num_hives * num_bees * bee_wings
result = total_legs + total_wings
return result
|
There is a pot with 17 apples. If Patrick took away 2 apples each day, how many apples are left after 7 days? | def solve() -> int:
num_apples = 17
taken_away = 2
days = 7
result = num_apples - (taken_away * days)
return result
|
heryl wants to paint her hall which is 14 feet long and 8 feet wide. If one gallon of paint covers 150 square feet of the wall, how many gallons will Sheryl need to paint the whole hall? | def solve() -> int:
length = 14
width = 8
total_area = length * width
one_gallon_area = 150
total_gallons = total_area // one_gallon_area
result = total_gallons
return result
|
Tim is a chef and sells cakes for $15 each, cupcakes for $10 each, and brownies for $9 each. This month he sold 7 cakes, 5 cupcakes, and 8 brownies. How much money, in dollars, did he make this month? | def solve() -> int:
cake_cost = 15
cake_number = 7
cake_total = cake_cost * cake_number
cupcake_cost = 10
cupcake_number = 5
cupcake_total = cupcake_cost * cupcake_number
brownie_cost = 9
brownie_number = 8
brownie_total = brownie_cost * brownie_number
total_money_... |
Possible math questions and programs: Nancy and Amy were baking cupcakes for a fundraiser. Nancy made 8 batches of 12 cupcakes each. Amy made 10 batches of 9 cupcakes each. They sold each cupcake for $1.50. How much more money did Amy make than Nancy? | def solve() -> int:
nancy_cupcakes = 8 * 12
amy_cupcakes = 10 * 9
nancy_revenue = nancy_cupcakes * 1.5
amy_revenue = amy_cupcakes * 1.5
revenue_difference = amy_revenue - nancy_revenue
result = revenue_difference
return result
|
Ethan is planning to build a deck in his backyard that is 15 feet long and 10 feet wide. He wants to install a hot tub in the corner of the deck that has a diameter of 7 feet. How much space will be left on the deck for chairs and tables after the hot tub is installed? | def solve() -> int:
length = 15
width = 10
diameter = 7
radius = diameter / 2
area_hot_tub = 3.14 * radius ** 2
area_deck = length * width
area_left = area_deck - area_hot_tub
result = area_left
return result
|
Andrew earns $24 per hour and worked 42 hours in one week. How much did he earn in total that week? | def solve() -> int:
wage = 24
hours = 42
total_payment = wage * hours
result = total_payment
return result
|
Olivia sells tuna and american sandwiches for $1.99. If a slice of bread costs $0.15, a slice of tuna costs $0.35 and a slice of cheese costs $0.25, how many cents does a sandwich with one slice of each protein cost Olivia to make? | def solve() -> int:
bread_cost = 0.15
tuna_cost = 0.35
cheese_cost = 0.25
sandwich_cost = bread_cost + tuna_cost + cheese_cost
sandwich_cost_in_cents = sandwich_cost * 100
result = sandwich_cost_in_cents
return result
|
After using 25 out of 60 sheets of paper, Jane put the notebook down. Her classmate later brought over four times the amount of paper that Jane had used. They decided to share it evenly. If Jane used 12 sheets of paper, how many sheets did her classmate initially bring? | def solve() -> int:
jane_used = 12
total_sheets = 60
jane_left = total_sheets - 25
classmate_brought = 4 * jane_used
total_sheets += classmate_brought
each_person_gets = total_sheets / 2
result = each_person_gets - jane_left
return result
|
Rachel has a dog bed filled with dogs. Every day, Rachel feeds each dog 2 scoops of kibble. It takes Rachel 10 minutes to prepare each scoop of kibble. If it takes Rachel 6 hours to prepare enough kibble to feed all of her dogs, how many dogs does Rachel have in her dog bed? | def solve() -> int:
dogs = 0
scoops_per_dog = 2
time_per_scoop = 10
total_time = 6 * 60
total_scoops = total_time / time_per_scoop
dogs = total_scoops / scoops_per_dog
result = dogs
return result
|
Student: It took Jerry 3 hours to read a book. If he continues to read the same rate, how many hours would it take him to read 1.5 books? | def solve() -> int:
book_rate = 1/3
num_books = 1.5
total_time = num_books * book_rate
result = total_time
return result
|
A store has 20 boxes of chocolates, each containing 24 bars. If the store offers a deal of buy 2 boxes and get 1 free, how many bars of chocolates will a customer get if they buy all the boxes? | def solve() -> int:
boxes = 20
bars_per_box = 24
total_bars = boxes * bars_per_box
free_boxes = boxes // 2
bars_with_deal = total_bars + (free_boxes * bars_per_box)
result = bars_with_deal
return result
|
phen has $35 to spend at the game shop. He sees some board games that cost $8 each, card packs which sell 3 pieces for $2, and puzzles that cost $9 each. If Stephen wants to buy 2 board games and 1 puzzle, how many pieces of card packs can he buy with the amount of money he has left? | def solve() -> int:
total_spend = (2*8 + 9);
remain = 35 - total_spend;
num_of_card_packs = remain/2;
result = num_of_card_packs
return result
|
Ann got a job in which she is to be paid $500 every week. If she starts from September 2nd and her payday is every Friday, how much will she save by the end of 2021 (assuming no expenditures)? | def solve() -> int:
pay_per_week = 500
weeks_in_remaining_year = 17
total_earnings = pay_per_week * weeks_in_remaining_year
result = total_earnings
return result
|
On the first day of the jewelry store sale, 20 necklaces were sold. The next day 10 more necklaces were sold. On the third day the store sold nine times the number of necklaces it did on the day before. How many necklaces were sold during the sale? | def solve() -> int:
day1 = 20
day2 = day1 + 10
day3 = day2 * 9
total = day1 + day2 + day3
result = total
return result
|
A farmer has a rectangular field that is 100ft wide. The length of the field is twice its width. If he plants corn in 80% of the field, how many square feet of corn does he plant? | def solve() -> int:
width = 100
length = 2 * width
total_area = width * length
corn_area = 0.8 * total_area
result = corn_area
return result
|
Ava has 3500 pennies in her jar. She needs $75 to buy a new dress. How many pennies will she have left? The Empire State Building has 20 more floors than the Rockefeller Center. Together they have a total of 85 floors. How many floors does the Empire State Building have? | def solve() -> int:
pennies_in_jar = 3500
cost_of_dress = 75
pennies_left = pennies_in_jar - cost_of_dress
rockefeller_floors = (85 - 20) / 2
empire_state_floors = rockefeller_floors + 20
result = pennies_left
result = empire_state_floors
return result
|
A store is having a sale on books. If you buy 3 books, you get 20% off. If each book is originally $10, what is the sale price for 3 books? | def solve() -> int:
book_price = 10
quantity = 3
percent_off = 20
discount = (book_price * quantity) * (percent_off / 100)
sale_price = (book_price * quantity) - discount
result = sale_price
return result
|
A car travels 360 miles in 6 hours. What is the average speed of the car in miles per hour? | def solve() -> int:
distance = 360
time = 6
average_speed = distance / time
result = average_speed
return result
|
Jenna buys a pack of 24 pencils for $6. She gives 8 pencils to her sister and 4 pencils to her brother. She sells the remaining pencils for $0.5 each. How much profit does she make? | def solve() -> int:
cost = 6
pencils = 24 - 8 - 4
revenue = pencils * 0.5
profit = revenue - cost
result = profit
return result
|
The farmers collected 75 corns from their farm and thrice as many wheat from their fields. What is the difference between the number of the two crops? | def solve() -> int:
corns = 75
wheat = 3 * corns
difference = wheat - corns
result = difference
return result
|
A recipe calls for 3/4 teaspoon of salt per serving. If we want to prepare a meal for 6 people, how many teaspoons of salt do we need? | def solve() -> int:
serving_size = 1
persons = 6
total_servings = serving_size * persons
salt_per_serving = 3/4
total_salt = total_servings * salt_per_serving
result = round(total_salt/3, 3)
return result
|
In an art exhibition, there were 70 paintings. 1/8 of them were accidentally damaged and had to be taken down. For those that remained, 4/5 were unframed and 1/6 of the unframed paintings were removed for being too fragile. How many paintings were on display at the end of the exhibition? | def solve() -> int:
total_paintings = 70
damaged_paintings = total_paintings / 8
remaining_paintings = total_paintings - damaged_paintings
unframed_paintings = remaining_paintings * 4 / 5
fragile_paintings = unframed_paintings / 6
display_paintings = unframed_paintings - fragile_paintings
re... |
Rachel drives for an hour at 40 mph and then doubles her speed and reduces her driving time to 45 minutes. What’s her total distance traveled? Mary decided to sell her piano since she was now taking up guitar. She sold her sheet music for $15. She got $20 for her metronome and agreed to sell her $50 keyboard stand at a... | def solve() -> int:
time_1 = 1
speed_1 = 40
distance_1 = time_1 * speed_1
time_2 = 0.75
speed_2 = 80
distance_2 = time_2 * speed_2
total_distance = distance_1 + distance_2
sheet_music = 15
metronome = 20
keyboard_stand = 50 * 0.9
bench = 30
total_... |
There are 7 ducks at Memory of Cold Duck and 3 times as many ducks at Nature For All. Calculate the total number of ducks in the two organizations given that there are 28 ducks at Nature For All. | def solve() -> int:
ducks_MemoryCold = 7
ducks_NatureForAll = 3 * 28
ducks_total = ducks_MemoryCold + ducks_NatureForAll
result = ducks_total
return result
|
If Sarah drove her car at a speed of 50 miles per hour for 2 hours, took a break for 15 minutes, and then continued driving for another 1.5 hours at a speed of 60 miles per hour, what's the total distance covered? | def solve() -> int:
time_first_leg = 2
time_second_leg = 1.5
distance_first_leg = 50 * time_first_leg
distance_second_leg = 60 * time_second_leg
total_distance = distance_first_leg + distance_second_leg
result = total_distance
return result
|
Lila is a teacher. Typically, she gets 35 students' questions every lesson. Two thirds of the questions are about math. One fourth of the math questions are regarding algebra. Seven questions are about English, while questions about history are five more than about English. Lila gives homework once one-third as often a... | def solve() -> int:
total_questions = 35
math_questions = total_questions * 2 / 3
algebra_questions = math_questions / 4
english_questions = 7
history_questions = english_questions + 5
homework_given = history_questions / 3
result = homework_given
retur... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.