question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A company takes 5 days to complete a project. If they use 10 workers, how long will it take if they use 15 workers instead? | def solve() -> int:
initial_num_workers = 10
initial_days = 5
new_num_workers = 15
new_days = (initial_num_workers * initial_days) / new_num_workers
result = new_days
return result
|
Student: Amelia worked for 5 hours over the weekend and earned $12 per hour for the first three hours, and time-and-a-half ($18) for the other 2 hours. How much money did she earn? | def solve() -> int:
hours = 5
rate_1 = 12
rate_2 = 18
total_1 = rate_1 * 3
total_2 = rate_2 * 2
result = total_1 + total_2
return result
|
A company sells 10 widgets each day. If each widget costs $3 to produce, and they sell them for $7 each, by how much money do they profit in one week? | def solve() -> int:
widgets_sold_per_day = 10
cost_per_widget = 3
price_per_widget = 7
days_per_week = 7
widgets_sold_per_week = widgets_sold_per_day * days_per_week
profit_per_widget = price_per_widget - cost_per_widget
total_profit = widgets_sold_per_week * profit_per_widget
result = t... |
Anna has 25% more candies than Maria. If Maria has 80 candies, how many candies does Anna have? | def solve() -> int:
maria_candies = 80
anna_candies = maria_candies + (maria_candies * 0.25)
result = anna_candies
return result
|
A car travels at a speed of 60 km/h. How much time will it take for the car to travel a distance of 180 km? | def solve() -> int:
speed = 60
distance = 180
time = distance / speed
result = time
return result
|
Jason has twice as many pencils as Jackie. Together, they have 24 pencils. How many pencils does Jackie have? | def solve() -> int:
total_pencils = 24
jason_pencils = total_pencils * 2/3
jackie_pencils = total_pencils * 1/3
result = jackie_pencils
return result
|
Jonathan can paint a wall in 2 hours while Maria can paint the same wall in 3 hours. If they work together, how many hours would it take for them to paint 4 similar walls? | def solve() -> int:
j_time = 2
m_time = 3
together_time = 1 / ((1/j_time) + (1/m_time))
total_time = together_time * 4
result = total_time
return result
|
The average rainfall for three cities was as follows: City A had 10mm of rainfall, City B had 20mm of rainfall, and City C had 30mm of rainfall. What was the average amount of rainfall for the three cities? | def solve() -> int:
total_rainfall = 10 + 20 + 30
average_rainfall = total_rainfall / 3
result = average_rainfall
return result
|
If a store sells 30 items per hour and is open for 10 hours, how many items in total does it sell? | def solve() -> int:
items_per_hour = 30
hours_open = 10
total_items_sold = items_per_hour * hours_open
result = total_items_sold
return result
|
Jordan wants to buy a set of resistance bands which come in 3 different strengths. The first has a resistance of 10 lbs, the second has a resistance of 20 lbs, and the third has a resistance of 30 lbs. If Jordan wants to buy 2 of each strength, how much total resistance will his set have? | def solve() -> int:
total_resistance = (10 + 20 + 30) * 2
result = total_resistance
return result
|
Sam wants to invest in the stock market. He has $500 and he wants to invest 70% of his money in a technology company and 30% in an energy company. If he invests $350 in the technology company, how much will he have left to invest in the energy company? | def solve() -> int:
money = 500
tech_percent = 0.7
energy_percent = 0.3
tech_investment = money * tech_percent
energy_investment = money * energy_percent
tech_investment = 350
remaining_money = money - tech_investment
remaining_energy_investment = remaining_money * en... |
A train travels at a speed of 50 miles per hour. How long does it take for the train to travel 250 miles? | def solve() -> int:
train_speed = 50
distance_traveled = 250
travel_time = distance_traveled/train_speed
result = travel_time
return result
|
Mia is counting the number of chairs in a room. All the chairs are either wooden, metal, or plastic. She sees 100 chairs in total, 50% of which are metal and another 25% are wooden. If she chooses one chair at random, what is the percentage chance it's a plastic chair, rounded to the nearest integer? | def solve() -> int:
total_chairs = 100
metal_chairs = total_chairs * 0.5
wooden_chairs = total_chairs * 0.25
plastic_chairs = total_chairs - metal_chairs - wooden_chairs
percentage_plastic = (plastic_chairs / total_chairs) * 100
rounded_percentage = round(percentage_plastic)
result = ro... |
Dylan wishes to hike a vertical trail with a ratio of 2 feet up for every 6 feet moved horizontally. His goal is to reach the summit, which sits at an elevation of 2,500 feet. If he starts at an elevation of 1,000 feet, how far does he need to hike horizontally to reach the summit? | def solve() -> int:
ratio = 2/6
elevation_difference = 2500 - 1000
horizontal_distance = elevation_difference / ratio
result = horizontal_distance
return result
|
Emma has 51 books, Stella has 28 books, and Lily has 11 books. How many books do they have altogether? | def solve() -> int:
total = 51 + 28 + 11
result = 90
return result
|
A restaurant has 90 plates for a catering event. They have already used 34 plates, but they need to serve enough food for 7 more tables. How many more plates does the restaurant need? | def solve() -> int:
total_plates = 90
used_plates = 34
tables_needed = 7
plates_per_table = 10
remaining_tables = tables_needed - (total_plates - used_plates) // plates_per_table
plates_needed = remaining_tables * plates_per_table
result = plates_needed
return result
|
``` A person borrows money at 7% interest rate compounded annually to purchase a house. If the monthly payment on the mortgage is $2000 for 30 years, find the initial borrowed amount. | def solve() -> int:
r = 0.07
n = 12
t = 30
payment = 2000
num_payments = n*t
A = payment*(1 - (1 + r/n)**(-num_payments))/(r/n)
result = f'<<<{A}>>>'
result = A
return result
|
A bag contains 40 green balls and 60 blue balls. If a ball is selected randomly from the bag, what is the probability of selecting a green ball? | def solve() -> int:
green_balls = 40
blue_balls = 60
total_balls = green_balls + blue_balls
probability = green_balls / total_balls
result = probability
return result
|
If the sum of two consecutive even numbers is 162, what is the smaller number? | def solve() -> int:
Sum = 162
First_Number = (Sum - 2) / 2
result = First_Number
return result
|
ome possible questions and programs are: The difference of the three numbers is 500. If the first number is 700, and the second number is half of the third number, find the value of the second number. | def solve() -> int:
first = 700
diff = 500
third = first - diff
second = third / 2
result = second
return result
|
A toy store has a maximum shelf capacity of 500 toys. If there are already 280 toys on the shelf, how many more toys can be added to the shelf if each toy takes up a space of 2 square feet and the shelf has an area of 1000 square feet? | def solve() -> int:
max_capacity = 500
toys_loaded = 280
area_per_toy = 2
shelf_area = 1000
available_toy_capacity = (shelf_area // area_per_toy) - toys_loaded
result = available_toy_capacity
return result
|
The cost of an item is $25 and it is on sale for 20% off. What is the sale price of the item? | def solve() -> int:
item_cost = 25
discount_percent = 20
new_price = item_cost * (100-discount_percent)/100
result = new_price
return result
|
Student: A group of people planted 54 trees in a park. 4/9 of the trees are maple trees and the rest are oak trees. How many oak trees were planted? | def solve() -> int:
total_trees = 54
maple_trees = total_trees * 4/9
oak_trees = total_trees - maple_trees
result = oak_trees
return result
|
Sarah has 4 red marbles, 5 blue marbles, and 7 green marbles. If she gives away 3 green marbles, how many marbles does she have left? | def solve() -> int:
red = 4
blue = 5
green = 7
green -= 3
total_marbles = red + blue + green
result = total_marbles
return result
|
Here are some possible new questions and programs: Lucas is making some lemonade for a party. He needs to mix lemon juice and water in a ratio of 1:4 to get the right taste. He has 750 milliliters of lemon juice and a large pitcher that can hold 5 liters. How much water does he need to add to the pitcher to fill it up ... | def solve() -> int:
juice = 750 / 1000
pitcher = 5
total = juice * 5
water = total - juice
result = round(water, 2)
return result
|
Student: Harris has a stamp collection which consists of 1000 stamps. On the first day, he carefully arranges 520 stamps. On the second day, he arranges another 360 stamps. How many more stamps does Harris need to arrange to complete his collection? | def solve() -> int:
stamps_total = 1000
stamps_arranged_1 = 520
stamps_arranged_2 = 360
stamps_remaining = stamps_total - (stamps_arranged_1 + stamps_arranged_2)
result = stamps_remaining
return result
|
A person runs for 45 minutes at a speed of 8 km/hour. How many km did he cover during this time? | def solve() -> int:
time_in_hours = 45 / 60
speed = 8
distance = time_in_hours * speed
result = distance
return result
|
Samantha picked 30 strawberries from the garden before going to bed. In the morning, she discovered that there were 6 times more strawberries. How many strawberries grew overnight? | def solve() -> int:
picked_strawberries = 30
total_strawberries = picked_strawberries * 6
grew_strawberries = total_strawberries - picked_strawberries
result = grew_strawberries
return result
|
A store offers a 25% discount on all items. If an item originally costs $80, how much will it cost after the discount? | def solve() -> int:
original_price = 80
discount_percentage = 25
discount_amount = original_price * (discount_percentage / 100)
new_price = original_price - discount_amount
result = new_price
return result
|
Amy collected a total of 27 stones on Monday. On Tuesday, she collected 4 more stones than she did on Monday. If each stone is worth 20 cents, how much money can Amy make by selling all her stones? | def solve() -> int:
monday = 27
tuesday = monday + 4
price_per_stone = 0.2
total_money = monday * price_per_stone + tuesday * price_per_stone
result = 10.8
return result
|
If Anna has 1/2 as many books as she has pens on her desk, and she has 24 pens, how many books does she have? | def solve() -> int:
pens = 24
books = pens / 2
result = books
return result
|
A store has 60 shirts and 45 pants. If 25% of the shirts are sold and 40% of the pants are sold, how many items are left in the store? | def solve() -> int:
total_shirts = 60
total_pants = 45
shirts_sold = total_shirts * 0.25
pants_sold = total_pants * 0.4
remaining_shirts = total_shirts - shirts_sold
remaining_pants = total_pants - pants_sold
result = remaining_shirts + remaining_pants
return result
|
A bottle of shampoo is priced at $6.99. If the store has a 20% off sale, how much will the bottle of shampoo cost? | def solve() -> int:
price = 6.99
percent_off = 20
discount = price * (percent_off/100)
new_price = price - discount
result = new_price
return result
|
John ran 10 miles last week, but he only has time to run one-eighth of the number of miles this week. If John wants to run 5 times the number of miles next week, how many miles does he need to run? | def solve() -> int:
last_week_miles = 10
this_week_miles = last_week_miles / 8
next_week_miles = 5 * this_week_miles
result = next_week_miles
return result
|
A coffee shop sells 200 cups of coffee every weekday and twice as much on the weekend. How many cups of coffee does it sell by the end of the week? | def solve() -> int:
weekday_cups = 200
weekend_cups = 2 * weekday_cups
total_cups = weekday_cups * 5 + weekend_cups * 2
result = total_cups
return result
|
Alice has $80 dollars in her pocket, and her friend has $20 less than Alice. After a day, Alice triples her money by gambling, while her friend spends half of her money on a gift and gives the remaining to Alice. How much money does Alice have now? | def solve() -> int:
alice_money = 80
friend_money = alice_money - 20
alice_money *= 3
friend_money /= 2
alice_money += friend_money
result = alice_money
return result
|
Karen bought 5 boxes of chocolates, each box contains 10 chocolates. She shared evenly among 4 friends. How many chocolates does each friend get? | def solve() -> int:
boxes = 5
chocolates = 10
friends = 4
total_chocolates = boxes * chocolates
chocolates_per_friend = total_chocolates/friends
result = chocolates_per_friend
return result
|
Tom went to the bike store to buy helmets. His favorite brand was having a sale that offered customers to buy one helmet at full price and get the second one for half off the full price. If he purchased two helmets that were each originally marked at a full price of $40, how much did he spend on the two helmets, in dol... | def solve() -> int:
helmet_price = 40
discounted_price = helmet_price / 2
total_price = helmet_price + discounted_price
result = total_price
return result
|
An orchard has 192 orange trees, of which 85% are from seed. How many orange trees are from seed? | def solve() -> int:
no_of_orange_trees_from_seed = 0
total_no_of_orange_trees = 192
percentage_from_seed = 0.85
no_of_orange_trees_from_seed = total_no_of_orange_trees * percentage_from_seed
result = no_of_orange_trees_from_seed
return result
|
A store sells cars and each car has a price tag of $16,500. John wants to buy 2 cars but he gets a 10% discount on both cars. He also pays 6% sales tax on the discounted price. How much did John spend in total? | def solve() -> int:
car_cost = 16500
number_of_cars = 2
discount_rate = 0.1
sales_tax_rate = 0.06
total_car_cost = car_cost * number_of_cars
discount = total_car_cost * discount_rate
cost_after_discount = total_car_cost - discount
sales_tax = cost_after_discount * sal... |
A car is rented at a rate of $30 per day. If the rental is for 5 days and there is a 15% discount, how much is the total rental cost after tax (10%) is applied? | def solve() -> int:
rate_per_day = 30
num_of_days = 5
price_before_discount = rate_per_day * num_of_days
discount = price_before_discount * 0.15
price_after_discount = price_before_discount - discount
sales_tax = price_after_discount * 0.1
total_cost = price_after_discount + sales_tax
re... |
Michael runs at a speed of 9 miles per hour. When he encounters a muddy path, his speed decreases by 50 percent, but when he runs on a paved track, his speed increases by 15 percent. If Michael runs on a muddy path for 2 miles and on a paved track for 4 miles, how long will his entire run take? Samantha is trying to ea... | def solve() -> int:
speed = 9
muddy_distance = 2
paved_distance = 4
muddy_speed = speed * 0.5
paved_speed = speed * 1.15
muddy_time = muddy_distance / muddy_speed
paved_time = paved_distance / paved_speed
total_time = muddy_time + paved_time
re... |
A store sells shoes for $75 per pair. If they sell 30 pairs of shoes, how much money did they make? | def solve() -> int:
price_per_pair = 75
number_of_pairs = 30
total_money = price_per_pair * number_of_pairs
result = total_money
return result
|
Tim and Tom have a total of 100 marbles. Tim has twice as many marbles as Tom. How many marbles does Tim have? | def solve() -> int:
total_marbles = 100
tim_marbles = (2/3)*total_marbles
result = tim_marbles
return result
|
Mary works 8 hours a day, 5 days a week. Her hourly rate is $20. Calculate her total earning in a week. | def solve() -> int:
hours_per_day = 8
number_of_days = 5
hourly_rate = 20
total_earning = hours_per_day * number_of_days * hourly_rate
result = total_earning
return result
|
Alicia has 15 oranges and wants to divide them between her 3 siblings. How many oranges will each sibling get? | def solve() -> int:
num_oranges = 15
num_siblings = 3
oranges_per_sibling = num_oranges / num_siblings
result = oranges_per_sibling
return result
|
Last year, Susan spent $1000 on rent, $300 on food, and $150 on car insurance. This year, her rent goes up by 20%, food costs increase by 50%, and the cost of car insurance quadruples because she had an accident. How much more will Susan pay for her month expenses compared to last year? | def solve() -> int:
rent_last_year = 1000
food_last_year = 300
insurance_last_year = 150
rent_this_year = rent_last_year * 1.2
food_this_year = food_last_year * 1.5
insurance_this_year = insurance_last_year * 4
total_last_year = rent_last_year + food_last_year + insurance_last_year... |
A supermarket can pack 200 bags in 30 minutes. How long will it take to pack 800 bags? | def solve() -> int:
bags_per_minute = 200/30
total_bags = 800
minutes_needed = total_bags / bags_per_minute
result = minutes_needed
return result
|
Janet deposited $1000 in a bank account and received a 3% interest rate. How much interest would she earn after 7 months? | def solve() -> int:
deposit_amount = 1000
interest_rate = 0.03
time = 7
result = deposit_amount*interest_rate*time
result = 210
return result
|
At a pet adoption event, Sarah is tasked with walking a group of five dogs. She walks 16 different groups of dogs throughout the event. In one group, she walks alongside two dogs she has walked before, and in another group, she walks alongside one dog she has walked before. How many unique dogs did Sarah walk during th... | def solve() -> int:
num_groups = 16
dogs_per_group = 5
dogs_walked_twice = 2
dogs_walked_once = 1
total_dogs_walked = num_groups * dogs_per_group
dogs_walked_twice_total = dogs_walked_twice * num_groups
dogs_walked_once_total = dogs_walked_once * (num_groups - 1)
unique_do... |
Gavin bought 5 bottles of juice for $3 each, and 3 packages of candy for $4 each. What is the total cost Gavin paid for these items? | def solve() -> int:
juice_price = 3
candy_price = 4
total_price = juice_price * 5 + candy_price * 3
result = total_price
return result
|
A car travels 400 miles in 6 hours. What is the speed of the car in miles per hour? | def solve() -> int:
distance = 400
time = 6
speed = distance / time
result = speed
return result
|
``` A company makes a 20% profit on the selling price of their products. If the company sells a product for $100, what is their profit? | def solve() -> int:
selling_price = 100
profit_percent = 20
profit_amt = selling_price * profit_percent / 100
result = profit_amt
return result
|
-Use similar concepts and formats as the example question! Team Basket Ballers plays in a basketball league. They played a total of 15 games, and won 9 games, lost 4, and drew the rest of the matches. They earn 2 points for a win, 1 point for a draw, and nothing for a loss. How many points did they have at the end of t... | def solve() -> int:
games = 15
wins = 9
losses = 4
draws = games - wins - losses
win_points = 2
draw_points = 1
loss_points = 0
points = wins * win_points + draws * draw_points + losses * loss_points
result = points
return result
|
Student: A store offers a 10% discount on all items. If an item's original price was $50, what is its final price after the discount? | def solve() -> int:
original_price = 50
discount_amount = original_price * 0.1
final_price = original_price - discount_amount
result = final_price
return result
|
If 8 doctors can see 100 patients in a day, how many doctors are needed to see 150 patients in a day? | def solve() -> int:
doctors_per_day = 8
patients_per_day = 100
patients_needed = 150
doctors_needed = (patients_needed * doctors_per_day) / patients_per_day
result = doctors_needed
return result
|
Kenny is making a birdhouse that measures 20 inches on each side. He wants to paint the outside of the birdhouse. Each can of paint can cover 350 square feet. How many cans of paint will Kenny need? | def solve() -> int:
side_length = 20
area = side_length * side_length * 6
paint_can_coverage = 350
cans_of_paint_needed = area / paint_can_coverage
result = cans_of_paint_needed
return result
|
A pizza shop sells a total of 72 slices of pizza in one day. Each pizza has 8 slices. How many pizzas did the pizza shop sell in one day? | def solve() -> int:
total_slices = 72
slices_per_pizza = 8
pizzas_sold = total_slices / slices_per_pizza
result = pizzas_sold
return result
|
Alex has 100 pennies in his jar. His friend Erica has twice as many pennies. How much more money does Erica have? | def solve() -> int:
alex_pennies = 100
erica_pennies = 2 * alex_pennies
money_difference = erica_pennies - alex_pennies
result = money_difference
return result
|
The number of students who wish to go on a football game is 70% of those who wish to go on a soccer game. If there are 4500 students who wish to go on a soccer game, how many students are there altogether? | def solve() -> int:
soccer_game = 4500
football_game = 0.7*soccer_game
total_students = soccer_game + football_game
result = total_students
return result
|
Emma is training to run a marathon. She runs 3 miles on Monday, and then increases her distance by 2 miles each day for the rest of the week. How many miles will she run in total for the week? | def solve() -> int:
first_day = 3
increase = 2
total_miles = first_day + (increase * 6)
result = total_miles
return result
|
In a survey, 200 people were asked if they prefer tea, coffee, or neither. 75 people said they like tea, 85 said they like coffee, and 25 said they like both. How many people do not like either drink? | def solve() -> int:
neither = 200 - (75 + 85 - 25)
result = neither
return result
|
Kay won 3 soccer games out of 5 soccer games. If each win is worth 3 points and each loss is worth 1 point, what is Kay's total score? | def solve() -> int:
win_points = 3*3
loss_points = 2*1
total_score = win_points + loss_points
result = total_score
return result
|
If Mary can buy 3 pencils for $6, how much will it cost her to buy 5 pencils? | def solve() -> int:
price_per_pencil = 6/3
total_cost = price_per_pencil * 5
result = total_cost
return result
|
Jack has 8 pencils and 4 pens. If he pays $2 for each pen, how much does he pay in total? | def solve() -> int:
amount_pens = 4
amount_pencils = 8
cost_per_pen = 2
total_cost = amount_pens * cost_per_pen
result = total_cost
return result
|
Mark leaves his house and takes 3 steps to the east, and 4 steps to the north. How far is Mark from his house? | def solve() -> int:
distance = 0
distance = (3**2 + 4**2)**0.5
result = distance
return result
|
There are 2400 citizens voting in a town. If John gets 400 votes, and James captures 27% of the remaining votes, how many votes did the third person get? | def solve() -> int:
remaining_votes = 2400 - 400
johns_votes = 400
jimmy_percent = 0.27
jimmy_votes = remaining_votes * jimmy_percent
total_votes = johns_votes + jimmy_votes
third_person = 2400 - total_votes
result = 1044
return result
|
Student: Anna needs to score at least 55 points to pass to the next class. She earned 11 points for each of the 5 exams she wrote but lost 4 points during the school year for bad behavior. How many more points can Anna lose and still be able to pass the next class? | def solve() -> int:
total_points = 55
exam_points = 11
exam_number = 5
lost_points = 4
exam_total = exam_points * exam_number
remaining_points = exam_total - lost_points
max_lost = remaining_points - total_points
result = max_lost
return result
|
Janet and Joe have 300 apples in their basket. They plan to pass the apples to their friends, each getting the same amount of apples as Janet and Joe. How many apples will each of their friends get? | def solve() -> int:
apples = 300
friends = 2
each_friend = apples / friends
result = each_friend
return result
|
At a party, there were 7 times as many adults as children. If there were 21 children, how many adults were there? | def solve() -> int:
adults = 0
children = 21
adults = children * 7
result = adults
return result
|
Samantha is setting up her new home theater system. She bought 5 speakers on sale for $120 each. The store told her that she saved a total of $100. If Samantha saved the same amount on each speaker, what was the original price of each speaker? | def solve() -> int:
original_price = 0
discount = 100
number_of_speakers = 5
total_savings = discount
savings_per_speaker = total_savings / number_of_speakers
original_price = 120 - savings_per_speaker
result = original_price
return result
|
Lily works at a library. Every Monday, she organizes 200 books, and every Tuesday she organizes twice the amount of books she organizes on Monday. Every Wednesday, she organizes 1/4 of the amount of books she organizes on Tuesday. If each book costs $5 and each DVD costs $10, how much does she earn from Monday to Wedne... | def solve() -> int:
monday_books = 200
tuesday_books = 2 * monday_books
wednesday_books = tuesday_books / 4
total_books = monday_books + tuesday_books + wednesday_books
book_cost = 5
dvd_cost = 10
earnings = total_books * book_cost
result = f'<<<{earnin... |
A bag contains 12 red balls and 8 blue balls. What is the probability of picking a blue ball if a ball is selected at random from the bag? | def solve() -> int:
num_blue_balls = 8
total_balls = 12 + 8
probability = num_blue_balls / total_balls
result = probability
return result
|
At the pet store, 2/3 of the customers prefer dogs to cats. At the animal shelter, 3/4 of the customers prefer cats to dogs. If there are 150 customers at the pet store and 200 customers at the animal shelter, find the total number of customers who prefer dogs or cats. | def solve() -> int:
pet_store_customers = 150
animal_shelter_customers = 200
dogs_preference = 2/3
cats_preference = 3/4
dogs_customers = pet_store_customers * dogs_preference
cats_customers = animal_shelter_customers * cats_preference
total_customers = dogs_customers + cats_c... |
arah was saving money for college. Each week, she saves 25 dollars and each month she saves 100 dollars. If she has been saving for 5 years, how much has she saved so far? | def solve() -> int:
weekly_saved = 25
monthly_saved = 100
years = 5
total_saved = (weekly_saved * 52) * 5 + (monthly_saved * 12 * 5)
result = total_saved
return result
|
2. Aria has 10 fewer papers than Tamora, and twice as many as does Rustin. If Rustin has 8 papers, how many papers does Tamora have? | def solve() -> int:
Rustin_papers = 8
Aria_papers = Rustin_papers * 2
Tamora_papers = Aria_papers + 10
result = Tamora_papers
return result
|
Emily's father wants to buy chocolates for all the guests at her birthday party. There are 20 guests and Emily's father wants to give 5 chocolates to each guest. A pack of chocolates contains 12 pieces. How many packs should Emily's father buy? | def solve() -> int:
num_guests = 20
chocolates_per_guest = 5
chocolates_needed = num_guests * chocolates_per_guest
chocolates_per_pack = 12
packs_needed = chocolates_needed // chocolates_per_pack + (chocolates_needed % chocolates_per_pack > 0)
result = packs_needed
return result
|
Mr. and Mrs. Smith shared a sum of money between their three children, John, Mark, and Susan. John got $800, which was $300 less than Susan's share. Mark got twice as much as John. How much was the money shared? | def solve() -> int:
susan_share = 800 + 300
mark_share = 2 * 800
total_share = 800 + 1100 + 1600
result = total_share
return result
|
Possible questions and programs: A baker made two dozen muffins and gave away half of them to his friends. He then sold four muffins to a customer and ate one muffin for himself. How many muffins did he have left? | def solve() -> int:
muffins = 24
muffins = muffins - muffins//2
muffins = muffins - 4
muffins = muffins - 1
result = muffins
return result
|
In a library, there are 3/4 times as many non-fiction books as fiction books. If there were 240 fiction books, how many non-fiction books were there in the library? Moreover, if there were 5 librarians and 80 students reading books, how many people were there in the library? | def solve() -> int:
fiction_books = 240
non_fiction_books = (3/4) * fiction_books
total_books = fiction_books + non_fiction_books
librarians = 5
students = 80
total_people = librarians + students
result = total_people
return result
|
Jackson buys two printers at $150 each and three boxes of paper at $30 each. He gets a 10% discount on all the items he purchased. How much does he pay in all? | def solve() -> int:
price1 = 150
price2 = 30
discount = 0.1
quantity1 = 2
quantity2 = 3
subtotal1 = price1*quantity1
subtotal2 = price2*quantity2
subtotal = subtotal1+subtotal2
discount_amount = subtotal*discount
total = subtotal-discount_amount
result = total
return res... |
As part of a fitness routine, a person runs at a pace of 8 miles per hour. If they run for 45 minutes, what distance would they cover in miles? | def solve() -> int:
speed = 8
time = 45/60
distance = speed * time
result = distance
return result
|
Ali scored 82, 94, and 87 on his math tests. What is the average of the scores? | def solve() -> int:
test1_score = 82
test2_score = 94
test3_score = 87
total_score = test1_score + test2_score + test3_score
average_score = total_score / 3
result = average_score
return result
|
Lisa has a rectangular garden that measures 12 meters by 9 meters. She wants to plant flowers along the perimeter of the garden, leaving 1 meter of space between each flower. How many flowers does she need? | def solve() -> int:
length = 12
width = 9
space = 1
perimeter = 2 * (length + width)
spaces = perimeter / space
flowers = spaces - 1
result = flowers
return result
|
``` Jim can paint a room in 6 hours. If he starts painting at 8am, what is the earliest time he can finish? | def solve() -> int:
start_time = 8
hours = 6
finish_time = start_time + hours
result = finish_time
return result
|
Liam is twice as old as Jaden. In 5 years, Liam will be three times as old as Jaden will be. If Jaden is 10, how old is Liam? | def solve() -> int:
age_jaden = 10
age_liam_in_5_years = age_jaden * 3
age_liam = age_liam_in_5_years - 5 * 3
result = age_liam
return result
|
A family is planning a vacation and needs to rent a car. The rental company offers a small car for $30 per day and a minivan for $60 per day. If the family rents the minivan for 7 days and the small car for 4 days, how much will they pay in total? | def solve() -> int:
small_car_rental_cost = 30
minivan_rental_cost = 60
num_small_car_days = 4
num_minivan_days = 7
total_small_car_cost = small_car_rental_cost * num_small_car_days
total_minivan_cost = minivan_rental_cost * num_minivan_days
total_spent = total_small_car_cost + total_minivan... |
Tina is flying a plane and needs to calculate the total weight of all the passengers and luggage. She has 19 passengers that each weigh 200 pounds, and 4 suitcases that each weigh 25 pounds. How much weight is Tina carrying? | def solve() -> int:
total_weight = 0
total_weight += 19*200
total_weight += 4*25
result = total_weight
return result
|
Chloe borrows $10,000 from a bank in a personal loan. The interest rate is 9% per year. If she takes 2 years to pay off the loan, how much money does she need to pay back in total? | def solve() -> int:
loan_amount = 10000
interest_rate = 0.09
loan_duration = 2
total_interest = loan_amount * interest_rate * loan_duration
total_payment = loan_amount + total_interest
result = total_payment
return result
|
Meg and Gil each bought fishhooks that cost them $6.95 each. If they bought a total of 4 fishhooks, how much money did they spend in total? | def solve() -> int:
num_fishhooks = 4
cost_per_fishhook = 6.95
result = num_fishhooks * cost_per_fishhook
return result
|
san is looking to buy new plants for her garden. Last month, it cost her $80 but this month it costs $92. What is the percent increase in cost? | def solve() -> int:
price_old = 80
price_new = 92
price_increase = price_new - price_old
percent_increase = (price_increase/price_old) * 100
result = percent_increase
return result
|
A school has 34 students who each paid $150 for a field trip. The school wants to rent 6 buses and each bus costs $600 per day. If the field trip is for 3 days, what is the total cost of renting the buses and how much profit is the school making from the trip if the school charges $300 for each student's enrollment? | def solve() -> int:
students = 34
fee_per_student = 150
total_fee = students * fee_per_student
buses = 6
cost_per_day = 600
days = 3
total_cost = buses * cost_per_day * days
profit = total_fee - total_cost - students * 300
result = (total_cost, profit)
return resu... |
Aliza was prompted to get a full of 75 gallons of diesel. The station charges an additional 20% for being late to pick up the fuel. How much did Aliza pay for the fuel at the end of the day? | def solve() -> int:
amount_of_fuel = 75
late_fee_percentage = 0.2
total_price_before_fee = amount_of_fuel
total_price_after_fee = amount_of_fuel + (amount_of_fuel * late_fee_percentage)
result = total_price_after_fee
return result
|
Bob spends 2/5 of his monthly salary on rent, 1/3 of the rest on groceries, and 1/4 of what is left on leisure activities. If his monthly salary is $2000, how much money does he have remaining at the end of the month? | def solve() -> int:
salary = 2000
rent_spending = salary*(2/5)
remaining_money1 = salary - rent_spending
grocery_spending = remaining_money1*(1/3)
remaining_money2 = remaining_money1 - grocery_spending
leisure_spending = remaining_money2*(1/4)
remaining_money3 = remaining_money2 - leisure_sp... |
Tom is twice as old as his sister, Amy. If Tom is 20 years old, how old is Amy? | def solve() -> int:
age_of_tom = 20
age_of_sister = age_of_tom / 2
result = age_of_sister
return result
|
If a company made a profit of $1,500,000 in June and July and a loss of $600,000 in August, what was the total profit or loss? | def solve() -> int:
profit_june_july = 1500000
loss_august = 600000
total_profit_loss = profit_june_july - loss_august
result = total_profit_loss
return result
|
Liam has a rectangular garden that is 12 meters long and 8 meters wide. He wants to plant some flowers along the perimeter of the garden, leaving 1 meter of space between each flower. How many flowers can he plant in total? | def solve() -> int:
length = 12
width = 8
space = 1
perimeter = 2 * (length + width)
space_num = perimeter // space
flower_num = space_num - 1
result = flower_num
return result
|
Student: Carlos is 24 years old. His brother Benjamin is three times as old. How old is Benjamin? | def solve() -> int:
carlos_age = 24
benjamin_age = carlos_age * 3
result = benjamin_age
return result
|
Ben buys 2 teddy bears from a toy store, one for himself and one for his friend. He pays $18 for each teddy bear, but he sells the one for his friend for $20. He also buys a gift wrap for $2. How much money does he lose or gain from the transaction? | def solve() -> int:
bears = 2
buy_price = 18
sell_price = 20
gift_wrap = 2
cost = bears * buy_price + gift_wrap
revenue = sell_price
loss_or_gain = revenue - cost
result = loss_or_gain
return result
|
Student: A rectangle has a length of 8 cm and a width of 5 cm. What is the area of the rectangle? | def solve() -> int:
length = 8
width = 5
area = length * width
result = area
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.