question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
'A company makes a profit of 20% on an item that costs $4.50 to produce. What is the selling price of the item? | def solve() -> int:
selling_price = 4.50*1.20
result = selling_price
return result
|
James made a pizza. He cuts it into 12 even slices. If there are 3 people in total, how many slices of pizza can each person eat? | def solve() -> int:
total_slices = 12
total_people = 3
slices_per_person = total_slices / total_people
result = slices_per_person
return result
|
arah has $50.00 to spend on groceries. She buys eggs for $1.50, bread for $2.00, and milk for $3.00 a gallon. If she buys 2 gallons of milk, how many dozens of eggs can she buy? | def solve() -> int:
total_spent = 1.50 + 2.00 + 2*3.00
money_left = 50.00 - total_spent
num_dozen_eggs = money_left // (1.50*12)
result = num_dozen_eggs
return result
|
Sara has four times as many peaches as she has pears. If she has 20 peaches, how many pears does she have? | def solve() -> int:
peaches = 20
peaches_pears_ratio = 4
pears = peaches/peaches_pears_ratio
result = pears
return result
|
A recipe calls for 2 cups of flour for every 3 eggs. If you need to use 6 eggs, how much flour will you need? | def solve() -> int:
flour_per_egg = 2/3
total_flour = flour_per_egg * 6
result = total_flour
return result
|
If a teacher wants to give a test where 20% of the exam is multiple choice, and the rest is essay, and the exam is 48 questions long, how many multiple choice questions are there? | def solve() -> int:
total_questions = 48
multiple_choice_percent = 0.20
multiple_choice = total_questions * multiple_choice_percent
result = multiple_choice
return result
|
If the first camera was invented 200 years ago, how many years in the future will it be 15 years before its 250th anniversary of being invented? | def solve() -> int:
first_camera_invented = 200
anniversary_year = first_camera_invented + 250
years_before_anniversary = anniversary_year - 15
years_in_future = years_before_anniversary - first_camera_invented
result = years_in_future
return result
|
A pizza with a diameter of 12 inches costs $10. What is the price per square inch of pizza? | def solve() -> int:
radius = 6
area = 3.14 * radius**2
price_per_inch = 10 / area
result = price_per_inch
return result
|
The zookeeper needs to feed the elephants 1000 pounds of food this week. As of Wednesday, the elephants have only eaten 400 pounds. How many pounds per day does the zookeeper need to feed the elephants for the rest of the week to meet their food requirement? | def solve() -> int:
total_food = 1000
food_eaten = 400
days_left = 7 - 3
food_per_day = (total_food - food_eaten) / days_left
result = food_per_day
return result
|
If the sum of the ages of a father and his son is 56, and the father is 32 years older than his son, what is the age of the son? | def solve() -> int:
x = 12
result = x
return result
|
John has $100. He spends 1/4 of the money on a video game and 1/3 of the remaining money on a book. How much money does John have left? | def solve() -> int:
start_money = 100
video_game = start_money * (1/4)
money_left = start_money - video_game
book = money_left * (1/3)
money_left = money_left - book
result = money_left
return result
|
A book has 250 pages and each page has 300 words. If Sam reads 20 pages a day, how many words does he read in a week? | def solve() -> int:
pages = 250
words_per_page = 300
pages_per_day = 20
words_per_day = pages_per_day * words_per_page
days_in_a_week = 7
words_in_a_week = words_per_day * days_in_a_week
result = words_in_a_week
return result
|
In the first round of dancing, Caroline danced a total of 50 minutes and Grace danced 1/2 as long as Caroline. In the second round, Caroline danced twice as long as Grace in the first round and Grace danced for 20 minutes less than Caroline. How many more minutes in total did Caroline dance than Grace? Sandra spent $30... | def solve() -> int:
caroline_time = 50
grace_time = caroline_time / 2
grace_time_2 = caroline_time / 2 - 20
caroline_time_2 = grace_time_2 * 2
total_caroline_time = caroline_time + caroline_time_2
total_grace_time = grace_time + grace_time_2
time_difference = total_caroline_ti... |
A car rental company is trying to optimize its fleet size and revenue. It has 100 cars in total, and each car costs $20 per day to maintain. It charges $40 per day to rent a car, and it estimates that the average rental duration is 3 days. It also estimates that the demand for cars varies by day of the week, and that o... | def solve() -> int:
def profit(n):
revenue = n * (0.6 * 5 + 0.8 * 2) * 40 * 3
cost = n * 20 * 7
return revenue - cost
max_profit = 0
best_n = 0
for n in range(1, 101):
p = profit(n)
if p > max_profit:
max_profit = p
best_n = n
result = best_n
return... |
Amy had 200 balloons. She split them between her friends and family, giving each person 20 balloons. How many people did Amy give balloons to? | def solve() -> int:
balloons = 200
balloons_per_person = 20
people = balloons // balloons_per_person
result = people
return result
|
If the area of a square is 81 square meters, what is its perimeter? | def solve() -> int:
area = 81
side_length = area ** 0.5
perimeter = side_length * 4
result = perimeter
return result
|
Student: A car travels 240 miles in 4 hours. What is the average speed of the car in mph? | def solve() -> int:
distance = 240
time = 4
speed = 0
speed = distance / time
result = speed
return result
|
A car can travel 35 miles per gallon of gasoline. If the car has a 20-gallon tank and it is completely full, how many miles can the car travel before it runs out of gas? | def solve() -> int:
miles_per_gallon = 35
tank_size = 20
miles_before_empty = miles_per_gallon * tank_size
result = miles_before_empty
return result
|
Alex and Peter are both completing a training. Alex can complete 81 repetitions in 4 minutes. Peter can complete 48 repetitions in 4 minutes. How many more repetitions will Alex complete in 9 minutes compared to Peter? | def solve() -> int:
time_alex = 9
time_peter = 9
rate_alex = 81/4
rate_peter = 48/4
total_alex = time_alex * rate_alex
total_peter = time_peter * rate_peter
result = total_alex - total_peter
return result
|
Leo is planning a road trip with his friends. He estimates that his car can travel 25 miles per gallon of gas and that the gas price is $3.00 per gallon. He also expects to pay $50.00 for tolls and $100.00 for lodging along the way. If the total distance of the trip is 800 miles, how much will the trip cost him? | def solve() -> int:
miles_per_gallon = 25
gas_price = 3
tolls = 50
lodging = 100
distance = 800
gallons = distance / miles_per_gallon
gas_cost = gallons * gas_price
total_cost = gas_cost + tolls + lodging
result = total_cost
return result
|
There are 36 apples in the basket. Jack took twice as many as Ryan. How many apples did Jack take? | def solve() -> int:
apples = 36
jack_apples = 0
ryan_apples = 0
ryan_apples = apples / 3
jack_apples = ryan_apples * 2
result = jack_apples
return result
|
The length of a rectangular table is 7 feet more than its width. The area of the table is 60 square feet. Find the dimensions of the table. | def solve() -> int:
result = "Insert your code here"
return result
|
The length of a rectangle is twice its width. If the perimeter of the rectangle is 30cm, what is its area? | def solve() -> int:
perimeter = 30
width = perimeter/6
length = 2*width
area = length*width
result = area
return result
|
A recipe calls for 2 cups of sugar for every 3 cups of flour. How many cups of sugar do you need if you have 9 cups of flour? | def solve() -> int:
flour_quantity = 9
sugar_flour_ratio = 2/3
sugar_quantity = sugar_flour_ratio * flour_quantity
result = sugar_quantity
return result
|
Student: David has 7 tennis rackets, he gives 5 tennis rackets to his friends. How many tennis rackets does he have left? | def solve() -> int:
num_rackets = 7
num_given = 5
num_left = num_rackets - num_given
result = num_left
return result
|
A movie theater has 150 seats. If 80% of the seats are sold for a movie, how many seats are left empty? | def solve() -> int:
num_seats = 150
num_sold = num_seats * 0.8
num_empty = num_seats - num_sold
result = num_empty
return result
|
A bag of grapes weighs 2.5 pounds and costs $4. If you buy 3 bags, how much do you spend? | def solve() -> int:
grapes_weight = 2.5
grapes_cost = 4
number_of_bags = 3
total_weight = grapes_weight * number_of_bags
total_cost = grapes_cost * number_of_bags
result = total_cost
return result
|
Jane baked some cookies and muffins for a bake sale. She sold the cookies for $0.50 each and the muffins for $1.00 each. She made $36 from selling all the cookies and muffins. She sold twice as many cookies as muffins. How many muffins did she bake? | def solve() -> int:
muffins = 36 / 2.0
result = muffins
return result
|
A car traveled 64 miles in 2 hours. What is the average speed of the car in miles per hour? | def solve() -> int:
distance_traveled = 64
time_elapsed = 2
average_speed = distance_traveled / time_elapsed
result = average_speed
return result
|
A farmer planted 40 trees in his field. Each tree requires 9 gallons of water per week. If the farmer has already used 45 gallons of water, how many gallons of water are left? | def solve() -> int:
total_trees = 40
water_per_tree = 9
water_used = 45
water_left = (total_trees * water_per_tree) - water_used
result = water_left
return result
|
A pizza place slices their pizzas into 8 equal slices. If Jessica orders a pizza and eats 3 slices, what fraction of the pizza is left? | def solve() -> int:
total_slices = 8
eaten_slices = 3
result = (total_slices - eaten_slices)/total_slices
return result
|
Ethan is paid 20 cents for every piece of litter he picks up at the park. If he wants to earn $30 in a week, how many pieces of litter must he pick up each day? | def solve() -> int:
litter_per_day = 7 * 30 / 0.20
result = litter_per_day
return result
|
Benjamin bought 24 candy bars and each cost 85 cents. How much money did he spend in total? | def solve() -> int:
candy_num = 24
cost_per_candy = 0.85
price = candy_num * cost_per_candy
result = price
return result
|
Student: John got an additional pay of $100 for the work he did. However, he had to pay 25% tax and $2 processing fee. How much did he take home? | def solve() -> int:
additional_pay = 100
tax_rate = 0.25
processing_fee = 2
tax = additional_pay * tax_rate
take_home = additional_pay - tax - processing_fee
result = take_home
return result
|
Emily is decorating her bedroom with throw pillows, blankets, and wall art. There are six times as many throw pillows as wall art and seven less than three times as many blankets as throw pillows. If there are 3 wall arts, how many items are in the bedroom total? | def solve() -> int:
wall_art = 3
throw_pillows = 6 * wall_art
blankets = 3 * throw_pillows - 7
total_items = wall_art + throw_pillows + blankets
result = total_items
return result
|
Mia sells lemonade at a stand. She charges $0.50 per cup and has a fixed cost of $10 for the ingredients and supplies. She sells 120 cups of lemonade in one day. How much profit does she make? | def solve() -> int:
revenue = 0.50 * 120
cost = 10
profit = revenue - cost
result = profit
return result
|
Student: What is the total surface area of a cylinder with a radius 8 cm and a height 20 cm? | def solve() -> int:
radius = 8
height = 20
pi = 3.14159
base_area = pi * radius**2
side_area = 2 * pi * radius * height
total_area = base_area + side_area
result = total_area
return result
|
A library has 500 books. The ratio of non-fiction books to fiction books is 3:2. How many non-fiction books are there in the library? | def solve() -> int:
total_ratio = 3 + 2
non_fiction_books = (3 / total_ratio) * 500
result = non_fiction_books
return result
|
Emily got 10 books and 5 DVDs for $120. DVDs are 1/3 the price of one book. Calculate the total amount spent on the books. | def solve() -> int:
books = 10
dvds = 5
total_cost = 120
dvd_price = total_cost / (books + dvds)
book_price = 3 * dvd_price
total_book_cost = books * book_price
result = total_book_cost
return result
|
Alan has 5 times as many apples as John and 3 times more oranges than John. If Alan has 63 apples and 24 oranges, how many of each fruit does John have? | def solve() -> int:
apples_alan = 63
oranges_alan = 24
factor_apple = 5
factor_orange = 3
apples_john = apples_alan/factor_apple
oranges_john = oranges_alan/factor_orange
result = apples_john, oranges_john
return result
|
Jenny has $50. She spends 20% of it. How much money does she have left? | def solve() -> int:
spent = 50 * 0.2
left = 50 - spent
result = left
return result
|
Two months ago, Lisa spent 40 percent of her savings on a car. If she has saved $3000 more since then, and her savings now are $12000, calculate how much her car cost. | def solve() -> int:
lisa_2_months_ago = 12000 - 3000
car_cost = lisa_2_months_ago * 0.4
result = car_cost
return result
|
Emily just bought a car and plans to save 10% of her salary each month toward it. If she earns $200 every month, how much will she save in the first 3 months? | def solve() -> int:
salary = 200
percent_saved = 0.10
months = 3
amount_saved = salary * percent_saved * months
result = 120.0
return result
|
Student: Suzie spends 25 minutes/day twice a week walking the dog and 40 minutes/day three days a week taking out the trash. How much time does she spend walking the dog and taking out the trash in total each week? | def solve() -> int:
dog_time = 25 * 2
trash_time = 40 * 3
total_time = dog_time + trash_time
result = total_time
return result
|
A company produces 5000 units of a product each month. If the company increases production by 20%, how many units of the product will they produce in a month? | def solve() -> int:
units = 5000
increase = 1.2
new_units = units * increase
result = new_units
return result
|
The math club is having a pizza party. They ordered twice as many pizzas as the science club, who ordered 4 more than half the number of pizzas the art club ordered. If the art club ordered 12 pizzas, how many pizzas did the math club order? | def solve() -> int:
science_pizzas = 12 / 2 + 4
math_pizzas = science_pizzas * 2
result = math_pizzas
return result
|
The water tank in a school holds 1000 liters of water and is filled with water at the rate of 10 liters per minute. How many minutes will it take to fill the tank? | def solve() -> int:
fill_rate = 10
time_to_fill = 1000/fill_rate
result = time_to_fill
return result
|
A company has 100 employees. If each employee earns $50,000 per year and the company pays an additional 8% in benefits, what is the company's annual payroll expense? | def solve() -> int:
salary = 50000
benefits = salary * 0.08
total_expense = (salary + benefits) * 100
result = total_expense
return result
|
san wants to buy a phone worth $550. She has a coupon for 15% discount and a reward card worth $30 she can use to buy the phone. How much does Susan need to pay? | def solve() -> int:
phone_cost = 550
discounted_phone_cost = phone_cost * 0.15
total_cost = phone_cost - discounted_phone_cost - 30
result = total_cost
return result
|
- Sam wants to paint his room and buys a can of paint that covers 20 square meters. His room has a floor area of 12 square meters and a wall height of 2.5 meters. How much paint does Sam need to cover all the walls and the ceiling of his room and how much paint will he have left over? | def solve() -> int:
wall_area = 12 * 2.5 * 4
ceiling_area = 12
total_area = wall_area + ceiling_area
paint = total_area / 20
leftover = 1 - paint
result = (paint, leftover)
return result
|
Student: An investor invested some money in 2 separate schemes: A and B. Scheme A will yield 12% of the capital within a year, and scheme B will yield 18% of the capital within a year. If he invested $1500 in scheme A and $2000 in B, how much more bonus will he get in scheme B than in A after a year, provided he does n... | def solve() -> int:
capital_A = 1500
capital_B = 2000
rate_A = 0.12
rate_B = 0.18
bonus_A = capital_A * rate_A
bonus_B = capital_B * rate_B
difference = bonus_B - bonus_A
result = difference
return result
|
A baker bought 50 dozen eggs for $200. She used 6 dozen for her own use and sold 25 dozen at a profit of 25%. For the remaining, she found that she missed the expiration date and had to sell them at 50% discount. What was the total revenue and profit? | def solve() -> int:
total_cost = 200
profit_margin_1 = 0.25
discount = 0.5
used = 6 * 12
sold_1 = 25 * 12
remaining = 50 * 12 - used - sold_1
cost_price_1 = total_cost / (50 * 12)
selling_price_1 = cost_price_1 * (1 + profit_margin_1)
revenue_1 = sold_1 * selling_price_1
selling_... |
4. Ralph sold produce at the farmers market. He sold 88 apples, 36 oranges and 52 bananas in a week. If each apple cost 75 cents, each orange cost $2 and each banana cost $1.25, how much money did he make? | def solve() -> int:
apples = 88
price_apple = 0.75
oranges = 36
price_orange = 2
bananas = 52
price_banana = 1.25
total_revenue = apples * price_apple + oranges * price_orange + bananas * price_banana
result = total_revenue
return result
|
A rectangle has a length of 12 units and a width of 8 units. What is the area of the rectangle? | def solve() -> int:
length = 12
width = 8
result = length * width
return result
|
Mia works for a catering company. She gets paid a flat fee of $200 for every event she works. She also gets paid an additional $50 for every guest at the event. Yesterday, she worked at an event where there were 100 guests. How much did Mia earn? | def solve() -> int:
flat_fee_per_event = 200
additional_fee_per_guest = 50
number_of_guests = 100
total_additional_fee = additional_fee_per_guest * number_of_guests
total_earnings = flat_fee_per_event + total_additional_fee
result = total_earnings
return result
|
4/5 of the students in a school have cats as their pet. If there are 512 students, how many of them do not have a cat as their pet? | def solve() -> int:
cat_owners = 512 * 4/5
non_cat_owners = 512 - cat_owners
result = non_cat_owners
return result
|
At a electronics store, a laptop costs $1000, a tablet $500, and a phone $300. If someone buys one laptop, two tablets, and three phones, how much will they spend? Lila wants to donate money to a charity. She gets $500 donations from 300 people, and twice as many people donate one fourth of this sum of money to the sam... | def solve() -> int:
laptop_cost = 1000
tablet_cost = 500
phone_cost = 300
laptop_quantity = 1
tablet_quantity = 2
phone_quantity = 3
total_cost = (laptop_cost * laptop_quantity) + (tablet_cost * tablet_quantity) + (phone_cost * phone_quantity)
donation_amount = 500
don... |
Sarah ordered 456 donuts for her coffee shop. On opening day, she sold 123 donuts and has 75 left. How many donuts are left in the shop? | def solve() -> int:
donuts_ordered = 456
donuts_sold = 123
donuts_left = 75
donuts_remaining = donuts_ordered - donuts_sold
donuts_remaining = donuts_remaining - donuts_left
result = donuts_remaining
return result
|
At Green park there are 45 benches. A third of the benches are painted green, a fifth of the benches are painted blue, and the rest are painted red. Of the benches that are painted red, a quarter of them have a plaque. Of the benches that have a plaque, a third of them are dedicated to a famous person. How many benches... | def solve() -> int:
total_benches = 45
green_benches = total_benches / 3
blue_benches = total_benches / 5
red_benches = total_benches - green_benches - blue_benches
plaque_benches = red_benches / 4
famous_benches = plaque_benches / 3
result = int(famous_benches)... |
At a baseball game, the home team scored 7 runs, while the opposing team scored 5 runs. If each run is worth two points, and the game went for 9 innings, what was the final score of the game? | def solve() -> int:
home_runs = 7
opposing_runs = 5
points_per_run = 2
innings = 9
home_score = home_runs * points_per_run
opposing_score = opposing_runs * points_per_run
total_score = home_score + opposing_score
result = f'<<<{total_score}>>>'
return result
|
A group of ornithologists are studying a flock of seagulls. Their results show that the size of the flock doubled in the first year, then increased by a factor of 5 in the next year. This year, the flock only gained 20 seagulls. The flock now has 270 seagulls. If each seagull ate 2 clams per day, how many clams did the... | def solve() -> int:
flock_size = 1
flock_size *= 2
flock_size *= 5
flock_size += 20
flock_size_now = 270
initial_flock_size = flock_size / (flock_size_now / flock_size)
clams_per_seagull_per_day = 2
total_clams_per_day = initial_flock_size * clams_per_seagull_per_day
result = to... |
Some possible questions and programs are: Alex and Ben want to join a chess club. The club charges a $60 registration fee and a $10 monthly fee. Alex pays the registration fee and 8 months of the monthly fee in advance. How much should Ben pay if he wants to pay the same amount as Alex but only pays the registration fe... | def solve() -> int:
reg_fee = 60
mon_fee = 10
alex_paid = reg_fee + 8 * mon_fee
ben_paid = alex_paid
ben_months = (ben_paid - reg_fee) / mon_fee
result = ben_months
return result
|
Kelly had to write a research paper that would take her 7 days. If she took 8 ten-hour breaks during the 7 days, how long did she spend working on the paper? | def solve() -> int:
days_to_write_paper = 7
breaks_taken = 8
hours_per_break = 10
total_hours_spent = days_to_write_paper * 24 - breaks_taken * hours_per_break
result = total_hours_spent
return result
|
Student: Heather and Zara decided to contribute money to buy supplies. Heather contributed $800, Zara contributed 30% more money than Heather, and a third contributor donated $200 less than Zara. How much was the cost of supplies? | def solve() -> int:
heather = 800
zara = 0
third_contributor = 0
zara = heather * 1.3
third_contributor = zara - 200
cost_of_supplies = heather + zara + third_contributor
result = cost_of_supplies
return result
|
Student: How many hours in total did the bus driver drove in the 7 days from Wednesday to Tuesday? | def solve() -> int:
wednesday_hours = 8
thursday_hours = 6
friday_hours = 7
saturday_hours = 5
sunday_hours = 9
monday_hours = 8
tuesday_hours = 7
total_hours = wednesday_hours + thursday_hours + friday_hours + saturday_hours + sunday_hours + monday_hours + tuesday_hours
result = tot... |
If you walked 2 miles in 10 minutes, how many miles per hour did you walk? | def solve() -> int:
distance_walked = 2
time_in_minutes = 10
minutes_in_one_hour = 60
distance_in_one_hour = distance_walked * minutes_in_one_hour / time_in_minutes
result = distance_in_one_hour
return result
|
A school has 500 students where 60% are boys. If there are 200 boys in the school, how many girls are there? | def solve() -> int:
total_students = 500
boys = 0.6 * total_students
girls = total_students - boys
girls_without_decimal = int(girls)
result = girls_without_decimal - (200 - boys)
return result
|
Lisa has 25 cookies. She ate 1/5 of them and gave 1/3 of the rest to her sister. After that, she gave 2 cookies to her little brother and then found 5 more cookies in the kitchen. How many cookies does she have now? | def solve() -> int:
cookies = 25/5*4
cookies = cookies/3*2
cookies = cookies - 2
cookies = cookies + 5
result = cookies
return result
|
Possible questions and programs: Ella has 15 pieces of candy, each with 4 calories. She decides to share them with her two friends, Amy and Ben. She gives Amy 3 more pieces than Ben, and keeps the rest for herself. How many calories of candy does Ella have left? | def solve() -> int:
total_pieces = 15
ben_pieces = (total_pieces - 3) // 3
amy_pieces = ben_pieces + 3
ella_pieces = total_pieces - amy_pieces - ben_pieces
calories_per_piece = 4
ella_calories = ella_pieces * calories_per_piece
result = ella_calories
return result
|
A driver traveled 120 miles in 3 hours. What was their average speed in miles per hour (mph)? | def solve() -> int:
avg_speed = 120 / 3
result = avg_speed
return result
|
A company uses a machine for 9 hours a day and produces 1200 units of product. If the machine is used for 12 hours a day, how many units of product will be produced? | def solve() -> int:
hours_per_day_1 = 9
hours_per_day_2 = 12
units_produced_per_hour = 1200 / hours_per_day_1
units_produced_per_day_2 = units_produced_per_hour * hours_per_day_2
result = units_produced_per_day_2
return result
|
Emma bakes 24 cupcakes in a day. She bakes 4 cupcakes in every 30 minutes. After how many hours will she be able to bake a total of 24 cupcakes? | def solve() -> int:
cupcakes_per_day = 24
cupcakes_per_30_minutes = 4
cupcakes_per_hour = cupcakes_per_30_minutes * 2
hours = cupcakes_per_day / cupcakes_per_hour
result = hours
return result
|
Jacob worked for 10 hours at a rate of $7 per hour. How much did he earn? | def solve() -> int:
rate_per_hour = 7
time = 10
earnings = rate_per_hour * time
result = earnings
return result
|
A spaceship moves 300 people to their destination and travels back to Earth. After this, it moves 50 more people. Each person is supplied with food for 3 days during the journey back to Earth. How much food do they need for the entire journey? | def solve() -> int:
numberOfPeople = 300
additionalPeople = 50
totalPeople = numberOfPeople + additionalPeople
foodNeeded = totalPeople * 3
result = foodNeeded
return result
|
Mark is painting his room. It takes him 4 hours to paint the entire room. He can paint each wall in 30 minutes. How many walls does the room have? | def solve() -> int:
hours_to_paint_room = 4
minutes_to_paint_wall = 30
total_minutes_painting = hours_to_paint_room * 60
number_of_walls = total_minutes_painting / minutes_to_paint_wall
result = number_of_walls
return result
|
There are 625 students in a school. If 25% of them are absent, how many students are present in the school? | def solve() -> int:
total_students = 625
absent_percentage = 25
present_students = total_students * (100-absent_percentage)/100
result = present_students
return result
|
A tank contains 10 liters of fresh water. If 3 liters of the water is removed and replaced by salt water, such that the tank now contains 15% salt water, how much salt water was added? | def solve() -> int:
initial_vol = 10
vol_removed = 3
new_percent = 15
amount_of_salt_water_to_add = ((vol_removed/initial_vol)*(100-new_percent))/(100-new_percent/100)
result = amount_of_salt_water_to_add
return result
|
Student: There are 7 packs of strawberries and 6 bags of grapes. How many containers of fruits are there in total? | def solve() -> int:
packs_of_strawberries = 7
bags_of_grapes = 6
total_containers = packs_of_strawberries + bags_of_grapes
result = total_containers
return result
|
Alice has a farm and has 100 chickens. 1/4 of them are roosters. How many roosters does she have? | def solve() -> int:
chickens = 100
roosters = chickens / 4
result = roosters
return result
|
Hannah is making 3 batches of cookies. Each batch requires 2 cups of flour. If Hannah has 8 cups of flour, how many batches of cookies can she make? | def solve() -> int:
batches = 3
flour_per_batch = 2
total_flour = 8
max_batches = total_flour // flour_per_batch
result = max_batches
return result
|
Oliver deposited $312 in a credit union. Ava deposited $70 less than six times as much as Oliver. How much did Oliver deposit in the credit union? | def solve() -> int:
oliver_deposit = 312
ava_deposit = 6 * oliver_deposit - 70
result = oliver_deposit
return result
|
Sarah has a jar of coins. She took out one-third of the coins and gave half of the remaining coins to charity. If she has 60 coins left, how many coins did Sarah have in the jar originally? | def solve() -> int:
total_coins = 60
remaining_coins = total_coins * 2
original_coins = remaining_coins * 3
result = original_coins
return result
|
Jessica wrote for 4 hours. Every 100 words took her 3 minutes, but every 45 minutes, she had to take a 5-minute pause. How many words did Jessica write in total? | def solve() -> int:
words_per_minute = 100 / 3
pause_time = 5
writing_time = 4 * 60 - (4 * 60 // 45) * pause_time
total_words = words_per_minute * writing_time
result = total_words
return result
|
Student: Marley had twice as many walnuts as Jerry who has 4 fewer walnuts than Devin. After Devin gave 3 walnuts to Marley, Devin had 15 walnuts. How many walnuts did Marley have originally? | def solve() -> int:
marley = 0
jerry = 0
devin = 0
devin = 15
jerry = devin - 4
marley = jerry * 2
marley = marley + 3
result = marley
return result
|
Student: A box of cookies contains 12 cookies. If Jane wants to give 3 cookies to each of her 4 friends, how many cookies will she have left? | def solve() -> int:
cookies = 12
friends = 4
cookies_per_friend = 3
cookies_given = friends * cookies_per_friend
cookies_left = cookies - cookies_given
result = cookies_left
return result
|
At the beginning of every summer, a neighbor sets up a kiddie pool in the back yard. The pool has a volume of 38 gallons. Every day, the pool gains 6 gallons of water from the sprinklers. If no water is drained, how many gallons of water will the pool have after 8 days? | def solve() -> int:
initial_volume = 38
daily_gain = 6
numberofdays = 8
total_gain = daily_gain * numberofdays
final_volume = initial_volume + total_gain
result = final_volume
return result
|
Mark reads 15 pages of a book every day for a week. A 100 page book costs $5. How much will he spend on books over 35 days? | def solve() -> int:
pages_per_day = 15
days_per_week = 7
pages_per_week = pages_per_day * days_per_week
book_cost = 5
pages_per_book = 100
books_per_week = pages_per_week / pages_per_book
weeks_per_35_days = 35 / 7
total_books = books_per_week * weeks_per_35_days
total... |
Karen's grocery bill was $120 and she was given a 10% discount coupon. She also collected $20 worth of change due to an overpayment upon payment. Calculate the total amount of money Karen had to pay? | def solve() -> int:
original_bill = 120
discount = 10/100
overpayment = 20
total_cost = original_bill*(1-discount) - overpayment
result = total_cost
return result
|
A factory produced 10000 units of a product. If 2% of the units were defective, how many units were not defective? | def solve() -> int:
total_units = 10000
defective_percent = 2
defective_units = total_units*defective_percent/100
good_units = total_units-defective_units
result = good_units
return result
|
(Question 1 is already done for you) Some possible additional questions are: Mary has 12 candies and she wants to share them equally with her 3 friends. How many candies does each friend get? | def solve() -> int:
candies = 12
friends = 3
candies_per_friend = candies // friends
result = candies_per_friend
return result
|
Carl can make 10 batches of muffins in 3 hours. How many muffins can he make in 1 hour? | def solve() -> int:
timeSpentForEachBatch = 3/10
totalMuffins = 10 * 10
muffinsPerHour = totalMuffins / timeSpentForEachBatch
result = muffinsPerHour
return result
|
Marcus has a bag of cherries with 60 cherries. He eats 15 of them, but throws it away by accident and 1/2 the remaining cherries spills out. He goes to the store and buys 25 more cherries and his sister gives him 20 new ones. How many cherries does Marcus have now? | def solve() -> int:
cherries = 60
cherries -= 15
cherries *= 0.5
cherries += 25
cherries += 20
result = cherries
return result
|
Emily bought a coffee, a croissant, a bagel, and a muffin from the bakery. If the cost of the croissant was half the price of the coffee and the cost of the bagel was 75% of the price of the croissant and the price of the muffin was three times the cost of the bagel, and the coffee cost $5, how much did she pay for all... | def solve() -> int:
coffee = 5
croissant = coffee / 2
bagel = croissant * 0.75
muffin = bagel * 3
total_cost = coffee + croissant + bagel + muffin
result = total_cost
return result
|
A recipe calls for 3 cups of flour and 1/2 cups of sugar. How many cups of sugar are needed for 18 cups of flour? | def solve() -> int:
flour = 18
sugar = (1/2)/(3/18)
result = round(sugar, 2)
return result
|
Student: A pizza has 8 slices and 4 people want to share it equally. How many slices will each person get? | def solve() -> int:
slices = 8
people = 4
slices_per_person = slices / people
result = slices_per_person
return result
|
Three brothers, Armando, Lucas and Eddie split a pack of 24 cookies evenly. How many cookies did each brother get? | def solve() -> int:
cookies = 0
cookies = 24
result = cookies / 3
return result
|
If the 350 employees that have been working for the company for the longest period are paid $13 per hour, how much does the company pay in total per month for these 350 employees only? | def solve() -> int:
number_employees = 350
wage_per_hour = 13
salary_longest_employees = number_employees * wage_per_hour * 10 * 5 * 4
result = salary_longest_employees
return result
|
Jessica paid $48 for 6 pairs of shoes. If every pair of shoes costs the same amount, what is the cost of one pair of shoes? | def solve() -> int:
num_of_shoes = 6
total_cost = 48
cost_of_one_shoe = total_cost / num_of_shoes
result = cost_of_one_shoe
return result
|
A pizza restaurant charges $10 per pizza plus $2 per topping. If a group of friends orders 4 pizzas with three toppings on each, how much will it cost? | def solve() -> int:
number_of_pizzas = 4
number_of_toppings = 3
total_cost = (10 * number_of_pizzas) + (2 * number_of_toppings * number_of_pizzas)
result = total_cost
return result
|
John has 5 apples and he wants to divide them equally among his 3 friends. How many apples will each friend get? | def solve() -> int:
num_apples = 5
num_friends = 3
apples_per_friend = num_apples // num_friends
result = apples_per_friend
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.