question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Alex and Nicole participated in their school's science fair. Alex conducted 6 experiments - 4 in physics and 2 in chemistry, while Nicole conducted 9 experiments - 5 in physics and 1 experiment less than thrice Alex's chemistry projects. How many more experiments did Nicole conduct than Alex? | def solve() -> int:
alex_physics = 4
alex_chemistry = 2
nicole_physics = 5
nicole_chemistry = 3 * alex_chemistry - 1
alex_total_experiments = alex_physics + alex_chemistry
nicole_total_experiments = nicole_physics + nicole_chemistry
more_experiments = nicole_total_experiments ... |
10. Quinn had 14 cups of ice cream and 4 fewer than the last time. How many cups of ice cream did Quinn have last time? | def solve() -> int:
total = 0
cups = 14
fewer = cups - 4
total = cups + fewer
result = total
return result
|
Rachel ordered a shirt for $25 and a skirt for $35. If she used a 15% coupon, and paid a 6% tax rate, how much did she pay in total? | def solve() -> int:
subtotal = 25 + 35
discount = subtotal * 0.15
subtotal_with_discount = subtotal - discount
tax = subtotal_with_discount*0.06
total = subtotal_with_discount + tax
result = total
return result
|
Possible new questions: A painter made four paintings in different years. The first painting was made 12 years after the second painting. The third painting was made 9 years before the second painting. The fourth painting was made 15 years before the third painting. The painter signed the fourth painting with the year ... | def solve() -> int:
first = 0
second = 0
third = 0
fourth = 1987
third = fourth + 15
second = third + 9
first = second + 12
result = first
return result
|
am collects stamps and has 4 albums. Each album has 20 pages and each page can fit 8 stamps. Sam has already filled 3 albums and 15 pages of the fourth album. If each stamp costs $0.25, how much money has Sam spent on his stamp collection? | def solve() -> int:
albums = 4
pages = 20
stamps = 8
filled_albums = 3
filled_pages = 15
stamp_cost = 0.25
stamps_in_album = pages * stamps
stamps_in_filled_albums = filled_albums * stamps_in_album
stamps_in_filled_pages = filled_pages * stamps
total_stamps = stamps... |
Debbie has 24 cupcakes. She wants to divide them equally among 8 friends. How many cupcakes will each friend get? | def solve() -> int:
num_cupcakes = 24
num_friends = 8
num_cupcakes_per_friend = num_cupcakes // num_friends
result = num_cupcakes_per_friend
return result
|
A company is producing t-shirts and jeans. They need 15 yards of fabric to produce one t-shirt and 30 yards of fabric to produce one jeans. If they want to produce 200 t-shirts and 150 jeans, how many yards of fabric do they need in total? | def solve() -> int:
tshirt_yard = 15
jeans_yard = 30
tshirt_count = 200
jeans_count = 150
total_yard = tshirt_count * tshirt_yard + jeans_count * jeans_yard
result = total_yard
return result
|
Student: Sarah bought 3 apples for $4.50 and 2 oranges for $1.75 each. What was the total cost of her purchase? | def solve() -> int:
apples = 3
oranges = 2
cost_apple = 4.50
cost_orange = 1.75
total_cost = apples * cost_apple + oranges * cost_orange
result = total_cost
return result
|
helly has 48 books. She gives away a third of the books and then she gives away 1/8 of the remaining books. How many books does Shelly have left? | def solve() -> int:
initial_number_of_books = 48
percentage_given_away1 = 0.33
percentage_given_away2 = 0.125
remaining_books = initial_number_of_books - (initial_number_of_books * percentage_given_away1)
result = remaining_books - (remaining_books * percentage_given_away2)
return result
|
A zoo has a rectangular enclosure that measures 12 meters long and 9 meters wide. A square petting zoo of side length 6 meters is also inside the zoo. If both are fenced, how many meters of fencing are needed in total? | def solve() -> int:
length_enclosure = 12
width_enclosure = 9
side_petting_zoo = 6
perimeter_enclosure = 2 * (length_enclosure + width_enclosure)
perimeter_petting_zoo = 4 * side_petting_zoo
total_fencing = perimeter_enclosure + perimeter_petting_zoo
result = total_fencing
... |
Amy has 7/8 of a loaf of bread and 1/3 of a pack of hot dogs. If she eats 1/6 of a loaf of bread and 1/10 of a pack of hot dogs per day, how many days will her food last? Samantha wanted to bake a cake for her sister's birthday party starting at 2pm that day. Her mom gave her a condition to finish her homework and stud... | def solve() -> int:
bread = 7/8
hot_dogs = 1/3
bread_per_day = 1/6
hot_dogs_per_day = 1/10
days_bread_last = bread / bread_per_day
days_hot_dogs_last = hot_dogs / hot_dogs_per_day
total_days = min(days_bread_last, days_hot_dogs_last)
latest_start_time = 2 - (1/60)*((4... |
am runs 5 kilometers every day for a week. On Sunday, he runs twice as much as usual. How many kilometers did he run in total that week? | def solve() -> int:
daily_distance = 5
sunday_distance = daily_distance * 2
total_distance = (daily_distance * 6) + sunday_distance
result = total_distance
return result
|
The farmers' market can fit 500 customers at once. If they predict 3000 customers will attend the market, how many different times will they need to repeat the intake process to accommodate everyone? | def solve() -> int:
n_customers = 3000
n_rounds = n_customers // 500 + 1
result = n_rounds
return result
|
A community center has a total of 30 employees. If 40% of the employees are part-time, how many are full-time employees? | def solve() -> int:
total_employees = 30
percent_part_time = 0.40
part_time_employees = total_employees * percent_part_time
full_time_employees = total_employees - part_time_employees
result = full_time_employees
return result
|
Student: Gil and Barbara shared the cost of renting a cart that cost $19 an hour. If they rented it for 5 hours, how much did each person pay? | def solve() -> int:
cost_per_hour = 19
hours_rented = 5
total_cost = cost_per_hour * hours_rented
cost_each_person = total_cost / 2
result = cost_each_person
return result
|
Student: A store sells shoes in pairs. If the store sold 240 shoes, how many pairs of shoes were sold? | def solve() -> int:
shoes = 240
pairs = shoes / 2
result = pairs
return result
|
A recipe for a cake requires 300 grams of flour, 200 grams of sugar, and 150 grams of butter. A baker wants to make 4 cakes. Calculate the total amount of flour, sugar, and butter he needs. | def solve() -> int:
flour_per_cake = 300
sugar_per_cake = 200
butter_per_cake = 150
cakes = 4
flour_total = flour_per_cake * cakes
sugar_total = sugar_per_cake * cakes
butter_total = butter_per_cake * cakes
result = (flour_total, sugar_total, butter_total)
... |
Jane has 40 stickers. She gave 8 stickers to her sister and 7 stickers to her brother. She received 5 stickers from her friend and bought 10 more stickers. How many stickers does she have now? | def solve() -> int:
stickers = 40
stickers = stickers - 8 - 7
stickers = stickers + 5 + 10
result = stickers
return result
|
Marissa reads a book for 25 minutes every day during her commute to work. If she misses one day of commuting due to a holiday, how many hours did she spend reading during the week? | def solve() -> int:
minutes_per_day = 25
days_per_week = 6
minutes_per_week = minutes_per_day * days_per_week
hours_per_week = minutes_per_week / 60
result = hours_per_week
return result
|
David has 12 horses. Each of them runs 5 races. The regular horses are sold at $500 while the rare racehorse is sold at 9 times that price. What is the total income from the sale of the horses? | def solve() -> int:
horses = 12
races = 5
regular_price = 500
rare_price = 9 * regular_price
regular_income = horses * races * regular_price
rare_income = horses * races * rare_price
total_income = regular_income + rare_income
result = total_income
return result
|
A store had a sale of 20% on all its items. If the sale price of an item was $240, what was the original price of the item? | def solve() -> int:
sale_price_of_item = 240
discount_percent = 20
original_price_of_item = sale_price_of_item / ((100-discount_percent)/100)
result = original_price_of_item
return result
|
Vanessa invested $800 in a stock that increased in value by 15%. She decided to sell the stock and made a 5% commission. How much did she make in total? | def solve() -> int:
investment = 800
increase_rate = 0.15
commission_rate = 0.05
final_value = investment * (1 + increase_rate)
commission = final_value * commission_rate
total_profit = final_value - investment - commission
result = total_profit
return result
|
John needs to walk from his office to the train station, which is five times farther than the distance from his home to the train station. If it takes him 15 minutes to walk from his home to the train station, how long would it take him to walk from his office to the train station? | def solve() -> int:
distance_home_to_train = 1
distance_office_to_train = distance_home_to_train * 5
time_home_to_train = 15
time_office_to_train = time_home_to_train * 5
result = time_office_to_train
return result
|
A toy store has 500 stuffed animals. If each customer buys 2 stuffed animals, how many customers can the store serve before running out of stuffed animals? | def solve() -> int:
stuffed_animals = 500
animals_per_customer = 2
customers = stuffed_animals // animals_per_customer
result = customers
return result
|
arah needs to walk 6km. If she walks 1.5 km per hour, how many hours will it take her to walk the distance? | def solve() -> int:
distance_to_walk = 6
speed = 1.5
time_taken = distance_to_walk / speed
result = time_taken
return result
|
If a baker can bake 36 cupcakes in 45 minutes, how many cupcakes can he bake in 2 hours? | def solve() -> int:
cupcakes_per_minute = 0.8
minutes_in_2_hours = 120
total_cupcakes = cupcakes_per_minute * minutes_in_2_hours
result = total_cupcakes
return result
|
A bicycle traveled 12 miles in 45 minutes. How long would it take to travel 20 miles at the same speed? | def solve() -> int:
distance_1 = 12
time_1 = 45
time_1_hours = time_1 / 60
speed = distance_1 / time_1_hours
distance_2 = 20
time_2_hours = distance_2 / speed
time_2_minutes = time_2_hours * 60
time_2_minutes = round(time_2_minutes)
result = time_2_minutes
return result
|
-Coding environment: Vanilla Python 3, you may use modules like math or sympy or random, etc. Some possible questions and programs are: John has a basket of oranges. He sells 6 oranges on Monday, 9 oranges on Tuesday and on Wednesday, he sells half of the remaining oranges in the basket. If he started with 30 oranges, ... | def solve() -> int:
oranges = 30
oranges = oranges - 6 - 9
oranges = oranges // 2
result = oranges
return result
|
Student: A museum has 100 paintings. Each painter has painted an equal amount of paintings. How many paintings have each painter painted? | def solve() -> int:
paintings = 100
painters = 5
paintings_per_painter = paintings / painters
result = paintings_per_painter
return result
|
Student: A box has 24 cookies, 10 of which are chocolate. What percentage of the cookies are chocolate? | def solve() -> int:
total_cookies = 24
chocolate_cookies = 10
percentage_chocolate = chocolate_cookies / total_cookies * 100
result = percentage_chocolate
return result
|
Sarah is a teacher and graded 100 papers. The rest of her colleagues together graded 30 times as many papers as Sarah did by herself. If each paper weighs 2 ounces, how many pounds of papers did they grade in total? | def solve() -> int:
sarah_papers = 100
colleagues_papers = sarah_papers * 30
total_papers = sarah_papers + colleagues_papers
total_weight_ounces = total_papers * 2
total_weight_pounds = total_weight_ounces / 16
result = total_weight_pounds
return result
|
Amy is reading a book that has 200 pages. She reads 10 pages every day, except on Sundays, when she reads 15 pages. She started reading the book on a Monday. How many days will it take her to finish the book? | def solve() -> int:
pages_read = 0
days = 0
sundays = 0
while pages_read < 200:
days += 1
if days % 7 == 0:
sundays += 1
pages_read += 15
else:
pages_read += 10
result = days
return result
|
If a circle has a radius of 5 units, what is its circumference in units? | def solve() -> int:
radius = 5
pi = 3.14159265
circumference = 2*pi*radius
result = circumference
return result
|
David has 10 action figures. His friend brings him his own collection of 35 action figures. Over his birthday and Christmas, David receives a fourth of that amount as gifts from his family. How many action figures does David have now? | def solve() -> int:
davids_action_figures = 10
friends_action_figures = 35
gifts_from_family = (friends_action_figures / 4)
total_action_figures = davids_action_figures + friends_action_figures + gifts_from_family
result = total_action_figures
return result
|
If twelve people share a pizza evenly, each person will get 3 slices. If there are 24 slices total, how many pizzas were ordered? | def solve() -> int:
slices_per_person = 3
total_slices = 24
people = 12
slices_per_pizza = slices_per_person * people
pizzas = total_slices / slices_per_pizza
result = pizzas
return result
|
Karen's friend's band just released their first album, and she wants to buy 10 copies for her friends. Each album costs $10. How much money should Karen spend in total to buy 10 albums? | def solve() -> int:
num_albums = 10
price_album = 10
total_cost = num_albums*price_album
result = total_cost
return result
|
``` A train travels 140 km in 2 hours. What is its speed? | def solve() -> int:
distance = 140
time = 2
speed = distance/time
result = speed
return result
|
Wanda orders a pizza that costs $12. She also adds a salad for $4 and a drink for $2. She has a coupon for 25% off her entire order, but she also has to pay a delivery fee of $3. How much does she pay for her order in dollars total? | def solve() -> int:
subtotal = 12 + 4 + 2
coupon = subtotal * 0.25
discounted_total = subtotal - coupon
final_amount = discounted_total + 3
result = final_amount
return result
|
Possible new questions are: Henry likes to play video games with his friends. He decided to buy a new controller, a headset, and a subscription to an online service. The controller cost $50 and the headset was 60% more expensive than the controller. The subscription cost $10 per month and Henry paid for 6 months in adv... | def solve() -> int:
controller = 50
headset = controller * 1.6
subscription = 10 * 6
total = controller + headset + subscription
result = total
return result
|
Carl has $100 and wants to buy a $60 shirt. If the sales tax is 8%, how much money will he have left after buying the shirt? | def solve() -> int:
price = 60
tax_rate = 0.08
total_cost = price * (1 + tax_rate)
money_left = 100 - total_cost
result = money_left
return result
|
John takes public transportation to work, which takes 40 minutes each way. After work, he spends an hour watching his favorite TV show. How many hours does John spend commuting and relaxing in a week? | def solve() -> int:
commute_time = 40
tv_time = 60
commute_time_week = commute_time * 2
relax_time_week = tv_time * 7
total_time_week = commute_time_week + relax_time_week
result = total_time_week / 60
return result
|
Student: 6. The day before yesterday, Clifford had 20 rulers in his pencil case. Yesterday, he put 8 rulers into his drawer. How many rulers does Clifford have now? | def solve() -> int:
rulers_pencil_case = 20
rulers_drawer = 8
result = rulers_pencil_case - rulers_drawer
return result
|
A supermarket had 2,500 shoppers. One-fourth of them bought groceries online. Three-fifths of those who purchased in-store left before dinner time. If 300 people shopped during dinner, how many did not buy anything? | def solve() -> int:
total_shoppers = 2500
online_shoppers = total_shoppers / 4
instore_shoppers = total_shoppers - online_shoppers
left_before_dinner = instore_shoppers * 3 / 5
shopped_during_dinner = 300
did_not_buy = total_shoppers - online_shoppers - left_before_dinner - shopped_during_dinner... |
A can do a work in 12 days while B can do in 16 days. They begin together but 3 days before the completion of the work, A leaves alone. How many days will the total work be completed in? | def solve() -> int:
A_work = 1/12
B_work = 1/16
total_work = 1
days_spent = 0
days_left = None
while (A_work + B_work) * days_spent < 0.97:
total_work -= (A_work + B_work)
days_spent += 1
A_work_left = (total_work/A_work) - 3
B_work_left = (total_work/B_work) - 3
if A_w... |
Sally has a 16 gigabyte (GB) phone. She has used 8 GB so far. Each photo is 2 megabytes (MB) and each song is 5 MB. How many photos and songs can Sally store on her phone? | def solve() -> int:
total_storage = 16
used_storage = 8
remaining_storage = total_storage - used_storage
photo_size = 2
song_size = 5
num_of_photos = remaining_storage//photo_size
num_of_songs = remaining_storage//song_size
result = (num_of_photos, num_of_songs)
return result
|
A movie theater charges $12 for adults and $8 for children. If a group of 4 adults and 3 children go to the movies, how much is the total cost of tickets? | def solve() -> int:
adult_price = 12
child_price = 8
adults = 4
children = 3
total_cost = adult_price * adults + child_price * children
result = total_cost
return result
|
The sum of two consecutive even numbers is 78. What are the two numbers? | def solve() -> int:
result = (38, 40)
return result
|
David had to build a birdhouse in 5 hours. If he took 3 fifteen-minute breaks during the building process, how long did he spend building the birdhouse? | def solve() -> int:
hours_building = 5 - (3 * 0.25)
minutes_building = hours_building * 60
result = f'{minutes_building} minutes'
return result
|
Maya has 15 stickers and wants to give some to her friends. She gives 2 stickers to each friend and keeps 3 stickers for herself. How many friends does she give stickers to? | def solve() -> int:
stickers = 15
stickers_per_friend = 2
stickers_kept = 3
stickers_given = stickers - stickers_kept
friends = stickers_given // stickers_per_friend
result = friends
return result
|
A company employs 150 workers. If 60 of them are males, what percentage of workers are females? | def solve() -> int:
males = 60
total_workers = 150
females = total_workers - males
females_percentage = (females / total_workers) * 100
result = females_percentage
return result
|
A cake recipe requires 4 oz of butter and 8 oz of sugar. If John wants to make half of the cake, how much butter and sugar does he need? | def solve() -> int:
quantity_of_butter = 4 + 8
quantity_of_sugar = quantity_of_butter
scale_factor = 0.5
butter_needed = quantity_of_butter * scale_factor
sugar_needed = quantity_of_sugar * scale_factor
result = (butter_needed, sugar_needed)
return result
|
phanie has $105 and spends 2/5 of it at a store, then she spends $26 at another store. If she has $53 left, how much did she spend at the first store? | def solve() -> int:
total = 105
first_store = total*(2/5)
second_store = 26
total_spent = first_store + second_store
left_over = total - total_spent
result = first_store
return result
|
If a pizza costs $8 and each slice of the pizza is $1, how many slices are there in the pizza? | def solve() -> int:
cost = 8
slice = 1
num_slices = cost/slice
result = num_slices
return result
|
At the store, James bought 2 packs of stickers. Each pack had 30 stickers left. His sister, Sarah, also bought 2 packs of stickers. One of her packs had 17 stickers left and the other pack had 25 stickers left. How many more stickers did James have altogether? | def solve() -> int:
james_packs = 2
james_stickers_per_pack = 30
sarah_packs = 2
sarah_stickers_pack1 = 17
sarah_stickers_pack2 = 25
james_total_stickers = james_packs * james_stickers_per_pack
sarah_total_stickers = (sarah_packs * sarah_stickers_pack1) + (sarah_packs * sarah_stickers_p... |
A jar of candy had 36 pieces and was shared equally among four children: David, Jennifer, Peter, and Lisa. How many candies did David and Lisa get together? | def solve() -> int:
candy_jar = 36
children = 4
candies_per_child = candy_jar // children
david_candies = candies_per_child
lisa_candies = candies_per_child
result = david_candies + lisa_candies
return result
|
Emily drank 2 liters of water every day for 3 weeks. Olivia drank 1.5 liters of water every other day for 2 months. How many more liters of water did Emily drink than Olivia? | def solve() -> int:
days_emily_drank = 3 * 7
liters_emily_drank = 2 * days_emily_drank
days_olivia_drank = 2 * 4 * 7
liters_olivia_drank = 1.5 * (days_olivia_drank // 2)
liters_more_emily_drank = liters_emily_drank - liters_olivia_drank
result = liters_more_emily_drank
return result
|
A bakery sells 18 cupcakes and 12 muffins. A cupcake costs $1.50 each and a muffin costs 25 cents more. How much will the bakery earn if all cupcakes and muffins are sold? | def solve() -> int:
cupcakes = 18
cupcake_price = 1.5
muffins = 12
muffin_price = cupcake_price + 0.25
cupcake_earnings = cupcakes * cupcake_price
muffin_earnings = muffins * muffin_price
total_earnings = cupcake_earnings + muffin_earnings
result = total_earnings
r... |
Marco just opened up a new pizza restaurant and is ordering ingredients for his first week’s orders. He needs 50 pounds of flour to make 100 pizzas, but if the flour is low-quality, he'll need 60 pounds of it to make the same number of pizzas. If he accidentally orders 20% low-quality flour, how much flour should he ex... | def solve() -> int:
flour_high_quality = 50
flour_low_quality = 60
pizzas = 100
low_quality_percentage = 0.2
flour_needed_high_quality = flour_high_quality * pizzas
flour_needed_low_quality = flour_low_quality * pizzas
total_flour_needed = (flour_needed_high_quality * (1 - low_qual... |
A rectangular pool measures 6 meters by 4 meters and is surrounded by a track of uniform width. If the total length of the pool and the track is 30 meters, how wide is the track? | def solve() -> int:
pool_length = 6
pool_width = 4
track_pool_length = 30
track_width = (track_pool_length - pool_length - pool_width) / 2
result = track_width
return result
|
There are 40 roses in a garden, out of which 10 are withered. 12 of these roses are picked and taken away. How many roses are left in the garden? | def solve() -> int:
roses_total = 40
roses_withered = 10
roses_picked = 12
result = roses_total - roses_withered - roses_picked
return result
|
Ms. Lee has 50 sheets of paper. Each sheet can fit 4 small stickers or 1 big sticker. If 120 small stickers and 10 big stickers are made, how many sheets of paper are needed now? | def solve() -> int:
total_papers = 50
small_stickers = 120
big_stickers = 10
stickers_needed = small_stickers + big_stickers*4
papers_needed = stickers_needed/4
result = papers_needed
return result
|
Student: Anna bicycles 8 km to school every morning and takes a bus back home in the afternoon. The bus ride takes 25 minutes and she walks 10 minutes from the bus stop to her house. How many hours per week does Anna spend traveling to and from school, if she goes to school 5 days a week? | def solve() -> int:
distance_bicycle = 8
time_bus = 25
time_walk = 10
days_week = 5
time_bicycle = distance_bicycle / 1
time_total = (time_bus + time_walk) / 60
time_per_week = (time_bicycle + time_total) * days_week
result = time_per_week
return result
|
Jackson and Olivia divided their inheritance in the ratio 5:7. If Jackson received $350 (which is the smaller share), what was the total value of the inheritance? | def solve() -> int:
ratio = 5/7
jackson_share = 350
total_inheritance = jackson_share / (ratio * (1/5))
result = total_inheritance
return result
|
Lisa has 4 times as many pens as Joy. If Joy has 5 pens, how many pens do they both have in total? | def solve() -> int:
joy_pens = 5
lisa_pens = 4 * joy_pens
total_pens = joy_pens + lisa_pens
result = total_pens
return result
|
A recipe calls for 2 cups of sugar per 3 cups of flour. If you want to make a smaller batch with only 1.5 cups of flour, how much sugar would you need? | def solve() -> int:
sugar_per_flour = 2/3
flour = 1.5
sugar_needed = flour * sugar_per_flour
result = sugar_needed
return result
|
7 years ago, John and Jane were the same age. If John is 28 now, how old is Jane? | def solve() -> int:
john_age_now = 28
years_ago = 7
john_age_7_years_ago = john_age_now - years_ago
jane_age_7_years_ago = john_age_7_years_ago
jane_age_now = jane_age_7_years_ago + years_ago
result = jane_age_now
return result
|
Sebastian eats 6 ounces of almonds every day. If a bag of almonds contains 24 ounces, how many days will the bag last for Sebastian if he continues to eat the almonds in the same quantity? | def solve() -> int:
almonds_per_day = 6
almonds_per_bag = 24
days = almonds_per_bag / almonds_per_day
result = days
return result
|
-Put each new question in a new line Renee is baking some cakes for a charity event. She needs 3 cups of flour for each cake and she has 15 cups of flour in her pantry. She also wants to donate 10% of the cakes she bakes to a local shelter. How many cakes can she bake and donate? | def solve() -> int:
flour_per_cake = 3
flour_available = 15
donation_rate = 0.1
cakes_baked = flour_available // flour_per_cake
cakes_donated = int(cakes_baked * donation_rate)
result = "She can bake {} cakes and donate {} cakes.".format(cakes_baked, cakes_donated)
retur... |
In Brazil, a meter of fabric costs $5. A dress needs 3 meters of fabric and a zipper. A zipper costs $1.50. How much will it cost to make 6 dresses? | def solve() -> int:
cost_per_meter = 5
meters_per_dress = 3
cost_per_zipper = 1.50
zipper_per_dress = 1
dresses = 6
cost_of_fabric = meters_per_dress * cost_per_meter
cost_of_zipper = zipper_per_dress * cost_per_zipper
cost_per_dress = cost_of_fabric + cost_of_zipper
cost = d... |
A cell phone company charges $30 a month for unlimited texting and $0.10 per minute for calls. If Mary paid $75 this month and talked for 500 minutes, how many text messages did she send? | def solve() -> int:
monthly_charge = 30
call_charge = 0.10
total_charge = 75
call_minutes = 500
call_cost = call_charge * call_minutes
text_cost = total_charge - call_cost - monthly_charge
texts = text_cost / 0.01
result = texts
return result
|
A toy car costs $10. A toy plane costs $20 more than the car. How much does the plane cost? | def solve() -> int:
car_cost = 10
plane_cost = car_cost + 20
result = plane_cost
return result
|
A toy store offers a 5% discount on the total bill for purchases worth more than $50. Tom bought two action figures worth $15 each and a board game worth $30. Will Tom get the discount? | def solve() -> int:
action_figure_price = 15
board_game_price = 30
total_bill = (2 * action_figure_price) + board_game_price
if total_bill > 50:
discount = total_bill * 0.05
final_bill = total_bill - discount
result = "Tom will get the discount"
else:
final_... |
Student: Question8: Abby wants to buy 5 new books for school, she knows each book will cost her $19. She has $150 saved up. How much money will be left in her savings after she purchases the books? | def solve() -> int:
books = 5
cost = 19
savings = 150
total_cost = books * cost
remaining = savings - total_cost
result = remaining
return result
|
Samuel caught 50 fishes from the lake. He kept 20 for his family and sold the rest to the local market. If each bucket contains 5 fishes, how many buckets did he sell to the market? | def solve() -> int:
fish_caught = 50
fish_kept = 20
fish_sold = fish_caught - fish_kept
buckets_sold = fish_sold // 5
result = buckets_sold
return result
|
A bowl contains 10 red balls and 15 blue balls. If two balls are picked at random, what is the probability that both balls are red? | def solve() -> int:
total_balls = 10 + 15
prob_red_first = 10/total_balls
prob_red_second = 9/(total_balls-1)
prob_both_red = prob_red_first * prob_red_second
result = prob_both_red
return result
|
A car travels at an average speed of 60 miles per hour. How long does it take to travel 300 miles? | def solve() -> int:
speed = 60
distance = 300
time = distance / speed
result = time
return result
|
Ava has 30 candy bars. Sophia has 9 fewer candy bars than Ava, and Grace has twice the number of candy bars as Sophia. How many candy bars do Sophia and Grace have together? | def solve() -> int:
ava_candy_bars = 30
sophia_candy_bars = ava_candy_bars - 9
grace_candy_bars = 2 * sophia_candy_bars
total_candy_bars = sophia_candy_bars + grace_candy_bars
result = total_candy_bars
return result
|
A construction project can be completed by 12 workers in 15 days. If the project need to be completed in 10 days, how many more workers are needed? Also, find the total amount the workers will earn if each worker is paid $18 per day. | def solve() -> int:
workers = 12
days = 15
new_days = 10
rate = 18
total_payment = workers * days * rate
new_workers = workers * days / new_days
new_payment = new_workers * new_days * rate
additional_workers = new_workers - workers
result = additional_workers, new_payment
return... |
Student: A grocery store has a total of 300 items on sale. If 2/3 of the items are fruits and 3/5 of the remaining items are vegetables, how many items are NOT fruits or vegetables? | def solve() -> int:
total_items = 300
fruits = (2/3) * total_items
remaining_items = total_items - fruits
vegetables = (3/5) * remaining_items
not_fruits_or_vegetables = total_items - fruits - vegetables
result = not_fruits_or_vegetables
return result
|
Andy bought 4 packs of pencils, each containing 10 pencils. After sharpening 3 pencils in each pack, he realized that 2 pencils in each pack were broken. How many usable pencils are there in each pack now? | def solve() -> int:
packs_of_pencils = 4
pencils_per_pack = 10
pencils_sharpened_per_pack = 3
broken_pencils_per_pack = 2
usable_pencils_per_pack = pencils_per_pack - pencils_sharpened_per_pack - broken_pencils_per_pack
result = usable_pencils_per_pack
return result
|
Student: The perimeter of a square is 20cm. What is the length of each side? | def solve() -> int:
perimeter = 20
side_length = perimeter / 4
result = side_length
return result
|
A cake recipe requires 2 cups of sugar for every 3 cups of flour. If you need to make a cake that requires 6 cups of flour, how much sugar do you need? | def solve() -> int:
cups_of_flour = 6
cups_of_sugar = (2/3) * cups_of_flour
result = cups_of_sugar
return result
|
Hannah has a bag of candy. She counted that there are 36 gummy bears, 24 jelly beans, 18 chocolates and 12 lollipops in the bag. She ate 6 gummy bears, 4 jelly beans and 3 chocolates. She also shared 9 gummy bears, 6 jelly beans and 4 chocolates with her friend Ian. How many candy pieces does Hannah have left in the ba... | def solve() -> int:
candy_before = 36 + 24 + 18 + 12
candy_eaten = 6 + 4 + 3
candy_shared = 9 + 6 + 4
candy_after = candy_before - candy_eaten - candy_shared
gummy_bears = 36 - 6 - 9
jelly_beans = 24 - 4 - 6
chocolates = 18 - 3 - 4
lollipops = 12
from fractions import Fractio... |
Student: Sarah bought 10 ice cream pints for $2.50 each, plus 5% sales tax. How much did Sarah spend in total? | def solve() -> int:
num_pints = 10
price_per_pint = 2.50
total_cost_before_tax = num_pints * price_per_pint
sales_tax_rate = 0.05
sales_tax_amount = total_cost_before_tax * sales_tax_rate
total_cost_with_tax = total_cost_before_tax + sales_tax_amount
result = total_cost_with_tax
return ... |
A toy car has 4 wheels. If a set of 6 toy cars has a total of 18 wheels, how many wheels does each car have? | def solve() -> int:
total_wheels = 18
cars = 6
wheels_each = total_wheels / (cars*4)
result = wheels_each
return result
|
``` A company pays its employees $15 per hour for the first 40 hours of work in a week, and $18 per hour for any additional hours worked. If an employee works 50 hours in a week, how much will they be paid? | def solve() -> int:
reg_pay_rate = 15
ot_pay_rate = 18
reg_hours = 40
ot_hours = 50 - reg_hours
total_pay = (reg_pay_rate * reg_hours) + (ot_pay_rate * ot_hours)
result = total_pay
return result
|
Jada has a collection of 250 baseball cards, 350 basketball cards, and 100 football cards. If she wants to donate an equal amount of cards to three different charities, how many cards will each charity receive? | def solve() -> int:
baseball_cards = 250
basketball_cards = 350
football_cards = 100
total_cards = baseball_cards + basketball_cards + football_cards
cards_per_charity = total_cards / 3
result = cards_per_charity
return result
|
Hannah can read a book in 6 hours. If she reads for 2 hours a day, how many days will it take her to finish the book? | def solve() -> int:
x = 3
days = x
result = days
return result
|
arah is buying a new laptop that costs $800. She gets $20 a week for allowance and earns $50 per week doing a part-time job. After saving up for 6 weeks, how much money does she still need to buy the laptop? | def solve() -> int:
allowance = 20
job_income = 50
weeks = 6
laptop_cost = 800
total_savings = (allowance + job_income) * weeks
money_needed = laptop_cost - total_savings
result = money_needed
return result
|
Lily and Noah share the same birthdate, but were born in different years. They got married on Lily's 23rd birthday. Today they are celebrating their 12th anniversary, and their combined age is 5 times what Noah's age was when they got married. How old was Lily when they got married? | def solve() -> int:
lily_age_on_marriage = 23
combined_age_on_anniversary = 5 * (lily_age_on_marriage - (12 - 1))
lily_age_on_anniversary = combined_age_on_anniversary / 6
result = lily_age_on_anniversary
return result
|
Claire wants to go on a weekend trip to a resort that is 150 miles away. If she drives at a speed of 55 mph and stops for a quick breakfast for 5 minutes and two gas station breaks taking 15 minutes each, how much time will it take her to reach the resort? | def solve() -> int:
distance = 150
speed = 55
breakfast_time = 5
gas_station_time = 15
travel_time = distance / speed
total_time = travel_time + breakfast_time + (2 * gas_station_time)
result = total_time
return result
|
A company budgeted $200,000 for salaries this year. If they have already paid $150,000, how much more do they need to pay their employees? | def solve() -> int:
budget = 200000
paid = 150000
remaining = budget - paid
result = remaining
return result
|
The price of a regular coffee at a café is $3. The price of a coffee subscription for one month that includes one cup of coffee per day is $75. How much can you save, in cents, per cup if you buy the subscription versus individual coffees? | def solve() -> int:
regular_coffee_price = 3
subscription_price = 75
cups_per_month = 30
price_per_cup_subscription = subscription_price / cups_per_month
savings_per_cup = regular_coffee_price - price_per_cup_subscription
savings_per_cup_cents = savings_per_cup * 100
result = savin... |
Emma made a deal with her grandmother to earn four cents for every cookie she bakes. If she baked 30 cupcakes, 15 muffins, and 24 cookies and then bought a toy with some of her earnings for $2.50, how much money does she have left? | def solve() -> int:
cupcakes = 30
muffins = 15
cookies = 24
earnings = (cupcakes * 0.04) + (muffins * 0.04) + (cookies * 0.04)
toy_cost = 2.50
money_left = earnings - toy_cost
result = money_left
return result
|
Ann got a 30% salary raise. If her salary was previously $32,000, what is her new salary? | def solve() -> int:
salary_original = 32000
raise_percentage = 0.3
salary_raise = 32000 * 0.3
salary_new = salary_original + salary_raise
result = salary_new
return result
|
Sarah and Emily ran a total distance of 20 miles. Sarah ran 5 miles more than Emily. If Sarah's pace was 8 minutes per mile, how many minutes did Emily take in total to finish her part of the race? | def solve() -> int:
sarah_miles = 12.5
emily_miles = 7.5
emily_total_time = emily_miles*8
result = emily_total_time
return result
|
In a shop, the price of a product is $50. If a salesman receives a commission of 15% on each product he sells, and he sells 20 products in a week, what is his total commission? | def solve() -> int:
price = 50
commission_rate = 0.15
num_products_sold = 20
total_commission = price * commission_rate * num_products_sold
result = total_commission
return result
|
Ria has 72 stickers and she wants to put them in albums. Each album can hold 12 stickers. How many albums does she need and how many stickers will be left over? | def solve() -> int:
number_of_albums = 72 // 12
number_of_stickers_left = 72 % 12
result = (number_of_albums, number_of_stickers_left)
return result
|
A recipe calls for 2/3 cup of sugar to make 12 cookies. How much sugar is needed to make 24 cookies? | def solve() -> int:
sugar_per_cookie = 2/3
cookies_needed = 24
sugar_needed = sugar_per_cookie / 12 * cookies_needed
result = sugar_needed
return result
|
Anthony stored a total of 750 kg of apples in his 5 storage bins. How much, in kg, did Anthony store in each bin? | def solve() -> int:
total_apples = 750
num_bins = 5
apples_per_bin = total_apples / num_bins
result = apples_per_bin
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.