question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Peter has a monthly salary of $5,000. If he spends 30% of his salary on rent and 20% of the remaining on food and other expenses, how much money does he have left for other savings? | def solve() -> int:
rent = 5000 * 0.3
remaining = 5000 - rent
expenses = remaining * 0.2
saving = remaining - expenses
result = saving
return result
|
-Maria had 30 books. She bought 12 more books and then gave away a quarter of her total books to her friend. How many books does Maria have left? | def solve() -> int:
total_books = 30 + 12
books_given = total_books / 4
books_left = total_books - books_given
result = books_left
return result
|
Billie Eilish uploads 11 different music videos on Vevo. Then she releases 1 album that has 15 songs and 2 EPs that each have 6 songs. How many songs has Billie Eilish released in total? | def solve() -> int:
vevo_videos = 11
album_songs = 15
ep_songs = 6
total_songs = vevo_videos + album_songs + (2 * ep_songs)
result = total_songs
return result
|
A car dealership decides to replace all of their vehicles. They have 3 locations. Each location has 50 cars, 25 trucks, and 10 SUVs. The cars cost $25,000 each. The trucks cost 50% more than that. The SUVs cost 25% less than that. How much does it cost to replace everything? | def solve() -> int:
cars_cost = 25000
trucks_cost = cars_cost * 1.5
suvs_cost = cars_cost * 0.75
total_cars = 3 * 50
total_trucks = 3 * 25
total_suvs = 3 * 10
total_cost = (total_cars * cars_cost) + (total_trucks * trucks_cost) + (total_suvs * suvs_cost)
result = total_cos... |
There are a total of 50 apples. Barbara takes 3/4 of the apples, how many does she get? | def solve() -> int:
totalApples = 50
barbaraFraction = 3/4
barbaraApples = totalApples * barbaraFraction
result = barbaraApples
return result
|
Mark is picking strawberries from his garden. On the first day, he picked 20 strawberries. In the next two days, he picked 30 strawberries each day. On the fourth day, he picked 40 strawberries, but he gave 8 to his neighbor. How many strawberries does Mark have now? | def solve() -> int:
day1 = 20
day2 = 30
day3 = 30
day4 = 40
given_away = 8
total_picked = day1 + day2 + day3 + day4 - given_away
result = total_picked
return result
|
During her morning routine, Jane jumps rope for 500 times, runs for 1/2 as many times as she jumped rope, and walks for 8 times the number of times she jogged. How many total times did Jane exercise during her morning routine? | def solve() -> int:
jumped_rope = 500
ran = jumped_rope / 2
jogged = ran
walked = 8 * jogged
total_exercise = jumped_rope + ran + jogged + walked
result = total_exercise
return result
|
Andy has a pack of 60 balloons. He gives 3 to his friend and then takes 4 to a party. Once at the party, he gives away 2 at a time and does this until he has given all of his balloons away. How many balloons does he have left when he gets home? | def solve() -> int:
balloons = 60
balloons -= 3
balloons -= 4
balloons -= (balloons//2)*2
result = balloons
return result
|
Madison has 100 stickers to divide equally between her five friends. How many stickers will each person receive? | def solve() -> int:
stickers = 100
friends = 5
stickers_per_person = stickers / friends
result = stickers_per_person
return result
|
Jack has a jar of candy. He counted that there are 36 red candies and 24 blue candies. He then ate 12 red candies and 6 blue candies. He then added 18 green candies to the jar. How many candies are in the jar now? | def solve() -> int:
red = 36
blue = 24
red_eat = 12
blue_eat = 6
green = 18
red = red - red_eat
blue = blue - blue_eat
total = red + blue + green
result = total
return result
|
Student: There are 9 flowers in a vase. On Monday, 6 more flowers are added. On Tuesday, 3 flowers wilt and have to be removed. How many flowers are left in the vase? | def solve() -> int:
flowers = 9
flowers = flowers + 6
flowers = flowers - 3
result = flowers
return result
|
A store is having a sale where all items are 20% off the original price. If a shirt was originally $25, how much would it cost during the sale? | def solve() -> int:
original_price = 25
discount = 0.2
discounted_price = original_price * (1 - discount)
result = discounted_price
return result
|
Student: Leo earns $15 per hour working at a store. He works 5 hours a day from Monday to Friday, and 8 hours a day on Saturday and Sunday. How much does he earn in a week, assuming he does not get any overtime pay or bonuses? | def solve() -> int:
hourly_rate = 15
weekday_hours = 5
weekend_hours = 8
days_in_week = 7
weekday_earnings = hourly_rate * weekday_hours * 5
weekend_earnings = hourly_rate * weekend_hours * 2
weekly_earnings = weekday_earnings + weekend_earnings
result = weekly_earnings
return r... |
Student: A rectangular room is 8m by 12m. It is to be extended by 3m at one end and 4m at the other end. What would be the area of the new room? | def solve() -> int:
length = 8
width = 12
extension_1 = 3
extension_2 = 4
new_length = length + extension_1 + extension_2
new_width = width
area = new_length * new_width
result = area
return result
|
Student: Mr. Lee has 600 oranges and wants to distribute them evenly among 12 bags. How many oranges should be put into each bag? | def solve() -> int:
oranges = 600
bags = 12
oranges_per_bag = oranges // bags
remaining_oranges = oranges % bags
result = oranges_per_bag
return result
|
A discus thrower competes in three different meets in a month. At the first meet he threw the discus 43 meters. At the second meet he threw it 3 meters farther. At the last meet he threw it 2 meters farther than the second meet. How far did he throw the discus at the last meet? | def solve() -> int:
first_meet = 43
second_meet = first_meet + 3
last_meet = second_meet + 2
result = 48
return result
|
A company has a total of 500 employees. If the company's HR reports that 25% of the employees are on vacation and 10% are on sick leave, how many employees are currently at work? | def solve() -> int:
total_employees = 500
vacation_percentage = 0.25
sick_leave_percentage = 0.1
working_percentage = 1 - vacation_percentage - sick_leave_percentage
working_employees = round(working_percentage * total_employees)
result = f'There are {working_employees} employees currently at wo... |
Student: Tony has a gallon of water that is 1/2 full. Klay has a gallon of water that is 3/4 full. Calculate the total amount of gallons of water they have together. | def solve() -> int:
tony_gallon = 1
tony_amount = 0.5
klay_gallon = 1
klay_amount = 0.75
total_gallon = tony_gallon + klay_gallon
total_amount = tony_amount + klay_amount
result = total_gallon + total_amount
return result
|
In a bakery, there are 800 pastries. If the number of pastries doubles every day, how many days ago were there less than 60 pastries in the bakery? Samantha wants to go to a spa and get a massage, a pedicure, and a facial. She called 3 different spas to compare prices: Tranquility Spa, Refresh Spa, and Serenity Spa. Tr... | def solve() -> int:
pastries = 800
days = 0
while pastries >= 60:
pastries = pastries / 2
days += 1
cheapest = min(60+30+40, 75+25+35, 50+35+45)
if cheapest == 60+30+40:
result = "Tranquility Spa"
elif cheapest == 75+25+35:
result = "Refresh Spa"
else:
... |
David had a bag of candies that contained 60 pieces. He decided to share them with his friends. He gave a third of the candies to Alice, a quarter of the candies to Bob, and the rest to Charlie. How many candies did each person get? | def solve() -> int:
alice = 60 / 3
bob = 60 / 4
charlie = 60 - alice - bob
result = (alice, bob, charlie)
return result
|
A cake recipe calls for 2 cups of sugar to make 10 cupcakes. How much sugar is needed to make 30 cupcakes? | def solve() -> int:
sugar = (2/10)*30
result = sugar
return result
|
Aaron went fishing and he caught 35 fish on Monday, 24 fish on Tuesday, 32 fish on Wednesday, and 15 fish on Thursday. How many fish did Aaron catch in total? | def solve() -> int:
total_fish = 0
fish_monday = 35
fish_tuesday = 24
fish_wednesday = 32
fish_thursday = 15
total_fish += fish_monday
total_fish += fish_tuesday
total_fish += fish_wednesday
total_fish += fish_thursday
result = total_fish
return result
|
Rachel is counting the number of books she has on her bookshelf. She has 50 mystery books, 25 romance books, and some science fiction books. If the romance books make up 20% of her total books, how many science fiction books does Rachel have? | def solve() -> int:
mystery_books = 50
romance_books = 25
total_books = mystery_books + romance_books
romance_percentage = 20
romance_percentage_decimal = romance_percentage / 100
romance_books_percentage = romance_books / total_books
science_fiction_books_percentage = romance_perc... |
A recipe for chocolate chip cookies requires 2 cups of flour, 1 cup of sugar, 1/2 cup of butter, and 1/4 cup of chocolate chips for every 12 cookies. If you want to make 36 cookies, how much butter do you need? | def solve() -> int:
ratio = 1/2 / 12
butter = ratio * 36
result = butter * 227
return result
|
Mason can cut 8 pieces of wood with 1 saw blade. If each blade costs $12.00, and he cuts wood once a week for a year, how much does he spend on saw blades? John planted 70 apple trees and 40 orange trees in his orchard. A total of 8 trees were hit by lightning. 2 more apple trees were hit than orange trees. Two weeks l... | def solve() -> int:
saw_blade_cost = 12.00
number_of_blades = 1
number_of_pieces = 8
number_of_weeks = 52
total_cost = saw_blade_cost * number_of_blades * number_of_weeks
result = total_cost
total_apple_trees = 70
total_orange_trees = 40
trees_hit_by_lightning = 8
... |
Leah had 5 bananas and each banana costs 50 cents. How much money did Leah spend to buy the bananas? | def solve() -> int:
num_bananas = 5
cost_banana = 0.5
total_cost = num_bananas * cost_banana
result = total_cost
return result
|
Ana and her friends are making bracelets for a fundraiser. They need 64 beads for each bracelet, and plan to make 25 bracelets in total. If they have 2000 beads, how many more beads do they need? | def solve() -> int:
beads_per_bracelet = 64
total_bracelets = 25
total_beads = 2000
beads_needed = beads_per_bracelet * total_bracelets
beads_remaining = beads_needed - total_beads
result = beads_remaining
return result
|
Student: At a party, the ratio of males to females is 4 to 5. Out of the males, 1/3 are wearing glasses. Out of the females, 1/4 are wearing glasses. What is the total number of people wearing glasses? | def solve() -> int:
males = 4
females = 5
male_glasses = 1/3
female_glasses = 1/4
total_glasses = males * male_glasses + females * female_glasses
result = total_glasses
return result
|
Student: A football team played 12 games this season. They won 7 games, tied 2 games, and lost the rest. What is their winning percentage? | def solve() -> int:
games_played = 12
games_won = 7
games_tied = 2
winning_percentage = (games_won + 0.5 * games_tied) / games_played
result = winning_percentage
return result
|
There is a group of 20 people. Some men and the same number of women leave. If there are now 12 men and 6 women left in the group, how many men and women were in the group originally? | def solve() -> int:
men_left = 12
women_left = 6
total_people_left = men_left + women_left
total_people = 20
men_original = (total_people - total_people_left) / 2
women_original = (total_people - total_people_left) / 2
result = f'{men_original} men and {women_original} wo... |
A textbook has 200 pages. Kevin needs to read 40% of the textbook by Wednesday. How many pages does he need to read? | def solve() -> int:
total_pages = 200
percent_to_read = 40
pages_to_read = total_pages * percent_to_read / 100
result = pages_to_read
return result
|
Lily spent 15 minutes reading a book. She read 20 pages in the first 10 minutes and 15 pages in the last 5 minutes. What was her average reading speed in pages per minute? | def solve() -> int:
total_pages = 20 + 15
average_speed = total_pages / 15
result = average_speed
return result
|
A company sells bottles of water for $2.50 each. If they need to sell 200 bottles to make a profit of $200, what is the cost to produce a bottle of water? | def solve() -> int:
selling_price = 2.5
num_bottles = 200
profit_amount = 200
total_revenue = selling_price * num_bottles
total_cost = total_revenue - profit_amount
cost_per_bottle = total_cost / num_bottles
result = cost_per_bottle
return result
|
A factory can produce 1000 units of product A in 5 hours. But when they work for an additional hour, they can produce an additional 200 units. How much time would it take for the factory to produce 5000 units? | def solve() -> int:
product_per_hour = 1000/5
additional_product = 200/1
additional_time = 1
time_to_produce_5000 = (5000 - 1000)/product_per_hour + additional_time
result = time_to_produce_5000
return result
|
Student: A triangle has a base of 12 and a height of 8. What is the area of the triangle? | def solve() -> int:
base = 12
height = 8
area = 0.5 * base * height
result = area
return result
|
Lily, Michael, Sarah, and David play basketball together every week. At the end of the season, Lily scored 10 more points than Michael, while Sarah scored 4 points fewer than Michael. David scored 6 points more than Sarah did. If David scored a total of 28 points, how many more points did Lily score than did David? | def solve() -> int:
michael_score = 0
lily_score = 0
sarah_score = 0
david_score = 28
sarah_score = michael_score - 4
lily_score = michael_score + 10
david_score = sarah_score + 6
difference = lily_score - david_score
result = difference
return result
|
Student: An office has 6 computers, 8 printers, and 4 scanners. The IT department plans on adding 4 computers, 6 printers, and 2 scanners. How many equipment will the office have? | def solve() -> int:
computers = 6
printers = 8
scanners = 4
computers += 4
printers += 6
scanners += 2
result = computers + printers + scanners
return result
|
Student: A printer can print a 20-page document in 5 minutes. How long will it take to print a 40-page document? | def solve() -> int:
pages = 40
time_for_20_pages = 5
time_for_40_pages = pages / 20 * time_for_20_pages
result = time_for_40_pages
return result
|
Tom and Linda are baking. Tom can bake 20 cookies in an hour, and Linda can bake 15 cookies in an hour. If they each bake for 1 and a half hours, how many cookies have they baked in total? | def solve() -> int:
tom_cookies = 20 * 1.5
linda_cookies = 15 * 1.5
total_cookies = tom_cookies + linda_cookies
result = total_cookies
return result
|
2. Peter had $540 saved up to go to his favorite movie. He was surprised when he got to the theater and the cost of tickets had risen to $22. He has enough money for the tickets and popcorn but not for drinks. How many tickets can Peter buy so he has enough money left over for 2 large drinks? | def solve() -> int:
t = 22
d = 10*2
cost = t*2 + d
remain = 540 - cost
n = remain/t
result = int(n)
return result
|
A car travels a distance of 400 miles in 6 hours. If the driver makes a 30 minute rest stop, what is the average speed of the car in miles per hour? | def solve() -> int:
time_without_rest_stop = 6 - 0.5
average_speed = 400 / time_without_rest_stop
result = average_speed
return result
|
Emma has 80 baseball cards and trades 3 of her prized ones for 18 of Michael's baseball cards. Michael starts with 76 cards and trades another 7 of his cards for 12 of Emma's cards. How many baseball cards were traded between both Emma and Michael? | def solve() -> int:
emma_cards = 80
michael_cards = 76
emma_trade = 3
michael_trade = 7
emma_receive = 18
michael_receive = 12
total_traded = emma_trade + michael_trade + emma_receive + michael_receive
result = total_traded
return result
|
Student: A bike travels a distance of 40 miles at an average speed of 20 miles per hour. How long did the journey take in minutes? | def solve() -> int:
distance = 40
speed = 20
time = distance / speed
minutes = time * 60
result = minutes
return result
|
A square playground has a side length of 12 meters. The city council wants to install a fence around the playground with a gate that is 1.5 meters wide. How many meters of fence are needed, excluding the gate? | def solve() -> int:
fence_length = 12 - 1.5
total_fence_length = fence_length * 4
result = round(total_fence_length, 2)
return result
|
Rachel has 48 cupcakes. Two thirds of them are frosted and the rest are not. Of the unfrosted cupcakes, a half have chocolate chips in them and the rest do not. How many unfrosted cupcakes have chocolate chips in them? Lila jogs from her house to the park. Then she continues to jog, at the same pace, 30 kilometers to h... | def solve() -> int:
cupcakes = 48
frosted_cupcakes = cupcakes * (2/3)
unfrosted_cupcakes = cupcakes - frosted_cupcakes
cupcakes_with_chocolate_chips = unfrosted_cupcakes * (1/2)
distance_to_park = 30
distance_to_friend = distance_to_park * 3
total_distance = distance_to_park + distance_... |
A car travels 120 miles in 2 hours at a constant speed. How far will it travel in 5 hours at the same speed? | def solve() -> int:
speed = 120/2
distance = 5 * speed
result = distance
return result
|
A triangle has a base of 12 and a height of 5. What is the area of the triangle? | def solve() -> int:
base = 12
height = 5
area = 0.5 * base * height
result = area
return result
|
A train covers a distance of 500 km in 5 hours. If the speed of the train is constant, what is its average speed in km/hour? | def solve() -> int:
distance = 500
time = 5
average_speed = distance/time
result = average_speed
return result
|
Student: Olivia has 5 red marbles and 3 blue marbles. If she adds 2 more red marbles and 1 more blue marble, how many marbles does she have in total? | def solve() -> int:
red_marbles = 5
blue_marbles = 3
red_marbles += 2
blue_marbles += 1
total_marbles = red_marbles + blue_marbles
result = total_marbles
return result
|
Student: Andy had 45 red apples and 25 green apples. He gave away 3/7 of the red apples and 1/4 of green apples. How many apples did Andy end up with? | def solve() -> int:
red_apples = 45
green_apples = 25
red_apples_given = 3/7 * red_apples
green_apples_given = 1/4 * green_apples
red_apples_left = red_apples - red_apples_given
green_apples_left = green_apples - green_apples_given
total_apples_left = red_apples_left + green_apples_left
... |
Student: Mary went to a candy store and found a deal where she can buy one candy for $0.75 and get two more for free. If she bought 10 candies, how much money did she pay in total? | def solve() -> int:
price = 0.75
candies = 10
paid_candies = candies // 3
cost = price * paid_candies
result = cost
return result
|
ome possible questions are: In a bakery, Anna baked three times as many loaves of bread as Bob did on Monday. On Tuesday, Anna baked 15 more loaves than Bob's number. If Bob baked 24 loaves on Monday and 30 less loaves on Tuesday than on Monday, how many loaves of bread did they bake together in the two days? | def solve() -> int:
Bob_Monday = 24
Bob_Tuesday = Bob_Monday - 30
Anna_Monday = 3 * Bob_Monday
Anna_Tuesday = Bob_Tuesday + 15
Bob_total = Bob_Monday + Bob_Tuesday
Anna_total = Anna_Monday + Anna_Tuesday
total_loaves = Bob_total + Anna_total
result = total_loaves
... |
If 70% of the cars in a parking lot are sedans and there are 210 trucks, how many sedans are in the parking lot? | def solve() -> int:
cars_in_parking_lot = 210 / (1 - 0.7)
sedans_in_parking_lot = cars_in_parking_lot * 0.7
result = sedans_in_parking_lot
return result
|
A sheet of paper has a width of 8 inches and a total area of 96 square inches. How many sheets of the same size would reach a length of 200 inches? | def solve() -> int:
width = 8
area = 96
length = 200
length_of_sheet = area / width
num_sheets = length / length_of_sheet
result = num_sheets
return result
|
During a science experiment, Alex poured 100 ml of water into a beaker and then adds 5 ml of solution every day. After 6 days, what percentage of the beaker is filled with solution? | def solve() -> int:
beaker_volume = 100
solution_added_per_day = 5
days = 6
total_solution_added = solution_added_per_day * days
total_volume = beaker_volume + total_solution_added
percentage_filled = (total_solution_added / total_volume) * 100
result = percentage_... |
Two friends split the cost of a laptop, Chandra pays $5 for each $40 spent and Galen pays the rest. If the laptop costs $400, calculate the total money Chandra paid. | def solve() -> int:
discount = 0
if 400/40 > 0:
discount += 5*(400//40)
result = discount
return result
|
In a basketball game, a player made 44 out of 63 shots taken. What percentage of shots did the player make? | def solve() -> int:
percentage = (44/63) * 100
result = f'{percentage}%'
result = percentage
return result
|
Lena has 48 blocks and William has 24 blocks. If Lena gives William one fifth of her blocks, how many more blocks does Lena have than William? | def solve() -> int:
blockLena = 48
blockWilliam = 24
blockLena = blockLena - (blockLena/5)
result = blockLena - blockWilliam
return result
|
John ran 4 kilometers in 20 minutes. If he continues to run at the same speed, how long would it take him to run 12 kilometers? | def solve() -> int:
distance_run1 = 4
time_run1 = 20
speed_run1 = distance_run1 / time_run1
distance_run2 = 12
time_run2 = distance_run2 / speed_run1
result = time_run2
return result
|
Student: A train travels 600 km in 5 hours. If it continues at the same speed, how far will it travel in 8 hours? | def solve() -> int:
distance = 600
time = 5
speed = distance / time
new_time = 8
new_distance = speed * new_time
result = new_distance
return result
|
Sam has 15 coins in his pocket, consisting of quarters and dimes. The total value of the coins is $2.85. How many quarters and how many dimes does he have? | def solve() -> int:
from sympy import Symbol, solve
q = Symbol('q')
d = Symbol('d')
solution = solve([q + d - 15, 0.25 * q + 0.1 * d - 2.85])
result = (solution[q], solution[d])
return result
|
John can drive 240 miles in 4 hours. Mike can drive the same distance in 3 hours. How long will it take them to drive the distance if they drive together? | def solve() -> int:
speed_john = 240/4
speed_mike = 240/3
speed_together = speed_john + speed_mike
time_together = 240/speed_together
result = time_together
return result
|
Student: A recipe calls for 3/4 cup of sugar. If you want to triple the recipe, how much sugar do you need? | def solve() -> int:
original_amount = 3/4
multiplier = 3
result = original_amount * multiplier
return result
|
Rachel is currently 60 years old. Her daughter is currently 28 years old and her mother is currently 26 years older than her daughter. If Rachel's mother is younger than her father by 1/3 of Rachel's current age, how old was Rachel's mother when she gave birth to Rachel's daughter? | def solve() -> int:
rachel_age = 60
daughter_age = 28
mother_age = daughter_age + 26
father_age = rachel_age + (1/3) * rachel_age
mother_age_when_gave_birth = daughter_age - (rachel_age - mother_age)
result = mother_age_when_gave_birth
return result
|
A party planner needs to buy decorations for a party. If she needs 15 balloons, and each balloon costs $0.50, how much will she spend on balloons? | def solve() -> int:
num_balloons = 15
balloon_price = 0.50
total_cost = num_balloons * balloon_price
result = total_cost
return result
|
Each car engine produces 200 horsepower. If Sarah drives her car for 3 hours a day from Monday to Friday, how many car engines would she need to produce the same amount of power as a wind turbine generating 10 kW over that period of time? | def solve() -> int:
horsepower_per_engine = 200
hours_per_day = 3
days_per_week = 5
total_hours = hours_per_day * days_per_week
power_generated_by_turbine = 10000
total_power_generated_by_car_engines = horsepower_per_engine * total_hours * days_per_week
engines_needed = power_generated... |
Student: Emma and Olivia are sisters who love to read. Emma read 180 books in a year, of which 2/9 were non-fiction. Olivia read 150 books in a year, of which 1/5 were non-fiction. How many more non-fiction books did Olivia read than Emma? | def solve() -> int:
emma_books = 180
emma_non_fiction = 2/9
olivia_books = 150
olivia_non_fiction = 1/5
emma_non_fiction_books = emma_books * emma_non_fiction
olivia_non_fiction_books = olivia_books * olivia_non_fiction
result = olivia_non_fiction_books - emma_non_fiction_books
return r... |
A car can travel 400 miles on a full tank of gas. If the gas tank can hold 20 gallons, how many miles per gallon can the car travel? | def solve() -> int:
miles_per_tank = 400
gallons_per_tank = 20
miles_per_gallon = miles_per_tank / gallons_per_tank
result = miles_per_gallon
return result
|
A store gives a 10% discount to customers who spend over $50. If a customer spent $75 before the discount, how much did they save with the discount? | def solve() -> int:
original_price = 75
discount_percent = 10
discount_threshold = 50
if original_price > discount_threshold:
discount = (original_price * discount_percent) / 100
else:
discount = 0
result = discount
return result
|
Student: Kate paid $12 for a pizza, $6 for a salad, and $4 for a soda. She also gave a 15% tip to the delivery person. How much money did Kate spend? | def solve() -> int:
pizza = 12
salad = 6
soda = 4
tip = 0.15
total_cost = pizza + salad + soda
tip_amount = total_cost * tip
result = total_cost + tip_amount
return result
|
If the book has 250 pages and Bill read 7 pages every day, how many pages will Bill have read on the 13th day of April? | def solve() -> int:
pagesPerDay = 7
totalDays = 13
pagesReadTotal = pagesPerDay * totalDays
result = pagesReadTotal
return result
|
A school sells raffle tickets for $5, popcorn for $2, and soda for $1.5. If they sell 500 raffle tickets, 300 popcorn bags, and 400 soda cans, how much money do they make in total? | def solve() -> int:
raffle_price = 5
popcorn_price = 2
soda_price = 1.5
raffle_sold = 500
popcorn_sold = 300
soda_sold = 400
total_money = raffle_price * raffle_sold + popcorn_price * popcorn_sold + soda_price * soda_sold
result = total_money
return result
|
Student: A container with 220 liters of liquid is heated to 40% of its original volume. How much is lost after heating? | def solve() -> int:
original_volume = 220
percent_heated = 40
heated_volume = original_volume * (percent_heated/100)
lost_volume = original_volume - heated_volume
result = lost_volume
return result
|
During the bake sale, Karim sold five less than three times as many cookies as did Sara. If Sara sold ten more than half as many cookies as did Omar, and Omar sold 16 cookies, how many cookies did Karim sell? | def solve() -> int:
omar = 16
sara = (omar / 2) + 10
karim = (sara * 3) - 5
result = karim
return result
|
If one bag of flour weighs 5 pounds and one bag of sugar weighs half as much as a bag of flour, how many pounds would 6 bags of flour and 12 bags of sugar weigh in total? | def solve() -> int:
flour_weight = 5
sugar_weight = flour_weight / 2
total_weight = (6 * flour_weight) + (12 * sugar_weight)
result = total_weight
return result
|
``` Susan has 300 jelly beans. She wants to put them into small bags each with 25 jelly beans. How many small bags of jelly beans can she make? | def solve() -> int:
total_jelly_beans = 300
jelly_beans_per_bag = 25
num_bags = int(total_jelly_beans / jelly_beans_per_bag)
result = num_bags
return result
|
There are eight bicycles in a garage. If four more bicycles are added, the number of bicycles in the garage becomes seven times the number of bicycles in the driveway. How many bicycles are in the driveway? | def solve() -> int:
garage_bicycles = 8
added_bicycles = 4
total_bicycles = garage_bicycles + added_bicycles
driveway_bicycles = total_bicycles / 7
result = driveway_bicycles
return result
|
Amanda wants to visit her grandparents. If she takes route R, it will take her 10 hours to get there, but if she takes route S, it will only take her 6 hours. How much time will she save if she takes route S both ways? | def solve() -> int:
route_R = 10
route_S = 6
time_saved = (route_R - route_S) * 2
result = time_saved
return result
|
A recipe calls for 2 cups of sugar to make 12 cookies. How many cups of sugar are needed to make 60 cookies? | def solve() -> int:
cups_of_sugar_per_cookies = 2 / 12
total_cookies = 60
total_cups_of_sugar_needed = cups_of_sugar_per_cookies * total_cookies
result = total_cups_of_sugar_needed
return result
|
Student: Gavin and Abby wanted to get a $175.00 laptop for their cousin for her graduation. Gavin had $20.00 saved up and Abby had $20.00. Gavin then washed 6 cars for his neighbors, charging $8.00 each, while Abby sold 4 crafts on the street for $2.00 each. How much more money will Gavin and Abby need to make in order... | def solve() -> int:
gavin_saved = 20
abby_saved = 20
gavin_earned = 6 * 8
abby_earned = 4 * 2
total_earned = gavin_earned + abby_earned
needed = 175 - (gavin_saved + abby_saved + total_earned)
result = needed
return result
|
Andrew is cleaning his house. He needs 4 paper towels for each room. He has a roll of 12 paper towels. How many rooms can he clean? | def solve() -> int:
paper_towels_per_room = 4
roll_of_paper_towels = 12
rooms_cleaned = roll_of_paper_towels // paper_towels_per_room
result = rooms_cleaned
return result
|
A restaurateur earns $3125 per month for running the restaurant. She spends $600 a month for rent, $425 for ingredients, and $140 on other supplies. How much is left in the restaurateur's pocket after the expenses? | def solve() -> int:
monthly_income = 3125
rent = 600
ingredients = 425
supplies = 140
amount_left = monthly_income - rent - ingredients - supplies
result = amount_left
return result
|
Mike has 10 classes in a week, totaling 24 hours in school altogether. He spends 4 hours doing his math and science homework. If he spends equal amounts of time in each of his remaining classes, how much time does he spend in one class? | def solve() -> int:
total_classes = 10
total_hours = 24
homework_hours = 4
class_hours = total_hours - homework_hours
remaining_classes = total_classes - 2
time_per_class = class_hours / remaining_classes
result = time_per_class
return result
|
Breanna has planted 9 maple trees in her garden. She has planted 20% more trees than the original plan. How many trees did she originally plan to plant in her garden? | def solve() -> int:
original_plan = 9 / 1.2
result = 7.5
return result
|
Student: A car rental costs $50.00 per day with an additional charge of $0.20 per mile. Sarah rented the car for 5 days and drove 300 miles. How much does she need to pay? | def solve() -> int:
rental_cost_per_day = 50.00
additional_charge_per_mile = 0.20
days_rented = 5
miles_driven = 300
total_rental_cost = rental_cost_per_day * days_rented
total_additional_charge = additional_charge_per_mile * miles_driven
total_cost = total_rental_cost + total_additional_cha... |
Tom needs to buy a car which is $25,000. He has saved $7000 already, and his parents would give him an extra $4000. If he could save $400 each month, how many months would it take for him to reach his goal? | def solve() -> int:
total = 25000
saved = 7000
parents = 4000
pocket_money = 400
target = total - saved - parents
month = target / pocket_money
result = int(month)
return result
|
Ethan and his 6 colleagues are going on a business trip to New York. They decide to rent a conference room for 3 days from Monday to Wednesday. The rental rate for weekdays is $200 per day, and the weekend rental rate is $250 per day. If they share the total rental charges equally, how much will each of them have to pa... | def solve() -> int:
weekday_rate = 200
weekend_rate = 250
total_charges = (weekday_rate * 3) + (weekend_rate * 0)
num_people = 7
each_person_pay = total_charges / num_people
result = each_person_pay
return result
|
Sophia wants to sew clothes. Each item takes 9 hours to sew. The jackets take 30% longer than each item. The dresses took four times as much time as the jackets and items combine. How long did everything take? | def solve() -> int:
item_time = 9
jacket_time = item_time * 1.3
total_jacket_time = jacket_time * 1
dress_time = (item_time + jacket_time) * 4
total_time = total_jacket_time + dress_time
result = total_time
return result
|
A toy store sells 1000 balls. Sheila buys 6 for a special game, and gives away 3 to her friends. She then buys 10 more packs of balls, each containing 8 balls. How many balls does Sheila have left? | def solve() -> int:
balls = 1000
special_game = 6
friends = 3
remaining_balls = balls - special_game - friends
packs = 10
balls_per_pack = 8
new_balls = packs * balls_per_pack
total_balls = remaining_balls + new_balls
result = total_balls
return result
|
Dylan and Jack went to the arcade. Dylan played the racing game three times, while Jack played the basketball shooting game five times. If the racing game costs 6 tickets and the basketball shooting game costs 4 tickets, how many tickets did they use in total? | def solve() -> int:
dylan_racing = 6*3
jack_basketball = 4*5
total_tickets = dylan_racing + jack_basketball
result = total_tickets
return result
|
At his sandwich shop, Ben sells ham and cheese sandwiches and turkey and cheese sandwiches. He makes the ham and cheese sandwiches with 8 slices of bread. He makes the turkey and cheese sandwiches with 6 slices of bread. On Thursday, he sold 40 ham and cheese sandwiches and 30 turkey and cheese sandwiches. How many sli... | def solve() -> int:
ham_slices = 40 * 8
turkey_slices = 30 * 6
total_slices = ham_slices + turkey_slices
result = total_slices
return result
|
arah bakes a cake that serves 12 people. The recipe calls for 5 cups of sugar. How many cups of sugar does Sarah need if she bakes 3 cakes? | def solve() -> int:
result = 15
number_of_cakes = 3
cake_servings = 12
sugar_per_cake = 5
total_sugar = number_of_cakes * cake_servings * sugar_per_cake
result = total_sugar
return result
|
Nathan has four snakes. Each snake needs 1 mouse per week. How many mice does he need for a month? | def solve() -> int:
snakes = 4
mice_per_week = 1
weeks_per_month = 4
mice_per_month = snakes * mice_per_week * weeks_per_month
result = mice_per_month
return result
|
There are 60 students in a classroom, the ratio of girls to boys is 3:2. How many girls are in the classroom? | def solve() -> int:
girls = 60 * 3 / 5
result = girls
return result
|
A book has 300 pages. On the first day, you read 20 pages. On the second day, you read twice as many pages as you did on the first day. On the third day, you read half as many pages as you did on the first day. How many pages have you left? | def solve() -> int:
pages = 300
pages -= 20
pages -= 2*20
pages -= 20/2
result = pages
return result
|
Grace and Ava want to read every article in a magazine. The magazine has 200 articles. If they read 2 articles every Tuesday and 1 article every Thursday each week, how many weeks will it take them to read all the articles in the magazine? | def solve() -> int:
articles_in_magazine = 200
articles_read_per_week = 2 + 1
weeks_to_read_all_articles = articles_in_magazine / articles_read_per_week
result = weeks_to_read_all_articles
return result
|
Evan, the tailor, purchases 25 yards of fabric. He then cuts the fabric into equal pieces, with each piece measuring 5 yards. Unfortunately, one piece gets torn during cutting and he has to discard it. How many yards of fabric are left? | def solve() -> int:
fabric_purchased = 25
piece_size = 5
pieces_cut = fabric_purchased // piece_size
pieces_cut -= 1
fabric_left = pieces_cut * piece_size
result = fabric_left
return result
|
Sophie is trying to save for a new bike. She has saved $120 so far. She earns $8 an hour but only works ten hours a week. How long will it take Sophie to earn enough money to afford the $400 bike? | def solve() -> int:
hours_worked_weekly = 10
wages_earned_weekly = 8 * hours_worked_weekly
weeks_needed = (400 - 120) / wages_earned_weekly
result = weeks_needed
return result
|
Student: Sasha had a bag of candy that originally contained 20 pieces of candy. She ate 3 of them. How many pieces of candy does Sasha have left? | def solve() -> int:
candy = 20
ate = 3
left = candy - ate
result = left
return result
|
A cake recipe requires 2 cups of sugar and 3 cups of flour. If Mary wants to make 3 cakes, how many cups of sugar and flour does she need in total? | def solve() -> int:
sugar_per_cake = 2
flour_per_cake = 3
total_cakes = 3
sugar_total = sugar_per_cake * total_cakes
flour_total = flour_per_cake * total_cakes
result = sugar_total + flour_total
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.