question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Student: The balance on a credit card is $5000. If the interest rate is 2% per month, how much interest will accrue in 6 months? | def solve() -> int:
balance = 5000
interest_rate = 0.02
months = 6
interest = balance * interest_rate * months
result = interest
return result
|
- Potato chips come in bags of 8. For the movie night, Ms. Brown bought 12 bags of potato chips. She has four groups with 14 students in each group. How many bags of potato chips can each of Ms. Brown's groups get? | def solve() -> int:
total_bags = 12
total_groups = 4
bags_per_group = total_bags // total_groups
result = bags_per_group
return result
|
George, Harry, and Isabel are running a race. George runs twice as fast as Harry, but Harry runs three times as fast as Isabel. If Isabel covers 50 meters in 10 seconds, how long will it take for George to run a distance of 500 meters? | def solve() -> int:
isabel_speed = 50 / 10
harry_speed = isabel_speed * 3
george_speed = harry_speed * 2
george_time = 500 / george_speed
result = george_time
return result
|
A car travels 45 miles in 3 hours, what is the average speed of the car in miles per hour? | def solve() -> int:
distance = 45
time = 3
average_speed = distance / time
result = average_speed
return result
|
In a company of 100 employees, 15% of them have been there less than a year. The remaining employees are divided equally between those who have been there for 1-5 years and those who have been there for more than 5 years. If the number of employees who have been there for more than 5 years is triple the number of emplo... | def solve() -> int:
total_employees = 100
less_than_1_year = total_employees * 0.15
remaining_employees = total_employees - less_than_1_year
employees_1_to_5_years = remaining_employees / 2
employees_more_than_5_years = 3 * employees_1_to_5_years
result = employees_more_than_5_years
ret... |
John invested $500 in a savings account with a 5% interest rate. If he did not withdraw any money, how much money will he have after 3 years? | def solve() -> int:
principal = 500
interest_rate = 0.05
years = 3
final_amount = principal*(1+interest_rate)**years
result = final_amount
return result
|
Maria has 50 quarters. She uses a quarter of them to buy a toy. How many quarters does she have left? | def solve() -> int:
quarters = 50
used_quarters = quarters / 4
left_quarters = quarters - used_quarters
result = left_quarters
return result
|
A rectangle has a length of 12 cm and a width of 5 cm. What is the perimeter of the rectangle in cm? | def solve() -> int:
length = 12
width = 5
perimeter = 2 * length + 2 * width
result = perimeter
return result
|
A delivery company has a maximum capacity of 4000 pounds in a truck. One package weighs 75 pounds. If the company loads 42 packages into the truck, how many more pounds can still be loaded into the truck? | def solve() -> int:
package_weight = 75
max_capacity = 4000
packages = 42
total_weight_loaded = package_weight * packages
available_capacity = max_capacity - total_weight_loaded
result = available_capacity
return result
|
Student: A company produces 200 units per week. If they increase their production by 50%, how many units will they produce in a month (4 weeks)? | def solve() -> int:
units_per_week = 200
increase_percentage = 0.5
weeks_in_month = 4
increase_in_units = units_per_week * increase_percentage
total_units_in_month = (units_per_week + increase_in_units) * weeks_in_month
result = total_units_in_month
return result
|
A group of friends purchased 18 boxes of donuts. If one box contains 4 donuts and if the group of friends consumed half of the donuts, how many donuts are remaining? | def solve() -> int:
number_of_boxes = 18
donuts_per_box = 4
donuts_consumed = number_of_boxes / 2 * donuts_per_box
donuts_remaining = number_of_boxes * donuts_per_box - donuts_consumed
result = donuts_remaining
return result
|
Olivia is twice as old as her son and 10 years older than her daughter. If her son is now 12 years old, how old is her daughter? | def solve() -> int:
son_age = 12
olivia_age = son_age * 2
daughter_age = olivia_age - 10
result = daughter_age
return result
|
There are 25 apples on a table. If 2/5 of the apples are green and the rest are red, how many red apples are on the table? | def solve() -> int:
apples = 25
green_apples = apples * 2/5
red_apples = apples - green_apples
result = red_apples
return result
|
Student: A pizza place offers a deal where someone can buy 1 large pizza for $15.00 and get a second one for half price. If someone buys 2 large pizzas, how much will they pay in total (including the discount)? | def solve() -> int:
pizza_price = 15.00
discount = 0.5 * pizza_price
total_price = 2 * (pizza_price + discount)
result = total_price
return result
|
Student: Patrick needs to tile his bathroom which is 7 feet in length and 5 feet in width. How many 1 foot by 1 foot tiles will he need to complete the room? | def solve() -> int:
length = 7
width = 5
area = length * width
tiles = area // 1
result = tiles
return result
|
Tiffany works out a math exercise. She needs to double the number of apples in the basket, then add 10 more apples, and finally decrease the number of apples in the basket by 4. If the basket originally contains 20 apples, how many apples are there in the basket now? | def solve() -> int:
number_of_apples = 20
number_of_apples = number_of_apples * 2
number_of_apples = number_of_apples + 10
number_of_apples = number_of_apples - 4
result = number_of_apples
return result
|
On a road trip, you drive 350 miles in 5 hours. What is your average speed in miles per hour? | def solve() -> int:
miles = 350
hours = 5
speed = miles/hours
result = speed
return result
|
Student: A bag contains 12 red balls and 8 blue balls. Two balls are drawn at random without replacement. What is the probability that both balls are red? | def solve() -> int:
num_red_balls = 12
num_blue_balls = 8
total_balls = num_red_balls + num_blue_balls
prob_red_first = num_red_balls / total_balls
prob_red_second_given_red_first = (num_red_balls - 1) / (total_balls - 1)
prob_two_red_balls = prob_red_first * prob_red_second_given_red_first
... |
Jacob earned $540 from doing yard work for 27 hours from February to June. However, from July to October, he was only able to work for 9 hours. Jacob wants to buy a new gaming system for $700 and has already spent $250 on clothes. How many more hours does he need to work to buy the gaming system? | def solve() -> int:
earnings_per_hour = 540 / 27
total_hours_needed = (700 + 250) / earnings_per_hour
hours_worked = 27 + 9
hours_left = total_hours_needed - hours_worked
result = hours_left
return result
|
A car traveled 84km in one hour. What is its speed in km/h? | def solve() -> int:
distance = 84
time = 1
speed = distance / time
result = speed
return result
|
Sophia wants to make homemade smoothies for her workout group. She wants to make a total of 48 smoothies with equal parts strawberry banana and mango pineapple. Each recipe makes 2 dozen smoothies. She was able to make 5 batches of strawberry banana smoothies but ran out of mangoes. How many more batches of smoothies d... | def solve() -> int:
strawberry_banana_per_batch = 2 * 12
total_smoothies = 48
batches_strawberry_banana = 5
smoothies_strawberry_banana = batches_strawberry_banana * strawberry_banana_per_batch
smoothies_mango_pineapple = total_smoothies - smoothies_strawberry_banana
batches_mango_pineapple = sm... |
Student: 3. Bob had 5 cups of coffee and 6 pieces of cake. If each cup of coffee costs $2 and each piece of cake costs $3, how much money did Bob spend in total? | def solve() -> int:
coffee_cups = 5
cake_pieces = 6
coffee_price = 2
cake_price = 3
total_cost = coffee_cups * coffee_price + cake_pieces * cake_price
result = total_cost
return result
|
Michal had $65 and bought 3 pairs of pants. Each pair cost $14. He then split the rest of the money 3 ways. How much did he have left? | def solve() -> int:
remaining_money = 65 - (3 * 14) - (14/3)
result = remaining_money
return result
|
A store has a sale where all items are 25% off. If a shirt originally costs $20, what is the sale price? | def solve() -> int:
original_price = 20
percent_off = 25
sale_price = original_price - (original_price * percent_off / 100)
result = sale_price
return result
|
A book has 213 pages. If I read 57 pages today, how many more pages do I need to read to finish the book? | def solve() -> int:
total_pages = 213
read_today = 57
remaining = total_pages - read_today
result = remaining
return result
|
John sells clothes and each month he has 10 packages of clothes with 4 pieces of clothing in each package. Each piece of clothing weighs 0.3 kilograms. How much weight of clothes does he have in his store after one year in kilograms? | def solve() -> int:
packages_per_month = 10
clothes_per_package = 4
clothing_weight = 0.3
total_clothes = packages_per_month * 12 * clothes_per_package
total_weight = total_clothes * clothing_weight
result = total_weight
return result
|
A warehouse can store 1000 boxes. At the beginning of the year, the warehouse had 5/8 of its capacity filled with boxes. On the first day of the year, the warehouse received 50 boxes. On the second day, the warehouse received half the number of boxes it received on the first day. On the third day, the warehouse was alr... | def solve() -> int:
capacity = 1000
initial_boxes = capacity * 5/8
day1_boxes = initial_boxes + 50
day2_boxes = 1/2 * 50
day2_total = day1_boxes + day2_boxes
day3_boxes = capacity - day2_total
result = day3_boxes
return result
|
Harry and his coworkers are ordering utensils for the office. The utensils come in packs of 100 with an equal number of knives, forks, and spoons. If they need to have 200 spoons, how many packs of utensils should they order? | def solve() -> int:
pack_size = 100
spoons_needed = 200
packs_needed = spoons_needed / pack_size
result = packs_needed
return result
|
Max found 14 coins on the beach. He gave away 3 coins to his sister, kept half of the remaining coins, and gave the rest to his friend. How many coins did Max give to his friend? | def solve() -> int:
initial_coins = 14
coins_given_to_sister = 3
remaining_coins = initial_coins - coins_given_to_sister
maxs_coins = remaining_coins / 2
friends_coins = remaining_coins - maxs_coins
result = friends_coins
result
return result
|
A business sent out 200 survey emails and received a response rate of 40%. To increase their response rate to 60%, how many more responses do they need to receive out of 100 upcoming survey emails? | def solve() -> int:
total_emails = 300
current_response_rate = 0.4
target_response_rate = 0.6
current_responses = total_emails * current_response_rate
target_responses = total_emails * target_response_rate
additional_responses_needed = target_responses - current_responses
resu... |
Mr. Whit bought 9 bags of chips for a game night. Each bag has 10 packages of chips. If each person got 2 packages of chips, how many persons can have chips? | def solve() -> int:
numberOfBags = 9
packagesPerBag = 10
packagesPerPerson = 2
totalPackages = numberOfBags * packagesPerBag
numberOfPeople = totalPackages // packagesPerPerson
result = numberOfPeople
return result
|
Student: If there are 3 marbles for every 7 beads, how many marbles are there for 35 beads? | def solve() -> int:
marbles_per_bead = 3 / 7
marbles = marbles_per_bead * 35
result = marbles
return result
|
John is filling a water bottle from a dispenser. The dispenser can fill up 2 cups every 10 seconds. If the water bottle can hold 20 ounces of water, how long will it take John to fill it up to the top? | def solve() -> int:
dispenser_capacity = 2
fill_time = 10
water_bottle_capacity = 20
cups_needed = water_bottle_capacity / dispenser_capacity
total_time = cups_needed * fill_time
result = total_time
return result
|
Emily bought 20 books for $150. If the cost of each book was the same, how much does one book cost? | def solve() -> int:
cost_one_book = 150 / 20
result = cost_one_book
return result
|
Bob is planning a road trip and wants to know the average speed he needs to maintain to cover 300 miles in 5 hours (assuming no stops). What should his average speed be? | def solve() -> int:
distance = 300
time = 5
average_speed = distance / time
result = average_speed
return result
|
Jack counts stars. On Monday he counts 9 stars. On Tuesday he counts 6 more stars than Monday. On Wednesday he counts half as many stars as Tuesday. On Thursday he counts 3 fewer stars than Wednesday. How many total stars does he count for the 4 days? | def solve() -> int:
stars_monday = 9
stars_tuesday = stars_monday + 6
stars_wednesday = stars_tuesday / 2
stars_thursday = stars_wednesday - 3
stars_total = stars_monday + stars_tuesday + stars_wednesday + stars_thursday
result = stars_total
return result
|
Liam had 20 marbles in his jar. He played a game with his sister and lost 5 marbles. Then he played another game with his brother and doubled his marbles. How many marbles did Liam have after the games? | def solve() -> int:
liam = 20
liam = liam - 5
liam = liam * 2
result = liam
return result
|
There are 10 flowers in a garden. If 7 are red and the rest are yellow, how many flowers are yellow? | def solve() -> int:
total_flowers = 10
red_flowers = 7
yellow_flowers = total_flowers - red_flowers
result = yellow_flowers
return result
|
Susan has 24 pencils. Tom takes 8 of Susan's pencils, and still has 5 less pencils than Susan started with. How many pencils did Tom start with? | def solve() -> int:
susan_pencils = 24
tom_pencils = susan_pencils - 8
tom_pencils += 5
result = tom_pencils
return result
|
In 7 years, Grace will be 3 times as old as Harry. If Harry is 5 years old today, how old is Grace today? | def solve() -> int:
grace = 0
harry = 5
grace = 29
result = grace
return result
|
Student: Emily has a craving for double chocolate donuts and finds them in the local donut shop. She needs 12 of them but there are only 8 double chocolate donuts in the store. How many other donuts does she have to buy in addition to the 8 double chocolate donuts? | def solve() -> int:
double_chocolate = 8
total = 12
other_donuts = total - double_chocolate
result = other_donuts
return result
|
Rachel has 60% as much money to spend on books as on DVDs. Emily has one-fifth as much money to spend on DVDs as Rachel but three times as much money to spend on books as Rachel. If Emily has $90 to spend on books, how much money does Rachel have to spend on DVDs and books in total? | def solve() -> int:
rachel_dvds = 0
rachel_books = 0
emily_dvds = 0
emily_books = 90
rachel_books = emily_books / 3
rachel_dvds = rachel_books / 0.6
total_money = rachel_dvds + rachel_books
result = total_money
return result
|
A store sells pencils at 10 for $1, while pens cost $0.50 each. If I have $5 to spend and I want to buy an equal number of pencils and pens, how many of each can I buy? | def solve() -> int:
cost_per_pencil = 1/10
cost_per_pen = 0.5
total_money = 5
num_pencils = (total_money // (cost_per_pencil + cost_per_pen))/2
num_pens = num_pencils
total_spent = num_pencils*(cost_per_pencil + cost_per_pen)
result = (num_pencils, num_pens)
return result
|
After eating at a restaurant, Ben received a bill of $87.50 in total. He paid $100 and received the change. How much money did Ben get back? | def solve() -> int:
bill = 87.50
paid = 100
change = paid - bill
result = change
return result
|
If Tom's phone was $50 more expensive than Mary's phone, and Mary's phone was $30 less expensive than Jane's phone, and Jane's phone was $150 more expensive than Grace's phone, and lastly Grace's phone was $300, how much did all the phones cost put together? | def solve() -> int:
grace_phone = 300
jane_phone = grace_phone + 150
mary_phone = jane_phone - 30
tom_phone = mary_phone + 50
total_cost = grace_phone + jane_phone + mary_phone + tom_phone
result = total_cost
return result
|
-The variable names used in the python code should be easy to read and understand Possible questions and programs: A jar of candies has 6 red candies and 3 more yellow candies than red candies. It also has 2 less blue candies than half of the yellow candies. How many candies are there in the jar? | def solve() -> int:
red = 6
yellow = red + 3
blue = yellow // 2 - 2
total = red + yellow + blue
result = total
return result
|
A class has 30 students and the teacher wants to divide them into equal groups with at least 2 students in each group. How many groups can be formed? | def solve() -> int:
num_students = 30
min_group_size = 2
num_groups = num_students//min_group_size
result = num_groups
return result
|
There are 20 students in a math class. If each student has 5 fingers, how many fingers are there in total? | def solve() -> int:
students_in_class = 20
fingers_per_student = 5
total_fingers = students_in_class * fingers_per_student
result = total_fingers
return result
|
Ted needs to buy a book that costs $16. He has $8.50. How much more money does he need? | def solve() -> int:
book_cost = 16
ted_money = 8.5
money_needed = book_cost - ted_money
result = money_needed
return result
|
A right triangle has a base of 12 cm and a height of 5 cm, what is the length of the hypotenuse? | def solve() -> int:
base = 12
height = 5
hypotenuse = (base**2 + height**2)**0.5
result = hypotenuse
return result
|
Celia has 96 marbles in total. She gives 4 marbles to her friend. How many marbles does Celia have left? | def solve() -> int:
marbles = 96
marbles = marbles - 4
result = marbles
return result
|
The Cool Cats chess club played a total of 50 games in a tournament. Max, Sue, and Lee won 42% of the games. The rest of the club lost all their games. How many games did each of the rest of the club play? | def solve() -> int:
max_sue_lee = 0.42 * 50
rest = 50 - max_sue_lee
other_players = 10 - 3
each_other = rest / other_players
result = each_other
return result
|
In a race, the first 8 runners finished within 1 minute. The next 6 runners finished within 2 minutes. How many runners finished this race within 3 minutes? | def solve() -> int:
start_time = 1
finish_time = 3
runners_in_1min = 8
runners_in_2min = 6
total_time = finish_time - start_time
total_runners = runners_in_1min + runners_in_2min
runners_in_3min = total_runners * total_time
result = runners_in_3min
return result
|
A bakery sells cupcakes for $1.50 each. If the bakery makes 100 cupcakes in a day and 60 cupcakes were sold, how much money did the bakery make in dollars? | def solve() -> int:
cupcake_cost = 1.5
num_cupcakes = 100
num_sold = 60
total_money = num_sold * cupcake_cost
result = total_money
return result
|
There are 18 students in the first grade and 6 less than 8 times as many in the kindergarten. How many students are in the kindergarten? | def solve() -> int:
students_in_first_grade = 18
students_in_kindergarten = students_in_first_grade * 8 - 6
result = students_in_kindergarten
return result
|
Rachel wants to buy new gym clothes and has a budget of $200. If each pair of leggings costs $25 and each sports bra costs $15, how many outfits can she buy? | def solve() -> int:
budget = 200
leggings_cost = 25
sports_bra_cost = 15
leggings_quantity = budget // leggings_cost
remaining_budget = budget % leggings_cost
sports_bra_quantity = remaining_budget // sports_bra_cost
outfits_quantity = min(leggings_quantity, sports_bra_quantit... |
A recipe calls for 2/3 cups of sugar. If there are 6 tablespoons in a 1/3 cup, how many tablespoons of sugar are needed for the recipe? | def solve() -> int:
cups_sugar = 2/3
tbsp_per_cup = 6
tbsp_sugar = cups_sugar * tbsp_per_cup
result = tbsp_sugar
return result
|
If fifteen concert tickets cost 2.5 times as much as one theater ticket, and each theater ticket is sold at $50, calculate the total amount of money Phoebe will pay if she buys fifteen concert tickets and six theater tickets. | def solve() -> int:
theater_ticket_price = 50
concert_ticket_price = theater_ticket_price * 2.5
num_concert_tickets = 15
num_theater_tickets = 6
total_concert_cost = concert_ticket_price * num_concert_tickets
total_theater_cost = theater_ticket_price * num_theater_tickets
tota... |
Five friends went to a music festival and shared the cost of tickets, parking, and food equally. If they spent a total of $550 and one friend paid $100 in total, how much did they spend on tickets? A clothing store is offering a discount of 10% off for customers who buy at least 3 items at once. Rachel, Sarah and Tom w... | def solve() -> int:
total_cost = 550
num_friends = 5
one_friend_cost = 100
four_friends_cost = total_cost - one_friend_cost
each_friend_cost = four_friends_cost / 4
ticket_cost = each_friend_cost / 3
result = ticket_cost
return result
|
Jake has a fishing boat that can catch 100 fish every trip, while his neighbor has a bigger boat that can catch three times the amount as Jake's boat. How many fish can they catch altogether after eight trips? | def solve() -> int:
jake_fish_per_trip = 100
neighbor_fish_per_trip = 3 * jake_fish_per_trip
total_fish_jake = jake_fish_per_trip * 8
total_fish_neighbor = neighbor_fish_per_trip * 8
total_fish = total_fish_jake + total_fish_neighbor
result = total_fish
return result
|
Student: Sean was planning a trip. He needed 120 gallons of fuel for the drive. He had 80 gallons of fuel in the beginning and filled up the rest at a gas station. How many gallons of fuel did he buy at the gas station? | def solve() -> int:
total_fuel = 120
initial_fuel = 80
gas_station_fuel = 0
gas_station_fuel = total_fuel - initial_fuel
result = gas_station_fuel
return result
|
Claire has 40 books in her personal library; Ruby has 100 books. Claire adds 2 books per week to her collection and Ruby adds 4 books per week to her collection. How long will it take for Ruby to have 3 times as many books as Claire? | def solve() -> int:
Claire_books = 40
Ruby_books = 100
Claire_rate = 2
Ruby_rate = 4
weeks = ((Claire_books * 3) - Ruby_books) / (Ruby_rate - Claire_rate)
result = weeks
return result
|
Some possible math questions and programs are: Lisa wants to make cookies for her friends. She needs 3 cups of flour, 2 cups of sugar, and 1 cup of butter for every 24 cookies. How many cups of flour does she need if she wants to make 72 cookies? | def solve() -> int:
cookies_per_batch = 24
flour_per_batch = 3
batches = 72 // cookies_per_batch
flour = batches * flour_per_batch
result = flour
return result
|
In 6 years, Lily will be three times as old as Ava. If Lily is 9 years old today, how old is Ava today? | def solve() -> int:
lily_age_now = 9
years_in_future = 6
lily_age_in_future = lily_age_now + years_in_future
ava_age_in_future = lily_age_in_future / 3
ava_age_now = ava_age_in_future - years_in_future
result = ava_age_now
return result
|
Carl has an orange tree in his garden. His orange tree gives 4 oranges each week. If Carl has his orange tree for 8 weeks, how many oranges will he have in total? | def solve() -> int:
oranges = 0
for i in range(0, 8):
oranges += 4
result = oranges
return result
|
Emily has 20 pencils. She gave 3 pencils to her brother and lent 4 pencils to her friend. How many pencils does Emily have now? | def solve() -> int:
pencils = 20
pencils = pencils - 3
pencils = pencils - 4
result = pencils
return result
|
A room is 10 feet long, 8 feet wide, and 12 feet tall. What is the volume of the room in cubic feet? | def solve() -> int:
length = 10
width = 8
height = 12
volume = length * width * height
result = volume
return result
|
The cost of a new car is $30,000. If the sales tax rate is 6%, how much will the sales tax on the car be? | def solve() -> int:
car_cost = 30000
tax_rate = 0.06
sales_tax = car_cost * tax_rate
result = sales_tax
return result
|
Karina has 45 marbles. She gave away 7 marbles. How many marbles does she have left? | def solve() -> int:
numberOfMarbles = 45
numberOfMarblesGivenAway = 7
numberOfMarblesLeft = numberOfMarbles - numberOfMarblesGivenAway
result = numberOfMarblesLeft
return result
|
Kevin is making a fruit salad. He needs 3 kg of apples, 2 kg of oranges, 1.5 kg of bananas and 0.5 kg of grapes. He has already bought 2.5 kg of apples, 1.8 kg of oranges, 1.2 kg of bananas and 0.3 kg of grapes. How much more fruit does he need to buy in total to make the salad? | def solve() -> int:
apple_need = 3
orange_need = 2
banana_need = 1.5
grape_need = 0.5
apple_bought = 2.5
orange_bought = 1.8
banana_bought = 1.2
grape_bought = 0.3
apple_buy = apple_need - apple_bought
orange_buy = orange_need - orange_bought
banana_buy = banana_need - banana... |
Student: James is trying to save money by bringing lunch to work instead of buying lunch. If he spends $2.50 per day buying lunch and makes his own lunch for $1.25 per day, how much money will he save in a week? | def solve() -> int:
buy_lunch = 2.50
make_lunch = 1.25
daily_saving = buy_lunch - make_lunch
weekly_saving = daily_saving * 7
result = weekly_saving
return result
|
A train travels 50 miles per hour. It began its journey at 9 AM and arrived at its destination at 1 PM. If the distance traveled was 175 miles, what time did the train stop for a 30-minute break? | def solve() -> int:
distance_traveled = 175
speed = 50
start_time = 9
end_time = 13
total_time = end_time - start_time
travel_time = distance_traveled / speed
break_time = total_time - travel_time
break_hours = int(break_time)
break_minutes = int((break_time - break_hours) ... |
If a recipe calls for 2 1/2 cups flour to make 24 cookies, how many cups of flour are needed to make 36 cookies? | def solve() -> int:
flour_per_cookie = 2.5 / 24
flour_needed = flour_per_cookie * 36
result = flour_needed
return result
|
Jennifer spent the day baking pizzas for a restaurant. She made 40 pizzas with 8 slices in each pizza. She used a rotating oven to bake them and it took her 3 hours. How many pizza slices did she bake each hour? | def solve() -> int:
num_pizzas = 40
slices_per_pizza = 8
total_slices = num_pizzas * slices_per_pizza
time_taken = 3
slices_per_hour = total_slices / time_taken
result = slices_per_hour
return result
|
Student: Ryan, Sam, and Tina are building towers with blocks. Ryan has 12 blocks, Sam has 15 blocks, and Tina has 18 blocks. They decide to combine their blocks and make one big tower. How many blocks are in the big tower? How many more blocks does Tina have than Ryan? | def solve() -> int:
ryan_blocks = 12
sam_blocks = 15
tina_blocks = 18
total_blocks = ryan_blocks + sam_blocks + tina_blocks
difference = tina_blocks - ryan_blocks
result = total_blocks
result = difference
return result
|
A store has 200 shirts to sell. They sold 50 shirts on Monday and 65 shirts on Tuesday. How many shirts do they have to sell on Wednesday? | def solve() -> int:
total_shirts = 200
shirts_sold = 50 + 65
shirts_left = total_shirts - shirts_sold
result = shirts_left
return result
|
Michael is baking cupcakes for a party. He has 3 pans, each of which can hold 12 cupcakes. If he has already baked 18 cupcakes and he wants to end up with a total of 60 cupcakes, how many more batches does he need to bake? | def solve() -> int:
pans = 3
pan_capacity = 12
baked_cupcakes = 18
total_cupcakes = 60
needed_cupcakes = total_cupcakes - baked_cupcakes
batches = needed_cupcakes // (pans * pan_capacity)
result = batches
return result
|
In Miss Lee's English class, of the 40 students, 70% were familiar with essay writing, and of those familiar with essay writing, 40% also knew how to write poetry. How many students in the class knew essay writing and poetry? | def solve() -> int:
total_students = 40
essay_writers = round(total_students * 0.7)
poetry_writers = round(essay_writers * 0.4)
result = poetry_writers
return result
|
Student: Mrs. Smith has 41 apples and her neighbor has 14 apples. If she gives her neighbor 7 apples, how many apples does she have left? | def solve() -> int:
mrs_smith = 41
neighbor = 14
gift = 7
mrs_smith = mrs_smith - gift
result = mrs_smith
return result
|
Mike needs to buy 45 apples for an apple pie. Each bag of apples contains 8 apples. How many bags of apples does Mike need to buy? | def solve() -> int:
total_apples = 45
apples_per_bag = 8
bags_of_apples = total_apples/apples_per_bag
result = bags_of_apples
return result
|
Olivia's new laptop cost 5 times as much as her old laptop. She sold her old laptop for $300 and used that to pay off some of the cost of her new laptop. She still owes another $1500 on her new laptop. How much did her old laptop cost, in dollars? | def solve() -> int:
old_laptop_cost = 300
new_laptop_cost = old_laptop_cost * 5
amount_owed = new_laptop_cost - old_laptop_cost
old_laptop_cost = amount_owed + 1500
result = old_laptop_cost
return result
|
Naomi saves $100 in January. Each month, she saves half as much as her previous month's savings. How much will she save in May? | def solve() -> int:
january_savings = 100
february_savings = january_savings / 2
march_savings = february_savings / 2
april_savings = march_savings / 2
may_savings = april_savings / 2
result = may_savings
return result
|
There are 320 students in a school. 95 of them are sophomores, 140 are juniors, and the rest are seniors. How many seniors are there? | def solve() -> int:
totalStudents = 320
sophomores = 95
juniors = 140
result_1 = totalStudents - sophomores - juniors
seniors = result_1
result = seniors
return result
|
A restaurant has a total of 27 tables and can seat 4 people at each table. How many people can be seated in the restaurant at one time? | def solve() -> int:
total_tables = 27
people_per_table = 4
total_people = total_tables * people_per_table
result = total_people
return result
|
Student: 3. Thomas has 30 apples. Shawn has that same number of apples, plus twice the amount Thomas has. They put their apples into a bag and Shawn removes 20% of the apples. How many apples are in the bag? | def solve() -> int:
thomas_apples = 30
shawn_apples = thomas_apples * 2
total_apples = thomas_apples + shawn_apples
removed_apples = total_apples * 0.2
result = total_apples - removed_apples
return result
|
If a recipe calls for 2 cups of sugar to make 24 cupcakes, how many cups of sugar would be needed to make 60 cupcakes? | def solve() -> int:
sugar_per_cupcake = 2/24
total_cupcakes = 60
total_sugar = sugar_per_cupcake * total_cupcakes
result = total_sugar
return result
|
Samuel is a painter creating artwork for his first art exhibition. He thinks it will take many paintings to impress the art world. Each painting he creates is 30x40 inches. The gallery curator rejects his work after displaying only seven paintings, and Samuel is devastated over the 840 square inches of art that was nev... | def solve() -> int:
painting_width = 30
painting_height = 40
rejected_area = 840
painting_area = painting_width * painting_height
total_paintings = (rejected_area / painting_area) + 7
total_paintings = int(total_paintings + 0.5)
result = total_paintings
return re... |
Steven is currently 6 years older than his sister Elizabeth. In 10 years, Steven will only be twice as old as Elizabeth. How old is Elizabeth? | def solve() -> int:
age_difference_in_years = 6
steven_future_ratio = 2
elizabeth_future_ratio = 1
steven_future_age = elizabeth_future_ratio * steven_future_ratio + age_difference_in_years
elizabeth_future_age = steven_future_age - age_difference_in_years
result = elizabeth_future_age
retur... |
Rachel went shopping for clothes. She spent €120 on 2 dresses for €30 each, a pair of shoes for €50, and a scarf for €10. How much money does Rachel have left? | def solve() -> int:
dresses_cost = 30 * 2
shoes_cost = 50
scarf_cost = 10
total_cost = dresses_cost + shoes_cost + scarf_cost
money_left = 120 - total_cost
result = money_left
return result
|
Student: A truck can travel 600 miles on 40 gallons of gas. How many miles per gallon does the truck get? | def solve() -> int:
miles = 600
gallons = 40
miles_per_gallon = miles / gallons
result = miles_per_gallon
return result
|
Olivia and Ethan are making sandwiches together. Olivia has brought 6 slices of ham from her house and Ethan has 8 slices of ham in his house. Each sandwich requires 2 slices of ham and they have made 9 sandwiches in total. How many slices of ham did Ethan have to use from Olivia's house? | def solve() -> int:
olivia_slices = 6
ethan_slices = 8
sandwiches = 9
total_slices = sandwiches * 2
ethan_used = total_slices - olivia_slices
result = ethan_used
return result
|
A farmer had 100 chickens. He sold 30 chickens and later bought 15 more. How many chickens does he have now? | def solve() -> int:
chickens = 100
chickens -= 30
chickens += 15
result = chickens
return result
|
Student: If the cost of a box of apples is $6.50, and a box contains 5 apples, how much does each apple cost? | def solve() -> int:
cost_of_box = 6.50
number_of_apples = 5
cost_of_each_apple = cost_of_box / number_of_apples
result = cost_of_each_apple
return result
|
Student: John and Paul have $6 between them. If John has $1 less than Paul, how much money does John have? | def solve() -> int:
total = 6
diff = 1
john = (6 - diff) / 2
paul = john + diff
result = john
return result
|
A rectangular field has a length of 75 meters and a width of 48 meters. What is the area of this field? | def solve() -> int:
area = 75 * 48
result = area
return result
|
A recipe for pancakes requires 2 cups of flour, 3 eggs, and 1.5 cups of milk. How many pancakes can be made with this recipe if each pancake requires 1/4 cup of batter? | def solve() -> int:
batter = 2 + 1.5
pancakes = batter // 0.25
pancakes = int(pancakes)
result = pancakes
return result
|
Michael buys a toy car with 6 quarters, 2 dimes, and 4 nickels. He gets 10 cents back in change. What is the cost of the toy car? | def solve() -> int:
quarters = 6
dimes = 2
nickels = 4
change = 10
total_quarters = quarters * 25
total_dimes = dimes * 10
total_nickels = nickels * 5
total_change = total_quarters + total_dimes + total_nickels
cost_of_toy_car = total_change - change
result = ... |
A company has 80 male and 50 female employees. If 20% of the male employees and 25% of the female employees take sick leave, what is the total number of employees who take sick leave? | def solve() -> int:
male_employees = 80
female_employees = 50
male_sick_leave = male_employees * 0.20
female_sick_leave = female_employees * 0.25
total_sick_leave = male_sick_leave + female_sick_leave
result = total_sick_leave
return result
|
-New questions should be original and not copied from other sources. Lexi bought 4 packs of stickers to share with her 18 friends and her sister, Rita. Each pack of stickers had 12 stickers inside and Lexi, her friends, and Rita all took 2 stickers each. How many stickers are left? | def solve() -> int:
total_stickers = 4 * 12
total_taken = (18 + 1 + 1) * 2
left_stickers = total_stickers - total_taken
result = left_stickers
return result
|
Jennifer has 100 euros in her savings account. She saves 10 euros each week. What will be her total savings in 1 year? | def solve() -> int:
savings_per_week = 10
weeks_per_year = 52
total_savings = 100 + (savings_per_week * weeks_per_year)
result = total_savings
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.