question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
There are 8 cars and 4 trucks in a parking lot. Each vehicle needs a parking space to park separately. How many total parking spaces are needed? | def solve() -> int:
cars = 8
trucks = 4
total_vehicles = cars + trucks
parking_spaces_needed = total_vehicles
result = parking_spaces_needed
return result
|
A triangle has a base of 8 cm and a height of 10 cm. What is the area of the triangle? | def solve() -> int:
base = 8
height = 10
area = 0.5*base*height
result = area
return result
|
A book has 200 pages, while another book has 300 pages. What is the percentage difference in the number of pages, expressed as a percentage of the shorter book's pages? | def solve() -> int:
book1_pages = 200
book2_pages = 300
if book1_pages < book2_pages:
shorter_book_pages = book1_pages
longer_book_pages = book2_pages
else:
shorter_book_pages = book2_pages
longer_book_pages = book1_pages
percentage_difference = ((longer_boo... |
Emma wants to buy three pens -- one for $7.25, one for $9.50, and one for $5.15. She also wants to pay using 8 coins which are 5 cents, 10 cents, 25 cents, and $1 each. How many coins of each does she need to use? | def solve() -> int:
pen1_price = 7.25
pen2_price = 9.50
pen3_price = 5.15
total_price = pen1_price + pen2_price + pen3_price
coin1 = 5
coin2 = 10
coin3 = 25
coin4 = 100
no_of_coin4 = total_price // coin4
remaining_amount = total_price % coin4
no_of_coin3 = remaining... |
Student: A pizza has a diameter of 14 inches and a crust with a thickness of 1 inch. What is the area of the crust? | def solve() -> int:
diameter = 14
thickness = 1
radius = diameter / 2
radius_crust = radius - thickness
area_crust = 3.14 * (radius_crust ** 2)
result = area_crust
return result
|
Alex buys two bags of chips for $3 each, a gallon of milk for $4, and a loaf of bread for $2.50. How much did Alex pay in total? | def solve() -> int:
chip_price = 3
milk_price = 4
bread_price = 2.50
total_chips = 2 * chip_price
total_cost = total_chips + milk_price + bread_price
result = total_cost
return result
|
A carpenter can make a wooden table in 4 hours. He uses 5 boards of wood, each costing $12, and 10 nails, each costing $0.1. He can sell the table for $150. He works for 10 hours a day. How many tables can he make and sell in a day, and how much money does he make? | def solve() -> int:
tables = 10 // 4
board_cost = 5 * 12
nail_cost = 10 * 0.1
material_cost = board_cost + nail_cost
profit = 150 - material_cost
total_profit = tables * profit
result = (tables, total_profit)
return result
|
There are some pencils in a box. If there are 24 pencils in total, and 10 of them are blue, how many pencils are not blue? | def solve() -> int:
n_pencils = 24
n_blue_pencils = 10
result = (n_pencils - n_blue_pencils)
return result
|
A bus travels at a speed of 60 miles per hour. How far can it travel in 3 hours? | def solve() -> int:
speed = 60
time = 3
distance = speed * time
result = distance
return result
|
John is a personal trainer and collects $75/hour. He sees his clients in sessions of 45 minutes. This week he had 8 sessions. How much did he get paid? | def solve() -> int:
session_minutes = 45
sessions = 8
pay_rate = 75 / 60
total_pay = sessions * (session_minutes / 60) * pay_rate
result = total_pay
return result
|
If Eva is 8 years older than Leah, and Leah is 4 times younger than Mike, how old was Mike when Eva was 12? | def solve() -> int:
Eva_age = 12
Leah_age = Eva_age - 8
Mike_age = 4 * Leah_age
diff = Mike_age - Eva_age
Mike_age_12 = Mike_age - diff
result = Mike_age_12
return result
|
A restaurant has 60 seats. If 45 people have already been seated, how many more can be seated? | def solve() -> int:
seats = 60
seated = 45
result = seats - seated
return result
|
Martin has twice the number of toys as Jared, but both boys have 24 toys combined. How many toys does Jared have? | def solve() -> int:
num_toys = 24
jared_toys = num_toys / 3
martin_toys = num_toys * 2 / 3
result = jared_toys
return result
|
Rebecca is six times the age of her daughter, and her daughter's best friend is two times the age of Rebecca's daughter. If the sum of the ages of Rebecca, her daughter, and her daughter's best friend is 216 years, then how many years old is Rebecca's daughter's best friend? | def solve() -> int:
daughter_age = 216 / (6 + 1 + 2)
daughter_bestfriend_age = daughter_age * 2
result = daughter_bestfriend_age
return result
|
If Eric lifted 30 lbs last week and lifted twice as much this week as he did last week, while his friend Michael lifted three times as much as Eric each day, how much weight did they lift altogether? | def solve() -> int:
last_week_lift = 30
this_week_lift = last_week_lift * 2
michael_lift = last_week_lift * 3
total_lift = (last_week_lift + this_week_lift) * 7 + michael_lift * 7
result = total_lift
return result
|
A fruit seller sells apples at a rate of $2 per apple and oranges at a rate of $3 per orange. If the total amount made after selling 10 apples and 8 oranges is $38, what is the total amount earned by selling 5 apples and 4 oranges? | def solve() -> int:
apples_price = 2
oranges_price = 3
total_apples = 10
total_oranges = 8
total_cost = 38
cost_5_apples_4_oranges = 5 * apples_price + 4 * oranges_price
total_5_apples_4_oranges = ((total_cost - cost_5_apples_4_oranges)/(total_apples - 5)) * 5 + ((total_cost - cost_5_apples_... |
John has $42 in pennies, which is one fourth the amount of money he has in nickels and quarters combined. How much money does John have in quarters? | def solve() -> int:
total_money = 42
total_in_nickels_and_quarters = total_money * 4
quarters = total_in_nickels_and_quarters / 4
result = quarters
return result
|
Sarah is knitting scarves with wool, silk, and cotton. For every scarf, she uses 8 balls of wool, thrice as many silk as wool, and half as many cotton as silk. If Sarah wants to knit 2 sets of scarves, how many balls of wool will she need? | def solve() -> int:
wool = 8
silk = 3 * wool
cotton = silk / 2
scarves_per_set = 2
wool_per_set = wool * scarves_per_set
silk_per_set = silk * scarves_per_set
cotton_per_set = cotton * scarves_per_set
wool_total = wool_per_set * scarves_per_set
silk_total = silk_per_set * s... |
Jacob had 40 pencils in his pencil case. He lost 15 pencils and then bought 3 times as many pencils. How many pencils does Jacob have now? | def solve() -> int:
pencils_in_pencil_case = 40
pencils_lost = 15
pencils_bought = 3 * pencils_lost
pencils_now = pencils_in_pencil_case - pencils_lost + pencils_bought
result = pencils_now
return result
|
Q3: Angie has 5 books, and the number of books she has increases by 67% each month. How many books will Angie have in 6 months? | def solve() -> int:
books_months_6 = 5
for i in range(6):
books_months_6 = books_months_6 + (books_months_6 * 0.67)
result = books_months_6
return result
|
-Do not add any more tokens. Some possible questions and programs are: Emma sells cookies at a bake sale. She makes $0.5 profit for each chocolate chip cookie and $0.75 profit for each oatmeal raisin cookie. She sells 40 chocolate chip cookies and 60 oatmeal raisin cookies. She spends $15 on ingredients and $5 on packa... | def solve() -> int:
chocolate_revenue = 40 * 0.5
oatmeal_revenue = 60 * 0.75
total_revenue = chocolate_revenue + oatmeal_revenue
total_cost = 15 + 5
profit = total_revenue - total_cost
result = profit
return result
|
Oliver has 70 T-shirts in three colors: 20 white T-shirts, 30 black T-shirts, and 20 gray T-shirts. He wants to sell the whole collection and has already sold 15 white T-shirts for $5 each and 25 black T-shirts for $6 each. How much should he sell each gray T-shirt, if he wants to earn a total of $200 from the whole sa... | def solve() -> int:
white_tshirts = 20
black_tshirts = 30
gray_tshirts = 20
sold_white_tshirts = 15
sold_black_tshirts = 25
price_per_white_tshirt = 5
price_per_black_tshirt = 6
total_earned = (sold_white_tshirts * price_per_white_tshirt) + (sold_black_tshirts * price_per_... |
- Elsa makes bracelets and sells them at a craft fair. She charges $4 for each bracelet. She sells 15 bracelets in the first hour, 20 bracelets in the second hour, and 10 bracelets in the third hour. She pays $20 for the booth rental. She also spends $30 on beads and strings. She wants to buy a pair of earrings that co... | def solve() -> int:
sales = (15 + 20 + 10) * 4
costs = 20 + 30
profit = sales - costs
left = profit - 25
result = left
return result
|
The concert hall can hold 1,500 people, but only 90% of the tickets were sold for the performance. Because the lead singer was ill, 250 people were refunded their tickets. How many people attended the performance? | def solve() -> int:
total_capacity = 1500
tickets_sold_percentage = 90
tickets_refunded = 250
tickets_sold = total_capacity * tickets_sold_percentage / 100
people_attended = tickets_sold - tickets_refunded
result = people_attended
return result
|
Ann bought a car for $35,000 and it depreciates in value at a rate of 18% every year. How much will the car be worth in 4 years? | def solve() -> int:
price = 35000
rate = 0.18
num_years = 4
for x in range(num_years):
price -= price * rate
result = price
return result
|
At a store, a shirt that cost $25 is now on sale for 30% off. How much does the shirt cost now? | def solve() -> int:
price = 25
discount = 30
new_price = price * (100 - discount)/100
result = round(new_price, 2)
return result
|
Sarah is packing food for a hiking trip. Each hiker needs twice as much food as a camper, and the trail mix is in one container that can hold 5 pounds. If she has 10 hikers and 20 campers, and each campers needs 1 pound of trail mix, how many pounds of trail mix does she need to bring? | def solve() -> int:
hikers = 10
campers = 20
trail_mix_per_camper = 1
trail_mix_per_hiker = 2 * trail_mix_per_camper
total_trail_mix_needed = (campers * trail_mix_per_camper) + (hikers * trail_mix_per_hiker)
result = total_trail_mix_needed
return result
|
Student: Tara is making her own terrarium. She needs to buy 10 stones that cost $25 each, 10 trees that cost $20 each, and 12 plants that cost $10 each. How much did Tara spend in total? | def solve() -> int:
num_stones = 10
stone_cost = 25
num_trees = 10
tree_cost = 20
num_plants = 12
plant_cost = 10
total_stone_cost = num_stones * stone_cost
total_tree_cost = num_trees * tree_cost
total_plant_cost = num_plants * plant_cost
total_cost = total_stone_cost + total_tr... |
Student: Kim bought 8 envelopes for $2 each and sold them at the end of the year for $15. How much money did she make? | def solve() -> int:
envelopes_bought = 8
price_bought = 2
price_sold = 15
total_spent = envelopes_bought * price_bought
total_made = envelopes_bought * price_sold
result = total_made - total_spent
return result
|
Ben runs a lemonade stand. He buys each lemon for $0.1 and each cup for $0.05. He sells each cup of lemonade for $0.25. He uses 2 lemons and 1 cup to make one cup of lemonade. If he sells 40 cups of lemonade, how much profit, in dollars, does he make? | def solve() -> int:
lemon_cost = 0.1
cup_cost = 0.05
lemonade_price = 0.25
lemons_per_cup = 2
cups_per_cup = 1
cups_sold = 40
total_cost = (lemon_cost * lemons_per_cup + cup_cost * cups_per_cup) * cups_sold
total_revenue = lemonade_price * cups_sold
profit = ... |
A shirt costs $10 more than a pair of pants. If a pair of pants costs $20, find the average cost of a shirt and a pair of pants. | def solve() -> int:
pants_cost = 20
shirt_cost = pants_cost + 10
average_cost = (shirt_cost + pants_cost) / 2
result = average_cost
return result
|
James makes 1 dollar for every package he delivers. He also gets a bonus of 15 dollars every day he delivers more than 30 packages. If he delivers 150 packages in a week, how much money will he earn with bonuses included? | def solve() -> int:
packages_per_week = 150
packages_per_day = packages_per_week / 7
bonus_days = 0
if packages_per_day > 30:
bonus_days = 7
total_without_bonus = packages_per_week
total_with_bonus = total_without_bonus + bonus_days * 15
result = total_with_b... |
Mark makes a pizza with 10 slices. He eats 2 slices every day for 3 days. His friends came over and they shared 4 slices. How many slices are left? | def solve() -> int:
slices = 10
eaten_slices = 2 * 3
shared_slices = 4
remaining_slices = slices - eaten_slices - shared_slices
result = remaining_slices
return result
|
Jack is the pilot of a small plane and is calculating the amount of fuel needed for a short flight. The empty plane needs 15 gallons of fuel per flight hour. Each passenger on the plane increases this amount by 2 gallons per hour and each piece of luggage increases it by 1 gallon per hour. If Jack is taking 6 passenger... | def solve() -> int:
empty_plane_fuel = 15
passenger_fuel_per_hour = 2
luggage_fuel_per_hour = 1
num_passengers = 6
num_bags_per_passenger = 2
flight_duration = 2
passenger_fuel = num_passengers * passenger_fuel_per_hour * flight_duration
luggage_fuel = num_passengers * num_bags_per_... |
arah has a 25% off coupon for a sweater that costs $50. If she also has to pay 7% sales tax, how much will she pay in total? | def solve() -> int:
cost = 50
discount = 0.25
tax = 0.07
discount_amount = cost * discount
cost_after_discount = cost - discount_amount
total_cost = cost_after_discount + (cost_after_discount * tax)
result = total_cost
return result
|
Ms. Garcia baked 30 cookies for her class. Each student got 2 cookies and there were 6 left over. How many students did Ms. Garcia have? | def solve() -> int:
total_cookies = 30
cookies_per_student = 2
leftover_cookies = 6
total_students = (total_cookies - leftover_cookies) / cookies_per_student
result = total_students
return result
|
Mike is making omelettes for a breakfast gathering. He wants to make 36 servings. His recipe makes enough batter for 6 omelettes. The recipe calls for 2 eggs. How many eggs does Mike need? | def solve() -> int:
servings_per_recipe = 6
total_servings = 36
eggs_per_recipe = 2
recipes_needed = total_servings // servings_per_recipe
eggs_needed = recipes_needed * eggs_per_recipe
result = eggs_needed
return result
|
Student: A pack of colored pencils costs $3.75, and a pack of markers costs $7. If Olivia buys one pack of colored pencils and one pack of markers, how much does she spend in total? | def solve() -> int:
cost_colored_pencils = 3.75
cost_markers = 7
total_cost = cost_colored_pencils + cost_markers
result = total_cost
return result
|
Henry is counting the number of passengers on a train. 15% of the passengers are children, 40% are adults and the rest are seniors. If he counts 30 children on the train, how many seniors are there? | def solve() -> int:
children = 30
total_passengers = children / 0.15
adults = total_passengers * 0.4
seniors = total_passengers - children - adults
result = seniors
return result
|
Henry sells homemade chocolates at craft shows. He charges $5 for each bar of dark chocolate, $7 for each bar of milk chocolate, and $9 for each bar of white chocolate. This week, he sold 4 bars of dark chocolate, 8 bars of milk chocolate, and 2 bars of white chocolate. How much money, in dollars, did he make this week... | def solve() -> int:
total_cost = 5*4 + 7*8 + 9*2
result = total_cost
return result
|
The perimeter of a square is 64 cm. What is the area of the square? | def solve() -> int:
perimeter = 64
side = perimeter / 4
area = side ** 2
result = area
return result
|
At the fish market, the bulk price of salmon is $12 per pound and the minimum spend is $80 before tax. The salmon is taxed at $3 per pound. If Brayden has paid $420 for salmon, by how many pounds has Brayden’s purchase exceed the minimum spend? | def solve() -> int:
bulk_price = 12
minimum_spend = 80
tax_rate = 3
total_paid = 420
salmon_before_tax = (total_paid - minimum_spend) / (bulk_price + tax_rate)
tax_paid = salmon_before_tax * tax_rate
total_salmon = salmon_before_tax + (tax_paid / bulk_price)
excess_sa... |
Student: Lila has 10 cards, 3 of them have a star, 4 of them have a circle, and 3 of them have a triangle. She shuffles the cards and deals 3 cards to herself. How likely is it that she has exactly one card of each shape? | def solve() -> int:
total_cards = 10
star_cards = 3
circle_cards = 4
triangle_cards = 3
total_ways = (total_cards * (total_cards - 1) * (total_cards - 2)) / 6
one_of_each = star_cards * circle_cards * triangle_cards
probability = one_of_each / total_ways
result = probability
return ... |
A company's expenses increased by $5000 in the last year. If the company had expenses of $50,000 in the previous year, what are the company's expenses this year? | def solve() -> int:
previous_expenses = 50000
increase = 5000
current_expenses = previous_expenses + increase
result = current_expenses
return result
|
A bakery sells donuts and cookies. If a dozen donuts cost $9, and a pack of 6 cookies cost $4, how much does it cost to buy 30 donuts and 24 cookies? | def solve() -> int:
donuts_per_dozen = 12
cookies_per_pack = 6
dozen_donuts_cost = 9
pack_of_cookies_cost = 4
total_cost = (2 * dozen_donuts_cost * 2.5) + (4 * pack_of_cookies_cost * 4)
result = total_cost
return result
|
Madison is trying to fit bookshelves into a bedroom. She has 5 rectangular bookshelves that are 4 feet long, 2 feet wide, and need 3 feet between them. How much space will these bookshelves take up in the bedroom, if the room is 15 feet long and 12 feet wide? | def solve() -> int:
length_room = 15
width_room = 12
length_bookshelf = 4
width_bookshelf = 2
space_between_bookshelves = 3
total_length_bookshelves = 5 * length_bookshelf
total_width_bookshelves = 2 * width_bookshelf + 4 * space_between_bookshelves
total_space_bookshelves = to... |
A farmer has 24 chickens in his farm. He wants to buy more chickens so that the ratio of adult chickens to young chickens will be 3:7. How many chickens does he need to buy? | def solve() -> int:
total_chickens = 24
adult_ratio = 3
young_ratio = 7
ratio_total = adult_ratio + young_ratio
total_needed = total_chickens * ratio_total
new_needed = total_needed - total_chickens
result = new_needed
return result
|
Student: Anna sells 15 loaves of bread for $3 each. She bought the flour for $20 and used 10 pounds of it. Each loaf weighs 1.5 pounds and costs $0.5 to bake. How much profit did she make? | def solve() -> int:
loaves = 15
price_per_loaf = 3
flour_price = 20
flour_used = 10
loaf_weight = 1.5
bake_cost = 0.5
total_flour_cost = flour_price * flour_used
total_bake_cost = bake_cost * loaves
total_revenue = price_per_loaf * loaves
total_profit = total_revenue - total_flou... |
John’s mom agrees to pay him 5 cents for every problem he solves in his math book. He wants to save up $50. If his math book has 200 problems, how many problems does he need to solve? | def solve() -> int:
book_problems = 200
payment_per_problem = 0.05
target_savings = 50
total_payment = book_problems * payment_per_problem
problems_solved = total_payment / payment_per_problem
result = problems_solved
return result
|
Dr. Kim teaches a class for 2 hours. For the first 40 minutes, she introduces herself and the course at a steady pace, spending an equal amount of time talking about each. For the next hour, she goes into more depth about the course, presenting information at a quicker pace. For the final 20 minutes, she answers questi... | def solve() -> int:
intro_time = 40
depth_time = 60
question_time = 20
intro_pace = intro_time / 2
depth_pace = depth_time / 3
total_talk_time = intro_pace + depth_pace + question_time
result = total_talk_time
return result
|
``` A rectangular field is 80 ft by 60 ft. If 1 square ft of grass needs 3 droplets to water, and a droplet costs $0.01, how much will it cost to water the entire field? | def solve() -> int:
total_sqft = 80 * 60
total_droplets = total_sqft * 3
total_cost = total_droplets * 0.01
result = total_cost
return result
|
David wants to buy a new laptop but can only afford a budget laptop that is 20% cheaper and has a smaller hard drive. He needs to buy additional storage for the laptop, which costs $70. The original price of the laptop was $900. How much money does he save? | def solve() -> int:
original_price = 900
discount = 0.2
discounted_price = original_price * (1 - discount)
additional_storage_cost = 70
total_cost = discounted_price + additional_storage_cost
savings = original_price - total_cost
result = savings
return result
|
Emma is making a rectangular rug that has a perimeter twice as large as a square rug. If the square rug has a side length of 8 feet, calculate the perimeter of the rectangular rug. | def solve() -> int:
square_side_length = 8
square_perimeter = 4 * square_side_length
rectangular_perimeter = 2 * square_perimeter
result = rectangular_perimeter
return result
|
A box of cereal contains 10 rectangular flakes. The length of each flake is 2 inches and the width is 1 inch. If the box is 8 inches long, how many boxes of cereal are needed to fill a 24 inch long countertop? | def solve() -> int:
num_flakes = 10
flake_length = 2
flake_width = 1
box_length = 8
flake_area = flake_length * flake_width
box_area = flake_area * num_flakes
countertop_length = 24
num_boxes = countertop_length / box_length
result = num_boxes
return resu... |
A bouncy ball is dropped from a building and bounces up to a height of ten feet. The ball bounces back down to earth and spreads out in a diameter twice the height it was dropped from. What is the radius of the area the ball spreads out to? | def solve() -> int:
height = 10
diameter = height * 2
radius = diameter / 2
result = radius
return result
|
A student needs to score an average of at least 80% in their 5 tests to pass a course. If their test scores are 75%, 85%, 90%, 80%, and 70%, what score do they need to get on the last test to pass the course? | def solve() -> int:
total_percentage = 75 + 85 + 90 + 80 + 70
score_needed = 80*6 - total_percentage
result = score_needed
return result
|
David is driving from New York to Boston, a distance of 215 miles. He has covered 80 miles in 90 minutes. He needs to arrive in Boston by 3 pm. What is the minimum speed in miles per hour that he needs to drive for the rest of the trip? | def solve() -> int:
distance = 215 - 80
time = 150 - 90
time = time / 60
speed = distance / time
result = speed
return result
|
If Thomas is 7 years younger than his sister Lucy and Lucy is 20 years old, how old is Thomas? | def solve() -> int:
lucy_age = 20
thomas_age = lucy_age - 7
result = thomas_age
return result
|
John had 24 apples. He gave 1/3 of them to Mary and then 1/2 of what he had left to Jane. How many apples does Jane have? | def solve() -> int:
john = 24
mary = john/3
leftover = john - mary
jane = leftover/2
result = jane
return result
|
A movie ticket costs $12 for an adult and $8 for a child. A family of two adults and three children went to see a movie. They also bought two large popcorns for $6 each and three small sodas for $2 each. How much did the family spend in total? | def solve() -> int:
adult_ticket = 12
child_ticket = 8
adults = 2
children = 3
large_popcorn = 6
small_soda = 2
popcorns = 2
sodas = 3
adult_ticket_total = adult_ticket * adults
child_ticket_total = child_ticket * children
large_popcorn_total = large_popcorn * popco... |
There are 50 employees in a company. 30 percent of employees work in the sales department. 20 percent of employees work in the accounting department. The rest of employees work in the production department. How many employees work in the production department? | def solve() -> int:
sales = 0.3 * 50
accounting = 0.2 * 50
production = 50 - sales - accounting
result = production
return result
|
If Ken drives for 2 hours at 60 miles per hour to the South, then drives for 4 hours to the East at the same constant speed, and then drives in a straight line for 5 hours until he reaches his destination, how fast was he driving on that last stretch of the drive? | def solve() -> int:
distance1 = 2 * 60
distance2 = 4 * 60
distance3 = None
time1 = 2
time2 = 4
time3 = 5
distance3 = ((distance1 ** 2 + distance2 ** 2) ** 0.5)
result = distance3 / time3
return result
|
Olivia spends $120 a month on video game subscriptions. Her subscriptions are for 12 months. She wants to use the money she earns from delivering newspapers to save up for a new gaming laptop. She charges $20 per delivery. How many deliveries does she need to make per month to save up for her new gaming laptop? | def solve() -> int:
subscriptions_cost = 120
months = 12
delivery_charge = 20
total_cost = subscriptions_cost * months
deliveries_needed = total_cost / delivery_charge
result = deliveries_needed
return result
|
Jenny has 24 toy cars and boats. If she wants to keep 3 toys in each compartment of her toy box, how many compartments will she need? | def solve() -> int:
total_toys = 24
toys_per_compartment = 3
total_compartments = total_toys // toys_per_compartment
result = total_compartments
return result
|
There are 120 students in a school who are attending a field trip. They are divided into 6 buses equally. How many students are there in each bus? | def solve() -> int:
num_students = 120
num_buses = 6
students_per_bus = num_students / num_buses
result = students_per_bus
return result
|
A phone company charges $15 per month for 2 GB of data, and each additional GB of data costs $5 per month. If your monthly usage is 8 GB, how much will you have to pay? | def solve() -> int:
base_price = 15
base_data = 2
additional_price_per_gb = 5
additional_data = 8 - base_data
additional_price = additional_price_per_gb * additional_data
total_price = base_price + additional_price
result = total_price
return result
|
If the perimeter of a square is 36 cm, what is the length of one side of the square? | def solve() -> int:
perimeter = 36
side_length = perimeter / 4
result = side_length
return result
|
Oliver went to the doctor 4 times, and each visit cost $150. After the first appointment, he paid $80 for medical insurance that covers 90% of the subsequent visits. How much did Oliver pay in total? | def solve() -> int:
visit_cost = 150
total_cost_without_insurance = visit_cost * 4
insurance_coverage = 0.9
covered_visits_cost = visit_cost * 3
total_cost_with_insurance = covered_visits_cost + insurance_coverage * visit_cost
amount_paid = total_cost_with_insurance + 80
... |
Four years ago, the cost of a watch was 3/11 times less than it is currently. If the cost was $3000 four years ago, what is the current cost of the watch? A group of scientists are researching a bee colony. They found out that the population increased by 150% in the first year and then decreased by 25% in the second ye... | def solve() -> int:
cost_four_years_ago = 3000
cost_current = cost_four_years_ago / (1 - 3/11)
population = 1000
population *= 1.5
population *= 0.75
population += 42
result = cost_current, population
return result
|
If a person runs 4 miles in 30 minutes, how many miles will they run in 45 minutes? | def solve() -> int:
time_to_run_4miles = 30
distance_to_run = 4
time_to_run_45min = 45
miles_to_run = (time_to_run_45min / time_to_run_4miles) * distance_to_run
result = miles_to_run
return result
|
Zoe is currently 12 years old and her father is 40 years old. How old was Zoe when her father was three times as old as she is now? | def solve() -> int:
zoe_current_age = 12
father_current_age = 40
age_difference = father_current_age - zoe_current_age
zoe_father_age_difference = age_difference * 2
zoe_age_at_that_time = zoe_current_age - zoe_father_age_difference
result = zoe_age_at_that_time
return re... |
David has 18 crayons and wants to give 5 crayons to his sister. How many crayons does he have left? | def solve() -> int:
total_crayons = 18
give_sister = 5
result = total_crayons - give_sister
return result
|
A family of 3 goes to the hospital. One member gets an X-ray for $200, another gets a CT scan for $800 and the third one gets an MRI for $1,200. The doctor charges $150 for being seen and $300 per hour. They spoke with the doctor for 45 minutes. If the insurance covers 85%, how much does the family have to pay? | def solve() -> int:
x_ray_cost = 200
ct_scan_cost = 800
mri_cost = 1200
doctor_fee = 150
doctor_time = 0.75
doctor_rate = 300
doctor_visit_cost = doctor_fee + doctor_time * doctor_rate
total_cost = x_ray_cost + ct_scan_cost + mri_cost + doctor_visit_cost
insurance_coverage = 0.85
... |
A recipe for lemonade calls for 6 cups of water, 1 cup of lemon juice, and 0.75 cups of sugar. How many cups of lemonade does the recipe make in total? How much of each ingredient is needed to make 12 cups of lemonade? | def solve() -> int:
lemonade_cups = 6 + 1 + 0.75
water_ratio = 6 / lemonade_cups
lemon_ratio = 1 / lemonade_cups
sugar_ratio = 0.75 / lemonade_cups
water_needed = water_ratio * 12
lemon_needed = lemon_ratio * 12
sugar_needed = sugar_ratio * 12
result = (lemonade_cups, water_needed, lemon... |
In the garden, there are a total of 18 plants, 3 quarters of them are roses and the rest are orchids. If a rose has 4 petals and an orchid has 6 petals, how many petals are in the garden? | def solve() -> int:
total_plants = 18
plants_rose = total_plants * 3/4
plants_orchid = total_plants * 1/4
petals_rose = 4
petals_orchid = 6
result = plants_rose * petals_rose + plants_orchid * petals_orchid
return result
|
Student: Adam is cooking breakfast and uses exactly 1/4 cup of oatmeal for each serving. Today he needs to make breakfast for 6 people. How many cups of oatmeal in total will he need to get? | def solve() -> int:
people = 6
serving = 1/4
total_cups = people * serving
result = total_cups
return result
|
Mark buys 4 and a half pounds of popcorn for his movie night with friends. Before the movie starts, he eats 20% of the popcorn himself. After the movie, he wants to save 1 pound of popcorn for later. How many pounds of popcorn do his friends get to enjoy during the movie? Rebecca has $1, $5, and $10 bills which amount ... | def solve() -> int:
popcorn = 4.5
mark_eats = 0.2 * popcorn
remaining_popcorn = popcorn - mark_eats - 1
friends_popcorn = remaining_popcorn
result = friends_popcorn
total_money = 75
five_bills = 20
ten_bills = 3
one_bills = (total_money - (5 * five_bills) - (10 * ten_b... |
Dan is designing a website for his client. He needs to create 3 pages, set up an online shop, and integrate a booking system. He can design one web page in 2 hours. Setting up the online shop takes him 5 hours. Integrating the booking system takes him 3 hours. How long will it take him to finish the website? | def solve() -> int:
page_time = 2
shop_time = 5
booking_time = 3
total_time = page_time * 3 + shop_time + booking_time
result = total_time
return result
|
A farm has 60 chickens in a coop. If the farmer sold 7/12 of the chickens, how many chickens are left? | def solve() -> int:
chickens_in_coop = 60
chickens_sold = chickens_in_coop * 7/12
chickens_left = chickens_in_coop - chickens_sold
result = chickens_left
return result
|
Jason invested $5000 in a bank account that pays 5% annual interest compounded monthly. How much money will he have in the account after 3 years? | def solve() -> int:
a = 5000 * (1 + 0.05 / 12) ** (12 * 3)
result = round(a, 2)
return result
|
A rectangle has a length of 8cm and a width of 5cm. What is the area of the rectangle? | def solve() -> int:
length = 8
width = 5
area = length * width
result = area
return result
|
A recipe calls for 2 cups of sugar to make 20 cookies. How much sugar is needed to make 100 cookies? | def solve() -> int:
sugar_per_cookie = 2 / 20
cookies = 100
sugar_needed = sugar_per_cookie * cookies
result = sugar_needed
return result
|
A store wants to earn a 20% profit on a shirt, which costs $15. What should be the selling price? | def solve() -> int:
cost_price = 15
profit_percentage = 20
selling_price = cost_price * (1 + profit_percentage/100)
result = selling_price
return result
|
There are 72 plates arranged in six rows. How many plates are in each row? | def solve() -> int:
result = 72 // 6
return result
|
A bag contains 25 marbles. If 20% of the marbles are red and the rest are blue, how many blue marbles are in the bag? | def solve() -> int:
total_marbles = 25
red_percentage = 0.20
red_marbles = total_marbles * red_percentage
blue_marbles = total_marbles - red_marbles
result = blue_marbles
return result
|
Lily is decorating for her upcoming party. Each balloon costs 15 cents. If she needs a total of 240 balloons, how much will she have to spend? | def solve() -> int:
cost_per_balloon = 0.15
total_balloons = 240
total_cost = cost_per_balloon * total_balloons
result = total_cost
return result
|
A gym is offering 20 personal training sessions for $500.00. Another gym is offering individual personal training sessions for $40.00. How much more expensive, per session, in cents, is the first gym's deal? | def solve() -> int:
sessions = 20
total_cost = 500.00
cost_per_session = total_cost / sessions
individual_cost = 40.00
difference = (cost_per_session - individual_cost) * 100
result = difference
return result
|
``` A bottle of juice has 350 ml. If a person drinks 75 ml per day, how many days will the bottle last? | def solve() -> int:
total_days_to_finish = 350/75
result = total_days_to_finish
return result
|
After refueling her car, Heather pays $21.95 for 1.5 gallons of gas. How much does each gallon of gas cost? | def solve() -> int:
price_per_gallon = 0
total_price = 21.95
gallons = 1.5
price_per_gallon = total_price / gallons
result = price_per_gallon
return result
|
In ten years, Mia will be 18 years old. Mia's brother is currently half as old as Mia is today. In three years, Mia's father will be the same age as Mia's brother is today. How old is Mia's father currently? | def solve() -> int:
mia_age_in_10_years = 18
mia_age_today = mia_age_in_10_years - 10
brother_age_today = mia_age_today / 2
father_age_in_3_years = brother_age_today
father_age_today = father_age_in_3_years - 3
result = father_age_today
return result
|
Student: Carol bought 4 different items for $27 each. How much did Carol spend in total? | def solve() -> int:
item_price = 27
num_items = 4
total_cost = item_price * num_items
result = total_cost
return result
|
Student: A rectangular pool is 20 feet wide and 30 feet long. If the pool has a depth of 5 feet at the deep end and a depth of 3 feet at the shallow end, what is the average depth of the pool? | def solve() -> int:
width = 20
length = 30
deep_end_depth = 5
shallow_end_depth = 3
average_depth = (deep_end_depth + shallow_end_depth) / 2
result = average_depth
return result
|
A book store buys a book for $8.00 and sells it for $12.00. If they sell 200 books, how much profit do they make? | def solve() -> int:
books_bought = 200
buying_price = 8.00
selling_price = 12.00
total_profit = (selling_price - buying_price) * books_bought
result = total_profit
return result
|
Amelia has $45. She wants to buy a toy for $12 and a book for $8. How much money will Amelia have left? | def solve() -> int:
total_money = 45
toy_cost = 12
book_cost = 8
money_left = total_money - toy_cost - book_cost
result = money_left
return result
|
Possible questions and programs are: Leo bought 10 shares of a company for $100 each. The next day, the price went up by 10% and he sold half of his shares. The day after that, the price went down by 20% and he bought 5 more shares. How much money does he have now? | def solve() -> int:
shares = 10
price = 100
money = 0
price = price * 1.1
money = money + shares / 2 * price
shares = shares / 2
price = price * 0.8
money = money - 5 * price
shares = shares + 5
result = money + shares * price
return result
|
The temperature in a city rose from -5°C to 10°C. What was the percentage increase in temperature? | def solve() -> int:
initial_temperature = -5
final_temperature = 10
increase = final_temperature - initial_temperature
percent_increase = (increase / abs(initial_temperature)) * 100
result = percent_increase
return result
|
san is traveling to Europe from the United States. If her flight leaves Los Angeles at 9:00 pm Pacific Standard Time and arrives in London at 3:00 am Greenwich Mean Time, how many hours long is her flight? | def solve() -> int:
departure_time_pst = 9
arrival_time_gmt = 3
flight_duration_hours = 24 - departure_time_pst + arrival_time_gmt
result = flight_duration_hours
return result
|
A party has 50 guests. If each guest drinks 4 cans of soda, how many cans does the party require? | def solve() -> int:
total_cans_required = 50*4
result = total_cans_required
return result
|
Q4: Lily buys 120 stickers for $12. She gives away 20% of them to her friends, and sells the rest for $0.15 each. How much profit does she make from the sale? | def solve() -> int:
keep_stickers = 120 * (1 - 0.2)
cost_money = 12
sale_money = keep_stickers * 0.15
profit = sale_money - cost_money
result = round(profit, 2)
return result
|
James is tasked with making 5 copies of a prospectus for 12 investors. The prospectus runs for 18 pages. How many pages in total will James need to copy for all the investors? | def solve() -> int:
num_copies = 5
num_investors = 12
num_pages = 18
total_pages = num_copies * num_investors * num_pages
result = total_pages
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.