question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
If a plane travels at a speed of 800 kilometers per hour, what distance will it cover in 4 hours? | def solve() -> int:
speed = 800
time = 4
distance = speed * time
result = 3200
return result
|
A box of pencils costs $10 and you want to buy 3 boxes. If the tax rate is 7%, how much will you pay in total? | def solve() -> int:
box_cost = 10
num_boxes = 3
tax_rate = 0.07
subtotal = box_cost * num_boxes
tax_amount = subtotal * tax_rate
total = subtotal + tax_amount
result = total
return result
|
- Lily has seven times as many bracelets as rings. She also has 6 more rings than necklaces. If she gives away 2/7 of her bracelets and 1/4 of her rings and necklaces, what would be the total number of the items she still has if she currently has 56 bracelets? | def solve() -> int:
rings = 56 / 7
necklaces = rings - 6
bracelets_give = 56 / 7 * 2
rings_give = rings / 4
necklaces_give = necklaces / 4
bracelets = 56 - bracelets_give
rings = rings - rings_give
necklaces = necklaces - necklaces_give
result = bracelets + rin... |
Student: Serena is baking cookies for a fundraiser. The first day she baked 24 cookies, the second day 2/3 times as many cookies as the first day, the third day one less cookie than she baked on the second day, and the fourth day three times the number of cookies she baked on the first day. How many cookies did Serena ... | def solve() -> int:
first_day = 24
second_day = first_day * 2/3
third_day = second_day - 1
fourth_day = first_day * 3
total_cookies = first_day + second_day + third_day + fourth_day
result = total_cookies
return result
|
A chef has to add 12 cups of flour to a batter. If he adds one spoonful at a time, consumed at equally spaced intervals, what is the length of time, in seconds, between adding each spoonful? | def solve() -> int:
cups_of_flour = 12
spoonfuls = cups_of_flour * 16
time_in_minutes = 5
time_in_seconds = time_in_minutes * 60
seconds_per_spoonful = time_in_seconds / spoonfuls
result = seconds_per_spoonful
return result
|
John wants to build a rectangular garden bed in his backyard, with length 10 feet and width 6 feet. He plans to put a 2-foot wide path around the garden bed. What is the total area he needs to cover with mulch (excluding the garden bed)? | def solve() -> int:
path_width = 2
length = 10
width = 6
perimeter = 2*(length + width)
area = (perimeter + 2*path_width)*path_width
result = area
return result
|
A video file has a size of 150 MB (megabytes) and a compression ratio of 10:1. What is the size of the compressed file in MB? | def solve() -> int:
factor = 10 / 1
compressed = 150 / factor
result = compressed
return result
|
A bus can carry 50 passengers. There are already 15 passengers on the bus. How many more passengers can it carry? | def solve() -> int:
capacity = 50
current = 15
x = capacity - current
result = x
return result
|
Student: 24 cookies are baked and divided equally among 6 plates. Then, 2/3 of the cookies on each plate are eaten. How many cookies are left on the plates in total? | def solve() -> int:
cookies = 24
plates = 6
cookies_per_plate = cookies // plates
cookies_eaten = (2/3) * cookies_per_plate
cookies_left = cookies_per_plate - cookies_eaten
total_cookies_left = cookies_left * plates
result = total_cookies_left
return result
|
David is building a tower out of legos. He starts with 10 legos, adds 5 more, removes 2 legos, and then triples the amount of legos he had before. How many legos does David have? | def solve() -> int:
num_legos = 10
more_legos = 5
less_legos = 2
tripled_legos = num_legos * 3
result = num_legos + more_legos - less_legos + tripled_legos
return result
|
Amanda owns a store and wants to make sure she has enough products to sell to customers. She has 300 products in stock and expects to sell 100, but hopes to receive an additional 50 products from a supplier. If she needs to have at least 10 items for each customer, how many more products does she need? | def solve() -> int:
stock = 300
expected_sales = 100
additional_products = 50
minimum_per_customer = 10
total_products = stock + additional_products - expected_sales
num_customers = total_products // minimum_per_customer
remaining_products = total_products - (num_customers * m... |
A gardener plants sunflower seeds, spacing the seeds 8 inches apart. If she plants a total of 45 seeds, how much space (in feet) do the sunflowers take up when they are fully grown? | def solve() -> int:
number_of_seeds = 45
distance_between_rows = 8/12
number_of_rows = (number_of_seeds**(1/2))/2
length_of_rows = number_of_rows * distance_between_rows
width_of_rows = distance_between_rows * 2
total_space = length_of_rows * width_of_rows
result = total_space
return re... |
If a mechanic charges $180 for 6 hours of service, how much does he charge per hour? | def solve() -> int:
cost = 0
for i in range (1,7):
cost += 30
result = cost
return result
|
The Washington Monument is the tallest obelisk in the world, standing at 555 feet tall. The monument is 155 feet taller than the Gateway Arch in St. Louis. How tall is the Gateway Arch? | def solve() -> int:
washington_monument_height = 555
gateway_arch_height = washington_monument_height - 155
result = gateway_arch_height
return result
|
John likes to bring his team coffee every day. He buys 15 cups a week for $3 each. If John works on his current project for 12 weeks, how much will he spend on coffee? | def solve() -> int:
cups_per_week = 15
price_per_cup = 3
weeks = 12
total_spent = cups_per_week * price_per_cup * weeks
result = total_spent
return result
|
Some possible questions and programs are: Tim had a jar of 120 marbles. He gave 20% of them to his brother, and then lost 15 marbles while playing. He decided to divide the remaining marbles into 4 equal groups and put them in different bags. How many marbles were in each bag? | def solve() -> int:
total = 120
given = 0.2 * total
lost = 15
remaining = total - given - lost
groups = 4
each = remaining // groups
result = each
return result
|
Olivia has a 512GB internal hard drive on her computer. She has used up 345GB so far. If a game takes up around 50GB of space, how many games can Olivia install on her computer? | def solve() -> int:
total_storage = 512
used_storage = 345
game_size = 50
remaining_storage = total_storage - used_storage
games_installable = remaining_storage // game_size
result = games_installable
return result
|
Three-quarters of the class have green eyes and one-fourth of those who have green eyes are girls. If 6 students have green eyes and are girls, how many students are there in total? | def solve() -> int:
number_of_students_with_green_eyes = 6 / 0.25
number_of_students = number_of_students_with_green_eyes / 0.75
result = number_of_students
return result
|
A book has 120 pages. If you read 15 pages per day, how many days will it take to finish the book? | def solve() -> int:
pages_in_book = 120
pages_read_per_day = 15
days_to_finish_book = pages_in_book // pages_read_per_day
result = days_to_finish_book
return result
|
The cost of one burger and one soft drink is $4 in a fast-food restaurant. If a group of 12 people spent $150 on burgers and soft drinks, how many burgers did they buy? | def solve() -> int:
total_cost = 150
cost_per_combo = 4
num_people = 12
num_burgers = (total_cost / cost_per_combo) * (num_people / 2)
result = num_burgers
return result
|
Amir wants to buy a skateboard for 80 euros and a helmet for 25 euros. He has 50 euros in his birthday envelope and 10 euros in his pocket. His grandfather participates in his purchase by giving him a 10 euro bill for every 10 euros he spends. How much money does Amir have left? | def solve() -> int:
skateboard_price = 80
helmet_price = 25
total_cost = skateboard_price + helmet_price
birthday_envelope = 50
pocket = 10
total_money = birthday_envelope + pocket
grandfather_ratio = 0.1
grandfather_money = total_cost * grandfather_ratio
difference = total_m... |
A pack of 12 cans of soda originally costs $6.99 but is now on sale for 15% off. What is the new price per can? | def solve() -> int:
original_price = 6.99
discount_pct = 0.15
num_cans = 12
discounted_price = original_price * (1 - discount_pct)
unit_price = discounted_price / num_cans
result = unit_price
return result
|
At what speed must Samuel drive if he wants to travel 240 miles in 4.5 hours, taking a break of 30 minutes? | def solve() -> int:
time_driving = 4.5 * 3600 - (30 * 60)
speed = 240 * 3600 / time_driving
result = speed
return result
|
Student: A recipe calls for 3 1/4 cups of flour. If Julia only has a 1/2 cup measuring cup, how many times does she need to fill up the measuring cup to get the right amount of flour? | def solve() -> int:
flour_needed = 3.25
measuring_cup = 0.5
times_needed = flour_needed / measuring_cup
result = round(times_needed)
return result
|
Tom reserved a golf course for a charity event for forty people. He has to pay a deposit for the reservation, and the deposit is a flat $100 plus an extra $6 per adult and $3 per child. Twelve of the people in Tom's party are children, and the rest are adults. How much does Tom have to pay for the reservation deposit? | def solve() -> int:
adults = 40 - 12
extra_adults = adults * 6
extra_children = 12 * 3
deposit = 100 + extra_adults + extra_children
result = deposit
return result
|
A gas station sold 100 gallons of gasoline. If 1/3 of the gas was premium and 20% of the premium gas was sold to motorcycles, how many gallons of premium gas was sold to motorcycles? | def solve() -> int:
premium_gas = 100/3
motorcycle_premium_gas = premium_gas * 0.2
result = motorcycle_premium_gas
return result
|
Amanda can paint a house in 8 hours. Bob can paint the same house in 12 hours. How long would it take them to paint the house together? | def solve() -> int:
result = 1/((1/8)+(1/12))
return result
|
A bag contains twice as many green marbles as red marbles. If the bag contains 30 red marbles, how many marbles are in the bag in total? | def solve() -> int:
r = 30
g = 2 * r
result = r + g
return result
|
arting with 1000 Euros, how much will there be in 2 years if it increases by 10% annually? | def solve() -> int:
amount = 1000
amount_1 = amount*1.1
amount_2 = amount_1*1.1
result = amount_2
return result
|
Andrew goes for a bike ride every day. First, he bikes for 5 miles to the park. Then he bikes for 8 miles to the gym. Finally, he bikes for 6 miles to get back home. If Andrew goes for a bike ride 4 times each day, how many miles does he ride in total? | def solve() -> int:
miles_to_park = 5
miles_to_gym = 8
miles_to_home = 6
rides_per_day = 4
total_miles_per_ride = miles_to_park + miles_to_gym + miles_to_home
total_miles_per_day = total_miles_per_ride * rides_per_day
result = total_miles_per_day
return result
|
Student: A phone plan has a base rate of $40 per month and an additional charge of $0.10 for every minute of talk time. If a customer uses 100 minutes in a month, how much will their bill be? | def solve() -> int:
base_rate = 40
additional_charge = 0.10
minutes = 100
total_charge = additional_charge * minutes + base_rate
result = total_charge
return result
|
Kelly is baking a cake. She needs 250 grams of flour, 150 grams of sugar, and 100 grams of butter. She has a 500-gram bag of flour, a 300-gram jar of sugar, and a 200-gram stick of butter. How many grams of each ingredient does she have left after baking the cake? | def solve() -> int:
flour = 500
sugar = 300
butter = 200
flour = flour - 250
sugar = sugar - 150
butter = butter - 100
result = (flour, sugar, butter)
return result
|
``` Grace has 24 pencils. She wants to divide them equally between her 4 friends, but she realizes she only has 18 pencils now. How many pencils can she give to her friends? | def solve() -> int:
pencils = 24
friends = 4
total_pencils = pencils // friends
pencils = 18
pencils_per_friend = pencils // friends
min_pencils = min(total_pencils, pencils_per_friend)
result = min_pencils
return result
|
In a garden, there are 800 flowers. 15% of the flowers are red, and a fifth of that number are also tulips. How many red flowers are also tulips? | def solve() -> int:
flowers = 800
red_flowers = flowers * 0.15
tulips = red_flowers / 5
result = tulips
return result
|
amantha has 15 apples. She gives 3 apples to each of her 4 friends. How many apples does she have left? | def solve() -> int:
total_apples = 15
friends = 4
apples_per_friend = 3
apples_given = friends * apples_per_friend
apples_left = total_apples - apples_given
result = apples_left
return result
|
Q3. Nicholas has to replace three tires for his car. If each tire costs $105, how much does he need to pay? | def solve() -> int:
tire_price = 105
num_tires = 3
total_cost = tire_price * num_tires
result = total_cost
return result
|
There are 24 marbles in a bag, 8 of which are red and the rest are blue. What percentage of the marbles are red? | def solve() -> int:
total_marbles = 24
red_marbles = 8
percentage_red = (red_marbles / total_marbles) * 100
result = percentage_red
return result
|
A book costs $25. However, if you buy 3 books, you can get them for $60 in total. How much money will you save if you buy 3 books instead of buying them separately? | def solve() -> int:
single_book_cost = 25
bundle_cost = 60
n_books_in_bundle = 3
total_cost = single_book_cost * n_books_in_bundle
savings = total_cost - bundle_cost
result = savings
return result
|
If a restaurant gains 50 new customers and loses 200 of its original customers, and then every year afterward half of the remaining customers leave, how many customers will be left after 5 years if the final count is 30 customers? | def solve() -> int:
original_customers = 200
new_customers = 50
final_count = 30
remaining_customers = original_customers + new_customers - final_count
for _ in range(5):
remaining_customers /= 2
result = remaining_customers
return result
|
James, Kelly, and Leo participated in a fundraising event for their school. James sold 20 tickets at $5 each, Kelly sold 15 tickets at $6 each, and Leo sold 10 tickets at $7 each. They donated 10% of their total sales to the school. How much did each of them keep for themselves? | def solve() -> int:
james_sales = 20 * 5
kelly_sales = 15 * 6
leo_sales = 10 * 7
james_donation = james_sales * 0.1
kelly_donation = kelly_sales * 0.1
leo_donation = leo_sales * 0.1
james_kept = james_sales - james_donation
kelly_kept = kelly_sales - kelly_donation
leo_kept =... |
Jim bought 12 chocolates for $1.50 each. How much money, in dollars, did he spend? | def solve() -> int:
chocolates = 12
price_per_chocolate = 1.50
total_cost = chocolates * price_per_chocolate
result = total_cost
return result
|
Student: If a train covers 300 km in 6 hours, what is its speed? | def solve() -> int:
distance = 300
time = 6
speed = distance / time
result = speed
return result
|
A store is having a sale where all items are 20% off. A shirt normally costs $25 but is on sale for $20. How much will the shirt cost during the sale? | def solve() -> int:
regular_price = 25
sale_price = 20
discount = 0.2
discounted_price = sale_price - (sale_price * discount)
result = discounted_price
return result
|
In a restaurant, there are three types of dishes: appetizers, entrees, and desserts. The prices of the dishes are $10 for appetizers, $20 for entrees, and $8 for desserts. Jennifer needs to buy three appetizers, four entrees, and two desserts. Can you calculate how much she needs to pay for all the dishes? | def solve() -> int:
dish_appetizers = 3 * 10
dish_entrees = 4 * 20
dish_desserts = 2 * 8
total_dish_price = dish_appetizers + dish_entrees + dish_desserts
result = total_dish_price
return result
|
Marty bought a pizza that has 12 slices. He ate 3 slices and shared the rest equally with his 3 friends. How much pizza did each friend get? | def solve() -> int:
slices_left = 12 - 3
slices_per_friend = slices_left / 3
result = slices_per_friend
return result
|
John had 15 apples. He gave 4 apples to his friend and then bought 8 more apples. How many apples does John have now? | def solve() -> int:
apples = 15
apples -= 4
apples += 8
result = apples
return result
|
A box of crayons contains 24 crayons. If one box costs $3, how much will 8 boxes cost in total? | def solve() -> int:
num_boxes = 8
box_cost = 3
num_crayons_per_box = 24
total_cost = num_boxes * box_cost
result = total_cost
return result
|
John has 5 red balls and 8 green balls. What is the ratio of red balls to green balls? | def solve() -> int:
red_balls = 5
green_balls = 8
ratio = red_balls / green_balls
result = ratio
return result
|
A school has 300 students. If 60% of the students are girls, how many are boys? | def solve() -> int:
girls_percent = 60
boys_percent = 100 - girls_percent
boys = 300 * (boys_percent / 100)
result = boys
return result
|
David's score on a history exam is 25. Emma scored 7 less than David while Frank scored 5 more than Emma. If the history exam has 50 points in all, how many mistakes did Frank make? | def solve() -> int:
david = 25
emma = david - 7
frank = emma + 5
total = david + emma + frank
mistakes = 50 - total
result = mistakes
return result
|
He has 120 stamps in total, and 40% of them are from Canada. He wants to exchange some of his Canadian stamps with his friend Lisa, who has 50 stamps from China. James wants to have 30% of his stamps from China after the exchange. How many Canadian stamps should he exchange with Lisa? | def solve() -> int:
canadian_stamps = 0.4 * 120
total_stamps = 120
chinese_stamps = 0.3 * total_stamps
x = canadian_stamps + chinese_stamps - total_stamps
result = x
return result
|
A store has 50 t-shirts that they want to sell in 10 days. After 3 days, 20 t-shirts have been sold. How many more days will it take for all the remaining t-shirts to be sold? | def solve() -> int:
total_tshirts = 50
days_to_sell = 10
tshirts_sold = 20
days_passed = 3
tshirts_remaining = total_tshirts - tshirts_sold
days_remaining = days_to_sell - days_passed
tshirts_per_day = tshirts_remaining / days_remaining
days_to_sell_remaining_tshirts = tshirts_... |
A gardener plants 500 flower seeds in a rectangular plot. The plot has a length of 25 feet and a width of 10 feet. The gardener expects that 80% of the seeds will germinate and grow. How many flowers will there be per square foot in the plot? | def solve() -> int:
area = 25 * 10
seeds_grow = 0.80 * 500
flowers_per_sqft = seeds_grow / area
result = flowers_per_sqft
return result
|
A train travels a distance of 250 km at an average speed of 50 km/h and then returns to its starting point at an average speed of 80 km/h. What is the train's average speed for the entire journey? | def solve() -> int:
distance = 250
speed1 = 50
speed2 = 80
time1 = distance / speed1
time2 = distance / speed2
total_time = time1 + time2
total_distance = distance * 2
average_speed = total_distance / total_time
result = average_speed
return result
|
A worker has a base salary of $30,000 and receives a 5% bonus each year. What is the total salary of the worker after 4 years? | def solve() -> int:
salary_year1 = 30000 * 1.05
salary_year2 = salary_year1 * 1.05
salary_year3 = salary_year2 * 1.05
salary_year4 = salary_year3 * 1.05
total_salary = salary_year1 + salary_year2 + salary_year3 + salary_year4
result = total_salary
return result
|
A cake recipe requires twice as much flour as sugar. If the recipe uses 300 grams of sugar, how much flour does it need? | def solve() -> int:
sugar = 300
flour = 2 * sugar
result = flour
return result
|
Levi and Zoey both bought 9 pairs of earrings for $20 each and decided to sell them. Levi sold his earrings for $30 each, while Zoey sold hers for $25 each. What was the difference in profit between Levi and Zoey? | def solve() -> int:
pairs_of_earrings = 9
cost_per_earring = 20
selling_price_levi = 30
selling_price_zoey = 25
total_cost = pairs_of_earrings * cost_per_earring
total_revenue_levi = pairs_of_earrings * selling_price_levi
total_revenue_zoey = pairs_of_earrings * selling_price_zoey
... |
Student: A group of people went to the movies. Each person paid $12 for their ticket. The group paid a total of $84 for their tickets. How many people went to the movies? | def solve() -> int:
ticket_price = 12
total_price = 84
number_of_people = total_price / ticket_price
result = number_of_people
return result
|
Jack, Lily, and Max went on a picnic. During their picnic, Max ate 3 sandwiches more than Jack, and Jack ate 2 sandwiches less than Lily. If Lily ate 4 sandwiches, how many sandwiches did they all eat together? | def solve() -> int:
lily = 4
jack = lily - 2
max = jack + 3
total_sandwiches = lily + jack + max
result = total_sandwiches
return result
|
At a theme park, there were three water slides: Slide A, Slide B, and Slide C. Slide B had four times as many riders as Slide C, which had 15 more riders than Slide A. If Slide A had 20 riders, how many riders were there in all three slides? If 6 nurses can administer 200 flu shots in 2 days, how many nurses are needed... | def solve() -> int:
slide_a = 20
slide_c = slide_a + 15
slide_b = 4 * slide_c
total_riders = slide_a + slide_b + slide_c
result = total_riders
nurses_needed = (6 * 400) / 200
result = nurses_needed
return result
|
Anna had 124 candy containers. She divided them equally between 6 friends. How many candy containers did each friend get? | def solve() -> int:
number_of_friends = 6
total_candy = 124
result = total_candy // number_of_friends
return result
|
There is a box of green balloons and a box of red balloons. If there are 24 green balloons and 18 red balloons in total, how many more green balloons than red balloons are there? | def solve() -> int:
green_balloons = 24
red_balloons = 18
more_green_balloons = green_balloons - red_balloons
result = more_green_balloons
return result
|
When Bella was born, the cost of a house was $500,000. The cost is increasing by 10% every year. How much will a house cost when Bella is 27? | def solve() -> int:
cost_of_house = 500000
annual_increase = 0.10
years = 27
for year in range(years):
cost_of_house += cost_of_house * annual_increase
result = cost_of_house
return result
|
A school has 300 students and 225 lockers. If each locker can be shared by 2 students, how many lockers are required for all the students? | def solve() -> int:
students = 300
lockers_per_two_students = 1
total_lockers_needed = students / 2
result = int(total_lockers_needed)
return result
|
Anna can read 20 pages of a book in 30 minutes. How many hours will it take her to finish the book if it has 240 pages and she takes a 10-minute break after every 40 pages? | def solve() -> int:
segments = 240 / 40
read_time = 40 / 20 * 30
break_time = 10
total_time = read_time * segments + break_time * (segments - 1)
total_hours = total_time / 60
result = total_hours
return result
|
Karen spends 30% of her salary on rent, 20% on food and 10% on entertainment. She keeps the remaining $800 for savings. If her salary is $3000, how much does she spend on food and entertainment combined? | def solve() -> int:
rent = 0.3*3000
food = 0.2*3000
entertainment = 0.1*3000
savings = 800
total_spent = rent + food + entertainment
food_entertainment_combined = total_spent - rent - savings
result = food_entertainment_combined
return result
|
An apartment building has 100 rooms. If there are 2 people per room on average, how many people live in the apartment building? | def solve() -> int:
num_rooms = 100
people_per_room = 2
total_people = num_rooms * people_per_room
result = total_people
return result
|
Possible new questions and programs are: Lisa sold her car for $12,000 and used 35% of the money to buy a new bike. She also spent 15% of the remaining money on gas and insurance. How much money does Lisa have left? | def solve() -> int:
bike = 0.35 * 12000
gas_insurance = 0.15 * (12000 - bike)
left = 12000 - bike - gas_insurance
result = left
return result
|
Student: John has $85 and he wants to buy a book that costs $17.50. How much money will he have left after buying the book? | def solve() -> int:
money_John_has = 85
cost_of_book = 17.50
money_left = money_John_has - cost_of_book
result = money_left
return result
|
A basket contains 250 fruits. If there are 30 apples and 62 oranges, how many fruits are neither apples nor oranges? | def solve() -> int:
total_fruits = 250
apples = 30
oranges = 62
neither_fruits = total_fruits - (apples + oranges)
result = neither_fruits
return result
|
A store sells apples at a price of $1 per apple and oranges at a price of $1.50 per orange. If John wants to buy 5 apples and 7 oranges, how much money does he need to spend? | def solve() -> int:
apples_price = 1
oranges_price = 1.5
apples_qty = 5
oranges_qty = 7
total_cost = (apples_price * apples_qty) + (oranges_price * oranges_qty)
result = total_cost
return result
|
David has a collection of 250 antique books that he wants to sell. Rachel offers to buy all of them for 10 dollars each, while Mike is only interested in 60% of them but is willing to pay 15 dollars each. For the remaining books, Mike will only pay 2 dollars each. What is the difference in profit between David selling ... | def solve() -> int:
books = 250
price_rachel = 10
price_mike_60 = 15
price_mike_remaining = 2
total_profit_rachel = books * price_rachel
total_profit_mike_60 = int(books * 0.6) * price_mike_60
total_profit_mike_remaining = (books - int(books * 0.6)) * price_mike_remaining
diffe... |
Student: David was given 6 oranges. He gave 3 oranges to his sister. How many oranges does David have left? | def solve() -> int:
oranges_given = 6
oranges_given_to_sister = 3
oranges_left = oranges_given - oranges_given_to_sister
result = oranges_left
return result
|
The ratio of boys to girls in a class is 4:5. If there are 36 children in the class, how many are boys? | def solve() -> int:
total_children = 36
boy_ratio = 4
girl_ratio = 5
total_ratio = boy_ratio + girl_ratio
num_boys = (boy_ratio / total_ratio) * total_children
result = num_boys
return result
|
Here are some possible questions and programs, based on the given example. Note that there might be other ways to write the programs, and the questions might vary in difficulty slightly. A chicken nugget contains 12 mg of sodium. Ken wants to limit his sodium intake to 1500 mg per day. If he eats 15 chicken nuggets, ho... | def solve() -> int:
sodium_per_nugget = 12
limit = 1500
nuggets = 15
total_sodium = nuggets * sodium_per_nugget
excess_sodium = total_sodium - limit
result = excess_sodium
return result
|
There are 25 ducks and 15 chickens in a farm. If the proportion of ducks to chickens is 5:3, how many chickens are there? | def solve() -> int:
total_fowls = 25 + 15
proportion_of_chickens = 3 / 8
chickens = total_fowls * proportion_of_chickens
result = chickens
return result
|
Student: Jen put 5 glass bottles in a bag. Each bottle has a capacity of 1 liter. How many liters of liquid can the bag hold in total? | def solve() -> int:
bottles = 5
capacity = 1
total_capacity = bottles * capacity
result = total_capacity
return result
|
A cargo ship can carry 3000 fruits in 5 days, while a smaller ship can carry 2000 fruits in 3 days. How many more fruits can the larger ship carry than the smaller ship in a day? | def solve() -> int:
time_cargo = 5
time_small = 3
fruits_cargo = 3000 / time_cargo
fruits_small = 2000 / time_small
difference = fruits_cargo - fruits_small
result = difference/24
return result
|
Out of 300 customers, 30% bought a coffee while 40% bought a sandwich. How many customers bought both a coffee and a sandwich? | def solve() -> int:
coffee = 0.3 * 300
sandwich = 0.4 * 300
both = 300 * 0.3 * 0.4
result = both
return result
|
Seven individuals donated $60 each towards a charity event. After the third week, they still had to donate $100 more to meet their goal. What was their goal for the total amount of money donated? | def solve() -> int:
donation_amount = 60
number_of_donors = 7
additional_donation = 100
total_donation = donation_amount * number_of_donors + additional_donation
result = total_donation
return result
|
Katy baked 10 dozen cupcakes and each cupcake has 3 different toppings. She wants to give out an equal number of cupcakes with each topping. How many of each topping should she top each cupcake with? | def solve() -> int:
cupcakes = 10 * 12
toppings = 3
total_toppings = cupcakes * toppings
equal_toppings = int(total_toppings / toppings)
result = equal_toppings
return result
|
The owner of a farm has 30 cows and 45 chickens. What is the ratio of cows to chickens? | def solve() -> int:
num_cows = 30
num_chickens = 45
ratio = num_cows / num_chickens
result = ratio
return result
|
A square pyramid has a base with sides of length 5cm and a height of 7cm. What is the volume of the pyramid? | def solve() -> int:
base_length = 5
height = 7
volume = (1/3)*base_length**2*height
result = volume
return result
|
Alan runs every morning. On Monday, he runs for 150 minutes, which is 50% more than he runs on Sunday. On Tuesday, he runs for 20% less than he runs on Monday. How many minutes does he run on Tuesday? | def solve() -> int:
running_time_sunday = 150 / 1.5
running_time_tuesday = 150 * 0.8
result = running_time_tuesday
return result
|
Student: There are 30 members in a classroom. Five ninths of the students are girls, and the rest are boys. How many boys are in the classroom? | def solve() -> int:
total_members = 30
girls = 5/9 * total_members
boys = total_members - girls
result = boys
return result
|
Student: Mark bought 12 oranges and 7 lemons, how many packages of 3 each would he need to make a complete set? | def solve() -> int:
oranges = 12
lemons = 7
total_fruits = oranges + lemons
package_size = 3
complete_sets = total_fruits // package_size
result = complete_sets
return result
|
Chris has $500 in his bank account. He saves $50 every week and spends $80 every two weeks. How many weeks will he need to save $1000? | def solve() -> int:
total_saved = 0
weeks = 0
while total_saved < 1000:
total_saved += 50
weeks += 1
if weeks % 2 == 0:
total_saved -= 80
result = weeks
return result
|
Mason ate 2/7 of his cheesecake slice and left the remainder in the box. If the slice in the box weighs 500 grams, how many grams did Mason eat? John and Mary went to a sandwich shop. A turkey sandwich costs £5, and a bag of chips costs £2. John bought 2 sandwiches and a bag of chips. Mary bought 3 sandwiches and 2 bag... | def solve() -> int:
total_weight = 500
portion_left = 5/7 * total_weight
portion_eaten = total_weight - portion_left
john_sandwiches = 2
john_chips = 1
mary_sandwiches = 3
mary_chips = 2
john_cost = john_sandwiches * 5 + john_chips * 2
mary_cost = mary_sandwiches * 5 + mary_chip... |
Possible questions and programs: Nina is selling cookies to raise money for her school trip. The trip costs $800 and there are 16 students who have to pay the same amount. She sells each cookie for $0.75 and has a fixed cost of $20 for ingredients and packaging. If she sells 400 cookies, how much profit does she make? | def solve() -> int:
trip_cost = 800
students = 16
cookie_price = 0.75
fixed_cost = 20
cookies_sold = 400
contribution = trip_cost / students
revenue = cookie_price * cookies_sold
profit = revenue - fixed_cost - contribution
result = profit
return result
|
If a bakery has 480 cupcakes, 240 donuts, and 720 cookies, and they want to divide these equally among 60 customers, how many cupcakes, donuts, and cookies does each customer get? | def solve() -> int:
total_items = 480 + 240 + 720
items_per_customer = total_items / 60
cupcakes_per_customer = 480 / 60
donuts_per_customer = 240 / 60
cookies_per_customer = 720 / 60
result = (cupcakes_per_customer, donuts_per_customer, cookies_per_customer)
return result
|
A flowerbed in the shape of a rectangle has a length of 6ft and a width of 3ft. If one bag of soil can fill an area of 10sq ft, how many bags of soil are needed to fill the flowerbed? | def solve() -> int:
length = 6
width = 3
area = length*width
bags_needed = area/10
result = bags_needed
return result
|
-Indentation means ``` Kelly and Tony each drink 6 glasses of milk for breakfast, 9 glasses of juice for lunch, and 12 glasses of soda for dinner. What is the total number of glasses of drinks the two consume in a day? | def solve() -> int:
milk = 6
juice = 9
soda = 12
total_one = milk + juice + soda
total_two = total_one * 2
result = total_two
return result
|
Lily needs 5 gallons of milk to make her popular cake recipe, while Matt's bakery requires 8 gallons for its daily sales. How many gallons of milk does the dairy need to deliver to fulfill their orders for 2 weeks? | def solve() -> int:
lily_gallons = 5
matt_gallons = 8
weeks = 2
total_gallons = (lily_gallons + matt_gallons) * weeks
result = total_gallons
return result
|
Daniel buys 20 books from a second-hand bookstore. He pays $4 per book, but gets a 10% discount for buying more than 10 books. He sells 15 books online for $6 each, and donates the remaining 5 books to a library. He also pays $5 for shipping the books he sells. How much money does Daniel make from this transaction? | def solve() -> int:
price = 4 * 20
discount = 0.1 * price
final = price - discount
earn = 6 * 15
ship = 5
net = earn - final - ship
result = net
return result
|
Jenna and her two brothers each start with the same number of cookies. Jenna has 3 times as many cookies as both her brothers combined and the brother have the same number of cookies. How many cookies does Jenna have? | def solve() -> int:
brother_cookies = 0
jenna_cookies = (2*brother_cookies) + brother_cookies
result = jenna_cookies
return result
|
And finally indicate "I am done with the final question" <|allend|> Possible questions and programs: Mr. Lee sells apples and oranges at his fruit stand. He has 36 apples and three times as many oranges. He sold half of his apples and a quarter of his oranges in the morning. How many fruits did he have left in the afte... | def solve() -> int:
apples = 36
oranges = 3 * apples
apples_sold = apples / 2
oranges_sold = oranges / 4
apples_left = apples - apples_sold
oranges_left = oranges - oranges_sold
fruits_left = apples_left + oranges_left
result = fruits_left
return result
|
Mark had 35 pencils and gave 7 of them to his friends. He sharpened the remaining ones and saw that altogether there were 28 of them. How many pencils did Mark originally have? | def solve() -> int:
pencils_in_total = 28
given_away_pencils = 7
pencils_original = pencils_in_total + given_away_pencils
result = int(pencils_original)
return result
|
If it takes Mary 12 minutes to solve 6 math problems, how long will it take her to solve 30 math problems? | def solve() -> int:
time_per_problem = 12/6
num_problems = 30
total_time = time_per_problem * num_problems
result = total_time
return result
|
Mark has twice the amount of books than twice the amount of pens. If he has 20 pens, how many books does Mark have? | def solve() -> int:
pens = 20
books = 0
books = 2 * (2 * pens)
result = int(books)
return result
|
A math test has a total of 25 questions. A student got 80% of the questions correct. How many questions did the student answer correctly? | def solve() -> int:
total_questions = 25
percentage_correct = 80
questions_correct = (percentage_correct * total_questions) / 100
result = questions_correct
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.