question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Lily, Noah, and Ethan have a combined age of 99. Lily is 1/6 the age of Noah, and Ethan is five times as old as Lily. How old is Noah? | def solve() -> int:
lily_age = 0
noah_age = 0
ethan_age = 0
lily_age = 99 / (1 + 1/6 + 5)
noah_age = 6 * lily_age
ethan_age = 5 * lily_age
result = noah_age
return result
|
A 6-pack of beer costs $12.00 and has 6 cans per pack. Each can contains 355 ml of beer. Most pubs will charge $4.00 for a pint of beer, which is 473 ml. How much money does a pub make on a 6-pack of beer? | def solve() -> int:
cost_per_ml = 12.00 / (6 * 355)
cost_per_pint = cost_per_ml * 473
profit_per_pint = 4.00 - cost_per_pint
pints_per_pack = (6 * 355) / 473
profit_per_pack = profit_per_pint * pints_per_pack
result = profit_per_pack
return result
|
A clothing store is closing down and selling all of its designer clothing. They have 500 designer shirts and 700 designer pants which would normally retail for $100 each. They are offering a 60% discount and manage to sell 85% of their clothing. If their debtors are demanding $8000 from them, how much money do they hav... | def solve() -> int:
shirts = 500
pants = 700
retail_price = 100
discount = 0.6
sell_percentage = 0.85
debtors_demand = 8000
discounted_price = retail_price * (1 - discount)
total_revenue = (shirts + pants) * discounted_price * sell_percentage
remaining_money = total_re... |
Lisa made 35 pancakes. She gave 8 to her brother and 5 to her sister. How many pancakes does she have left? | def solve() -> int:
pancakes = 35
pancakes = pancakes - 8
pancakes = pancakes - 5
result = pancakes
return result
|
A bag of apples weighs 5 kg and a bag of oranges weighs 4 kg. Sally bought 3 bags of apples and 2 bags of oranges, while Tom bought 2 bags of apples and 4 bags of oranges. How many more kilograms of fruits did Sally buy than Tom? | def solve() -> int:
weight_sally = 3 * 5 + 2 * 4
weight_tom = 2 * 5 + 4 * 4
difference = weight_sally - weight_tom
result = difference
return result
|
Jake needs to study for his final exams. He plans to study for 4 hours per day, and he has 5 days before the exams. How many hours will he study in total? | def solve() -> int:
hours_per_day = 4
days = 5
total_hours = hours_per_day * days
result = total_hours
return result
|
If Rachel can save $1500 a month after taxes and wants to save up for a $9000 vacation, how many months will it take her to save up for the trip? | def solve() -> int:
monthly_savings = 1500
vacation_cost = 9000
months_needed = vacation_cost / monthly_savings
result = months_needed
return result
|
The sum of two numbers is 358 and their difference is 96. What are these two numbers? | def solve() -> int:
sum_of_numbers = 358
difference_of_numbers = 96
x_plus_y = sum_of_numbers
x_minus_y = difference_of_numbers
x = (x_plus_y + x_minus_y)/2
y = (x_plus_y - x_minus_y)/2
result = (x,y)
return result
|
Student: Richard saved $22 in October, $38 in November and spent $27 in December. How much money does he need to save in January so he can have a total amount of $70? | def solve() -> int:
october = 22
november = 38
december = -27
total = october + november + december
target = 70
difference = target - total
january = difference
result = january
return result
|
A rectangular garden has a perimeter of 70 meters. If the length is 5 meters longer than the width, what is the area of the garden? | def solve() -> int:
length = 0
width = 0
perimeter = 70
width = (perimeter / 2 - 5) / 2
length = (perimeter / 2 + 5) / 2
area = length * width
result = area
return result
|
Possible questions and programs: Bob is painting a fence. He can paint one side of one panel in 15 minutes, and there are 12 panels on the fence. He needs to paint both sides of each panel, and wait for 45 minutes for the paint to dry between each side. If he starts painting at 9:00 am, what time will he finish paintin... | def solve() -> int:
def min_to_time(min):
hour = min // 60
minute = min % 60
return str(hour) + ":" + str(minute).zfill(2)
total_time = (15 * 2 + 45) * 12
start_time = 9 * 60
finish_time = start_time + total_time
finish_time = min_to_time(finish_time)
resul... |
A school has 500 students and a budget of $10,000 for a school trip. If the cost per student is $25 and they decide to reduce the cost by 10% per student, how many students can go on the trip and stay within budget? | def solve() -> int:
num_students = 500
budget = 10000
original_cost = 25
reduced_cost = original_cost * 0.9
max_students = budget / reduced_cost
result = max_students
return result
|
Jane has 8 marbles. She played a game with Tom and won 5 marbles from him. She played another game with Sam and lost 3 marbles to him. How many marbles does Jane have now? | def solve() -> int:
marbles = 8
marbles += 5
marbles -= 3
result = marbles
return result
|
Student: Adam has 8 oranges. He bought 4 more oranges. How many oranges does he have now? | def solve() -> int:
oranges_Adam = 8
oranges_bought = 4
oranges_total = oranges_Adam + oranges_bought
result = oranges_total
return result
|
James worked 8 hours on Monday, 6 hours on Tuesday, and 7 hours on Wednesday. If he is paid $12 per hour, how much did he earn for those 3 days? | def solve() -> int:
hours_worked = 8 + 6 + 7
hourly_wage = 12
total_earnings = hours_worked * hourly_wage
result = total_earnings
return result
|
Leah bought 18 chocolates for her friends, but she ate 6 of them on the way home. If she wants to share the remaining chocolates equally among her 3 best friends, how many chocolates will each friend get? If Leah wants to buy more chocolates for herself, how much will she have to pay? The chocolate shop sells 3 chocola... | def solve() -> int:
chocolates_left = 18 - 6
chocolates_per_friend = chocolates_left / 3
chocolates_for_leah = chocolates_per_friend
chocolate_price = 5 / 3
cost = chocolate_price * chocolates_for_leah
result = cost
return result
|
Possible new questions and python programs are: Ronny spent 4/9 of his money and had $36 left. How much is one-third of his original amount of money? | def solve() -> int:
remaining_amount = 36
fraction_spent = 4/9
original_amount = remaining_amount / (1 - fraction_spent)
one_third = original_amount / 3
result = one_third
return result
|
The ratio of apples to oranges in a basket is 5:7. If there are 35 oranges, how many apples are in the basket? | def solve() -> int:
num_oranges = 35
apple_to_orange_ratio = 5/7
num_apples = num_oranges / (1 - apple_to_orange_ratio)
result = num_apples
return result
|
Hannah had 21 socks and her brother gave her 5 more. How many socks does Hannah have in total? | def solve() -> int:
num_socks = 21
num_socks = num_socks + 5
result = num_socks
return result
|
Student: Mark purchased a 10-pack of gum for $3.50. How much does each piece of gum cost? | def solve() -> int:
cost = 3.50
cost_per_piece = cost / 10
result = cost_per_piece
return result
|
A worker is paid $15 per hour and works 8 hours per day. If they work for 5 days in a week, how much will they earn? | def solve() -> int:
hourly_pay = 15
daily_hours = 8
working_days = 5
weekly_pay = hourly_pay * daily_hours * working_days
result = weekly_pay
return result
|
Angela takes 1 antacid per day when she eats Chinese food, 3 antacids per day when she eats Indian food, and 2 antacids when she eats Mexican food. If Angela eats Chinese once a week, Indian twice a week, and Mexican once a week, how many antacids will she take in 10 days? | def solve() -> int:
total_antacids = 0
total_antacids += 1*1
total_antacids += 3*2
total_antacids += 2*1
result = total_antacids * 10
return result
|
Lily wants to fill a vase with water. The vase has the shape of a cylinder with a radius of 5 cm and a height of 20 cm. She has a pitcher that can hold 2 liters of water. How many times does she need to fill the pitcher and pour it into the vase to fill the vase completely? Assume 1 liter = 1000 cm^3. | def solve() -> int:
vase_volume = 3.14 * 5 * 5 * 20
times = round(vase_volume / 2000, 0)
result = times
return result
|
The cost of a pencil is 7 cents. How much will it cost to buy 16 pencils? | def solve() -> int:
cost_pencil = 7
num_pencils = 16
total_cost = cost_pencil * num_pencils
result = total_cost
return result
|
Liz buys 10 apples. She wants to divide them into equal groups of 3. How many groups can she make? | def solve() -> int:
apples = 10
group_size = 3
num_groups = apples // group_size
result = num_groups
return result
|
``` A rectangle has length 7cm and width 3cm. What is the perimeter of the rectangle? | def solve() -> int:
length = 7
width = 3
perimeter = 2*length + 2*width
result = perimeter
return result
|
A recipe calls for 2.5 cups of flour and makes 12 cookies. If you want to make 36 cookies, how much flour will you need? | def solve() -> int:
flour_per_cookie = 2.5 / 12
flour_needed = flour_per_cookie * 36
result = flour_needed
return result
|
``` Adam wants to buy a new laptop. The laptop he wants costs $800, but the store offers a 10% discount on all laptops. Additionally, he has a coupon that gives him an extra $100 off the final price. How much will he pay for the laptop? | def solve() -> int:
discounted_price = 800 * (1 - 0.1) - 100
result = discounted_price
return result
|
There are 90 books in a library. 15 percent of books are fiction, 35 percent are non-fiction, and the rest are reference. How many reference books are there in the library? | def solve() -> int:
fiction_books = 0.15 * 90
non_fiction_books = 0.35 * 90
reference_books = 90 - fiction_books - non_fiction_books
result = reference_books
return result
|
Emma had 16 books in her room. She lent 5 books to her friends and lost 2. Then, she bought 6 more books. How many books does Emma have now? | def solve() -> int:
books_in_room = 16
books_lent = 5
books_lost = 2
books_bought = 6
books_now = books_in_room - books_lent - books_lost + books_bought
result = books_now
return result
|
Tim baked 8 chocolate brownies, each weighing 6 ounces. He distributed them equally among 4 lunch boxes. While he was getting ready for school, his little sister Sarah ate all the brownies in one of the boxes. What was the total weight, in ounces, of the remaining brownies? | def solve() -> int:
brownies_weight = 6
num_brownies = 8
num_lunch_boxes = 4
total_weight = brownies_weight * num_brownies
weight_per_box = total_weight / num_lunch_boxes
remaining_weight = total_weight - weight_per_box
result = remaining_weight
return result
|
A party supply store orders 35 cases of balloons, and each case has 12 packs of 10 balloons. How many balloons are ordered in total? | def solve() -> int:
num_cases = 35
num_packs_per_case = 12
num_balloons_per_pack = 10
total_balloons = num_cases * num_packs_per_case * num_balloons_per_pack
result = total_balloons
return result
|
John is organizing a charity event. He sold 100 tickets for $5 each, but he had to give a 20% discount to students. If 30 of the tickets were sold to students, how much did he earn in total? | def solve() -> int:
ticket_price = 5
num_tickets = 100
discount_percent = 20
num_student_tickets = 30
total_cost = ticket_price * num_tickets
discount_amount = ticket_price * discount_percent/100
student_discount_amount = discount_amount * num_student_tickets
final_cost = total_cost - st... |
Jason's mom allows him to play up to 3 hours of video games in a day while his friend's mother allows his friend to play up to 2000 minutes in a week. If each day has 1440 minutes, how many times greater is the time his friend can spend playing compared to Jason? | def solve() -> int:
time_jason = 3 * 60 * 7
time_jasonfriend = 2000
ratio_time = time_jasonfriend/time_jason
result = ratio_time
return result
|
A classroom has 20 students. Each student has a desk, and every two desks share one textbook. How many textbooks are needed for the classroom? | def solve() -> int:
desks = 20
textbooks = desks / 2
result = textbooks
return result
|
Nate brought 8 books, his sister bought 4 books. How many books did they buy in total? | def solve() -> int:
total_books_brought_Nate = 8
total_books_bought_Sister = 4
total_books = total_books_brought_Nate + total_books_bought_Sister
result = total_books
return result
|
If Alex goes through a roll of paper towels every 2 weeks, and each roll costs $2, how much does he spend on paper towels in 3 months? | def solve() -> int:
weeks_in_month = 4
rolls_per_week = 1 / 2
cost_per_roll = 2
rolls_per_month = rolls_per_week * weeks_in_month
cost_per_month = rolls_per_month * cost_per_roll
cost_per_three_months = cost_per_month * 3
result = cost_per_three_months
return result
|
Barbara bought a laptop for $779 and had a coupon for 20% off. How much money did she save? | def solve() -> int:
price_original = 779
discount_percent = 0.20
discount_money = price_original * discount_percent
saved_money = discount_money
result = saved_money
return result
|
If a circle has a circumference of 88 cm, what is its area? | def solve() -> int:
circumference = 88
radius = circumference / (2 * 3.14)
area = 3.14 * radius**2
result = area
return result
|
Student: There are 10 people going to a restaurant. The total bill is $1200 including tax and tip. If they plan on splitting the bill equally, how much will each person pay? | def solve() -> int:
total_bill = 1200
people = 10
each_pay = total_bill / people
result = each_pay
return result
|
Sally has three times as many stickers as her sister, Lisa. However, Lisa has 12 less than half as many stickers as their friend, Emily. If Emily has 48 stickers, how many stickers does Sally have? | def solve() -> int:
l = (48/2) - 12
s = l*3
result = s
return result
|
A book has 300 pages. If each page has an average of 35 lines and each line has an average of 10 words, how many words are in the book? | def solve() -> int:
pages = 300
lines_per_page = 35
words_per_line = 10
total_words = pages * lines_per_page * words_per_line
result = total_words
return result
|
A baker made a tray of cookies. She kept 1/12 of the cookies and divided the rest among her 7 customers. The oldest customer ate 2 cookies while the youngest customer had only a third of that amount. If there were 84 cookies in the tray, how many did the second customer eat? | def solve() -> int:
cookies_in_tray = 84
kept_cookies = cookies_in_tray * (1/12)
cookies_for_customers = cookies_in_tray - kept_cookies
cookies_per_customer = cookies_for_customers / 7
oldest_customer_cookies = 2
youngest_customer_cookies = oldest_customer_cookies / 3
second_customer_cookies... |
Student: Mia has 8 red candies and she receives 3 yellow candies. She trades 4 red candies for 6 green candies. How many candies does Mia have now? | def solve() -> int:
red_candies = 8
yellow_candies = 3
green_candies = 6
red_candies = red_candies - 4
total_candies = red_candies + yellow_candies + green_candies
result = total_candies
return result
|
-Separate each new question and program pair with an empty line Here are some possible new questions and programs: Bob is a student who lives in a dorm with shared expenses and contributes $36 a month for rent and utilities. He has a part-time job that pays him $120 a month. He also spends a fraction of his income on f... | def solve() -> int:
x = (120 - 36 - 12) / 120
result = x
return result
|
Student: In a store, there are 1189 oranges. The customers purchased 5 groups of 12 oranges each and 2 groups of 6 oranges each. How many oranges were left in the store? | def solve() -> int:
oranges_in_store = 1189
oranges_purchased = 5 * 12 + 2 * 6
oranges_left = oranges_in_store - oranges_purchased
result = oranges_left
return result
|
Graham wants to buy a new laptop and saw a new model that he likes. The laptop is $1400 and if he pays with his credit card, he will get a 5% bonus. He decides to but the laptop but he also needs to pay a transaction fee of 4%. How much money will Graham be paying in total? | def solve() -> int:
list_price = 1400
bonus = list_price * 0.05
cost_after_bonus = list_price - bonus
fees = cost_after_bonus * 0.04
total = cost_after_bonus + fees
result = 1456.0
return result
|
Samantha took a tote bag weighing 2 pounds to the supermarket. She purchased 5 cans of soup weighing 1 pound each, 3 bottles of juice weighing 0.6 pounds each, and 2 loaves of bread weighing 0.8 pounds each. What was the weight of Samantha's tote bag on her way back from the supermarket? | def solve() -> int:
tote_bag_weight = 2
soup_weight = 5 * 1
juice_weight = 3 * 0.6
bread_weight = 2 * 0.8
total_weight = tote_bag_weight + soup_weight + juice_weight + bread_weight
result = total_weight
return result
|
A store sells socks for $10. If you buy three pairs, the fourth pair is half off. What is the total cost with tax (9%) if you buy eight pairs of socks? | def solve() -> int:
full_price_pairs = 6
half_off_pairs = 2
price = (10 * 3 * full_price_pairs) + (5 * half_off_pairs)
tax = price * 0.09
total_cost = price + tax
result = total_cost
return result
|
At the school talent show, a total of 12 acts performed. Five were groups, and the rest were solo performances. How many solo performances were there? | def solve() -> int:
total_acts = 12
group_acts = 5
solo_acts = total_acts - group_acts
result = solo_acts
return result
|
Kelly goes to the grocery store to make a salad. She got 1 head of lettuce, 1 bunch of kale, 2 avocados, 1 red onion, and 6 cherry tomatoes. If one head of lettuce weighs 8 ounces, one bunch of kale weighs 4 ounces, and one avocado and red onion weighs 8 ounces each, what's the total weight of the salad in ounces? | def solve() -> int:
lettuce = 8
kale = 4
avocado = 8
onion = 8
tomatoes = 3
weight = (lettuce+kale+avocado+onion+tomatoes)
result = weight
return result
|
Student: Stacy has 90 pencils in her pencil box. She will give 4/5 of the pencils to her friend and the rest to her sister. How many pencils does Stacy give to her friend? | def solve() -> int:
pencils = 90
friend_pencils = 4/5 * pencils
sister_pencils = pencils - friend_pencils
result = friend_pencils
return result
|
A smartphone has 2 cameras each. A tech store has 4 double smartphones and 25 single smartphones. How many cameras are there in total? | def solve() -> int:
double_smartphones = 4
single_smartphones = 25
cameras_per_double_smartphone = 2
cameras_per_single_smartphone = 1
total_cameras = (double_smartphones * cameras_per_double_smartphone) + (single_smartphones * cameras_per_single_smartphone)
result = total_cameras... |
A pet store sells dog treats for $3 each, cat toys for $2 each, and bird feeders for $5 each. If Tim buys 4 dog treats, 2 cat toys, and 1 bird feeder, how much does he spend in total? | def solve() -> int:
total_dog_treat_cost = 4*3
total_cat_toy_cost = 2*2
total_bird_feeder_cost = 1*5
total_cost = total_dog_treat_cost + total_cat_toy_cost + total_bird_feeder_cost
result = total_cost
return result
|
Amy has a total of 45 small balloons and 33 large balloons. How many balloons does Amy have in total? | def solve() -> int:
small_balloons = 45
large_balloons = 33
total_balloons = small_balloons + large_balloons
result = tota... |
Possible additional questions are: - Zara can swim the length of the pool in 2 minutes and James can do it in 3 minutes. If Zara swims at 2.5 MPH, what speed (in MPH) does James swim in the pool? | def solve() -> int:
length = 50 / 5280
time_zara = 2 / 60
time_james = 3 / 60
speed_zara = length / time_zara
speed_james = length / time_james
result = speed_james
return result
|
Student: Sara has a collection of 20 coins, half of them are quarters and the other half are dimes. How many dimes does she have? | def solve() -> int:
num_coins = 20
num_quarters = num_coins / 2
num_dimes = num_coins - num_quarters
result = num_dimes
return result
|
Alex spends 2 hours twice a week cooking meals for a homeless shelter. How many hours of service does he provide in a month? | def solve() -> int:
hours_per_week = 2
weeks_per_month = 4
hours_per_month = hours_per_week * 2 * weeks_per_month
result = hours_per_month
return result
|
A ladder is 20 feet long and leans against a wall. If the base of the ladder is 16 feet away from the wall, how far up the wall does the ladder reach? | def solve() -> int:
ladder_length = 20
distance_from_wall = 16
wall_height = ((ladder_length ** 2) - (distance_from_wall ** 2)) ** 0.5
result = wall_height
return result
|
A cinema has 12 movies that need to be screened. Each screening is 2 hours long. How many hours will it take for all the movies to be screened? | def solve() -> int:
num_movies = 12
screening_length = 2
total_screening_time = num_movies * screening_length
result = total_screening_time
return result
|
A car drove 15 kilometers more than twice the distance walked by its owner. If the owner walked 8 kilometers and they traveled 31 kilometers in total, how far did the car drive? | def solve() -> int:
owner_walked = 8
total_distance = 31
car_drove = total_distance - owner_walked
car_drove = car_drove / 2
car_drove = car_drove - 15
result = car_drove
return result
|
arah wants to make smoothies for her family. She has 3 bananas, 2 cups of strawberries, and 1 cup of milk. Each smoothie requires 1 banana, 0.5 cups of strawberries, and 0.25 cups of milk. How many smoothies can she make? | def solve() -> int:
b = 3
s = 2
m = 1
per_b = 1
per_s = 0.5
per_m = 0.25
max_bananas = b // per_b
max_strawberries = s // per_s
max_milk = m // per_m
max_smoothies = min(max_bananas, max_strawberries, max_milk)
result = max_smoothies
return result
|
Tom, Dick, and Harry divide a sum of $1680. Tom gets three times as much as Dick, and Harry gets twice as much as Tom. How much money does each get? | def solve() -> int:
money = 1680
dick_money = money/10
tom_money = 3*dick_money
harry_money = 2*tom_money
result = [dick_money, tom_money, harry_money]
return result
|
A clothing store has a sale where all items are 20% off. If a customer buys a dress that normally costs $80, how much money will they save during the sale? | def solve() -> int:
dress_price = 80
discount_percent = 20
discounted_price = dress_price * (100 - discount_percent) / 100
savings = dress_price - discounted_price
result = savings
return result
|
Ms. Sophie owns a coffee house where she makes 100 cups of coffee every day. She purchases coffee beans at the rate of $1 per cup. Calculate her profit in March if she sells each cup of coffee at $2.75. | def solve() -> int:
cups_of_coffee_per_day = 100
cost_per_cup = 1
selling_price_per_cup = 2.75
total_cost = cups_of_coffee_per_day * cost_per_cup
total_revenue = cups_of_coffee_per_day * selling_price_per_cup
profit = total_revenue - total_cost
result = profit
return resul... |
On the first day of the month, Tom has 15 dollars. Every week, he increases his money by 25 percent. If James ends up with 123.75 dollars, how much more money does James have than Tom? | def solve() -> int:
tom_money = 15
weekly_increase = 0.25
james_money = 123.75
weeks = (james_money - tom_money) / (tom_money * weekly_increase)
james_total_money = james_money + (tom_money * weekly_increase * weeks)
difference = james_total_money - tom_money
result = dif... |
Student: A box contains 24 red pens, 16 blue pens, and 12 black pens. What is the ratio of red pens to the total number of pens? | def solve() -> int:
red = 24
blue = 16
black = 12
total = red + blue + black
from fractions import Fraction
ratio = Fraction(red, total)
result = ratio
return result
|
Mark owns a pet store with 19 cockatoos and 22 mice. He feeds each cockatoo with 0.75 kg of food per day while the mice eat 20g of food per day. If food costs $2 per kg, how much money does Mark need to spend in a year to feed all his pets? | def solve() -> int:
amount_of_food_for_cockatoos = 19 * 0.75
amount_of_food_for_mice = 22 * 20
amount_of_food = (amount_of_food_for_cockatoos + (amount_of_food_for_mice / 1000))
cost_in_kg = amount_of_food * 2
result = cost_in_kg * 365
return result
|
Tom wants to vacuum a carpet that's 120 square meters. For the first 20 minutes, he can vacuum at a rate of 9 square meters per minute. For the next 30 minutes, he vacuums at half of the initial rate. After that, he vacuums the carpet at a rate of 3 square meters per minute. How long will it take him to vacuum the enti... | def solve() -> int:
carpet_area = 120
initial_rate = 9
half_rate = initial_rate / 2
final_rate = 3
time_first_20_minutes = 20
time_next_30_minutes = 30
area_first_20_minutes = initial_rate * time_first_20_minutes
area_next_30_minutes = half_rate * time_next_30_minutes
area_... |
Alice bought a car for $20,000 and agreed to pay it off in equal monthly installments over a period of 48 months. How much should Alice pay each month to fulfill the payments? | def solve() -> int:
principal = 20000
time_period = 48
installment = principal/time_period
result = installment
return result
|
In the Nets Team, each player made rebounds. Harden made 12 rebounds, Irving made 3 less than Harden, Durant made twice as many as Irving, Harris made 5 more than Durant, and Green made a fifth of the rebounds as Harris. How many rebounds did the Nets make in total? | def solve() -> int:
harden = 12
irving = harden - 3
durant = irving * 2
harris = durant + 5
green = harris / 5
total = harden + irving + durant + harris + green
result = total
return result
|
Mark is a mechanic at a repair shop. He needs to fix 35 cars in one day. He has already fixed 9 of them, and a tow truck brings in 8 more cars to be repaired. If his apprentice offers to help him and fix one-third of the remaining cars, how many cars will Mark and his apprentice each need to fix? | def solve() -> int:
cars_to_fix = 35
cars_fixed_by_mark = 9
cars_brought_by_tow_truck = 8
remaining_cars = cars_to_fix - cars_fixed_by_mark - cars_brought_by_tow_truck
cars_fixed_by_apprentice = remaining_cars / 3
cars_fixed_by_mark = remaining_cars - cars_fixed_by_apprentice
resul... |
Tom has saved $800 for his vacation. If he wants to save $1600, how much money does he still need to save? | def solve() -> int:
money_left_to_save = 1600 - 800
result = money_left_to_save
return result
|
A shopkeeper purchased 50 oranges for $250. At what price per dozen should he sell his oranges so as to earn 20% profit? | def solve() -> int:
orange_price = 250/50
price_for_1_dozen = 1.2*orange_price*12
result = price_for_1_dozen
return result
|
ome possible new questions and programs are: Lily runs a lemonade stand on weekends. She sells each cup for 25 cents and spends 10 cents on lemon, sugar, and cups for each cup. She sold 32 cups on Saturday and 28 cups on Sunday. She also had to pay a 5 dollar fee to rent the stand for the weekend. How much profit did s... | def solve() -> int:
revenue = (32 + 28) * 0.25
cost = (32 + 28) * 0.10 + 5
profit = revenue - cost
result = profit
return result
|
A teacher graded 80 papers in 2 hours. At this rate, how many hours will it take the teacher to grade 200 papers? | def solve() -> int:
papers_per_hour = 80 // 2
papers = 200
hours = papers // papers_per_hour
result = hours
return result
|
Joe purchased a new gaming console for $400. He also bought an online membership plan that costs $60, a controller that costs 10% of the cost of the console, and a headset that costs one-third of the cost of the controller. How much money will Joe end up spending on his console in the first year? | def solve() -> int:
console_cost = 400
membership_cost = 60
controller_cost = console_cost * 0.1
headset_cost = controller_cost * (1/3)
total_cost = console_cost + membership_cost + controller_cost + headset_cost
result = total_cost
return result
|
After two days of Math classes, the students collected 26 pencils and 32 erasers. If there were 18 students in the class, how many pencils and erasers did each student collect on average? | def solve() -> int:
pencils = 26
erasers = 32
students = 18
pencils_each = pencils // students
erasers_each = erasers // students
result = (pencils_each, erasers_each)
return result
|
Rita sells handmade keychains for $2.00 each. She makes 8 keychains in 1 hour. If she has 7 hours to make keychains, how much can she expect to earn? | def solve() -> int:
time_to_make_keychains = 7
sets_of_keychains = time_to_make_keychains
total_keychains = sets_of_keychains * 8
money_earned = total_keychains * 2.00
result = money_earned
return result
|
Olivia has 27 roses in her garden. She plants 9 more roses. Her neighbor Ethan, who has 40% as many total roses as Olivia, stops by to admire the flowers. How many roses do Olivia and Ethan have together? | def solve() -> int:
olivia_roses = 27
ethan_roses = olivia_roses * 0.4
total_roses = olivia_roses + ethan_roses
result = total_roses
return result
|
A candy store sells 3 types of candies: chocolate, gummy, and hard. Each chocolate candy weighs 10 grams and costs $0.2. Each gummy candy weighs 5 grams and costs $0.1. Each hard candy weighs 2 grams and costs $0.05. A customer bought 20 chocolate candies, 40 gummy candies, and 60 hard candies. How much did the custome... | def solve() -> int:
weight_chocolate = 20 * 10
weight_gummy = 40 * 5
weight_hard = 60 * 2
cost_chocolate = 20 * 0.2
cost_gummy = 40 * 0.1
cost_hard = 60 * 0.05
total_weight = weight_chocolate + weight_gummy + weight_hard
total_cost = cost_chocolate + cost_gummy + cost_hard
result = t... |
Carlos is sewing a quilt. He uses 14 pieces of fabric and four times as many buttons as pieces of fabric. Later, he takes away 32 buttons and triple the number of pieces of fabric. How many pieces of fabric are left in the quilt? | def solve() -> int:
pieces_of_fabric = 14
buttons = 4 * pieces_of_fabric
buttons -= 32
pieces_of_fabric *= 3
pieces_of_fabric_left = pieces_of_fabric
result = pieces_of_fabric_left
return result
|
Student: An office building has 22 floors and each floor has an average of 12 offices. If each office has an average of 3 workers, how many workers are in the building? | def solve() -> int:
num_floors = 22
avg_offices_per_floor = 12
avg_workers_per_office = 3
total_offices = num_floors * avg_offices_per_floor
total_workers = total_offices * avg_workers_per_office
result = total_workers
return result
|
If one dozen eggs is equal to 12 eggs, then how many dozen eggs is equal to 280 eggs? | def solve() -> int:
eggs = 280
per_dozen = 12
total_dozen = eggs/per_dozen
result = total_dozen
return result
|
John buys a rare stamp for $50, which then quadruples in value. What would be his profit if he sells it? | def solve() -> int:
stamp_price = 50
value_after_increase = stamp_price * 4
profit = value_after_increase - stamp_price
result = profit
return result
|
Olivia is creating a rope to use as decor in her room. She has one 20-foot rope, three 3-foot ropes, and two 8-foot ropes. Every knot she ties decreases the overall length by 1 foot. What is the final length of the rope when she has tied them all together? | def solve() -> int:
twenty_foot_rope = 20
three_foot_rope = 3
eight_foot_rope = 8
total_length = twenty_foot_rope + (three_foot_rope * 3) + (eight_foot_rope * 2)
final_length = total_length - (1 * 6)
result = final_length
return result
|
Chloe and Liam each had a coupon for a pizza place. Chloe's coupon gave her a 25% discount and Liam's coupon gave him a 15% discount. They both ordered a pizza that cost $12. How much more did Liam pay than Chloe? | def solve() -> int:
pizza_cost = 12
chloe_price = pizza_cost * 0.75
liam_price = pizza_cost * 0.85
difference = liam_price - chloe_price
result = difference
return result
|
Student: John has 21 marbles. He has 14 fewer blue marbles than red marbles. He has 3 more green marbles than blue marbles. How many red marbles does John have? | def solve() -> int:
num_marbles = 21
num_blue_marbles = num_marbles - 14
num_green_marbles = num_blue_marbles + 3
num_red_marbles = num_marbles - num_blue_marbles - num_green_marbles
result = num_red_marbles
return result
|
Joel went for a 27 km walk. After 15 minutes of the walk, he had already walked 3 km. What was his average speed in km/h? | def solve() -> int:
average_speed = (27 - 3)/(27/15)
result = average_speed
return result
|
A water tank is 2/3 full. It contains 200 liters of water. What is the capacity of the tank? | def solve() -> int:
capacity = 200 / (2/3)
result = f'{capacity} liters'
result = capacity
return result
|
25% of students in a class read books for pleasure. Out of those who read, 60% prefer fiction books. If there are 30 students in the class, how many prefer fiction books? | def solve() -> int:
num_students = 30
read_for_pleasure = num_students * 0.25
prefer_fiction = read_for_pleasure * 0.60
result = prefer_fiction
return result
|
A group of friends goes out to eat and the bill is $125. If they want to split the bill equally, how much does each person owe if there are 6 people in the group? | def solve() -> int:
bill_total = 125
num_people = 6
per_person = bill_total / num_people
result = per_person
return result
|
Jamie had a certain amount of money. She gave an equal share to each of her six siblings, but kept $10 for herself. If Jamie gave her siblings $30 each, how much money did she start with? | def solve() -> int:
x = 6 * 30 + 10
result = x
return result
|
A farmer has 20 hectares of farmland. If in one hectare of land there are 10000 square meters, how many square meters is the farmer's farmland? | def solve() -> int:
num_hectares = 20
num_sqm_hectare = 10000
total_sqm = num_hectares * num_sqm_hectare
result = total_sqm
return result
|
Lily is counting coins in her piggy bank. She counts 15 quarters, 30 dimes, and some nickels. If the quarters are 20% of the total coins, how many nickels are there? | def solve() -> int:
quarters = 15
dimes = 30
total_coins = quarters / 0.2
nickels = total_coins - quarters - dimes
result = nickels
return result
|
If the ratio of dogs to cats in the park is 3:2 and there are 30 animals in total, how many cats are in the park? | def solve() -> int:
total_animals = 30
dog_ratio = 3
cat_ratio = 2
cat_total = (cat_ratio / (dog_ratio + cat_ratio)) * total_animals
result = cat_total
return result
|
A river contains 95% of fresh water and the rest with salt water. If the river has 450 tonnes of water, how much salt water does the river contain? | def solve() -> int:
total = 450
percent_salt = 0.05
salt = total * percent_salt
result = salt
return result
|
A soccer coach ordered 15 soccer balls for $25 each and 20 cones for $5 each. How much did the coach have to pay? | def solve() -> int:
total_ball_cost = 15*25
total_cones_cost = 20*5
total_spent = total_ball_cost + total_cones_cost
result = total_spent
return result
|
Omar sells ice cream cones for $1.50 each and sundaes for $3 each. He started the day with 120 cones and 80 scoops of ice cream. He used one scoop of ice cream for each cone and two scoops for each sundae. He sold 75 cones and 25 sundaes. He also gave away 5 cones and 2 sundaes as samples. How much ice cream did he hav... | def solve() -> int:
scoops_cones = 75 + 5
scoops_sundaes = (25 + 2) * 2
scoops_used = scoops_cones + scoops_sundaes
scoops_left = 80 - scoops_used
result = scoops_left
return result
|
Abby has 12 more flowers than Ben. Ben has half as many flowers as Chloe. If Chloe has 20 flowers, how many does Abby have? | def solve() -> int:
chloe = 20
ben = chloe / 2
abby = ben + 12
result = abby
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.