question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
How many boxes of chocolates do you need to buy in order to give 12 pieces of chocolates for each of the 10 students in the class? | def solve() -> int:
no_of_students = 10
chocolate_per_student = 12
total_chocolate = no_of_students * chocolate_per_student
pack_size = 4
no_of_packs = total_chocolate/pack_size
result = no_of_packs
return result
|
Student: A pizza has 8 slices. James eats 3 slices and his friend eats 2. How many slices are left? | def solve() -> int:
slices = 8
slices = slices - 3
slices = slices - 2
result = slices
return result
|
Emily collected 12 seashells at the beach. For every seashell she kept, she gave away three to her friends. How many seashells did Emily give to her friends? | def solve() -> int:
seashells_collected = 12
seashells_kept = seashells_collected
seashells_given_away = 3 * (seashells_collected - seashells_kept)
result = seashells_given_away
return result
|
Lily wants to buy a pair of sunglasses for $17.99 and a hat for $12.50. If she has $35, how much money will be left after the purchase? | def solve() -> int:
money = 35
sunglasses = 17.99
hat = 12.50
total_cost = sunglasses + hat
leftover = money - total_cost
result = leftover
return result
|
A car travels 240 miles in 4 hours. How far will it travel in 6 hours? | def solve() -> int:
time1 = 4
distance1 = 240
time2 = 6
distance2 = (time2/time1) * distance1
result = distance2
return result
|
Alex purchased a new storage facility with four floors. The second floor has three times as much floor space for storage as the third floor. He put 12,000 boxes on the third floor, filling up half of the available storage space. How many boxes can be stored on the second floor, which has 9,000 square feet of storage sp... | def solve() -> int:
third_floor_boxes = 12000
third_floor_storage_space = third_floor_boxes * 2
second_floor_storage_space = 9000
second_floor_boxes = (second_floor_storage_space / (3 * third_floor_storage_space)) * (2 * third_floor_boxes)
result = int(second_floor_boxes)
return result
|
Student: If the area of a trapezoid is 42 cm squared, and the lengths of two adjacent sides of the trapezoid are 8 cm and 5 cm, what is the length of the third side in cm? | def solve() -> int:
area = 42
side1 = 8
side2 = 5
side3 = (2 * area) / (side1 + side2)
result = side3
return result
|
Q2: John is building a rectangular patio and needs to find how much sand he needs to fill it. If the patio is 18 feet long, 8 feet wide, and 2 feet deep, how many cubic feet of sand will he need? | def solve() -> int:
length = 18
width = 8
depth = 2
totalSand = length * width * depth
result = totalSand
return result
|
During a sale, 5 items are discounted by 13%, 9% and 4%, 19% and 12% respectively. If the original price of the 5 items were $36, $62, $84, $79 and $22, find the total amount saved. | def solve() -> int:
item1_original_price = 36
item2_original_price = 62
item3_original_price = 84
item4_original_price = 79
item5_original_price = 22
discount1 = 0.13
discount2 = 0.09
discount3 = 0.04
discount4 = 0.19
discount5 = 0.12
amount_saved1 = item1_original_... |
A rectangular tank has a height that is twice its width and a length of 12 feet. The tank holds 300 cubic feet of water. What are the dimensions of the tank? | def solve() -> int:
volume = 300
length = 12
width = (volume/length)**(1/3)
height = width * 2
result = (length, width, height)
return result
|
Student: A bottling company has 3 machines that can fill 300 bottles in 5 minutes. How long will it take for the 3 machines to fill 3600 bottles? | def solve() -> int:
bottles_per_machine = 300
minutes_per_bottles = 5
total_bottles = 3600
total_time = total_bottles / (bottles_per_machine * minutes_per_bottles)
result = total_time
return result
|
A spider can spin a web using silk from its spinnerets. The silk is composed of proteins that are produced by glands in the spider's abdomen. If the spider has 100 milligrams of protein in its abdomen, and it needs 10 micrograms of protein to spin 1 centimeter of silk, how many meters of silk can it spin? | def solve() -> int:
protein = 100
silk_protein = 10
silk_length = 1
micro_gram = 1e-6
centi_meter = 1e-2
protein_per_silk = silk_protein * micro_gram
silk_per_protein = silk_length / protein_per_silk
total_silk = protein * silk_per_protein
total_silk = total_... |
A man bought 3 books for $45. Each book costs $x. What was the cost of 5 books? | def solve() -> int:
cost_of_one_book = 15
cost_of_five_books = 5*cost_of_one_book
result = cost_of_five_books
return result
|
A recipe to make enough chili to feed 10 people calls for 2 pounds of ground beef. How much ground beef will be needed to make enough chili to feed 50 people? | def solve() -> int:
people_needed = 50
people_original = 10
beef_original = 2
beef_needed = (people_needed/people_original) * beef_original
result = beef_needed
return result
|
A toy store sells 3 toys for $10.00. If Tom spends $30.00, how many toys can he buy? | def solve() -> int:
toys_for_10_dollars = 3
total_spent = 30.00
num_toys = (total_spent // 10) * toys_for_10_dollars
result = num_toys
return result
|
Two pipes of length 12m and 15m respectively run from a tank to a river. The tank holds 900 litres of water. What is the capacity of each pipe? | def solve() -> int:
tank_capacity = 900
pipe1_length = 12
pipe2_length = 15
x = (tank_capacity*5)/9
y = (tank_capacity*4)/9
result = (x, y)
return result
|
A construction company wants to create a 30% profit margin on a building project. If the cost of the project is $500,000, how much should the company charge the client? | def solve() -> int:
project_cost = 500000
profit_margin_percentage = 0.30
project_cost_with_profit_margin = project_cost * (1 + profit_margin_percentage)
result = project_cost_with_profit_margin
return result
|
There are 48 pencils in a box. If each pencil case holds 8 pencils, how many pencil cases can be filled from this box? | def solve() -> int:
pencils = 48
pencils_per_case = 8
cases = pencils // pencils_per_case
result = cases
return result
|
Rodney has a box with 8 baseballs and 6 soccer balls. How many more baseballs does he have than soccer balls? | def solve() -> int:
baseball = 8
soccer = 6
difference = baseball - soccer
result = difference
return result
|
A box of fruits contains 15 oranges, 6 pears, and 9 apples. If a person wants to take 3 pieces of fruit at a time, how many times will they have to take fruit out of the box in order to finish all the fruit? | def solve() -> int:
totalFruits = 15 + 6 + 9
timesToTakeFruit = totalFruits // 3 + (totalFruits % 3 > 0)
result = timesToTakeFruit
return result
|
A web hosting company is running a promotion to give a 50% discount on all hosting plans for the first 3 months. If Tom signed up for a plan that cost $20/month, how much did he pay for the first 3 months after the discount? | def solve() -> int:
plan_cost = 20
discount = 0.5
months = 3
total_cost = plan_cost * months
discounted_cost = total_cost * discount
final_cost = total_cost - discounted_cost
result = final_cost
return result
|
If a restaurant uses 7/8 as many eggs on a busy day as on a slow day, and on a slow day they use 80 eggs, how many eggs will they use on a busy day? | def solve() -> int:
slow_day_eggs = 80
busy_day_eggs = (7/8) * slow_day_eggs
result = busy_day_eggs
return result
|
Juice bottles are sold in packages of 6 bottles per package. If a store orders 56 bottles of juice, how many packages of juice will they receive? | def solve() -> int:
bottles_per_package = 6
total_bottles = 56
result = int(total_bottles/bottles_per_package)
return result
|
It takes 3 painters 6 hours to paint a house. How long will it take 4 painters to paint the same house, assuming every painter paints at the same speed? | def solve() -> int:
hours = 6
painters = 3
painters_new = 4
painting_time = (hours * painters)/painters_new
result = painting_time
return result
|
Student: A library had 384 books on science fiction. The librarian decided to donate 40% of them to a local school and buy 62 new books on the same genre. How many books on science fiction did the library have after the donation and purchase? | def solve() -> int:
total_books = 384
donation_rate = 0.4
new_books = 62
donated_books = total_books * donation_rate
remaining_books = total_books - donated_books
final_books = remaining_books + new_books
result = final_books
return result
|
A sports store ordered 150 more than four times as many basketballs as it did soccer balls at $50 each. If the cost of a soccer ball was $25, and the store ordered 20, calculate the total amount of money they paid for sports equipment. | def solve() -> int:
soccer_balls = 20
basketballs = 4 * soccer_balls + 150
basketball_cost = 50
soccerball_cost = 25
total_cost = (basketballs * basketball_cost) + (soccer_balls * soccerball_cost)
result = total_cost
return result
|
A cone has a base radius of 5 inches and a height of 12 inches. A cylinder has the same base radius and height as the cone. What is the ratio of the volume of the cone to the volume of the cylinder? | def solve() -> int:
result = 1/3
return result
|
In a zoo, there were 250 animals. The zookeepers removed 50 animals to a different zoo. How many animals are in that zoo now? | def solve() -> int:
animals_left = 250 - 50
result = animals_left
return result
|
Possible questions and programs: Evan earns $12 per hour for gardening and $15 per hour for babysitting. He gardened for 10 hours and babysat for 8 hours in Week 1. In Week 2, he gardened for 12 hours and babysat for 6 hours. How much more money did Evan earn in Week 1 than in Week 2? | def solve() -> int:
week_1_earnings = 10 * 12 + 8 * 15
week_2_earnings = 12 * 12 + 6 * 15
difference = week_1_earnings - week_2_earnings
result = difference
return result
|
A factory produces 3200 widgets a day. If the factory operates 6 days a week, how many widgets does it produce in a month (30 days)? | def solve() -> int:
widgets_per_day = 3200
operating_days = 6
widgets_per_month = widgets_per_day * operating_days * 5
result = widgets_per_month
return result
|
Due to inflation, the cost of a computer has increased by 15%. If the original price of the computer was $1400, what is the new price? | def solve() -> int:
original_price = 1400
percentage_increase = 0.15
additional_cost = original_price * percentage_increase
new_price = original_price + additional_cost
result = new_price
return result
|
A teacher wants to give her 36 students pencils. If she wants to give each student 4 pencils, how many pencils does she need? | def solve() -> int:
students = 36
pencils_per_student = 4
total_pencils = students * pencils_per_student
result = total_pencils
return result
|
Zoe discovered that 1 rock weighs exactly 0.3 ounces. Zoe's entire rock collection weighs 20 pounds. How many rocks does Zoe have in her collection? | def solve() -> int:
rock_weight = 0.3
collection_weight = 20
ounces_per_pound = 16
total_weight_ounces = collection_weight * ounces_per_pound
total_rocks = total_weight_ounces / rock_weight
result = int(total_rocks)
return result
|
9. A car is driving at a constant speed of 45 kilometers per hour. How far will the car travel in 4.5 hours? | def solve() -> int:
speed = 45
time = 4.5
distance = speed*time
result = distance
return result
|
If a store's sales tax rate is 7.5% and a customer buys a shirt that costs $24.99, what is the total cost including tax? | def solve() -> int:
shirt_price = 24.99
tax_rate = 0.075
tax_amount = shirt_price * tax_rate
total_cost = shirt_price + tax_amount
result = f'<<<{total_cost}>>>'
result = total_cost
return result
|
Student: If there are 6 marbles in a jar, and one is taken out, how many marbles are left in the jar? | def solve() -> int:
marbles_in_jar = 6
marbles_taken_out = 1
marbles_left_in_jar = marbles_in_jar - marbles_taken_out
result = marbles_left_in_jar
return result
|
Jake has 19 firewood bundles. Each bundle costs $12. He gets a discount of 10% on the bundles. How much money did he save? | def solve() -> int:
bundles = 19
price = 12
discount = 0.1
savings = bundles*price*discount
result = savings
return result
|
A photographer shoots photos at a cost of $300 per event. He charges $50 per photo. If he sold 20 photos after the event, how much money did he make? | def solve() -> int:
num_photos = 20
photo_price = 50
event_cost = 300
photo_revenue = num_photos * photo_price
profit = photo_revenue - event_cost
result = profit
return result
|
sie is writing a report about her recycling progress. She has already recycled 48 plastic bottles and 30 aluminum cans this month. How many total individual containers has Susie already recycled this month? | def solve() -> int:
total_containers = 48 + 30
result = total_containers
return result
|
A train travelled 60 miles in 1 hour. How long will it take the train to travel 120 miles? | def solve() -> int:
distance = 120
speed = 60 / 1
time = distance / speed
result = time
return result
|
At the grocery store, Carol bought 6 watermelons, each weighing 4kg. She distributed them into five baskets. How much did the average watermelon weigh in each basket? | def solve() -> int:
watermelon_number = 6
each_weigh = 4
baskets_number = 5
total_weight = watermelon_number * each_weigh
average_weight_per_basket = total_weight // baskets_number
result = average_weight_per_basket
return result
|
Dan is a first-year student at a University in Houston. He has a budget of $900 per semester. He spends 25% of his money on food, 20% on books, 15% on entertainment, and 10% on transportation. He also donates 5% of his money to a charity. How much money does he donate to the charity? | def solve() -> int:
budget = 900
food = 0.25 * budget
books = 0.2 * budget
entertainment = 0.15 * budget
transportation = 0.1 * budget
charity = 0.05 * budget
result = charity
return result
|
Dan wants to buy a new laptop which costs $900. He currently has $700 saved up and is planning on saving $50 every week. How many weeks will it take him to save up for the laptop? | def solve() -> int:
saving = 700
laptop_cost = 900
weekly_savings = 50
weeks = 0
while saving < laptop_cost:
saving += weekly_savings
weeks += 1
result = weeks
return result
|
Tommy has 4 quarters, 1 dime, and 2 nickels. How much money does Tommy have in total? | def solve() -> int:
quarters = 4
dime = 1
nickels = 2
quarters_dollars = quarters * 0.25
dime_dollars = dime * 0.10
nickels_dollars = nickels * 0.05
total_dollars = quarters_dollars + dime_dollars + nickels_dollars
result = total_dollars
return result
|
Dan went on vacation and spent $1400 in a week. If he gained 10% on his hotel costs due to an early-bird discount, how much he paid in the end? | def solve() -> int:
total_costs = 1400
early_bird_discount = 0.10
discounted_cost_hotel = total_costs * (1.00 - early_bird_discount)
result = discounted_cost_hotel
return result
|
Student: Lara and Mira are baking cupcakes for a party. Lara can bake 12 cupcakes in an hour and Mira can bake 8 cupcakes in an hour. They start baking at 10 a.m. and finish at 2 p.m. How many cupcakes do they bake in total? | def solve() -> int:
lara_rate = 12
mira_rate = 8
start_time = 10
end_time = 2
duration = end_time - start_time
lara_cupcakes = lara_rate * duration
mira_cupcakes = mira_rate * duration
total_cupcakes = lara_cupcakes + mira_cupcakes
result = total_cupcakes
return result
|
Student: Emma gets a 25% discount on her purchase of $56. How much money is the discount? | def solve() -> int:
original_price = 56
discount_rate = 0.25
discount_amount = original_price * discount_rate
result = discount_amount
return result
|
In order to fund a community center, Sarah, Michael, and John aim to collect $10,000. Currently, Michael's donations are eight times what Sarah has, but only a third of John's contributions. If Sarah has raised $500, how much have the three exceeded their goal? | def solve() -> int:
sarah_donations = 500
michael_donations = 8 * sarah_donations
john_donations = 3 * michael_donations
total_donations = sarah_donations + michael_donations + john_donations
exceeded_goal = total_donations - 10000
result = exceeded_goal
return result
|
On a fishing trip, Sarah and Tom each caught 24 fish. If they plan to sell the fish for $2 each, how much money will they make in total? | def solve() -> int:
sarah_fish = 24
tom_fish = 24
total_fish = sarah_fish + tom_fish
price_per_fish = 2
total_money = total_fish * price_per_fish
result = total_money
return result
|
A park had 7 times as many oak trees planted as magnolias. If there were 119 magnolia trees planted, how many trees were planted in total? | def solve() -> int:
magnolias = 119
oaks = magnolias * 7
total_trees = magnolias + oaks
result = total_trees
return result
|
A pizza has 8 slices. Tom ate 3 slices and gave 2 slices to his friend. He then cut the remaining slices in half. How many pieces of pizza does Tom have now? | def solve() -> int:
slices = 8
ate = 3
gave = 2
left = slices - ate - gave
cut = left * 2
result = cut
return result
|
-Additionally, submit the actual result of each program. Make sure the final answer is a number. Possible new questions and programs are: Eight kids want to buy ice cream from a vendor who sells three flavors: chocolate, vanilla, and strawberry. Each scoop of chocolate costs $1.5, each scoop of vanilla costs $1, and ea... | def solve() -> int:
chocolate_cost = 2 * 1.5
vanilla_cost = 3 * 1
strawberry_cost = 4 * 1.2
ice_cream_cost = chocolate_cost + vanilla_cost + strawberry_cost
cone_cost = 6 * 0.3
total_cost = ice_cream_cost + cone_cost
cost_per_kid = total_cost / 8
result = round(cost_per_kid, 2)
retur... |
They must each practice for 1 hour each day. How many hours of practice do all the players need to do in total each day? | def solve() -> int:
total_hours = 0
for r in range(12):
total_hours += 1
for s in range(10):
total_hours += 1
for t in range(8):
total_hours +=1
for u in range(6):
total_hours += 1
result = total_hours
return result
|
A grocery store sells watermelons for $4 each. If the store buys a total of 12 watermelons from the supplier, how much did the store pay in total? | def solve() -> int:
price_per_watermelon = 4
total_watermelon = 12
total_price = price_per_watermelon * total_watermelon
result = total_price
return result
|
A number is increased by 30% and then decreased by 20%. If the resulting number is 40, what was the original number? | def solve() -> int:
resulting_number = 40
decreased_percentage = 0.2
increased_percentage = 0.3
new_number = resulting_number / (1 - decreased_percentage)
original_number = new_number / (1 + increased_percentage)
result = original_number
return result
|
A pizza restaurant offers 3 sizes of pizzas - small for $10, medium for $15 and large for $18. If they sold 5 small pizzas, 10 medium pizzas and 15 large pizzas, how much money did they make? | def solve() -> int:
price_small = 10
price_medium = 15
price_large = 18
sold_small = 5
sold_medium = 10
sold_large = 15
total_earnings = (price_small * sold_small) + (price_medium * sold_medium) + (price_large * sold_large)
result = total_earnings
return result
|
A supermarket has 3 cash registers. Each register has 12 customers waiting in line. How many customers are there in total? | def solve() -> int:
registers = 3
customers_per_register = 12
total_customers = registers * customers_per_register
result = total_customers
return result
|
Emma purchased 3 baskets of strawberries and Sarah bought 5 baskets of strawberries. They plan to share the strawberries equally among their 6 friends. How many baskets of strawberries will each friend get? | def solve() -> int:
emma_baskets = 3
sarah_baskets = 5
total_baskets = emma_baskets + sarah_baskets
friends = 6
baskets_per_friend = total_baskets / friends
result = baskets_per_friend
return result
|
There are 280 mango trees in a field. If 5/7 of them are yielding fruits, and each yielding tree has 500 mangoes, how many mangoes will be produced from the field? | def solve() -> int:
total_trees = 280
yielding_ratio = 5/7
yielding_trees = total_trees * yielding_ratio
total_mangoes = yielding_trees * 500
result = total_mangoes
return result
|
If an item costs $50 and is on sale for 20% off, what is the sale price? | def solve() -> int:
price = 50
discount = 0.20
sale_price = price*(1-discount)
result = sale_price
return result
|
Alex wants to buy a set of golf clubs for his brother's birthday. The set includes 12 golf clubs and cost $480. If Alex wants to buy 2 sets of golf clubs for his brother and dad, how much does each golf club cost? | def solve() -> int:
num_clubs = 12
total_cost = 480
num_sets = 2
total_cost_2_sets = total_cost * num_sets
total_clubs_2_sets = num_clubs * num_sets
cost_per_club = total_cost_2_sets / total_clubs_2_sets
result = cost_per_club
return result
|
Benjamin was 130 centimeters tall on his 8th birthday. If he grows 8 centimeters a year, how many centimeters tall will he be on his 11th birthday? Samantha is building a rectangular garden that is 10 meters wide and 20 meters long. She wants to cover the entire garden with plastic to prevent weeds from growing. Each s... | def solve() -> int:
initial_height = 130
growth_rate = 8
years_passed = 11 - 8
ben_height = initial_height + growth_rate * years_passed
width = 10
length = 20
area = width * length
time_per_square = 5
total_time = 6 * 60
time_needed = area * time_per_square
time_left = t... |
Mason is making blueberry muffins for a breakfast. He wants to make 36 muffins. His recipe makes enough batter for 12 muffins. The recipe calls for 2 cups of blueberries. How many cups of blueberries does Mason need? | def solve() -> int:
batches = 36 / 12
blueberries = batches * 2
result = blueberries
return result
|
Student: It takes 10 people to lift a truck while it takes half of that number to lift a car. How many people are needed to lift 8 trucks and 6 cars? | def solve() -> int:
num_people_truck = 10
num_people_car = num_people_truck / 2
total_people = 8*num_people_truck + 6*num_people_car
result = total_people
return result
|
Student: Ben ran a race with his friends. He completed the first half of the race in 15 minutes. He slowed down by 20% in the second half of the race. If the total race distance was 5 kilometers, what was Ben's average speed in kilometers per hour? | def solve() -> int:
distance = 5
time_first_half = 15
time_second_half = time_first_half * 1.2
total_time = time_first_half + time_second_half
speed = distance / (total_time / 60)
result = speed
return result
|
A company had a profit of $5000 in the first quarter, a profit of $8000 in the second quarter, and a loss of $3000 in the third quarter. What was the average profit or loss per quarter for the year? | def solve() -> int:
profits = [5000, 8000, -3000]
num_quarters = len(profits)
total_profit = sum(profits)
average_profit = total_profit / num_quarters
result = average_profit
return result
|
Karen is one-fourth younger than her aunt, who is 12 years older than Karen's uncle. If Karen's uncle is 32 years old, what's the age difference between Karen and her aunt? | def solve() -> int:
uncle_age = 32
aunt_age = uncle_age + 12
karen_age = aunt_age - (1/4)*aunt_age
age_difference = aunt_age - karen_age
result = age_difference
return result
|
If a car travels 60 miles per hour, how far will it travel in 3.5 hours? | def solve() -> int:
distance_traveled = 60*3.5
result = distance_traveled
return result
|
The money collected from a charity event must be divided in a ratio of 1:2 for making improvements to the community garden and donating to a local shelter, respectively. If the charity event collects $5000, how much is spent on making improvements to the community garden? | def solve() -> int:
charity_event_collected = 5000
ratio_community_garden = 1
ratio_local_shelter = 2
total_ratio = ratio_community_garden + ratio_local_shelter
amount_community_garden = (ratio_community_garden / total_ratio) * charity_event_collected
result = amount_community_gar... |
Ethan collected 30 baseball cards and traded 8 with his friend. He also gave away 2 to each of his 7 cousins. How many cards does he have left? | def solve() -> int:
cards_collected = 30
cards_traded = 8
cards_given_away = 2 * 7
cards_left = cards_collected - cards_traded - cards_given_away
result = cards_left
return result
|
Student: Kyla had 394 stickers. She gave away 17 fourteenths of her stickers. How many stickers did Kyla have left? | def solve() -> int:
total_stickers = 394
fraction_given = 17 / 14
stickers_given = total_stickers * fraction_given
stickers_left = total_stickers - stickers_given
result = stickers_left
return result
|
Mia and Max are taking a test. Mia takes an average of 4 minutes per question, while Max takes an average of 3 minutes per question. If the test has 50 questions, how long will it take for them to finish? | def solve() -> int:
mia_time_per_question = 4
max_time_per_question = 3
total_questions = 50
mia_total_time = mia_time_per_question * total_questions
max_total_time = max_time_per_question * total_questions
total_time = mia_total_time + max_total_time
result = total_time
... |
A room measures 8 feet by 10 feet. If you want to tile the floor with tiles that measure 1 square foot, how many tiles do you need? | def solve() -> int:
area = 8 * 10
tiles = area
result = tiles
return result
|
Ryan bought a pack of 48 pencils for his art class. He used 20% of them for sketching and gave 8 of them to his friend. How many pencils did he have left for coloring? | def solve() -> int:
sketching = 0.2 * 48
left = 48 - sketching - 8
result = left
return result
|
Jeff bought 8 books for $32. How much does one book cost? | def solve() -> int:
books = 8
total_price = 32
cost_per_book = total_price / books
result = cost_per_book
return result
|
A car travels a distance of 270 kilometers in 3 hours. If it travels at a constant speed, how many kilometers will it travel in 5 hours? | def solve() -> int:
speed = 270/3
distance = speed*5
result = distance
return result
|
There are 48 students in a class, and the ratio of boys to girls is 3:2. How many boys are in the class? | def solve() -> int:
total_ratio = 3+2
boys_ratio = 3/total_ratio
girls_ratio = 2/total_ratio
total_students = 48
boys_in_class = total_students * boys_ratio
result = boys_in_class
return result
|
The length of a rectangle is 7 inches and the width is 5 inches. What is the area of the rectangle in square inches? | def solve() -> int:
length = 7
width = 5
area = length * width
result = area
return result
|
James has 12 toy cars and 8 action figures. He lost 3 toy cars. He then gave away 40% of his action figures to his friend and bought 5 more toy cars. How many toy cars and action figures does James have now? | def solve() -> int:
toy_cars = 12
action_figures = 8
toy_cars -= 3
action_figures *= 0.6
toy_cars += 5
result = toy_cars + action_figures
return result
|
Student: A bakery buys 450 bagels from a wholesaler for a total of $900. How much does each bagel cost? | def solve() -> int:
bagels = 450
total_cost = 900
cost_per_bagel = total_cost / bagels
result = cost_per_bagel
return result
|
Julie works at a restaurant and needs to order 72 eggs. Each carton holds 12 eggs and costs $4. How much money will Julie have to spend altogether? | def solve() -> int:
eggs = 72
costPerCarton = 4
cartons = eggs/12
totalCost = costPerCarton * cartons
result = totalCost
return result
|
-*Add one blank line between each question* Possible new questions and programs are: Mai spent 30% of her savings on a laptop and then gave 10% of the remaining money to her brother. If her savings were $1200 before buying the laptop, how much money did she have left after giving some to her brother? | def solve() -> int:
savings = 1200
laptop = 0.3 * savings
after_laptop = savings - laptop
brother = 0.1 * after_laptop
left = after_laptop - brother
result = left
return result
|
A rectangular box has a length of 8 inches, a width of 6 inches, and a height of 4 inches. If each inch of the surface area requires 2.5 ml of paint, how many milliliters of paint are needed to paint the box? | def solve() -> int:
length = 8
width = 6
height = 4
paint_per_area = 2.5
box_surface_area = 2 * (length*width + width*height + height*length)
paint_needed = box_surface_area * paint_per_area
result = paint_needed
return result
|
One quarter of the widgets are defective and have to be discarded. The rest of the widgets are sold for $5 each. How much money does the factory make from selling widgets in one day? | def solve() -> int:
total_widgets = 1200
defective_rate = 0.25
widget_price = 5
defective_widgets = total_widgets * defective_rate
good_widgets = total_widgets - defective_widgets
revenue = good_widgets * widget_price
result = revenue
return result
|
Laura's garden has 20 flowers for every 2 square feet. Her neighbor's garden has 35 flowers per 3 square feet. If Laura has a garden of 8 square feet and her neighbor has a garden of 10 square feet, how many flowers are there in total? | def solve() -> int:
laura_flowers_per_sqft = 20/2
laura_garden_sqft = 8
laura_total_flowers = laura_flowers_per_sqft * laura_garden_sqft
neighbor_flowers_per_sqft = 35/3
neighbor_garden_sqft = 10
neighbor_total_flowers = neighbor_flowers_per_sqft * neighbor_garden_sqft
total_flower... |
A basketball game lasts for 4 quarters, and each quarter is 12 minutes long. How many minutes is the basketball game in total? | def solve() -> int:
total_minutes = 4*12
result = total_minutes
return result
|
A person buys a car for $20,000 and sells it for $24,000. What is the percentage profit made on the sale? | def solve() -> int:
cost_price = 20000
selling_price = 24000
profit = selling_price - cost_price
percentage_profit = (profit / cost_price) * 100
result = percentage_profit
return result
|
Robert has 30 textbooks, and he has already read 35% of them. How many textbooks has he read so far? | def solve() -> int:
num_textbooks = 30
perc_read = 0.35
num_read = num_textbooks * perc_read
result = num_read
return result
|
Ethan has 10 ten-dollar bills, 2 twenty-dollar bills, and 8 one-dollar bills. He goes to buy pears, which cost $2.50 per pound. He buys what he wants and has $4 in change. He plans to eat the pears all in one week. How many pounds does he eat on average per day? | def solve() -> int:
ten_dollar_bills = 10
twenty_dollar_bills = 2
one_dollar_bills = 8
cost_per_pound = 2.50
change = 4
total_money = (ten_dollar_bills * 10) + (twenty_dollar_bills * 20) + (one_dollar_bills * 1)
total_cost = total_money - change
pounds_eaten = total_cost / cost_per_... |
A theater has 500 seats. 40% of the seats are reserved for students and 60% for adults. If all the seats are booked, and a student ticket costs $10 and an adult ticket costs $20, how much revenue does the theater make? | def solve() -> int:
total_seats = 500
student_seats = total_seats * 0.4
adult_seats = total_seats * 0.6
student_revenue = student_seats * 10
adult_revenue = adult_seats * 20
total_revenue = student_revenue + adult_revenue
result = total_revenue
return result
|
In a competition, Maria scored an average of 85 in 5 rounds. If she wants to beat the current leader who has an average of 90, what must be her score in the final round? | def solve() -> int:
rounds = 5
current_average = 85
target_average = 90
total_score = rounds * current_average
target_score = (rounds + 1) * target_average
final_round_score = target_score - total_score
result = final_round_score
return result
|
ome possible questions and programs are: Omar wants to decorate his window with stickers. He has 8 star stickers, 2 times as many heart stickers, and 5 times as many flower stickers. If he uses all of his stickers except for 7, how many stickers did he have in total before he started? | def solve() -> int:
star = 8
heart = 2 * star
flower = 5 * heart
used = star + heart + flower - 7
total = used + 7
result = total
return result
|
Frank, Fiona and Fred all read books. Frank reads 6 books. Fiona reads 4 more than five times as many books as Frank. Fred reads 9 less than a third of the number of books that Fiona reads. How many books does Fred read? | def solve() -> int:
frank = 6
fiona = 0
fred = 0
fiona = 5 * frank + 4
fred = fiona // 3 - 9
result = fred
return result
|
There are 24 windows in a building and 12 workers available to clean them. If each worker cleans an equal number of windows, how many windows will each worker have to clean? | def solve() -> int:
remainder = 24 % 12
num_of_work = 24 - remainder
result = num_of_work / 12
return result
|
Student: The local bookstore sold 28 books in 3 weeks. What was the average number of books sold each week? | def solve() -> int:
books = 28
weeks = 3
average = books / weeks
result = average
return result
|
On Thursday, Ben brought 9 shirts and some jeans to Wash N Fold. He was charged $189, with a cost of $7 per shirt and $15 for each pair of jeans. When he came back to get his clothes on Saturday, the attendant said that he had only brought 3 jeans. Ben disputed this and asked the owner to resolve the issue. The owner t... | def solve() -> int:
shirts = 9
jeans = 3
total_cost = 189
cost_shirt = 7
cost_jeans = 15
cost_shirts = shirts * cost_shirt
cost_jeans = total_cost - cost_shirts
number_jeans = cost_jeans / cost_jeans
missing_jeans = number_jeans - jeans
result = missing_j... |
Possible new questions and programs: Jake baked some cupcakes for his friends. He used 3 cups of flour, 2 cups of sugar, 4 eggs, and half a cup of milk for each batch. He made 5 batches in total. How much flour did he use in cups? | def solve() -> int:
flour_per_batch = 3
batches = 5
total_flour = flour_per_batch * batches
result = total_flour
return result
|
Q1: Dave boarded his plane from London to Los Angeles at 5:00 p.m. ET on Monday and arrived 24 hours later. He took off from Los Angeles to Sydney at 4:00 a.m ET the next day and arrived at 8:00 a.m ET Wednesday. Calculate the number of hours his flight took from Los Angeles to Sydney. | def solve() -> int:
time_taken = 24 + (8 - 4)
result = time_taken
return result
|
A printer prints paper at a rate of 11 pages per minute. If the printer runs continuously for 30 minutes, how many pages will it print? | def solve() -> int:
pages_per_minute = 11
time_run = 30
total_pages = pages_per_minute * time_run
result = total_pages
return result
|
A triangular shaped garden has a base of 24 feet and a height of 12 feet. What is the area of the garden? | def solve() -> int:
base = 24
height = 12
area = (1/2) * base * height
result = area
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.