question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A company sells 1000 widgets per month at a price of $10 per widget. The company's overhead expenses are $5000 per month. The cost of producing each widget is $5. How much profit does the company make each month? | def solve() -> int:
widget_price = 10
widget_cost = 5
overhead_expense = 5000
widgets_sold = 1000
total_widget_cost = widget_cost * widgets_sold
total_widget_revenue = widget_price * widgets_sold
total_expenses = total_widget_cost + overhead_expense
profit = total_widget_revenue - t... |
Maya wants to buy a car. The dealership offers her a deal where she can pay $10,000 for the first year and increase the payment by 10% every year for the next 5 years. What will be the total amount she pays for the car after 6 years? | def solve() -> int:
year = 6
initial_payment = 10000
increase_rate = 0.1
total_payment = initial_payment
for i in range(1, year):
total_payment += initial_payment*(1+increase_rate)**i
result = total_payment
return result
|
Emily owns a car wash. Every Monday she washes 30 cars, and every Tuesday she washes three times the amount of cars she washes on Monday. Every Wednesday, she washes 1/5 of the amount of cars she washes on Tuesday. If she charges $10 per car, how much does she earn from Monday to Wednesday? | def solve() -> int:
monday_cars = 30
tuesday_cars = 3 * monday_cars
wednesday_cars = tuesday_cars / 5
total_cars = monday_cars + tuesday_cars + wednesday_cars
earnings = total_cars * 10
result = earnings
return result
|
A rectangular box has a length of 6 cm, a width of 4 cm and a height of 3 cm. What is the volume of the box? | def solve() -> int:
length = 6
width =4
height = 3
volume = length*width*height
result = volume
return result
|
A restaurant can cook a meal in 10 minutes using a pressure cooker or in 25 minutes using a regular pot. If John wants to cook 3 meals using the pressure cooker and 4 meals using the regular pot, how long will it take him in total? | def solve() -> int:
pressure_cooker_time = 10
regular_pot_time = 25
meals_pressure_cooker = 3
meals_regular_pot = 4
total_time = (meals_pressure_cooker * pressure_cooker_time) + (meals_regular_pot * regular_pot_time)
result = total_time
return result
|
How many legs are there in total if there are 12 llamas and 8 alpacas at a farm? Alice had a budget of $500 for shopping. She spent $80 on Monday, $75 on Tuesday, $65 on Wednesday, $85 on Thursday, $90 on Friday, $100 on Saturday, and $45 on Sunday. How much money did she have left after shopping on Wednesday? | def solve() -> int:
llamas = 12
alpacas = 8
total_legs = (llamas * 4) + (alpacas * 4)
budget = 500
spent_monday = 80
spent_tuesday = 75
spent_wednesday = 65
money_left = budget - (spent_monday + spent_tuesday + spent_wednesday)
result = money_left
return resul... |
The distance between two cities is 150 miles. If a car drives 50 miles per hour, how long does it take to get there? | def solve() -> int:
distance = 150
speed = 50
time = distance / speed
result = time
return result
|
``` There are 30 students in a classroom. If there are 18 girls, how many boys are in the classroom? | def solve() -> int:
num_boys = 30 - 18
result = num_boys
return result
|
In a department store, there are four floors, and each floor has six times as many employees as the floor above it. The top floor has 24 employees. How many employees work in the department store? | def solve() -> int:
top_floor = 24
third_floor = top_floor / 6
second_floor = third_floor / 6
first_floor = second_floor / 6
total_employees = top_floor + third_floor + second_floor + first_floor
result = total_employees
return result
|
In a game, the player starts with 100 points. They gain 50 points for every level they complete and they lose 20 points for every incorrect answer. If the player completed 4 levels and got 2 incorrect answers, how many points do they have? | def solve() -> int:
points = 100
points += 50*4
points -= 20*2
result = points
return result
|
Max has 18 apples in his basket. He ate 7 apples and picked 11 more from the orchard. The next day, he gave 3 apples to his neighbor and picked 14 more from the same orchard. How many apples does Max have in his basket now? | def solve() -> int:
max_apples = 18
ate_apples = 7
picked_apples = 11
gave_apples = 3
picked_more_apples = 14
max_apples -= ate_apples
max_apples += picked_apples
max_apples -= gave_apples
max_apples += picked_more_apples
result = max_apples
return result
|
In a competition, the top 5 scorers received a certificate and a gift each. There are 10 people who scored within the top 5 in the competition. How many certficates and gifts were rewarded in total? | def solve() -> int:
num_scorers=10
certificates_gifts_each=2
total_certificates_gifts=num_scorers*certificates_gifts_each
result = total_certificates_gifts
return result
|
Student: Kaylee has one-tenth as many strawberries as watermelons and 5 more cantaloupes than twice as many oranges as watermelons. If Kaylee has 12 cantaloupes, how many fruits does Kaylee have in total? | def solve() -> int:
strawberries = 0
watermelons = 0
cantaloupes = 12
oranges = 0
watermelons = cantaloupes / 5 * 2
oranges = watermelons / 2
strawberries = watermelons / 10
total_fruits = strawberries + watermelons + cantaloupes + oranges
result = total_fruits
return result
|
Jason just inherited a sum of money from his grand aunt. The sum is $16,500 and he wants to put it towards his student loan of $25,000. How much of his loan is he able to pay off with his inheritance? | def solve() -> int:
total_loan_amount = 25000
amount_paid_off = 16500
remaining_loan_amount = total_loan_amount - amount_paid_off
result = round(remaining_loan_amount,2)
return result
|
-Make sure that the questions and programs are **novel and original** and not copied from any source. Some possible questions and programs are: Sarah loves to buy stickers. She buys one pack every week from her allowance, and each pack has 5 stickers. She also gets 3 packs as a gift every month from her aunt. After 6 m... | def solve() -> int:
weekly_packs = 1
weekly_stickers = 5
monthly_packs = 3
months = 6
total_packs = weekly_packs * 4 * months + monthly_packs * months
total_stickers = total_packs * weekly_stickers
given_stickers = total_stickers // 2
remain_stickers = total_stic... |
================================================================================ Ben, Carrie, and Dave are making bracelets with beads. Ben has 48 beads, Carrie has 36 beads, and Dave has 24 beads. Ben gives Carrie one fourth of his beads in exchange for a comic book, and then Carrie gives Dave six beads for a candy ba... | def solve() -> int:
beads_from_ben = 48 // 4
carrie_total = 36 + beads_from_ben
beads_to_dave = 6
carrie_final = carrie_total - beads_to_dave
result = carrie_final
return result
|
Maria wants to buy a customized phone case for herself with her favorite quote written on it. The phone case is priced at $15 but there is a 10% discount. The writing will cost $5 and the delivery charge is fixed at $7. What will be the total cost of the phone case? | def solve() -> int:
price = 15
discount = 0.10
writing_cost = 5
delivery_charge = 7
discounted_price = price - (price * discount)
total_cost = discounted_price + writing_cost + delivery_charge
result = total_cost
return result
|
Student: - Sam has to drive from his home to his office and back. He drives at an average speed of 50 miles per hour on the highway and 25 miles per hour on the city roads. The distance from his home to the highway entrance is 10 miles and the distance from the highway exit to his office is 5 miles. The distance on the... | def solve() -> int:
distance_home_highway = 10
distance_highway_office = 5
distance_highway = 20
total_distance = distance_home_highway + distance_highway_office + distance_highway
time_highway = distance_highway / 50
time_city = (distance_home_highway + distance_highway_office) / 25
t... |
Lily and Rose harvested 400 strawberries in total. Lily picked 1/2 of the strawberries that Rose picked. How many strawberries did Lily pick? | def solve() -> int:
rose_strawberries = 400 / (1 + 1/2)
lily_strawberries = 400 - rose_strawberries
result = lily_strawberries
return result
|
There are 16 fish in an aquarium. 10 of them are goldfish, 4 of them are guppies, and 2 of them are bettas. If the aquarium owner feeds the fish once a day and each fish eats 2 grams of food, how many grams of food does the owner need to buy for one week? | def solve() -> int:
fish = 16
food_per_fish = 2
food_per_day = fish * food_per_fish
days_per_week = 7
food_per_week = food_per_day * days_per_week
result = food_per_week
return result
|
A tree grows 2 meters each year. If it is currently 8 meters tall, how long did it take for the tree to reach that height? | def solve() -> int:
years_to_reach_height = (8 / 2)
result = years_to_reach_height
return result
|
In a shoe factory, there are 4 workers who produce 10 shoes each hour. Every 5 hours, they collectively produce an additional shoe. What will be the total number of shoes produced after 5 hours? | def solve() -> int:
workers = 4
shoes_per_hour = 10
additional_shoes = 1
total_shoes = (workers * shoes_per_hour * 5) + additional_shoes
result = total_shoes
return result
|
A garden is 20 feet long and 15 feet wide. What is the area of the garden in square feet? | def solve() -> int:
length = 20
width = 15
area = length * width
result = area
return result
|
If a pizza is cut into 8 equal slices, what is the angle of each slice? | def solve() -> int:
num_of_slices = 8
total_degrees = 360
degrees_per_slice = total_degrees / num_of_slices
result = degrees_per_slice
return result
|
Daniel has 12 bottles of water in his office. He drank 3 bottles today and realizes he still has 15 more bottles in the stockroom. If Daniel drinks 2 liters of water each day and each bottle contains 500 milliliters, for how many days will his supply of water last? | def solve() -> int:
initial_bottles = 12
drank_today = 3
stockroom_bottles = 15
total_bottles = initial_bottles - drank_today + stockroom_bottles
total_water_ml = total_bottles * 500
total_water_l = total_water_ml / 1000
days_of_supply = total_water_l / 2
... |
A car travels 360 km in 4 hours. If the car traveled at the same speed for 5 hours, how many kilometers did it travel in total? | def solve() -> int:
distance_per_hour = 360 / 4
total_distance = distance_per_hour * 5
result = total_distance
return result
|
A flower shop sells 15 tulips for $20. If Jack wants to buy 25 tulips, how much will he pay? | def solve() -> int:
cost_of_15_tulips = 20
num_of_tulips = 25
cost_of_one_tulip = cost_of_15_tulips / 15
total_cost = num_of_tulips * cost_of_one_tulip
result = total_cost
return result
|
A group of tourists visited a museum and the entrance count was 500 on the first day. Seven days later, they visited the museum again and found that the number of visitors had increased by a number four times more than the first day. If another 2000 tourists visited the museum after three days, determine the total numb... | def solve() -> int:
first_day = 500
days_between_visits = 7
increase = 4 * first_day
second_day = first_day + increase
days_between_second_and_third = 3
third_day = second_day + 2000
total_visitors = first_day + second_day + third_day
result = total_vis... |
Emelie has 4000 coins, consisting of quarters, dimes and nickels. She has 32 quarters, 65 dimes and 40 nickels. How much money does she have in total? | def solve() -> int:
quarters = 32
dimes = 65
nickels = 40
value_quarters = quarters * 25
value_dimes = dimes * 10
value_nickels = nickels * 5
total_money = value_quarters + value_dimes + value_nickels
result = total_money
return result
|
arah went to the grocery store to buy some apples and bananas. She bought 5 kg of apples and 3 kg of bananas. One kilogram of apples cost $2 and one kilogram of bananas cost $3. How much did she pay in total? | def solve() -> int:
apple_price = 2
banana_price = 3
apples = 5
bananas = 3
total_cost = (apple_price * apples) + (banana_price * bananas)
result = total_cost
return result
|
Mark had 5,000 dollars in his bank account. He spent 1,550 dollars on rent and 350 dollars on groceries. Then he received a paycheck of 3,000 dollars. How much money does Mark have in his bank account now? | def solve() -> int:
total_spent = 1550 + 350
total_received = 3000
final_amount = 5000 - total_spent + total_received
result = final_amount
return result
|
Kevin has a stack of 40 cards with numbers from 1 to 40 on them. He shuffles the cards and randomly picks one card. He then puts the card back in the stack and shuffles again. He repeats this process 10 times and writes down the numbers he picks. The sum of the numbers he writes down is 210. What is the average number ... | def solve() -> int:
cards = 40
picks = 10
sum = 210
average = sum / picks
result = average
return result
|
Student: Lily has 8 flowers in a vase. She picks 4 more flowers from the garden and puts them in the vase. Then she gives 3 flowers to her mom and 2 flowers to her dad. How many flowers are left in the vase? | def solve() -> int:
flowers = 8
flowers = flowers + 4
flowers = flowers - 3 - 2
result = flowers
return result
|
There are 25 students in a class. 20 students have apple, 15 have orange and 5 have both. How many students in this class have at least 1 fruit? | def solve() -> int:
apples = 20
oranges = 15
both = 5
at_least_1 = apples + oranges - both
result = at_least_1
return result
|
Lillie has 11 marbles and her friend gives her 21 more marbles. How many marbles does Lillie have in total? | def solve() -> int:
marbles_original = 11
marbles_received = 21
marbles_total = marbles_original + marbles_received
result = marbles_total
return result
|
Cascade High School has 100 teachers, 6 librarians, 1 dean and 13 classes with each having 40 students. How many people are there in total in Cascade High School? | def solve() -> int:
num_teachers = 100
num_librarians = 6
num_dean = 1
num_students = 40 * 13
total = num_teachers + num_librarians + num_dean + num_students
result = total
return result
|
Alice has 30 sweets in a jar. A third of them are sour, half as many are sweet, and the remaining sweets are equally divided between salty and bitter. If Alice picks a sweet at random, what are the odds it's bitter (expressed as a percentage)? | def solve() -> int:
sweets_total = 30
sour = sweets_total / 3
sweet = sour / 2
salty_and_bitter = sweets_total - sour - sweet
bitter = salty_and_bitter / 2
odds_bitter = bitter / sweets_total * 100
result = odds_bitter
return result
|
Before the lockdown, William could bike 15 miles per hour, but since he hasn't been able to go out as much, he has lost some of his stamina. Now, he can only bike at 75% of his initial speed. What is William's new biking speed? | def solve() -> int:
initial_speed = 15
new_speed = initial_speed * 0.75
result = new_speed
return result
|
A hair salon can serve 4 customers every 30 minutes on weekdays and 6 customers every 30 minutes on weekends. How many customers can they serve from 10 am to 2 pm on a Saturday? | def solve() -> int:
weekday_customers = 4
weekend_customers = 6
intervals = 8
total_customers = intervals * weekend_customers
result = total_customers
return result
|
A company has a total of 200 employees. If 35% of the employees are managers, how many managers are there? | def solve() -> int:
total_employees = 200
manager_ratio = 0.35
managers = total_employees * manager_ratio
result = managers
return result
|
The cost of a new flat screen television is $750. If the cost increases by 20%, what is the new cost? | def solve() -> int:
original_cost = 750
price_increase_percent = 20
new_cost = original_cost * (1 + price_increase_percent/100)
result = new_cost
return result
|
A bakery sells 12 loaves of bread for $18. If they increase the price by 25 percent, how much money will they make by selling 15 loaves of bread? | def solve() -> int:
loaves = 12
price = 18
increase = 0.25
new_loaves = 15
unit_price = price / loaves
new_unit_price = unit_price * (1 + increase)
revenue = new_unit_price * new_loaves
result = revenue
return result
|
A film has a duration of 2 hours and 25 minutes. What is the duration of the film in minutes? | def solve() -> int:
hours = 2
minutes = 25
duration_minutes = (hours*60) + minutes
result = duration_minutes
return result
|
Jackson has a garden where he grows vegetables to sell at a nearby farmer's market. In the first week, he sold 30 pounds of vegetables. In the second week, he sold twice as many vegetables as the first week. If he gave away 60% of the vegetables he sold in the third week, what weight of vegetables does he have left? | def solve() -> int:
week1 = 30
week2 = 2 * week1
week3 = week2 + week1
given_away = 0.6 * week3
leftover = week3 - given_away
result = leftover
return result
|
A classroom has a ratio of boys to girls of 3:4. If there are 24 girls in the classroom, how many boys are there? | def solve() -> int:
girls = 4
boys = 3
total = girls + boys
g_ratio = girls/total
b_ratio = boys/total
b_count = b_ratio*24/g_ratio
result = b_count
return result
|
The length of a rectangle is 4 times its width. If the perimeter is 50 cm, what is the area of the rectangle? | def solve() -> int:
perimeter = 50
width = perimeter // 10
length = width * 4
area = length * width
result = area
return result
|
Alice has 30 seashells. She gives two-fifths of her seashells to her cousin, who gives her 5 more seashells. Alice then gives a third of her remaining seashells to her little sister. How many seashells does Alice have now? | def solve() -> int:
seashells = 30
cousin_seashells = seashells * 2 // 5
cousin_seashells += 5
alice_seashells_remaining = seashells - cousin_seashells
sister_seashells = alice_seashells_remaining // 3
result = alice_seashells_remaining - sister_seashells
return result
|
Tom's daily income is $45, while Carl's daily income is $13. Working 10 days a week, how much is the difference between their weekly incomes? | def solve() -> int:
Total_income_tom = 45*10
Total_income_carl = 13*10
result = Total_income_tom-Total_income_carl
return result
|
If a restaurant has 40 tables and it takes 5 minutes to clear each table, how long does the restaurant spend clearing all the tables? And if the restaurant hires a cleaner who can do the job twice as fast, how many hours would they spend in total clearing the tables? | def solve() -> int:
tables = 40
time_per_table = 5
total_time = tables * time_per_table
cleaner_time_per_table = time_per_table / 2
total_time_with_cleaner = tables * cleaner_time_per_table
result = total_time_with_cleaner / 60
return result
|
Student: A swimming pool has a capacity of 5000 liters. If the pool is being filled at a rate of 100 liters per minute, how long will it take to fill the pool completely? | def solve() -> int:
capacity = 5000
rate = 100
time = capacity / rate
result = time
return result
|
Addison, Mason and Chloe went to a park with their aunt. Addison brought 7 sandwiches, Mason brought 12 and Chloe brought 8. While at the park, their aunt bought a container of 40 juice boxes. She gave Addison 9, Mason 13 and the rest to Chloe. How many more juice boxes does Chloe have than Addison? | def solve() -> int:
addison_sandwiches = 7
mason_sandwiches = 12
chloe_sandwiches = 8
total_juice_boxes = 40
addison_juice_boxes = 9
mason_juice_boxes = 13
chloe_juice_boxes = total_juice_boxes - addison_juice_boxes - mason_juice_boxes
chloe_extra_juice_boxes = chloe_juice_boxe... |
John has $300 in his wallet. He wants to buy a new phone that costs $549. How much more money does he need? | def solve() -> int:
money = 300
cost = 549
difference = cost - money
result = difference
return result
|
Ben runs 3 km in the morning and 4 km in the afternoon. Then he runs 10% more the next day. How many km does he run in total in two days? | def solve() -> int:
day1 = 3 + 4
day2 = day1 * 1.1
result = day1 + day2
return result
|
ophia went out to dinner and had an appetizer for $7, a main course for $18, and a desert for $4. How much did she spend in total? | def solve() -> int:
price_appetizer = 7.00
price_main = 18.00
price_desert = 4.00
total_appetizer = price_appetizer * 1
total_main = price_main * 1
total_desert = price_desert * 1
total_cost = total_appetizer + total_main + total_desert
result = total_cost
return resu... |
Student: A shopkeeper has 60 pencils. If he sells 1/3 of them, how many pencils does he have left? | def solve() -> int:
pencils = 60
sold = pencils / 3
left = pencils - sold
result = left
return result
|
A company has 750 employees, of which 62% are women. How many women are employed by the company? | def solve() -> int:
total_employees = 750
percent_women = 62
num_women = total_employees * percent_women / 100
result = num_women
return result
|
At the bakery, there were five times as many people who ordered cupcakes as ordered muffins. If 180 people ordered baked goods on Tuesday, and 30% of those ordered cupcakes, how many people ordered muffins? | def solve() -> int:
result = 0.3 * 180 / 6
return result
|
As a programmer, Jack can code a website in 40 hours. His assistant, Emily, takes 1/8 more time to complete coding the same website. If Jack and Emily were to code websites for 15 clients together, how long would it take Emily to do her part? | def solve() -> int:
jack_time = 40
emily_time = jack_time * 1.125
total_time = (jack_time + emily_time) * 15
emily_part = total_time / 15 - jack_time
result = emily_part
return result
|
A family has 5 members, 2 parents, and their kids. They went on a picnic and brought 3 dozen sandwiches. Every adult took 4 sandwiches, and the boys each took 2 more sandwiches than each girl since the girls had some potato chips on the side. If there were 6 girls in the family, how many sandwiches did the boys take in... | def solve() -> int:
total_members = 5
total_sandwiches = 3 * 12
adult_sandwiches = 4
girls = 6
boys = total_members - 2 - girls
boys_sandwiches = boys * (adult_sandwiches + 2)
result = boys_sandwiches
return result
|
A company expects to earn $80,000 this year. It has already earned $50,000. What percentage of the total earnings has it already received? | def solve() -> int:
percentage_received = (50000 / 80000) * 100
result = percentage_received
return result
|
Sally wants to buy a dress that originally cost $80, but is 20% off today. She also has a coupon of $10 off for any purchase over $50. What is the final price of the dress Sally will pay for? | def solve() -> int:
original_price = 80
discount = 0.2
price_after_discount = original_price - (original_price * discount)
coupon_amount = 10
final_price = price_after_discount - coupon_amount if price_after_discount - coupon_amount > 50 else price_after_discount
result = final_price
return ... |
Yesterday, Mrs. Davis bought 2 dozen donuts for her breakfast club. Later on, she realized that she needed more donuts, so today she bought 3 donuts less than what she bought yesterday. If a dozen donuts contains 12 pieces, how many donuts did Mrs. Davis buy in all? Every book that Lily reads takes her 3 days to finish... | def solve() -> int:
yesterday = 2 * 12
today = yesterday - 3
total_donuts = yesterday + today
days = (30 - 1 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 30)
books = days // 3
result = total_donuts, books
return result
|
Student: 2 poles are of height 3.5 meter and 5.2 meters respectively. What is the difference between the heights of the two poles? | def solve() -> int:
pole1_height = 3.5
pole2_height = 5.2
height_difference = pole2_height - pole1_height
result = height_difference
return result
|
Mia has a collection of stickers that she likes to trade with her friends. She started with 120 stickers and traded 5 stickers for every 3 stickers she received. After some trading, she had 102 stickers left. How many stickers did she trade away and how many did she get in return? | def solve() -> int:
from sympy import symbols, solve
x, y = symbols('x y')
solution = solve([5 * x - 3 * y, 120 - x - y - 102], [x, y])
traded = solution[x]
received = solution[y]
result = (traded, received)
return result
|
Student: A pizza with 12 slices is divided equally among 4 people. How many slices does each person get? | def solve() -> int:
num_slices = 12
num_people = 4
slices_per_person = num_slices / num_people
result = slices_per_person
return result
|
Amy is making a cake that requires 1.5 cups of flour, 3 eggs, and 1 cup of milk. Eggs are sold for $0.20 each, milk is $2 per liter, and a 1 lb bag of flour costs $1.10. What is the total cost of the ingredients for the cake? | def solve() -> int:
flour_cost = 1.10
eggs_cost = 0.20
milk_cost = 2
flour_amount = 1.5
eggs_amount = 3
milk_amount = 1
total_cost = (flour_cost * flour_amount) + (eggs_cost * eggs_amount) + (milk_cost * milk_amount)
result = total_cost
return result
|
Sophia's dad is buying ice cream for his daughter and her two friends. He knows that Sophia eats 1/2 a scoop, her friend Maxine eats 1/3 of a scoop, and her other friend Leo eats 1/6 of a scoop. How many scoops of ice cream should he buy? | def solve() -> int:
sophia_scoop = 1/2
maxine_scoop = 1/3
leo_scoop = 1/6
total_scoops = sophia_scoop + maxine_scoop + leo_scoop
result = total_scoops
return result
|
Student: An aquarium tank that measures 2 feet long, 1 foot wide, and 1.5 feet tall, contains how many cubic feet of water? | def solve() -> int:
length = 2
width = 1
height = 1.5
volume = length * width * height
water = volume
result = water
return result
|
Jessica bought 21 apples on Monday. On Tuesday, she bought 6 less apples than the day before, then she bought 3/4 of the amount she bought on Wednesday. On Thursday, she bought twice as many as Monday. How many apples did she buy on Tuesday? | def solve() -> int:
answer = 0
monday = 21
wed = 0
thu = 0
wed = monday - 6
thu = wed * 4 / 3
answer = monday + thu
result = 13
return result
|
Martin can knit 8 scarves per week as a hobby. He wants to donate 120 scarves to a charity by the end of the year. He has already knitted 40 scarves. How many more weeks will it take Martin to finish knitting all 120 scarves? | def solve() -> int:
total = 120
knitted = 40
per_week = 8
left = total - knitted
weeks = left // per_week
remainder = left % per_week
if remainder > 0:
weeks = weeks + 1
result = weeks
return result
|
Emma has $50 to spend on dinner. She ordered 2 pizzas for $10 each and a pasta dish for half that price. She also paid $5 for breadsticks and the rest of the money on drinks. How much did Emma spend on drinks? | def solve() -> int:
pizza_price = 10
pasta_price = pizza_price / 2
breadsticks_price = 5
total_food_price = 2 * pizza_price + pasta_price + breadsticks_price
remaining_money = 50 - total_food_price
drinks_price = remaining_money
result = drinks_price
return result
|
A classroom consists of 27 students, and the teacher wants to divide them into equal groups for a group project. If each group consists of 4 students, how many groups can the teacher form? Also, how many students will be left out from forming complete groups? | def solve() -> int:
num_students = 27
group_size = 4
num_groups = num_students//group_size
num_leftout = num_students%group_size
result = (num_groups, num_leftout)
return result
|
A rectangular pool measures 20 feet by 10 feet. The pool is surrounded by a deck that measures 2 feet wide. The deck needs painting. How many square feet of paint are needed to paint the deck? | def solve() -> int:
deck_area = ((20+4)*(10+4))-(20*10)
result = deck_area
return result
|
A rectangular box is 5 cm wide, 4 cm tall, and 6 cm long. What is the volume of the box? | def solve() -> int:
width = 5
height = 4
length = 6
volume = width * height * length
result = volume
return result
|
Julia makes bracelets and sells them online. She uses different kinds of beads, which have different costs. Her most expensive beads are silver beads, which cost $0.5 each. She also uses glass beads, which cost $0.2 less than a silver bead, and wooden beads, which cost $0.1 less than a glass bead. If she makes a bracel... | def solve() -> int:
silver_bead_cost = 0.5
glass_bead_cost = silver_bead_cost - 0.2
wooden_bead_cost = glass_bead_cost - 0.1
silver_bead_number = 3
glass_bead_number = 4
wooden_bead_number = 5
bead_cost_per_bracelet = silver_bead_cost * silver_bead_number + glass_bead_cost * glass_... |
Rachel works at a pizza restaurant and serves an average of 50 slices every day. On Sundays, her sales are approximately 75% higher than the daily average. How many slices does she sell in a week if the restaurant is open from Monday to Sunday? | def solve() -> int:
daily_average = 50
sunday_sales = daily_average * 1.75
weekday_sales = daily_average * 6
weekly_sales = sunday_sales + weekday_sales
result = weekly_sales
return result
|
A crate contains 120 apples. If the crate is split into boxes containing 15 apples each, how many boxes will there be? | def solve() -> int:
total_apples = 120
apples_per_box = 15
total_boxes = total_apples // apples_per_box
result = total_boxes
return result
|
A jar contains 75 mini pumpkin pies. 43 pumpkin pies are sold in the first day. If 88% of the remaining pies were sold in the second day, how many were left unsold? | def solve() -> int:
number_of_pies_in_jar = 75
number_of_pies_sold_1st_day = 43
proportion_pies_sold_2nd_day = 0.88
number_of_pies_sold_2nd_day = (number_of_pies_in_jar - number_of_pies_sold_1st_day) * proportion_pies_sold_2nd_day
number_of_pies_left = number_of_pies_in_jar - number_of_pies_sol... |
Sofia deposited $63 in a bank. Ethan deposited $35 less than four times as much as Sofia. How much did Sofia deposit in the bank? | def solve() -> int:
sofia_deposit = 63
ethan_deposit = 4 * sofia_deposit - 35
result = sofia_deposit
return result
|
Lisa has to catch a bus that leaves at 6:00 a.m every day. She always takes 40 minutes to reach the pick-up point from her home. One day she woke up late and reached the pick-up point at 5:50 a.m. How much time did she have to wait for the bus? | def solve() -> int:
lisa_pickup_time = 5.50
bus_leaving_time = 6.00
lisa_travel_time = 0.40
lisa_late_time = bus_leaving_time - lisa_pickup_time - lisa_travel_time
lisa_late_time_minutes = lisa_late_time * 60
result = lisa_late_time_minutes
return result
|
Josh has 9 basketballs, Joe has 21 basketballs and Miles has 27 basketballs. If they combine them together and each takes away 3/4 of the basketballs, calculate the number of basketballs left in the pile. | def solve() -> int:
Josh_basketballs = 9
Joe_basketballs = 21
Miles_basketballs = 27
total_basketballs = Josh_basketballs + Joe_basketballs + Miles_basketballs
take_away1 = Josh_basketballs * 3 / 4
take_away2 = Joe_basketballs * 3 / 4
take_away3 = Miles_basketballs * 3 / 4
total_take_awa... |
There are 20 cupcakes in a box. If 6 boxes are sold, how many cupcakes were sold in total? | def solve() -> int:
cupcakes_per_box = 20
boxes_sold = 6
total_cupcakes_sold = cupcakes_per_box * boxes_sold
result = total_cupcakes_sold
return result
|
Possible new questions and programs: There were 36 students in a music class. A third of them played the violin, a fifth of them played the piano, and the rest played the guitar. How many students played the guitar? | def solve() -> int:
violin = 1/3
piano = 1/5
guitar = 1 - violin - piano
result = guitar * 36
return result
|
Jack bought 25 bottles of water on Monday. On Tuesday, he bought 3 times that amount and on Wednesday he bought 2.5 times the amount he bought on Tuesday. How many bottles of water did Jack buy on these three days? | def solve() -> int:
total = 0
total = total + 25
total = total + (3 * 25)
total = total + (2.5 * (3 * 25))
result = total
return result
|
Student: A book costs $5 more than a magazine. If a magazine costs $4, find the average cost of two books and one magazine. | def solve() -> int:
book_cost = 0
magazine_cost = 4
book_cost = magazine_cost + 5
book_total_cost = book_cost * 2
total_cost = book_total_cost + magazine_cost
result = total_cost / 3
return result
|
Mason has a jar of 240 jelly beans. He ate 1/8 of them and gave 1/6 of the remaining jelly beans to his brother. His brother then ate 1/4 of the jelly beans he got from Mason and returned the rest to him. How many jelly beans does Mason have now? | def solve() -> int:
jelly_eaten = 240 * 1/8
jelly_left = 240 - jelly_eaten
jelly_given = jelly_left * 1/6
jelly_left = jelly_left - jelly_given
jelly_brother_eaten = jelly_given * 1/4
jelly_brother_returned = jelly_given - jelly_brother_eaten
jelly_now = jelly_left + jelly_brother_retu... |
Matthew is organizing a toy drive for a children's hospital. Each box of toys requires twice as many small toys as large toys. If Matthew has 500 large toys and an equal number of small toys, how many boxes of toys can he make with 25 large toys in each box? | def solve() -> int:
large_toys = 500
small_toys = large_toys
toys_per_box = 25
small_toys_per_box = toys_per_box * 2
boxes = large_toys // toys_per_box
result = boxes
return result
|
Emily worked on a science project for 7 hours and spent twice as much time working on her presentation. If she charges $25 per hour, how much money did Emily make from the project and the presentation? | def solve() -> int:
hours_project = 7
hours_presentation = 2 * hours_project
hourly_rate = 25
total_hours = hours_project + hours_presentation
total_pay = total_hours * hourly_rate
result = total_pay
return result
|
John went to the bookstore to buy novels. The bookstore had a deal where customers could buy one novel at full price and get the second novel for half off the full price. If John purchased two novels that were each originally marked at a full price of $20, how much did he spend on the two novels, in dollars? | def solve() -> int:
full_price = 20
discount_price = full_price / 2
total_price = full_price + discount_price
total_cost = 2 * total_price
result = total_cost
return result
|
Assuming a 6% annual interest rate, how much principal would you need to invest today to accumulate $15,000 in 10 years (rounded to the nearest dollar)? | def solve() -> int:
r = 0.06
t = 10
A = 15000
P = A / ((1 + r)**t)
result = round(P)
return result
|
Student: Sam is saving to buy a motorcycle for $2000. He has $1500 and if he saves $150 per week, how many more weeks until he can buy the motorcycle? | def solve() -> int:
motorcycle_price = 2000
savings = 1500
weekly_savings = 150
remaining_savings = motorcycle_price - savings
weeks_needed = remaining_savings // weekly_savings
result = weeks_needed
return result
|
Student: There are 20 students in a classroom. If each student has 4 pencils, how many pencils are there in the classroom? | def solve() -> int:
num_students = 20
num_pencils_per_student = 4
total_num_pencils = num_students * num_pencils_per_student
result = total_num_pencils
return result
|
If 12 men can complete a work in 16 days, how many days will 4 men take to complete the same work? | def solve() -> int:
men_in_work1 = 12
days_work1 = 16
men_in_work2 = 4
work_done_by_12men_in_1day = 1/16
total_work = 1
total_work = total_work/(men_in_work1*days_work1)
work_done_4men_in_1day = total_work*(men_in_work2)
total_days = total_work/work_done_4men_in_1day
result = total_d... |
Sarah drove for 4 hours at an average speed of 60 miles per hour. How far did she travel in total? | def solve() -> int:
time = 4
speed = 60
distance = time * speed
result = distance
return result
|
Samantha wants to make a casserole using only chicken and broccoli. She will use a total of 300 pieces of meat and vegetables. If there are twice as many broccoli pieces as chicken pieces, how many pieces of chicken will be used in the casserole? | def solve() -> int:
chicken = 0
broccoli = 0
chicken = 300 / 3
result = chicken
return result
|
A train travels 400 miles in 4 hours. What is the average speed in miles per hour? | def solve() -> int:
total_distance = 400
total_time = 4
average_speed = total_distance / total_time
result = average_speed
return result
|
``` Ella has 60 crayons. She gives two-thirds of them to her sister. Then she loses one-fourth of her remaining crayons. Later, she buys 80 more crayons. Finally she gives one-fifth of her total crayons to her friend. How many crayons does she have left? | def solve() -> int:
ella_start = 60
giveaway = round(ella_start*2/3)
ella_second = ella_start - giveaway
lost = round(ella_second/4)
ella_third = ella_second - lost
bought = 80
ella_fourth = ella_third + bought
forgiven = round(ella_fourth/5)
ella_end = ella_fourth - forgiven
res... |
A store offers a discount of 10% on all purchases. If you buy a shirt for $20, how much will you save? | def solve() -> int:
original_price = 20
discount = 0.1
amount_saved = original_price * discount
result = amount_saved
return result
|
A school has a total of 950 students, of which 60% are girls. How many boys are in the school? | def solve() -> int:
total_students = 950
girls_percentage = 0.6
boys_percentage = 1 - girls_percentage
boys = total_students * boys_percentage
result = boys
return result
|
Student: Kelly got an 80% on her math test and a 90% on her science test. If the math test counted for 40% of her grade and the science test counted for 60% of her grade, what is Kelly's final grade in the class? | def solve() -> int:
math_test_grade = 80
science_test_grade = 90
math_test_weight = 40
science_test_weight = 60
final_grade = (math_test_grade * math_test_weight + science_test_grade * science_test_weight) / (math_test_weight + science_test_weight)
result = final_grade
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.