question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Sophie spent $18 on a movie ticket and a popcorn. If the movie ticket costs $8 more than the popcorn, how much does the movie ticket cost, in dollars? | def solve() -> int:
movie_ticket = (18 + 8) / 2
result = movie_ticket
return result
|
A rectangular field has a perimeter of 160 meters, and the length is 3 times the width. What are the dimensions of the field? | def solve() -> int:
perimeter = 160
width = perimeter/8
length = 3*width
result = "Width:", width, "Length:", length
return result
|
Q8: 84% of the jellybeans in a bowl are red. If there are 72 jellybeans, how many are red? | def solve() -> int:
total_jb_num = 72
percent_for_red_jb = 84
red_jb = (percent_for_red_jb/100) * total_jb_num
result = round(red_jb)
return result
|
Ava wants to go to the beach for the weekend. If she takes highway M, it will take her 4 hours to arrive; but if she takes highway N, it will only take her 1 hour to arrive at her destination. How much time will she save if she takes highway N to the beach and back to her home? | def solve() -> int:
m_time = 4
n_time = 1
total_time = m_time * 2
n_total_time = n_time * 2
time_saved = total_time - n_total_time
result = time_saved
return result
|
A garden is 12 meters wide and 20 meters long. If you want to plant seeds every 1/2 meter, how many seeds do you need? | def solve() -> int:
width = 12 / (1/2)
length = 20 / (1/2)
seeds = width*length
result = seeds
return result
|
A store sells apples for $1.50 per pound. If Joe wants to buy 4 pounds of apples, how much money will he need to spend? | def solve() -> int:
cost_per_pound = 1.5
pounds = 4
total_cost = cost_per_pound * pounds
result = total_cost
return result
|
Derek wants to buy a laptop that is on sale for $800 and has a 20% discount. How much will he need to pay in total? | def solve() -> int:
regular_price = 800
discount = 0.20
discount_amount = regular_price*discount
sale_price = regular_price - discount_amount
result = sale_price
return result
|
Mark has six classmates. The second youngest classmate is twice as old as Mark’s age. The second youngest classmate is 3 years older than the youngest classmate. What is the average age of Mark and his classmates? | def solve() -> int:
mark_age = 0
second_youngest_age = 0
youngest_age = 0
total_age = 0
second_youngest_age = youngest_age + 3
mark_age = second_youngest_age / 2
total_age = mark_age + second_youngest_age + 4 * youngest_age
average_age = total_age / 7
result = ave... |
David can paint a room in 3 hours, while Michael can do it in 5 hours. How long will it take them to paint the room together? | def solve() -> int:
painting_rate_per_hour = 1/3 + 1/5
time_for_the_room = 1/painting_rate_per_hour
result = time_for_the_room
return result
|
A group of six friends watched a total of 4 movies. Emily watched 1 movie that was 2 hours long, while Ben watched 2 movies that were 1 hour and 30 minutes each. How many minutes of movies did Charlie watch? | def solve() -> int:
emily_movie_duration = 2 * 60
ben_movie_duration = 2 * (1 * 60 + 30)
total_movie_duration = 4 * 60
charlie_movie_duration = total_movie_duration - (emily_movie_duration + ben_movie_duration)
result = charlie_movie_duration
return result
|
Student: If a store sells shirts for $20 each and pants for $30 each. If a customer buys 2 shirts and 3 pants, what is the total cost? | def solve() -> int:
shirt_cost = 20
pants_cost = 30
total_shirt_cost = shirt_cost * 2
total_pants_cost = pants_cost * 3
total_cost = total_shirt_cost + total_pants_cost
result = total_cost
return result
|
Denise invested $1000 in a savings account which provides 8% rate of interest annually. How much money will she have after 3 years? | def solve() -> int:
final_amount = 1000 * (1 + 0.08) ** 3
result = final_amount
return result
|
A train travels a distance of 360 km at an average speed of 80 km/hour. If the train stops for 30 minutes during the journey, calculate the total time the train takes to complete this distance. | def solve() -> int:
distance_traveled = 360
speed = 80
time_taken_without_stop = distance_traveled/speed
time_taken_with_stop = time_taken_without_stop + (30/60)
result = f'{time_taken_with_stop} hours'
result = time_taken_with_stop
return result
|
Miguel has 25 toys and some of them are in 5 filled boxes while 3 toys are not in any box. His friend gave him 10 more toys. If all toys must be placed in a box, how many more boxes do they need? | def solve() -> int:
toys_in_boxes = 5
toys_not_in_box = 3
total_toys = 25 + toys_not_in_box + 10
total_boxes = toys_in_boxes + (total_toys // 5)
more_boxes_needed = total_boxes - toys_in_boxes
result = more_boxes_needed
return result
|
Student: Sofia wants to buy a new dress. The dress costs $50 but there is a 20% sale. How much will Sofia pay for the dress? | def solve() -> int:
original_price = 50
discount_rate = 0.2
money_saved = original_price * discount_rate
final_price = original_price - money_saved
result = final_price
return result
|
A recipe calls for 3/4 cup of oil for every 2 cups of flour. If we want to make 10 cups of flour, how much oil do we need? | def solve() -> int:
flour = 10
oil = (3/2) * (flour/2)
result = round(oil, 2)
return result
|
The sports team scored 14 points in the first half and 18 in the second. How many total points did the team score? | def solve() -> int:
points_first_half = 14
points_second_half = 18
total_points = points_first_half + points_second_half
result = total_points
return result
|
A repair company charges a flat rate of $50 for a service call, plus an additional $75 per hour of service. If a job takes 3 hours and 15 minutes to complete, how much will the job cost? | def solve() -> int:
flat_rate = 50
hourly_rate = 75
num_hours = 3 + 15/60
total_cost = flat_rate + (hourly_rate * num_hours)
result = total_cost
return result
|
If Mike and Tina want to split a $120 bill evenly, but Tina only has $40, how much should Mike pay? | def solve() -> int:
mike_payment = (120-40)/2
result = mike_payment
return result
|
Jane has 10 more than half the number of pencils as John. Then John gave half of his pencils to Jane. If John had 50 pencils, how many pencils does Jane have now? | def solve() -> int:
john_pencils = 50
jane_pencils = (john_pencils / 2) + 10
john_pencils = john_pencils / 2
jane_pencils = jane_pencils + john_pencils
result = jane_pencils
return result
|
In a farm, there are 120 chickens and 80 ducks. A farmer sells some of the poultry every week. He sells an average of 10 chickens and 6 ducks per week. How many chickens and ducks will he have left after 5 weeks? | def solve() -> int:
chickens = 120
ducks = 80
chickens_sold = 10
ducks_sold = 6
weeks = 5
for i in range(weeks):
chickens = chickens - chickens_sold
ducks = ducks - ducks_sold
result = (chickens, ducks)
return result
|
A rectangular prism has a length of 8cm, width of 4cm, and height of 6cm. What is its volume? | def solve() -> int:
length = 8
width = 4
height = 6
volume = length*width*height
result = volume
return result
|
David had 15 dollars and spent 8. He then earned 5 more dollars and spent 3. How many dollars does David currently have? | def solve() -> int:
dollars = 15
dollars -= 8
dollars += 5
dollars -= 3
result = dollars
return result
|
Mia runs on a race track. For every 2 laps she runs forward, she runs 3 laps vertically. If she wants to run 25 laps vertically, how many laps does she run horizontally? | def solve() -> int:
forward_laps = 2
vertical_laps = 3
vertical_goal = 25
horizontal_laps = (vertical_goal * forward_laps) / vertical_laps
result = horizontal_laps
return result
|
John plants 5 rows of trees with 8 trees in each row. How many trees did John plant in total? | def solve() -> int:
num_rows = 5
trees_per_row = 8
result = num_rows * trees_per_row
return result
|
Ethan is working on his farm and needs to build a fence around his garden. The fence is 36 feet long. He has 12-foot-long planks to use for the fence. How many planks will he need to build the fence? | def solve() -> int:
fence_length = 36
plank_length = 12
planks_needed = fence_length / plank_length
result = planks_needed
return result
|
Sophie and Ben are working on a construction project. Sophie needs 6 pieces of wood that are 7 feet long, and she has cut them 9 times. Ben needs 4 pieces of wood that are 4 feet long, and he has cut them 18 times. How many feet of wood have they cut in total? | def solve() -> int:
sophie_pieces = 6
sophie_length = 7
sophie_cuts = 9
ben_pieces = 4
ben_length = 4
ben_cuts = 18
sophie_total_length = sophie_pieces * sophie_length
ben_total_length = ben_pieces * ben_length
sophie_cut_length = sophie_cuts * sophie_length
ben_cu... |
At an amusement park, Tyler saw 30 people on the roller coaster ride. In the Ferris wheel ride, there were twice as many people as in the roller coaster ride. If there were a total of 210 people at the park, how many more people were on the Ferris wheel than the roller coaster ride? Manny and Bella borrow a calculus te... | def solve() -> int:
roller_coaster = 30
ferris_wheel = 2 * roller_coaster
total_people = 210
other_rides = total_people - roller_coaster - ferris_wheel
ferris_more = ferris_wheel - roller_coaster
manny_days = 10
bella_days = 30
average_days = (manny_days + bella_... |
A family has 4 members and want to share 2 pizzas. If each member needs 2 slices, how many slices will be left over? | def solve() -> int:
total_slices = 8
slices_needed = 4 * 2
slices_left = total_slices - slices_needed
result = slices_left
return result
|
Three delivery drivers can deliver 120 packages in 4 hours. How many delivery drivers are needed to deliver 240 packages in 6 hours? | def solve() -> int:
num_drivers = 3
num_packages = 120
time = 4
rate_per_driver = num_packages / (num_drivers * time)
num_packages_2 = 240
time_2 = 6
num_drivers_2 = num_packages_2 / (rate_per_driver * time_2)
result = num_drivers_2
return result
|
Student: - Lucy is buying earrings from a jewelry shop. She pays $25 for a pair of silver earrings and $40 for a pair of gold earrings. She uses a coupon that gives her a 20% discount on the total purchase. How much money does she save with the coupon? | def solve() -> int:
silver_earrings = 25
gold_earrings = 40
total_cost = silver_earrings + gold_earrings
discount = total_cost * 0.2
result = discount
return result
|
Student: There are 7 cats and 4 dogs at the pet shop. How many animals are there in total? | def solve() -> int:
cats = 7
dogs = 4
total_animals = cats + dogs
result = total_animals
return result
|
John's hiking trip will take 6 hours 50 minutes. He spends 1 hour 30 minutes taking pictures, 2 hours 10 minutes resting, 45 minutes eating a sandwich, and 50 minutes using a GPS. How many hours does he have left to go hiking? | def solve() -> int:
total_time = 6*60 + 50
pictures_time = 1*60 + 30
rest_time = 2*60 + 10
eating_time = 45
gps_time = 50
total_break_time = pictures_time + rest_time + eating_time + gps_time
time_left = total_time - total_break_time
hours_left = time_left // 60
minutes_left = t... |
Some possible questions and programs are: Leo has 6 boxes of pencils, each box contains 12 pencils. He gave away 4 pencils to each of his 9 friends. How many pencils does he have left? | def solve() -> int:
total_pencils = 6 * 12
pencils_given = 4 * 9
pencils_left = total_pencils - pencils_given
result = pencils_left
return result
|
At a party, each person was served a slice of cake that was 1/8 of a whole cake. If 25 people came to the party, how much of the cake had been served? | def solve() -> int:
people = 25
slices = people * 1/8
result = slices
return result
|
A farmer has a field that is 40 acres. He plants 5 rows of corn that are 10 acres each and 3 rows of wheat that are 8 acres each. How many acres of his field is planted with crops? | def solve() -> int:
field_size = 40
corn_row_size = 10
wheat_row_size = 8
corn_acres = 5 * corn_row_size
wheat_acres = 3 * wheat_row_size
total_planted_acres = corn_acres + wheat_acres
result = total_planted_acres
return result
|
Taylor is doing a project. If the task of this project requires Taylor to complete 10 tasks in total, and Taylor finishes 7 tasks in the first 7 days, and spends the rest 3 days in completing 5 tasks, calculate the number of tasks Taylor has accomplished in the first 7 days. | def solve() -> int:
total_tasks = 10
tasks_first_7_days = 7
remaining_tasks = total_tasks - tasks_first_7_days
tasks_accomplished = tasks_first_7_days - remaining_tasks
result = tasks_accomplished
return result
|
Student: Hippo is 73 kilometers southwest of Red Deer and Dingo is 78 kilometers northeast of Red Deer. If they each travel at 110 kilometers per hour, how much time would it take to get from Hippo to Dingo? | def solve() -> int:
hippo_distance = 73
dingo_distance = 78
speed = 110
total_distance = hippo_distance + dingo_distance
time = total_distance / speed
result = time
return result
|
The septaflag has seven colors. In a parade of septaflags, there are a total of 35 colors. How many septaflags are in the parade? | def solve() -> int:
num_colors = 7
total_colors = 35
num_flags = total_colors // num_colors
result = num_flags
return result
|
Tara read three times as many pages as Uma. Uma read 20 more pages than Victor. Victor read 40 pages. How many pages did Tara read? | def solve() -> int:
victor = 40
uma = victor + 20
tara = 3 * uma
result = tara
return result
|
A classroom has 25 students in total, three times as many girls as boys. If there are 15 girls, how many boys are in the class? | def solve() -> int:
girls = 15
total_students = 25
boys = (total_students - girls) / 4
result = boys
return result
|
John earns $15 per hour for the first 40 hours of work each week and $22.50 per hour for overtime hours worked. If he worked 48 hours this week, how much money will he make? | def solve() -> int:
normal_hours = 40
normal_pay = 15
overtime_hours = 48 - normal_hours
overtime_pay = 22.50
total_pay = normal_hours * normal_pay + overtime_hours * overtime_pay
result = total_pay
return result
|
In a semester, John attends half the number of classes that Jane attends. Their friend Lucy attends twice the combined total number of classes both John and Jane attend in a semester. If John attends 30 classes in a semester, how many classes does Lucy attend in a semester? | def solve() -> int:
jane_classes = 2 * 30
john_classes = 30
total_classes = jane_classes + john_classes
lucy_classes = 2 * total_classes
result = lucy_classes
return result
|
Noah and his cousin Liam are saving money for a trip. Noah has $120, 5/6 of which he saved from his allowance. Liam has 3/4 times as much money as Noah, and he saved 2/3 of it from his birthday gift. How much money in total did they save from their sources? | def solve() -> int:
noah_allowance = 120 * 5 / 6
noah_other = 120 - noah_allowance
liam_money = 120 * 3 / 4
liam_birthday = liam_money * 2 / 3
liam_other = liam_money - liam_birthday
total_saved = noah_allowance + noah_other + liam_birthday + liam_other
result = total_saved
return result... |
Kevin had 16 baseball cards. He traded 4 cards with his friend and got 6 cards in return. He also bought 3 more cards from the store. How many baseball cards does Kevin have now? | def solve() -> int:
initial_cards = 16
traded_cards = 4
received_cards = 6
bought_cards = 3
current_cards = initial_cards - traded_cards + received_cards + bought_cards
result = current_cards
return result
|
Elena has saved up her allowance for months to buy a new bike. She knows that it will cost her $250, but her parents tell her she can only buy it if she has saved up $200. How much more money does Elena need to save up in order to buy the bike? | def solve() -> int:
bike_cost = 250
savings_goal = 200
difference = bike_cost - savings_goal
result = difference
return result
|
A dodgy gas station is charging customers for premium gas without them realizing. If Julia's gas tank cost $50 to fill up and she unknowingly used premium gas that was an additional 20% more expensive, how much did Julia spend on the premium gas? | def solve() -> int:
tank_cost = 50
premium_percent = 20
premium_cost = tank_cost * premium_percent / 100
result = premium_cost
return result
|
Kerry has 2 identical 11-story buildings. The first 7 floors have 3 apartment units each, the next 3 floors have 5 apartment units each and the last floor has 2 apartment units. How many apartment units does Kerry have in all? | def solve() -> int:
floors = 11
apartment_1to7floors = 3
apartment_8to10floors = 5
apartment_11floor = 2
total_apartments = (7 * apartment_1to7floors) + (3 * apartment_8to10floors) + (1 * apartment_11floor)
result = total_apartments
return result
|
A company produces 300 units a day. They want to produce 1800 units this week. How many more units do they need to produce? | def solve() -> int:
produced_daily = 300
production_goal = 1800
days = 7
units_remaining = production_goal - produced_daily * days
result = units_remaining
return result
|
Elsie made 3 batches of cupcakes. Each batch made 24 cupcakes. She gave away 43 cupcakes and sold the rest. How many cupcakes did Elsie sell? | def solve() -> int:
cupcakes_per_batch = 24
total_cupcakes = cupcakes_per_batch * 3
cupcakes_given_away = 43
cupcakes_sold = total_cupcakes - cupcakes_given_away
result = cupcakes_sold
return result
|
David bought 4 packs of pencils for school last week, but this week he was only able to buy half the amount. If he wants to buy twice as many pencils next week, how many packs does he need to buy and if one pack costs $2, how much would it cost him? | def solve() -> int:
last_week = 4
this_week = last_week / 2
next_week = 2 * this_week
total_packs = last_week + this_week + next_week
cost_per_pack = 2
total_cost = total_packs * cost_per_pack
result = total_cost
return result
|
A grocery store offers a discount of $20 for every purchase of $200 or more. A customer bought $500 worth of products. What is the total discount and the final cost? | def solve() -> int:
total_purchase = 500
discount_threshold = 200
discount_amount = 20
num_of_discounts = total_purchase // discount_threshold
total_discount = num_of_discounts * discount_amount
final_cost = total_purchase - total_discount
result = total_discount
result = final_cost
... |
In a basketball match, Tom scored 15 points out of the team's total of 70 points. What percentage of the team's points did Tom score? | def solve() -> int:
tom_points = 15
team_points = 70
percentage = (tom_points/team_points)*100
result = percentage
return result
|
A bag contains 124 marbles of different colors. If 3 out of every 5 marbles are red and the rest are blue, how many blue marbles are in the bag? | def solve() -> int:
red = 124 * 3/5
blue = 124 - red
result = blue
return result
|
Some possible questions and programs are: Julia bought a dozen eggs for $4.80. She used 8 eggs to bake a cake and sold the cake for $12. She gave half of the remaining eggs to her neighbor. How much money does Julia have now? | def solve() -> int:
eggs = 12
cost = 4.80
cake = 12
eggs_left = eggs - 8
eggs_give = eggs_left // 2
eggs_keep = eggs_left - eggs_give
money_spent = cost
money_earned = cake
money_final = money_earned - money_spent + eggs_keep * cost / eggs
result = money_final
return result
|
In a class of 40 students, 16 play soccer, 12 play basketball and 8 play both soccer and basketball. How many students do not play either soccer or basketball? | def solve() -> int:
total = 40
soccer = 16
basketball = 12
both = 8
either = soccer + basketball - both
neither = total - either
result = neither
return result
|
Kelly runs a bakery. She spends $500 a week on ingredients and $200 a week on rent and utilities. She sells each cake for $15 and can make 100 cakes a week with the ingredients. How many cakes does she need to sell to make a weekly profit of $1000? | def solve() -> int:
cost = 500 + 200
profit = 15 - cost / 100
cakes = (1000 + cost) / profit
cakes = int(cakes) + 1
result = cakes
return result
|
In a school, 35% of the students are boys. If there are 560 girls in the school, how many students are there in total? | def solve() -> int:
total_students = 560/0.65
result = total_students
return result
|
Janet and Ethan walked a total of 4 miles. If Ethan covered 25% of the distance that Janet covered, what distance did Janet walk? | def solve() -> int:
ethan_distance = 4 * 0.25
janet_distance = 4 - ethan_distance
result = janet_distance
return result
|
Alex buys a new couch. He puts down a 25% deposit and pays the rest when the couch is delivered. The couch is 60% more expensive than last year's couch, which was $800. What is the total amount Alex pays upon delivery? | def solve() -> int:
last_year_couch_price = 800
couch_price = last_year_couch_price * 1.6
deposit = couch_price * 0.25
total_amount = couch_price - deposit
result = total_amount
return result
|
Cindy wants to buy 3 cups of coffee at $3.00 each, 4 donuts for $2.50 each, and 1 coffee mug at $10.00. How much does Cindy spend? | def solve() -> int:
cost_coffee = 3.00 * 3
cost_donuts = 2.50 * 4
cost_mug = 10.00
total_cost = cost_coffee + cost_donuts + cost_mug
result = total_cost
return result
|
Ida has a cube that has an edge length of 6 centimeters. She paints the cube with blue paint. How many square centimeters of surface area does she paint? | def solve() -> int:
edge_length = 6
cube_surface_area = 6 * edge_length**2
result = cube_surface_area
return result
|
John went on a hiking trip with his friends. He hiked up for 5 km and then down for one-third of that distance. After reaching the bottom, he had to walk twice fewer kilometers than he walked down. How many kilometers did John travel during the hiking trip? | def solve() -> int:
distance_up = 5
distance_down = distance_up / 3
distance_walked = distance_down / 2
total_distance = distance_up + distance_down + distance_walked
result = total_distance
return result
|
Some possible questions and programs are: Fiona baked 3 batches of cookies. Each batch had 18 cookies. She gave 4 cookies to each of her 6 friends. How many cookies did she have left? | def solve() -> int:
total_cookies = 3 * 18
cookies_given = 4 * 6
cookies_left = total_cookies - cookies_given
result = cookies_left
return result
|
Lisa has a garden where she grows 12 rows of flowers. Each row has 8 flowers. She wants to pick half of the flowers and arrange them in bouquets of 6 flowers each. How many bouquets can she make? | def solve() -> int:
rows = 12
flowers_per_row = 8
fraction_picked = 0.5
flowers_per_bouquet = 6
total_flowers = rows * flowers_per_row
picked_flowers = total_flowers * fraction_picked
bouquets = picked_flowers // flowers_per_bouquet
result = bouquets
return result
|
Barbara is taking a three week vacation. She works five days a week and has 9 days of paid vacation. She earns $14.50 an hour and works 8 hours a day. How much pay will she miss on her vacation? | def solve() -> int:
hours_worked = 5 * 8;
paid_vacation_days = 9;
paid_vacation_hours = paid_vacation_days * 8;
unpaid_vacation_hours = hours_worked - paid_vacation_hours;
pay_rate = 14.50;
pay_missed = unpaid_vacation_hours * pay_rate;
result = pay_missed
return result
|
Paula likes to sort her collection of stickers by color. She has 500 stickers in total and decides to divide them into five equal groups based on the primary colors and black and white. She then splits each group into two halves randomly and gives one half to her friend. How many stickers does she have left in each col... | def solve() -> int:
stickers = 500
groups = 5
stickers_per_group = stickers // groups
stickers_per_group = stickers_per_group // 2
result = stickers_per_group
return result
|
John has $1765. He spent ¾ of his money for a laptop and another $200 for a new phone. How much money did John have initially? | def solve() -> int:
initial_money = 1765
laptop_cost = initial_money * 3/4
new_phone_cost = 200
remaining_money = initial_money - laptop_cost - new_phone_cost
initial_money = remaining_money * 4/1
result = initial_money
return result
|
An ice cream parlor sells 3 types of cones, named small, medium, and large for 5, 7, and 10 dollars, respectively. If a customer bought 2 medium and 1 small cone, how much did he spend in total? | def solve() -> int:
num_of_small_c = 1
num_of_medium_c = 2
num_of_large_c = 0
small_c_price = 5
medium_c_price = 7
large_c_price = 10
total_cost = (num_of_small_c*small_c_price)+(num_of_medium_c*medium_c_price)+(num_of_large_c*large_c_price)
result = total_cost
return result
|
Fiona has five times as many dollars as Greta. Greta has 20 more than Henry, who has 16 dollars. How many dollars do Fiona and Henry have? | def solve() -> int:
henry_dollars = 16
greta_dollars = henry_dollars + 20
fiona_dollars = 5 * greta_dollars
total_dollars = fiona_dollars + henry_dollars
result = total_dollars
return result
|
In a class of 40 students, 20 students play basketball and 15 students play football. If 7 students play both games, how many students do not play any games? | def solve() -> int:
total_students = 40
basketball_players = 20
football_players = 15
both_players = 7
no_game_players = total_students - (basketball_players + football_players - both_players)
result = no_game_players
return result
|
Olivia invests $3500 into her bank every week. She had $500,000 in her account when the year started. At the end of the year, she gets a windfall that is worth 80% more than what she has in her account. What is the final amount in her account? | def solve() -> int:
weekly_investment = 3500
initial_amount = 500000
total_investment = weekly_investment * 52
final_amount = initial_amount + total_investment
windfall = final_amount * 0.8
final_amount += windfall
result = final_amount
return result
|
Student: A recipe needs 12 oz of flour, but you only have a 24 oz bag of flour. If you use 1/3 of the bag of flour for the recipe, how much flour will be left? | def solve() -> int:
bag_of_flour = 24
recipe_flour = 12
fraction_used = 1/3
flour_used = bag_of_flour * fraction_used
flour_left = bag_of_flour - flour_used
result = flour_left
return result
|
Lucy has two homework assignments, one with 30 questions that should be finished in 45 minutes, and another with 18 questions that should be completed in 54 minutes. If she spends an equal amount of time on each question, how many more minutes does she have in answering each question on the second homework assignment t... | def solve() -> int:
questions_1 = 30
time_1 = 45
questions_2 = 18
time_2 = 54
time_per_question_1 = time_1 / questions_1
time_per_question_2 = time_2 / questions_2
time_difference = time_per_question_2 - time_per_question_1
result = time_difference
return res... |
There are 50 balls in a basket on the shelf. If 20% of the balls are removed, how many are left in the basket? | def solve() -> int:
balls_left = 50 - (50*0.2)
result = balls_left
return result
|
A bakery has 48 cupcakes and 72 brownies. If Jill takes 2 cupcakes and 4 brownies and Bob takes 1 cupcake and 3 brownies, how many pastries are left? | def solve() -> int:
cupcakes = 48
brownies = 72
jill_cupcakes = 2
jill_brownies = 4
bob_cupcakes = 1
bob_brownies = 3
remaining_cupcakes = cupcakes - jill_cupcakes - bob_cupcakes
remaining_brownies = brownies - jill_brownies - bob_brownies
result = remaining_cupca... |
Janet bought 10 items for $150. If the discount rate is 15%, how much did she pay after the discount? | def solve() -> int:
items = 10
price = 150
discount_rate = 0.15
discount_amount = items * (price / items) * discount_rate
new_price = price - discount_amount
result = new_price
return result
|
Student: Robert has 36 apples and John has twice as many. How many apples does John have? | def solve() -> int:
robert = 36
john = 2 * robert
result = john
return result
|
Student: In January 2021, there were 500 confirmed cases of COVID-19 in Texas. In February 2021, the number of cases tripled. If California had twice the number of cases than Texas in January, how many cases were confirmed in California in February? | def solve() -> int:
jan_texas_cases = 500
feb_texas_cases = jan_texas_cases * 3
jan_california_cases = jan_texas_cases * 2
feb_california_cases = feb_texas_cases * 2
result = feb_california_cases
return result
|
A bookstore sold fiction books, non-fiction books, and cookbooks. They made a total of $600. The sales of fiction books were $90 and the sales of non-fiction books were four times that amount. The sales of cookbooks were $50 more than half of the sales of non-fiction books. How much did they make from the sales of cook... | def solve() -> int:
fiction_sales = 90
non_fiction_sales = 4 * fiction_sales
cookbook_sales = (non_fiction_sales / 2) + 50
total_sales = fiction_sales + non_fiction_sales + cookbook_sales
result = cookbook_sales
return result
|
Student: Kelli wants to buy a new gaming console worth $220. She has $115 saved up, and will borrow the rest from her brother at an interest rate of 15%. How much more money does Kelli need to pay her brother at the end of the month? | def solve() -> int:
console_price = 220
kelli_savings = 115
interest_rate = 0.15
loan_amount = console_price - kelli_savings
interest_amount = loan_amount * interest_rate
total_amount = loan_amount + interest_amount
result = total_amount
return result
|
Samantha bought a car for $8,500. She sold it for $11,000 to a dealer, who charged her a commission of $550. Determine Samantha's profit from selling the car. | def solve() -> int:
cost_price = 8500
selling_price = 11000
commission = 550
profit = selling_price - (commission + cost_price)
result = f'<<<{profit}>>>'
result = profit
return result
|
Adrian goes to the farmer's market every other week and buys all the fruit he and his family need. He purchased 5 apples at $1 each, 3 pints of raspberries for $3.50, and 4 bunches of bananas at $2 per bunch. How much money did Adrian spend altogether over 4 weeks? | def solve() -> int:
price_apples = 5 * 1.00
price_raspberries = 3 * 3.50
price_bananas = 4 * 2.00
total_price = price_apples + price_raspberries + price_bananas
result = total_price * 4
return result
|
Amy has 45 balloons. She wants to make 3 bunches of balloons with the same number of balloons in each bunch. However, 7 balloons popped before she could make the bunches. How many balloons are in each bunch now? | def solve() -> int:
balloons = 45
bunches = 3
popped = 7
balloons -= popped
result = balloons // bunches
return result
|
At the carnival, 18 people won prizes at the ring toss game. The first 7 winners each won 5 stuffed animals. The next 5 winners each won 3 stuffed animals. The last 6 winners won 1 stuffed animal each. How many stuffed animals were won in total? | def solve() -> int:
total_stuffed_animals = (7*5) + (5*3) + (6*1)
result = total_stuffed_animals
return result
|
Sarah purchases two pizzas for $15 each and a soda for $5. How much does she spend on pizza and soda over three weeks? | def solve() -> int:
pizza_price = 15
soda_price = 5
weeks = 3
total_pizza_cost = 2 * pizza_price * weeks
total_soda_cost = soda_price * weeks
total_cost = total_pizza_cost + total_soda_cost
result = total_cost
return result
|
5. The average GPA of a group of students is 3.76. If 5 new students join the group, and their average GPA is 4.2, what is the new average GPA of the group? | def solve() -> int:
old_num_students = 10
old_avg_gpa = 3.76
new_num_students = 5
new_avg_gpa = 4.2
updated_num_students = old_num_students + new_num_students
updated_avg_gpa = ((old_num_students * old_avg_gpa) + (new_num_students * new_avg_gpa)) / updated_num_students
re... |
Possible new questions: In a cookie sale, five students sold 12 cookies each on Monday, 15 cookies each on Tuesday, and 18 cookies each on Wednesday. If the cookies cost $0.5 each, how much money did the students make in total? | def solve() -> int:
total_cookies = 5 * (12 + 15 + 18)
total_money = total_cookies * 0.5
result = total_money
return result
|
The sum of two numbers is 44 and one of them is 5 more than the other. What is the value of the larger number? | def solve() -> int:
sum_of_numbers = 44
difference = 5
larger_number = (sum_of_numbers + difference) / 2
result = larger_number
return result
|
Jessica wants to buy a new car and is deciding between two models. The first model is priced at $17,000 and the fuel costs $3.50 per gallon. The second model is priced at $19,000 and fuel costs $3.00 per gallon. If each car can travel up to 500 miles per tank and she plans to drive 16,000 miles a year, how much will sh... | def solve() -> int:
fuel_cost_diff_per_mile = 3.50 - 3.00
first_model_fuel_cost_per_mile = 3.50
miles_per_tank = 500
annual_miles = 16000
fuel_cost_model_1 = annual_miles * first_model_fuel_cost_per_mile
fuel_cost_model_2 = (annual_miles / miles_per_tank) * fuel_cost_diff_per_mile
... |
A football stadium can seat up to 50,000 spectators. On match days, 5000 fans are unable to attend due to transportation issues. After how many matches will the number of spectators be reduced to a half of its initial capacity? | def solve() -> int:
stadium_capacity = 50000
fans_unable_to_attend = 5000
spectators = stadium_capacity - fans_unable_to_attend
matches = 0
while spectators > stadium_capacity/2:
matches += 1
spectators -= 5000
result = matches
return result
|
Emma wants to invest in stocks. She has decided to invest $2500 spread out over 4 stock purchases. What is the amount Emma must invest in each stock purchase? | def solve() -> int:
total_amount = 2500
number_of_stocks = 4
amount_per_stock = total_amount/number_of_stocks
result = amount_per_stock
return result
|
Two classrooms are being used for a study session. One classroom has 5 more desks than the other. The total number of desks in both classrooms is 40. How many desks are in the larger classroom? A bakery has 400 cupcakes and they sold 80 on Monday morning. In the afternoon, they sold 30 more. The next day, they sold thr... | def solve() -> int:
x = (40 - 5) / 2
y = x + 5
monday_sales = 80
monday_sales += 30
total_sales = monday_sales
total_sales *= 3
cupcakes_left = 400 - total_sales
result = y
result = cupcakes_left
return result
|
Adam runs 20km every day for a week. How many kilometers did he run in total for a week? | def solve() -> int:
distance_per_day = 20
days_per_week = 7
total_distance = distance_per_day * days_per_week
result = total_distance
return result
|
Emily is twice as old as her sister, Sarah. 5 years ago, Sarah was 12 years old. How old is Emily now? | def solve() -> int:
sarah_5_years_ago = 12
sarah_age = sarah_5_years_ago + 5
emily_age = 2 * sarah_age
result = emily_age
return result
|
Four friends went out for dinner. The first one paid $15, the second one paid twice as the first one, the third one paid $30 and the last one paid half of what the first one paid. How much did they pay in total? | def solve() -> int:
friend1_payment = 15
friend2_payment = 2*friend1_payment
friend3_payment = 30
friend4_payment = friend1_payment/2
total_payment = friend1_payment + friend2_payment + friend3_payment + friend4_payment
result = total_payment
return result
|
Each pack contains 6 bottles of juice. He gave 3 bottles to his sister and 4 bottles to his best friend. How many bottles of juice were left for the party guests? | def solve() -> int:
packs = 12
bottles_per_pack = 6
total_bottles = packs * bottles_per_pack
bottles_left = total_bottles - (3 + 4)
result = bottles_left
return result
|
Mike has a bookstore with 7 shelves that need to be organized. It takes 10 minutes to organize each shelf. With the help of his employees, it takes only one-half of the time to organize all the shelves. How many hours did they spend organizing the shelves? | def solve() -> int:
num_shelves = 7
time_per_shelf = 10
total_time = num_shelves * time_per_shelf
total_time_with_help = total_time / 2
hours_spent = total_time_with_help / 60
result = hours_spent
return result
|
Leo has bought 15 shirts that cost $8 each and plans to resell them. He wants to sell four of the shirts at the same price he bought them, six of the shirts at a 20% discount, and five of the shirts at a 30% markup. How much will his total profit or loss be? | def solve() -> int:
cost = 15 * 8
revenue1 = 4 * 8
revenue2 = 6 * (8 * 0.8)
revenue3 = 5 * (8 * 1.3)
revenue = revenue1 + revenue2 + revenue3
profit_loss = revenue - cost
result = profit_loss
return result
|
Kevin, Leo, and Mia share a bag of candies. Kevin takes 7 more candies than Leo, but Leo takes half as many candies as Mia. If Mia takes 24 candies, how many candies are left in the bag? | def solve() -> int:
Kevin = 0
Leo = 0
Mia = 24
Bag = 100
Leo = Mia / 2
Kevin = Leo + 7
result = Bag - (Kevin + Leo + Mia)
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.