question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
In a group of 50 people, 20 people like tea and 35 people like coffee. If 10 people like both tea and coffee, how many people do not like either beverage? | def solve() -> int:
tea = 20
coffee = 35
both = 10
neither = 50 - (tea + coffee - both)
result = neither
return result
|
A group of coworkers are ordering lunch delivery from a local restaurant that charges $3 for delivery. The total cost of the food is $25. If they split the cost evenly, how much will each person pay, including the cost of delivery? | def solve() -> int:
total_cost = 25 + 3
num_people = 5
per_person = total_cost / num_people
result = per_person
return result
|
Susan can complete a task in 6 hours, while John can complete the same task in 3 hours. How long will it take for both of them to complete the task together? | def solve() -> int:
susan_hours = 6
john_hours = 3
combined_hours = (susan_hours * john_hours) / (susan_hours + john_hours)
result = combined_hours
return result
|
Olivia loves to collect seashells. She asks for 6 every birthday and 3 on Christmas. She gets every requested gift for 7 years. Then her parents give her 7 times the number of seashells she already has. How many seashells does Olivia have now? | def solve() -> int:
birthdays = 6 * 7
christmas = 3 * 7
total_seashells = birthdays + christmas
seashells_after_gift = total_seashells + (7 * total_seashells)
result = seashells_after_gift
return result
|
Bill mowed 5 lawns in 1 hour, plus some extra time to finish the last one. If the time taken to finish the last lawn is 25 minutes, how long will it take Bill to mow 10 lawns? | def solve() -> int:
lawns = 10
time_each_lawn = (1*5 + 25)/5
total_time = lawns * time_each_lawn
result = total_time
return result
|
A toy factory produces 2000 toy cars on Monday. They increase the production by 10% every day. How many toy cars do they produce on Friday? | def solve() -> int:
toy_cars_on_friday = 2000*(1+0.1)**4
result = toy_cars_on_friday
return result
|
It's Earth day, so all plants are on sale for 30% off the original price. If a pot of flowers normally costs $18 and a pack of seeds normally costs $6, how much will a gardener pay if they buy 2 pots of flowers and 4 packs of seeds with the discount? | def solve() -> int:
discount = 0.3
pot_price = 18
seed_price = 6
pot_discounted_price = pot_price * (1 - discount)
seed_discounted_price = seed_price * (1 - discount)
pot_count = 2
seed_count = 4
total_price = pot_discounted_price * pot_count + seed_discounted_price * seed_co... |
Jane owns 32 keychains. If she gives 3 keychains to Marie and 7 keychains to Ethan, how many keychains does Jane have left? | def solve() -> int:
janes_keychains = 32
janes_keychains -= 3
janes_keychains -= 7
result = janes_keychains
return result
|
Emily bakes 2 dozen cupcakes. Her friend ate 1/4 of them. If each cupcake contains 200 calories, how many calories did her friend eat? | def solve() -> int:
num_cupcakes = 2*12
num_cupcakes_eaten = 1/4*num_cupcakes
calories_per_cupcake = 200
calories_eaten = num_cupcakes_eaten * calories_per_cupcake
result = calories_eaten
return result
|
Each fruit salad contains 11 apples and 16 oranges. How many more apples are needed to make 293 fruit salads? | def solve() -> int:
apples = 11
oranges = 16
number_of_fruitsalads = 293
number_of_apples = number_of_fruitsalads*apples
number_of_oranges = number_of_fruitsalads*oranges
result = 0
if number_of_apples >= number_of_oranges:
result = number_of_apples-number_of_or... |
Here are some possible questions and programs: A school is collecting donations for a charity. Each class has a different goal amount to raise. Class A has a goal of $200, class B has a goal of $150, and class C has a goal of $100. How much money does the school need to raise in total if each class meets its goal? | def solve() -> int:
goal_A = 200
goal_B = 150
goal_C = 100
total_goal = goal_A + goal_B + goal_C
result = total_goal
return result
|
Lisa, the dentist, is cleaning teeth in her office. She cleaned 14 adult teeth, 8 child teeth, and 2 wisdom teeth. She then dismissed half of the patients in the waiting room, who were there for check-ups. Afterwards, she cleaned the teeth of the remaining patients, which included 5 canine teeth and 6 molar teeth. How ... | def solve() -> int:
adult_teeth = 14
child_teeth = 8
wisdom_teeth = 2
total_teeth = adult_teeth + child_teeth + wisdom_teeth
patients_before_dismissal = total_teeth // 2
canine_teeth = 5
molar_teeth = 6
remaining_teeth = canine_teeth + molar_teeth
total_patients = (remainin... |
Justin has $1.50 in quarters. If he gives 40 cents to Amelia and then one third as many cents to Brian as he gave to Amelia, how many quarters does Justin have left? | def solve() -> int:
quarters = 1.50 / 0.25
amelia_cents = 0.40
brian_cents = amelia_cents / 3
remaining_quarters = (quarters * 0.25 - amelia_cents - brian_cents) / 0.25
result = remaining_quarters
return result
|
Jackson is training for a marathon. He runs every day, and every week he runs 10 more miles than the previous week. If he runs 20 miles on the first week, how many total miles will he have run at the end of his 8th week? | def solve() -> int:
week_1 = 20
week_8 = week_1 + sum(range(10, 80, 10))
result = week_8
return result
|
In a restaurant, there are 80 tables. 75% of them are occupied, while 55% of the tables have more than one person. How many tables have only one person? | def solve() -> int:
tables = 80
occupied_tables = tables * 0.75
tables_with_more_than_one_person = tables * 0.55
tables_with_only_one_person = occupied_tables - tables_with_more_than_one_person
result = tables_with_only_one_person
return result
|
Tom works two jobs. He earns $15 per hour at his first job and $10 per hour at his second. Last week, he worked a total of 48 hours and earned $720. How many hours did he work at each job? | def solve() -> int:
x = 15
y = 10
y = (720 - 15*48)/(-5)
x = 48 - y
result = (x, y)
return result
|
A pound of strawberries contains about 24 strawberries. If Julie eats 4 strawberries a day, how many days will it take her to finish a 3-pound basket of strawberries? | def solve() -> int:
strawberries_per_pound = 24
strawberries_per_day = 4
basket_pounds = 3
basket_strawberries = basket_pounds * strawberries_per_pound
days = basket_strawberries / strawberries_per_day
result = days
return result
|
Every weekend, Elizabeth makes waffles for her family. She and her husband each eat 2 waffles, while their daughter eats one. If she makes a batch of 8 waffles per mix, how many mixes will she need over the course of a year if she makes them every Saturday and Sunday? | def solve() -> int:
waffles_per_mix = 8
waffles_per_weekend = 2 + 2 + 1
weeks_per_year = 52
total_waffles_needed = waffles_per_weekend * weeks_per_year
mixes_needed = total_waffles_needed / waffles_per_mix
result = mixes_needed
return result
|
John has a can of soda that contains 355 ml of liquid. He drank half of the soda and gave 1/3 of what was left to his friend. How many ml of soda did his friend get? | def solve() -> int:
soda_ml = 355
half_of_soda = soda_ml / 2
remaining_soda = half_of_soda
remaining_soda -= remaining_soda / 3
result = remaining_soda
return result
|
-Anna bakes some cupcakes for a fundraiser. She makes 48 cupcakes on the first day and 36 cupcakes on the second day. She sells 75% of the cupcakes she made and donates the rest to an orphanage. How many cupcakes did she donate? | def solve() -> int:
total = 48 + 36
sold = total * 0.75
donated = total - sold
result = int(donated)
return result
|
The population of town A is 10,000 people and the population of town B is 20,000 people. How many more people live in town B than town A? | def solve() -> int:
town_A_population = 10000
town_B_population = 20000
difference = town_B_population - town_A_population
result = difference
return result
|
At an airport, a flight takes off every hour for 16 hours a day. How many flights take off in a week? | def solve() -> int:
hours_per_day = 16
days_per_week = 7
flights_per_day = hours_per_day
flights_per_week = flights_per_day * days_per_week
result = flights_per_week
return result
|
James bought 100 mangoes at $2 each. If he wants to sell them at a profit of 20%, what should be the selling price of each mango? | def solve() -> int:
num_mangoes = 100
cost_per_mango = 2
profit_percent = 20
profit_amount = (profit_percent /100) * num_mangoes * cost_per_mango
selling_price_per_mango = (cost_per_mango + profit_amount)/num_mangoes
result = selling_price_per_mango
return result
|
Student: Q6: A shop has 50 apples and each customer should get an equal portion. How many apples can each customer get if 10 customers visit the shop? | def solve() -> int:
apples = 50
customers = 10
apples_per_customer = apples // customers
remaining_apples = apples % customers
result = apples_per_customer
return result
|
A swimming pool is 40 meters long and 20 meters wide. If the water depth is 3 meters, how many cubic meters of water does the pool hold? | def solve() -> int:
length = 40
width = 20
depth = 3
volume = length * width * depth
result = volume
return result
|
David wants to jog for 7 kilometers. If he has already jogged 2.5 kilometers, how many more kilometers does he need to jog? | def solve() -> int:
total_jog_distance = 7
jogged_distance = 2.5
remaining_distance = total_jog_distance - jogged_distance
result = remaining_distance
return result
|
A book has 600 pages. If you read 30 pages a day, how many days will it take to finish the book? | def solve() -> int:
pages_in_book = 600
pages_read_per_day = 30
days_to_finish_book = pages_in_book / pages_read_per_day
result = days_to_finish_book
return result
|
Jackson exercises for 15 minutes every day during the weekdays. On the weekends, he exercises an additional 1 hour and 15 minutes in total. How many hours does he exercise in 80 weeks? | def solve() -> int:
weekdays_exercise = 15 * 5
weekend_exercise = (1 * 60) + 15
total_exercise_per_week = weekdays_exercise + weekend_exercise
total_exercise_in_80_weeks = total_exercise_per_week * 80
hours_exercised = total_exercise_in_80_weeks / 60
result = hours_exercised
return resu... |
If Hodo has 3 more pencils than Sahra, and Sahra has 6 fewer pencils than Asha, and Asha has 18 pencils, how many pencils do all three of them have combined? | def solve() -> int:
pencils_asha = 18
pencils_sahra = pencils_asha - 6
pencils_hodo = pencils_sahra + 3
total_pencils = pencils_asha + pencils_sahra + pencils_hodo
result = total_pencils
return result
|
A mobile phone provider charges $20 per month for the first 3 months and $30 per month for any additional month. If a customer has been with the provider for 8 months, how much has he spent? | def solve() -> int:
rate_for_first_3_months = 20
rate_for_additional_months = 30
number_of_additional_months = 5
total_spent = (rate_for_first_3_months * 3) + (rate_for_additional_months * number_of_additional_months)
result = total_spent
return result
|
If a pizza has a diameter of 18 inches and a total cost of $12.00, what is the cost per square inch? | def solve() -> int:
radius = 9.0
diameter = 18.0
area = ((radius ** 2) * 3.14159)
cost = 12.0
cost_per_square_inch = cost/area
result = cost_per_square_inch
return result
|
Charlie bakes 24 cupcakes and sells them for $1.5 each. He spends $12 on ingredients and $3 on packaging. How much profit does he make? | def solve() -> int:
revenue = 24 * 1.5
cost = 12 + 3
profit = revenue - cost
result = profit
return result
|
Student: A company's profits for a quarter are $500,000. If the profits are distributed evenly among 8 board members, and the company's CEO receives three times the amount of the other board members, how much did the CEO receive in profits for the quarter? | def solve() -> int:
profits = 500000
board_members = 8
ceo_factor = 3
profits_per_member = profits / (board_members + ceo_factor - 1)
profits_ceo = profits_per_member * ceo_factor
result = profits_ceo
return result
|
Mia wants to buy a book for $18 and a magazine for $5. She has a $10 bill. How much change will she get back? | def solve() -> int:
book_price = 18
magazine_price = 5
payment = 10
total_cost = book_price + magazine_price
change = payment - total_cost
result = change
return result
|
Student: Millie always buys her shampoo in a 4-pack. How many 4-packs of shampoo will Millie need over the course of one year if she buys one 4-pack per month? | def solve() -> int:
months_in_year = 12
num_4packs = months_in_year * 1
result = num_4packs
return result
|
If a basketball player has a shooting percentage of 60% and they take 20 shots, how many shots did they make? | def solve() -> int:
total_shots = 20
shooting_percentage = 0.60
made_shots = total_shots * shooting_percentage
result = made_shots
return result
|
A pizza shop sells 3 sizes of pizza: small, medium, and large. A small pizza costs $10 and has 6 slices, a medium pizza costs $15 and has 8 slices, and a large pizza costs $20 and has 10 slices. How much money does the pizza shop make if they sell 15 small, 10 medium, and 5 large pizzas in a day? | def solve() -> int:
small = 15
medium = 10
large = 5
small_cost = 10
medium_cost = 15
large_cost = 20
total_money = small * small_cost + medium * medium_cost + large * large_cost
result = f'${total_money}'
result = total_money
return result
|
2. John has 8 coins. Three of these coins are $2 coins, four of these coins are $1 coins and the last one is a 50 cent coin. What is the total value of John's coins? | def solve() -> int:
two_dollar = 3
one_dollar = 4
fifty_cent = 1
two_dollar_value = two_dollar*2
one_dollar_value = one_dollar*1
fifty_cent_value = fifty_cent*0.5
result = two_dollar_value + one_dollar_value + fifty_cent_value
return result
|
The local library is offering discount on books. A hard title book costs $20, a paperback costs $12 and a set of textbooks cost $50. They will give 10% off for any books purchased together. How much money will the library save with the discounted books? | def solve() -> int:
cost_hardback = 20
cost_paperback = 12
cost_textbooks = 50
no_hardback = 2
no_paperback = 3
no_textbooks = 1
total_cost = no_hardback * cost_hardback + no_paperback * cost_paperback + no_textbooks * cost_textbooks
discount_rate = 0.1
discount_... |
The sum of two consecutive odd numbers is 52. What are the two numbers? | def solve() -> int:
first_odd = (52 - 1) / 2
second_odd = first_odd + 2
result = (first_odd, second_odd)
return result
|
Rachel is paying her monthly phone bill for a month with exactly 4 weeks. The phone company charges Rachel $30 for talk time and $0.10 per text message every week. Rachel made 25 minutes of talk time and sent 100 text messages every week. They're giving Rachel a 15% discount on the whole bill before fines for having a ... | def solve() -> int:
talk_time = 25
text_messages = 100
weekly_talk_charge = 30
weekly_text_charge = 0.10
total_talk_charge = talk_time * weekly_talk_charge
total_text_charge = text_messages * weekly_text_charge * 4
total_bill = total_talk_charge + total_text_charge
total_b... |
Oliver wants to buy new sports equipment, so his coach says he will give him some money if he does extra training. He promises $10 per hour spent on training. Oliver spends 1 hour running, and decides to do this twice. He also spends 3 hours practicing kickboxing, and the same amount of time swimming. How much spending... | def solve() -> int:
hours_running = 1
hours_kickboxing = 3
hours_swimming = hours_kickboxing
money_per_hour = 10
total_hours = hours_running * 2 + hours_kickboxing + hours_swimming
total_money = total_hours * money_per_hour
result = total_money
return result
|
If 8 friends share a $56 meal equally, how much would each person pay? | def solve() -> int:
num_friends = 8
total_cost = 56
cost_per_person = total_cost / num_friends
result = cost_per_person
return result
|
Student: At the movies, Jim and Jack bought popcorn. Jim bought 6 boxes of popcorn and Jack bought one third of the number Jim purchased. If each box costs $2, how much money did they pay in total? | def solve() -> int:
jim_popcorn = 6
jack_popcorn = jim_popcorn / 3
box_price = 2
total_popcorn = jim_popcorn + jack_popcorn
total_money = total_popcorn * box_price
result = total_money
return result
|
A sandwich requires 2 slices of bread, 3 slices of ham, and 1 slice of cheese. If a loaf of bread costs $2.70 and has 12 slices, 200 grams of ham costs $2, and 1 kg of cheese costs $8, how much would it cost to make the sandwich? | def solve() -> int:
bread_price_per_slice = 2.70 / 12
ham_price = 2 / 200 * 3
cheese_price = 8
bread_quantity = 2
ham_quantity = 3
cheese_quantity = 1
total_cost = (bread_price_per_slice * bread_quantity) + (ham_price * ham_quantity) + (cheese_price * cheese_quantity)
result = total_co... |
Olivia has a flower bed with 20 rows, each with 30 flowers. If 50% of the flowers are red and the rest are yellow, how many red flowers are there in total? | def solve() -> int:
rows = 20
flowers_per_row = 30
total_flowers = rows * flowers_per_row
red_flowers = total_flowers * 0.5
result = red_flowers
return result
|
John is 9 years old and his dad is 6 more than 3 times his age. In 12 years, how many years older is John's dad than him? | def solve() -> int:
age = 9
dad_age = age * 3 + 6
added_age = 12
result = dad_age + added_age - age
return result
|
Emma needs to buy a new laptop and has the option to choose between two models. The first one costs $1000 and has a processing speed of 2.3GHz, while the second one costs $1200 and has a processing speed of 3GHz. If Emma needs a processing speed of 2.5GHz, how much will she save by buying the first model instead of the... | def solve() -> int:
price_first_model = 1000
price_second_model = 1200
speed_first_model = 2.3
speed_second_model = 3
required_speed = 2.5
price_difference = price_second_model - price_first_model
speed_difference = speed_second_model - speed_first_model
price_per_speed = price... |
A math workbook has 8 chapters and each chapter contains 20 exercises. If each workbook costs $25, how much does one exercise cost, in dollars? | def solve() -> int:
total_exercises = 8*20
total_cost = 25
cost_per_exercise = total_cost/total_exercises
result = cost_per_exercise
return result
|
Henry owns 3 antique cars. Each car is worth $30,000 except for one that is worth 3 times as much. What is the total worth of Henry's antique cars? | def solve() -> int:
car_value = 30000
special_car_value = 3 * car_value
total_worth = (2 * car_value) + special_car_value
result = total_worth
return result
|
Kyle is playing in 8 games. Each game has 2 halves. He wears 1 pair of socks for each half. Each pair of socks cost $3. He quits one of the games and donates all the socks from that game to a local shelter for $1 each. How much money did he spend on all the socks? | def solve() -> int:
num_games = 8
num_halves = 2
num_socks_per_half = 1
cost_per_pair = 3
total_socks = num_games * num_halves * num_socks_per_half
total_cost = total_socks * cost_per_pair
donated_socks = num_halves * num_socks_per_half
donation_amount = donated_socks * 1
... |
A group of five friends went out to eat, and the total bill came out to $125. Each friend wants to pay an equal amount. How much should each friend pay? | def solve() -> int:
amount_per_friend = 125/5
result = amount_per_friend
return result
|
Student: A book costs $10. Amy has $30 and wants to buy 4 books. How much money will she have left after buying the books? | def solve() -> int:
book_cost = 10
amy_money = 30
books_wanted = 4
total_cost = book_cost * books_wanted
money_left = amy_money - total_cost
result = money_left
return result
|
A phone company charges a fixed cost of $20 per month for a basic plan and an additional $0.1 per call. If a customer makes 100 calls in a month, what is their total bill? | def solve() -> int:
calls_made = 100
fixed_cost = 20
cost_per_call = 0.1
total_cost = fixed_cost + (calls_made * cost_per_call)
result = total_cost
return result
|
A supermarket offers a 10% discount if you buy more than eight boxes of cereals. Erica paid $70 for 10 boxes. What is the original price for one box? | def solve() -> int:
total_paid = 70
num_of_boxes = 10
discount_rate = 0.1
discounted_price_per_box = total_paid / num_of_boxes
original_price_per_box = discounted_price_per_box / (1 - discount_rate)
result = original_price_per_box
result
return result
|
Cynthia won a lottery worth $10,000. She planned to donate half of her winnings to a charity and invest the rest of the money in real estate. If her total investment was worth $6,000, how much did she donate to charity? | def solve() -> int:
winning_amount = 10000
charity_donation = winning_amount / 2
real_estate_investment = winning_amount - charity_donation
total_investment = real_estate_investment + charity_donation
charity_donation = total_investment - 6000
result = charity_donation
return ... |
In the pantry, there are 80 cans of soup, 60 cansOlivia baked a batch of cookies. She gave a third of the batch to her neighbors. She then ate 12 cookies herself. She gave away half of what was left to her friends. Finally, she had 14 cookies left. How many cookies were in the original batch? | def solve() -> int:
soup_cans = 80
bean_cans = 60
cookies = 0
cookies -= cookies / 3
cookies -= 12
cookies /= 2
cookies -= 14
result = cookies * (-1)
return result
|
A factory produces 1500 units in 10 hours. How many units will it produce in 6 hours? | def solve() -> int:
units_10h = 1500
units_6h = (units_10h/10)*6
result = units_6h
return result
|
If a bakery has a total of 2400 breads and each package contains 4 breads, how many packages does it need? | def solve() -> int:
breads = 2400
per_package = 4
packages = breads//per_package
result = packages
return result
|
Student: Lila has 14 books. If Maya has 6 more books than Lila, and Nora has 3 less books than Maya, calculate the number of books present in the three towns. | def solve() -> int:
lila_books = 14
maya_books = lila_books + 6
nora_books = maya_books - 3
total_books = lila_books + maya_books + nora_books
result = total_books
return result
|
Lucas has 25 pens. Natalie has 6 times as many pens as Lucas, but 5 fewer pens than Ethan. How many pens do they have altogether? | def solve() -> int:
lucas_pens = 25
natalie_pens = 6 * lucas_pens
ethan_pens = natalie_pens + 5
total_pens = lucas_pens + natalie_pens + ethan_pens
result = total_pens
return result
|
If Emma is three years younger than Jack, and the sum of their ages today is 42, how old will Emma be in 10 years? | def solve() -> int:
jack_age = 0
emma_age = 0
jack_age = (42 + 3) / 2
emma_age = jack_age - 3
emma_age_in_10_years = emma_age + 10
result = emma_age_in_10_years
return result
|
Student: Tim works at a store and earns $10 per hour for the first 40 hours he works in a week, and $15 per hour for additional hours he works above 40 hours. If Tim worked for 55 hours in a week, how much money did he earn? | def solve() -> int:
hours_worked = 55
base_pay = 10
overtime_pay = 15
base_pay_total = base_pay * 40
overtime_pay_total = overtime_pay * (hours_worked - 40)
result = base_pay_total + overtime_pay_total
return result
|
Olivia is a singer rehearsing for two performances. The first performance has a 60% chance of making a $5,000 profit while the second performance has a 50% chance of making a $2,000 profit and a 50% chance of making no profit at all. What is the probability that Olivia will make a profit on both performances? | def solve() -> int:
prob_first_performance = 0.6
prob_second_performance = 0.5
prob_both = prob_first_performance * prob_second_performance
result = prob_both
return result
|
In a group of 100 people, 30 people have cats, 40 people have dogs, and 10 people have both cats and dogs. How many people don't have any pets? | def solve() -> int:
people_with_pets = 30 + 40 - 10
people_without_pets = 100 - people_with_pets
result = people_without_pets
return result
|
Kay and Emilia both bought a new laptop together. The total cost of the laptop was $756.80 and Emilia offered to pay four-fifths of the total cost, how much did each person need to pay? | def solve() -> int:
total_cost = 756.80
emilia_payment = 4 * total_cost // 5
kay_payment = total_cost - emilia_payment
result = kay_payment
return result
|
Peter has 128 apples and wants to put them into boxes with 8 apples in each. How many full boxes will he have? | def solve() -> int:
apples = 128
apples_per_box = 8
boxes = 0
while apples >= apples_per_box:
boxes += 1
apples -= apples_per_box
result = boxes
return result
|
Student: Susan has 3 times the number of books as her sister, who has 10 books. Susan also gave away 20 books to her friends. How many books does Susan have now? | def solve() -> int:
sisters_books = 10
susans_books = sisters_books * 3
susans_books_after_giving_away = susans_books - 20
result = susans_books_after_giving_away
return result
|
If Sarah bought 3 1/4 pounds of ground beef for $6.00 a pound and 2 pounds of chicken thighs for $4.50 a pound, how much did she spend? | def solve() -> int:
ground_beef_weight = 3 + 1/4
ground_beef_cost = ground_beef_weight * 6
chicken_weight = 2
chicken_cost = chicken_weight * 4.5
total_cost = ground_beef_cost + chicken_cost
result = total_cost
return result
|
The price of a bracelet is $10, and a necklace costs $15. If Mary bought four bracelets and two necklaces and paid using a $75 bill, calculate the change she received. | def solve() -> int:
bracelet = 10
necklace = 15
bracelets_bought = 4
necklaces_bought = 2
money_given = 75
total_cost = (bracelet * bracelets_bought) + (necklace * necklaces_bought)
change = money_given - total_cost
result = change
return result
|
A stack of 180 identical books is 45 cm high. Calculate the height of a single book. | def solve() -> int:
num_books = 180
total_height = 45
book_height = total_height / num_books
result = book_height
return result
|
A grocery store sells potatoes at a rate of $0.75 per pound. How much would a customer have to pay for 4 pounds of potatoes? | def solve() -> int:
rate_per_pound = 0.75
num_pounds = 4
total_cost = rate_per_pound * num_pounds
result = total_cost
return result
|
A bakery sold 30 loaves of bread. Eight customers bought one loaf, six customers bought four loaves, and the rest bought two loaves. How many customers bought two loaves? | def solve() -> int:
total_loaves = 30
one_loaf = 8
four_loaves = 6
two_loaves = 0
remaining_loaves = total_loaves - one_loaf - four_loaves * 4
two_loaves = remaining_loaves // 2
result = two_loaves
return result
|
Samantha needs to save $1500 for a trip next year, $500 for a new bike, and $200 for a gym membership. She also wants to save $300 for unexpected expenses. She makes $16 per hour at her job. How many hours will Samantha need to work this month? | def solve() -> int:
trip_cost = 1500
bike_cost = 500
gym_cost = 200
unexpected_cost = 300
hourly_rate = 16
total_cost = trip_cost + bike_cost + gym_cost + unexpected_cost
hours_needed = total_cost / hourly_rate
result = hours_needed
return result
|
A grocery store sells different types of meat. Beef costs $5.50 per pound, chicken costs $3.75 per pound, and pork costs $4.25 per pound. If the grocery store sold 10 pounds of beef, 8 pounds of chicken, and 15 pounds of pork, how much money was made from meat sales? | def solve() -> int:
b = 5.5*10
c = 3.75*8
p = 4.25*15
total_sales = b + c + p
result = f'${total_sales}'
result = total_sales
return result
|
Tyler has 60 toy cars. He loses 10% of them at the park. How many toy cars does Tyler have left? | def solve() -> int:
cars = 60
lost = cars * 0.1
left = cars - lost
result = left
return result
|
I have 2 boxes of fruits, the first box weighs 1 kg and contains 5 apples and 3 oranges, the second box weighs 2 kg and contains 7 apples and 5 oranges. If the price of an apple is $0.5 and the price of an orange is $0.3, what is the total price of the two boxes of fruits? | def solve() -> int:
box1_weight = 1
box1_apples = 5
box1_oranges = 3
box2_weight = 2
box2_apples = 7
box2_oranges = 5
apple_price = 0.5
orange_price = 0.3
box1_price = box1_apples * apple_price + box1_oranges * orange_price
box2_price = box2_apples * apple_price + box2_oranges * ... |
Student: John purchased 2 identical shirts for $25 each. If the sales tax is 9%, how much did John spend in total for the 2 shirts? | def solve() -> int:
shirt_price = 25
sales_tax = 0.09
total_price = (shirt_price * 2) * (1 + sales_tax)
result = total_price
return result
|
Sean bought 20 pencils for $10. He gave away 25% of them to his friends. He then sold the remaining pencils for $0.75 each. How much money did he make from selling the pencils? | def solve() -> int:
pencils_given_away = 0.25 * 20
pencils_sold = 20 - pencils_given_away
money_made = pencils_sold * 0.75
result = money_made
return result
|
Lily has 20 marbles. Mark gives Lily double the number she has. Lily then gives Mark back a half of her new total minus 2. How many marbles does Lily have now? | def solve() -> int:
lily_marbles = 20
lily_marbles += lily_marbles * 2
lily_marbles -= (lily_marbles / 2) - 2
result = lily_marbles
return result
|
Michelle is 33 years old. Her cousin is currently 18 years younger than her. How old was their grandmother when she gave birth to Michelle's mother if Michelle's mother is younger than Michelle's grandmother by 1/12 of Michelle's age now? | def solve() -> int:
michelle_age = 33
cousin_age = michelle_age - 18
age_difference = michelle_age / 12
mother_age = michelle_age - age_difference
grandmother_age = mother_age + michelle_age
grandmother_age_at_birth = grandmother_age - michelle_age
result = grandmother_age_at_birth... |
The backyard of a house is 120 square meters. If it has a width of 10 meters and the owner wants to extend it by 3 meters on each side, what will be the new area of the backyard? | def solve() -> int:
width = 10
original_area = 120
extended_width = width + 3
new_area = extended_width * extended_width
result = new_area
return result
|
Question X: A person borrowed $1000 at an interest rate of 5% per annum. If the person pays back $1100 after 1 year, what is the compound interest earned? | def solve() -> int:
principal_amount = 1000
interest_rate = 0.05
time_period = 1
total_amount = 1100
compound_interest = total_amount - principal_amount*(1+interest_rate)**time_period
result = compound_interest
return result
|
Student: A runner wants to complete a 10K run in under an hour. If the course is 6.2 miles long, what is the fastest speed in miles per hour that the runner needs to run in order to achieve their goal? | def solve() -> int:
distance = 6.2
time = 1
speed = distance / time
goal_time = 0.1666667
goal_distance = speed * goal_time
goal_speed = goal_distance / goal_time
result = round(goal_speed, 2)
return result
|
When a duck swims, it moves at a constant speed of 0.3 m/s. If there is a pond that is 50.4 meters in length and the duck starts swimming at one end, how many seconds will it take for the duck to swim across the pond? | def solve() -> int:
speed = 0.3
length = 50.4
time = length/speed
result = time
return result
|
Henry has twice as many pencils as Abby. If Abby has 20 pencils, how many pencils do they have if they put the pencils together and shared them equally between themselves? | def solve() -> int:
total_pencils = 2 * 20
shared_pencils = total_pencils / 2
result = shared_pencils
return result
|
David bought a pair of pants that cost $50. He also bought a pair of sunglasses that cost $80. He spent a total of $480. What was the price of the sunglasses? | def solve() -> int:
price_pants = 50
price_sunglasses = 80
total_price = 480
result = price_sunglasses
return result
|
A runner runs a distance of 10 km in 40 minutes. At the same average speed, how long will it take to cover a distance of 21 km? | def solve() -> int:
distance1 = 10
time1 = 40 / 60
speed = distance1 / time1
distance2 = 21
time2 = distance2 / speed
result = time2
return result
|
If a car covers a distance of 45km in 30 minutes, what is its speed in km/hr? | def solve() -> int:
distance = 45
time = 0.5
speed = (distance / time) * 2
result = speed
return result
|
Jack is planning to go on a fishing trip. He will drive to the lake, walk 30 minutes to get to his boat, wait twice the walking time for his friend to arrive, and then fish for 4 hours. If the entire trip takes him 7 hours, how long is his walk to reach the boat? | def solve() -> int:
total_time = 7
fishing_time = 4
waiting_time = 0
driving_time = 0
walking_time = 0
waiting_time = walking_time * 2
driving_time = total_time - fishing_time - waiting_time - walking_time
walking_time = (total_time - fishing_time - waiting_time - driving_... |
Emma has a set of toy cars and a set of toy trucks. She has 12 toy cars and 8 toy trucks. How many wheels are there in her entire collection? | def solve() -> int:
cars = 12
trucks = 8
wheels_per_car = 4
wheels_per_truck = 6
total_wheels = (cars * wheels_per_car) + (trucks * wheels_per_truck)
result = total_wheels
return result
|
Alan has 35 marbles. The ratio of the number of red marbles to the number of blue marbles he has is 4:7. How many red marbles does he have? | def solve() -> int:
total_marbles = 35
red_ratio = 4 / (4+7)
result = red_ratio * total_marbles
return result
|
Danny has five times as many coins as Dylan. Dylan has 12 more than Dakota, who has 32 coins. How many coins do Danny and Dakota have in total? | def solve() -> int:
dakota_coins = 32
dylan_coins = dakota_coins + 12
danny_coins = 5 * dylan_coins
total_coins = dakota_coins + danny_coins
result = total_coins
return result
|
Kim collected 362 pebbles from the backyard to make a mosaic. She gathered 94 pebbles for her brother and the rest she kept. How many pebbles does Kim have for her mosaic? | def solve() -> int:
total_pebbles = 362
pebbles_for_brother = 94
pebbles_for_mosaic = total_pebbles - pebbles_for_brother
result = pebbles_for_mosaic
return result
|
Student: Mia needs to buy 150 pens for her office. If a box of pens contains 25 pens, how many boxes of pens does Mia have to buy? | def solve() -> int:
num_pens = 150
pens_per_box = 25
num_boxes = num_pens // pens_per_box
result = num_boxes
return result
|
David has 75 Lego blocks to build a house. Each row of the house requires 15 blocks. How many rows can David build with 75 blocks? | def solve() -> int:
number_of_blocks = 75
blocks_per_row = 15
number_of_rows = number_of_blocks // blocks_per_row
result = number_of_rows
return result
|
A school has a budget of $25,000 to buy new computers. If each computer costs $1,250, how many computers can the school buy? | def solve() -> int:
budget =...
computer_cost =...
num_computers =...
result =...
return result
|
A bakery has 200 donuts. If 1/4 of the donuts have chocolate topping and 1/3 of the remaining donuts have sprinkles, how many donuts are there in total that have neither chocolate nor sprinkles? | def solve() -> int:
total_donuts = 200
chocolate_donuts = total_donuts / 4
remaining_donuts = total_donuts - chocolate_donuts
sprinkles_donuts = remaining_donuts / 3
neither_donuts = total_donuts - chocolate_donuts - sprinkles_donuts
result = neither_donuts
return result
|
A car is traveling at a speed of 50 km/h for 3 hours. How far did it travel in total? | def solve() -> int:
speed = 50
time = 3
distance = speed * time
result = distance
return result
|
It takes 3 gallons of paint to paint a house of 1500 sq ft. If there are 4 houses to be painted, each house being the same size, how many liters of paint will be required to paint all the houses? | def solve() -> int:
gallons_per_house = 3
house_area = 1500
num_houses = 4
total_area = house_area * num_houses
liters_per_gallon = 3.78541
liters_per_house = gallons_per_house * liters_per_gallon
total_liters = liters_per_house * num_houses
result = total_liters
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.