question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Janice had $580 in her bank account. In one day she spent $154 on a new bicycle. How much money does Janice have left in her account? | def solve() -> int:
initial_amount = 580
spent = 154
remaining_amount = initial_amount - spent
result = remaining_amount
return result
|
A jar contains 20 red, 30 blue, and 50 green marbles. Leah randomly picks 3 marbles from the jar without replacement. What is the probability that all 3 marbles are green? | def solve() -> int:
total_marbles = 20 + 30 + 50
first_green = 50 / total_marbles
second_green = 49 / (total_marbles - 1)
third_green = 48 / (total_marbles - 2)
all_green = first_green * second_green * third_green
result = all_green
return result
|
A school has 300 students and 15 teachers. Each teacher has the same number of students in their class. How many students are in each class? | def solve() -> int:
number_of_classes = 300 // 15
students_in_each_class = 300 // number_of_classes
result = students_in_each_class
return result
|
Jane and Bill went to a bookstore and bought books. They each bought a novel, but Jane also bought a cookbook for $7 and a bookmark for $1. Bill's bill was half of Jane's bill. What was the total cost of their books? | def solve() -> int:
novel_cost = 0
cookbook_cost = 7
bookmark_cost = 1
jane_bill = novel_cost + cookbook_cost + bookmark_cost
bill_bill = jane_bill / 2
total_cost = jane_bill + bill_bill
result = total_cost
return result
|
In a classroom, there are ten times as many pencils as pens. If there are 50 pens, how many pencils are there? | def solve() -> int:
pens = 50
pencils = 10 * pens
result = pencils
return result
|
Michelle is having a party for her friends. She will provide 4 cups of juice for each of the 10 guests. In addition, she will also provide 1 pitcher of juice for everyone to share. How many cups are needed for Michelle's party? | def solve() -> int:
number_of_cups_for_each_guest = 4
number_of_pitchers_provided_for_the_party = 1
number_of_cups_needed_for_the_party = 10 * number_of_cups_for_each_guest + number_of_pitchers_provided_for_the_party
result = number_of_cups_needed_for_the_party
return result
|
Student: The ratio of the length of a rectangle to its width is 3:1. If the width is 4 meters, what is its length? | def solve() -> int:
width = 4
ratio = 3/1
length = width * ratio
result = length
return result
|
A store has a clearance sale where they randomly discount items. Unfortunately, one-fifth of the time, the discount is so steep they make no profit. However, one-sixth of the time, two items are sold instead of only one. If the store has had 500 clearance sales this year, how many items were sold at a profit? | def solve() -> int:
total_sales = 500
no_profit_sales = total_sales / 5
double_sales = total_sales / 6
single_sales = total_sales - no_profit_sales - double_sales
profit_sales = single_sales + (double_sales * 2)
result = profit_sales
return result
|
There are 35 items in a basket which has only apples and bananas. The ratio of apples to bananas is 2:3. How many apples are there in the basket? | def solve() -> int:
total_items = 35
apples_ratio = 2/5
apples = apples_ratio*total_items
result = apples
return result
|
Student: In Angela's art class of 30 students, half of them are painting with acrylics and the other half with watercolors. How many students are painting with watercolors? | def solve() -> int:
students = 30
acrylics = students / 2
watercolors = students - acrylics
result = watercolors
return result
|
Angela has 3 hours and 20 minutes to complete all her work. Her math homework takes 50 minutes, her English homework takes 35 minutes, and her science homework takes 1 hour and 5 minutes. Her project will take her 1 hour and 40 minutes. How much time does she have left, in minutes? | def solve() -> int:
time_left = 3 * 60 + 20 - 50 - 35 - 65 - 1 * 60 - 40
result = time_left
return result
|
Sarah has a collection of toy cars. She organized them into 4 sets, each set containing 20 cars. She plans to sell them in sets of 10. If she has 65 toy cars in total, how many more cars does she need to find to have enough for one more set? | def solve() -> int:
num_sets = 4
cars_per_set = 20
cars_per_sale = 10
total_cars = 65
total_cars_sold = num_sets * (cars_per_set // cars_per_sale)
remaining_cars = total_cars - total_cars_sold * cars_per_sale
cars_needed_for_one_more_set = cars_per_set - remaining_cars
result =... |
Ann has 24 marbles. She gives away a fifth of the marbles to her friend Ben. Then Ben gives away half of what he received to their friend Carl. How many marbles does Carl have now? | def solve() -> int:
marbles = 24
ben_marbles = marbles // 5
carl_marbles = ben_marbles // 2
result = carl_marbles
return result
|
Possible new questions and Python programs: The library wants to buy 20 new books for the children's section. Each book costs $15, but the library has a coupon that gives them 10% off. The library also needs to pay 5% sales tax on the final amount. How much money does the library need to raise to buy the books? | def solve() -> int:
book_cost = 15
discounted_cost = book_cost * 0.9
sub_total = discounted_cost * 20
total_cost = sub_total * 1.05
total_cost = round(total_cost, 2)
result = total_cost
return result
|
A train starts at a speed of 70 miles per hour and decreases its speed by 15% every hour. If the train runs for 3 hours, how far has it travelled in total? | def solve() -> int:
speed = 70
time = 3
distance = 0
for i in range(time):
distance += speed
speed *= 0.85
result = distance
return result
|
Owen and Lily are running in a park that is 2 kilometers long. If the park's length increases uniformly by 500 meters every 500 meters along, and they run at a rate of 8 km/h, how long (in minutes) will it take them to get to the point where the park is 3 kilometers long? | def solve() -> int:
distance = 2
increase_rate = 500
total_increase = 1000
new_distance = distance + total_increase/1000
speed = 8
time = new_distance/speed
time_in_minutes = time * 60
result = time_in_minutes
return result
|
Jane has twice as many marbles as John does. If John has 15 marbles, how many marbles does Jane have? | def solve() -> int:
j_marbles = 15
jane_marbles = j_marbles * 2
result = jane_marbles
return result
|
Possible additional questions and programs are: A loaf of bread loses one-sixth of its weight every day due to evaporation. If it weighs 600g on the first day, what will it weigh on the fourth day? | def solve() -> int:
weight = 600
day = 1
while day < 4:
loss = weight / 6
weight = weight - loss
day = day + 1
result = weight
return result
|
David has 24 half-dollar coins in his box. His roommate Robert has 48 half-dollar coins in his box. How many more half-dollar coins does Robert have compared to David? | def solve() -> int:
davids_coins = 24
roberts_coins = 48
difference = roberts_coins - davids_coins
result = difference
return result
|
Student: Jasmine went out to observe different animals at the animal sanctuary. She counted 62 more monkeys than deer and 4 times the number of deer than goats. In total, she counted 110 animals. How many monkeys did she count? | def solve() -> int:
monkeys = 0
deer = 0
goats = 0
total_animals = 110
total_animals = monkeys + deer + goats
goats = deer * 4
monkeys = deer + 62
total_animals = monkeys + deer + goats
monkeys = total_animals - deer - goats
result = monkeys
return result
|
Student: Jane is buying a gift for her niece. She bought a statue that costs $15, a book that costs $10, and a box of chocolate that costs $4. She also bought wrapping paper with a cost of $2. If Jane has $30, how much money does she have left? | def solve() -> int:
statue = 15
book = 10
chocolate = 4
wrapping = 2
total = statue + book + chocolate + wrapping
left = 30 - total
result = left
return result
|
A baker has 10 pounds of sugar. He uses 2/5 of the sugar to make a cake. After that, he uses 1/3 of the remaining sugar to make a batch of cookies. How many pounds of sugar does the baker have left? | def solve() -> int:
sugar = 10
cake_sugar = sugar * 2/5
remaining_sugar = sugar - cake_sugar
cookies_sugar = remaining_sugar * 1/3
final_sugar = remaining_sugar - cookies_sugar
result = final_sugar
return result
|
Graham is building a fence with 50 posts that are 1 meter apart. How long, in total, will the fence be? | def solve() -> int:
num_posts = 50
distance = 1
fence_length = (num_posts - 1) * distance
result = fence_length
return result
|
Rachel is making pasta. One of the ingredients in the recipe is penne pasta. For every serving of pasta, the recipe calls for 2 ounces of penne pasta. In a box of penne pasta, there are 16 ounces. Rachel wants to make 5 servings. How many boxes of penne pasta does she need to buy? | def solve() -> int:
oz_per_serving = 2
oz_per_box = 16
servings_needed = 5
total_oz_needed = oz_per_serving * servings_needed
total_boxes_needed = total_oz_needed / oz_per_box
result = total_boxes_needed
return result
|
Student: Mike works at a store that sells apples. On Saturday morning, he had 183 apples. Throughout the day, he sold 27 apples to customers. By the time the store closes, he had 10 apples left. How many apples did Mike sell in total? | def solve() -> int:
start_apples = 183
sold_apples = 27
end_apples = 10
total_apples_sold = start_apples - end_apples
result = total_apples_sold
return result
|
Bob has 3 bags of candy. Each bag has 12 pieces of candy. He wants to give 2 pieces of candy to each of his 9 friends. How many pieces of candy will he have left for himself? | def solve() -> int:
total_candy = 3 * 12
candy_given = 2 * 9
candy_left = total_candy - candy_given
result = candy_left
return result
|
Sarah had 60 apples. She ate 15 apples and gave 10 apples to her brother. If she then sold half of the remaining apples, how many apples did she have left? | def solve() -> int:
apples = 60
apples -= 15
apples -= 10
apples /= 2
result = apples
return result
|
Jenna purchased 30 candies for a total of 6 dollars. She wants to give one-tenth of the candies to her niece, but her niece insists on paying for them. How much money did Jenna receive from her niece for the shared candies, in cents? | def solve() -> int:
candies = 30
total_cost = 6
shared_candies = candies / 10
cost_per_candy = total_cost / candies
money_received = shared_candies * cost_per_candy * 100
result = int(money_received)
return result
|
Student: If Helen starts running for 5 hours with an average speed of 8 mph and cuts 10 minutes off every hour to rest, how many miles does she end up running? | def solve() -> int:
total_time = 5 * (50/60)
distance = total_time * 8
result = distance
return result
|
Susan wants to save money to buy an iPad that costs $1000. She saved $300 already. She has two job offers. In the first job, she can earn $100 per week, while in the second job, she can earn $150 per week. Which job should she take and how long will it take her to save the remaining amount? | def solve() -> int:
savings_goal = 1000
current_savings = 300
job1_salary = 100
job2_salary = 150
weeks_to_save_1 = (savings_goal-current_savings)/job1_salary
weeks_to_save_2 = (savings_goal-current_savings)/job2_salary
if weeks_to_save_1 > weeks_to_save_2:
result = weeks_to_save_2
... |
Eight people go on a hike. Four of them bring sandwiches and the rest bring apples. Six of the hikers have water and the rest have juice. If each hiker has either one sandwich or one apple and one drink, what is the ratio of sandwich eaters to apple eaters? | def solve() -> int:
num_people = 8
num_sandwich_eaters = 4
num_apple_eaters = num_people - num_sandwich_eaters
num_water_drinkers = 6
num_juice_drinkers = num_people - num_water_drinkers
sandwich_ratio = num_sandwich_eaters/num_people
apple_ratio = num_apple_eaters/num_people
result = (s... |
Student: Joanna has 45 loaves of bread that she needs to divide equally between 9 people. How many loaves of bread will each person get? | def solve() -> int:
num_loaves = 45
num_people = 9
loaves_per_person = num_loaves / num_people
loaves_per_person = round(loaves_per_person)
result = loaves_per_person
return result
|
Josh was planning a picnic and wanted to have different types of sandwiches. He made 14 peanut butter and jelly sandwiches, 6 turkey sandwiches, 10 grilled cheese sandwiches, and 4 ham sandwiches. His mom gave him some sandwiches as well, and then Josh added double the amount of sandwiches his mom gave him. How many to... | def solve() -> int:
pbj_sandwiches = 14
turkey_sandwiches = 6
grilled_cheese_sandwiches = 10
ham_sandwiches = 4
total_sandwiches = pbj_sandwiches + turkey_sandwiches + grilled_cheese_sandwiches + ham_sandwiches
mom_sandwiches = 8
josh_sandwiches = mom_sandwiches * 2
total_... |
There are 15 apples and 12 oranges in a basket. If 5 more apples and 3 more oranges are added to the basket, how many fruits are there in total? | def solve() -> int:
apples = 15 + 5
oranges = 12 + 3
total_fruits = apples + oranges
result = total_fruits
return result
|
If Mike has twice as much money as Jane and Jane has $50, how much money does Mike have? | def solve() -> int:
jane_money = 50
mike_money = jane_money * 2
result = mike_money
return result
|
Emily has $600 to spend on books at $20 per book. She wants to share with her friends, Andrew and Olivia. Andrew wants 1/5 of the books, and Olivia wants 1/4 of the books. How many books does Emily give to her friends? | def solve() -> int:
total_money = 600
book_price = 20
total_books = total_money // book_price
andrew_books = total_books // 5
olivia_books = total_books // 4
emily_books = total_books - andrew_books - olivia_books
result = andrew_books + olivia_books
return result
|
A pair of shoes cost $65. If Samantha has $150, how many pairs of shoes can she buy after spending $25 on lunch? | def solve() -> int:
total_money = 150 - 25
cost_per_shoe = 65
max_shoes = total_money // cost_per_shoe
result = max_shoes
return result
|
Student: At the Bakery, there are 2635 bread loaves, 6252 croissants, and 4179 rolls. How many fewer rolls than bread and croissants together? | def solve() -> int:
total_bread_croissants = 2635 + 6252
total_rolls = 4179
difference = total_bread_croissants - total_rolls
result = difference
return result
|
Zoe and Liam collected some shells. Zoe collected 14 shells less than Liam did. However, Zoe found 3 more shells and Liam broke 2 shells. If Liam collected 36 shells, how many shells do they have altogether? | def solve() -> int:
x = 36
y = x - 14
y = y + 3
x = x - 2
result = x + y
return result
|
Student: A recipe calls for 2.5 cups of flour to make 12 cookies. If Sarah wants to make 36 cookies, how much flour does she need? | def solve() -> int:
flour_per_cookie = 2.5 / 12
cookies = 36
flour = flour_per_cookie * cookies
result = flour
return result
|
During a sale, a store is offering a discount of 20% on all items. If the original price of a shirt is $30, what is the sale price? | def solve() -> int:
original_price = 30
discount = 0.2
sale_price = original_price*(1-discount)
result = sale_price
return result
|
Two trains leave town at the same time, but one train is 17 miles per hour faster than the other. If they are 170 miles apart after 5 hours, what is the speed of the slower train? | def solve() -> int:
distanceTravelled = 170
timeTravelled = 5
speedDifference = 17
result = (distanceTravelled -(speedDifference*timeTravelled))/timeTravelled
return result
|
Ben spent 1/4 of his money on a book and 1/3 of the remaining money on a toy. He then had $10 left. How much money did he start with? | def solve() -> int:
from fractions import Fraction
book = Fraction(1, 4)
toy = Fraction(1, 3)
left = 10
before_toy = left / (1 - toy)
before_book = before_toy / (1 - book)
result = before_book
return result
|
A car travels 120 miles in two hours. What must be its average speed to cover a distance of 240 miles in four hours? | def solve() -> int:
distance1 = 120
time1 = 2
distance2 = 240
time2 = 4
total_distance = distance1 + distance2
total_time = time1 + time2
average_speed = total_distance/total_time
result = average_speed
return result
|
If Rachel spends 6 hours cleaning the house for every 2 hours spent cooking, and she spent 40 hours cleaning and cooking this week, how many hours did she spend cooking? | def solve() -> int:
cleaning_hours = 40
cooking_hours = cleaning_hours / (6 + 2)
result = cooking_hours
return result
|
Student: There are 3000 books in a library. 48% of the books are fiction books, and 15% of the fiction books are classics. How many books are not classics? | def solve() -> int:
fiction_books = 3000 * 0.48
classic_books = fiction_books * 0.15
non_classic_books = fiction_books - classic_books
result = non_classic_books
return result
|
A rectangle has one side of length 15cm, and the other side's length is twice the first side's length. What is the area of the rectangle in square centimeters? | def solve() -> int:
area = 15 * 30
result = area
return result
|
A librarian can classify a book in the library in 2 minutes and catalog a newly bought book in 5 minutes. If the librarian classified 20 books and cataloged 10 newly bought books, how many hours did it take to finish the job? | def solve() -> int:
classify_time = 2
catalog_time = 5
num_classified_books = 20
num_cataloged_books = 10
total_classify_time = classify_time * num_classified_books
total_catalog_time = catalog_time * num_cataloged_books
total_time = total_classify_time + total_catalog_time
... |
A gift shop has 50 teddy bears and dolls in total for sale. Two-fifths of the items are teddy bears, and a quarter of the dolls have blue eyes. How many dolls have blue eyes? | def solve() -> int:
teddy_bears = 50 * 2/5
dolls = 50 - teddy_bears
dolls_with_blue_eyes = dolls * 1/4
result = dolls_with_blue_eyes
return result
|
She wants to save a minimum of $6000 each month. She babysits from Monday to Friday for 4 hours every day and earns an extra $30 for each hour of babysitting she does on the weekend. How many weekend hours does Tara have to babysit to reach her goal? | def solve() -> int:
total_money = 0
weekday_hours = 4
weekend_hours = 0
hourly_rate = 25
while total_money < 6000:
total_money += hourly_rate * weekday_hours + (hourly_rate + 30) * weekend_hours
weekend_hours += 1
result = weekend_hours
return result
|
If Alex delivers every newspaper on his route, he will receive 10 cents per newspaper. If he delivers exactly 120 newspapers and earns $12, how much does he earn per newspaper? | def solve() -> int:
newspapers_delivered = 120
total_earnings = 12
earnings_per_newspaper = total_earnings / newspapers_delivered
result = earnings_per_newspaper
return result
|
Q5: A painter needs to paint a wall with 7 coats of paint. He needs 3 brush strokes for each coat. How many brush strokes are needed total? | def solve() -> int:
coats = 7
brush_strokes = 3
total_brush_strokes = coats * brush_strokes
result = total_brush_strokes
return result
|
Ben is collecting coins for a charity. He has 12 quarters, 20 dimes, and 15 nickels in his jar. Each quarter is worth 25 cents, each dime is worth 10 cents, and each nickel is worth 5 cents. How much money does he have in his jar in total? | def solve() -> int:
quarters = 12
dimes = 20
nickels = 15
quarter_value = 25
dime_value = 10
nickel_value = 5
total = quarters * quarter_value + dimes * dime_value + nickels * nickel_value
dollars = total / 100
result = dollars
return result
|
John is planning a party and he wants to invite 30 people. He knows that he can fit 15 people in his car at a time. How many trips does John need to make in his car to bring everyone to the party? | def solve() -> int:
num_people = 30
people_per_car = 15
trips = num_people // people_per_car
if num_people % people_per_car!= 0:
trips += 1
result = trips
return result
|
Susan is 5 years older than John and twice as old as Tim. Tim is 12. How old is Susan? | def solve() -> int:
age_tim = 12
age_susan = age_tim * 2 + 5
result = age_susan
return result
|
Five cupcakes, three muffins, and four cookies were in the bakery. The cupcakes were three times more expensive than the cookies, and the muffins were half as expensive as the cupcakes. If the cost of one cookie was $0.25, what would it cost to purchase all of the treats in the bakery, in dollars? | def solve() -> int:
cupcake_cost = 3 * 0.25
muffin_cost = cupcake_cost / 2
total_cost = 5 * cupcake_cost + 3 * muffin_cost + 4 * 0.25
result = total_cost
return result
|
Brittany worked in her office for 500 minutes on Monday. On Tuesday she worked three times as long as she did on Monday and on Wednesday she worked 550 minutes. How many more minutes did she work on Wednesday than on Tuesday? | def solve() -> int:
time_worked_Tue = 500 * 3
total_diff = 550 - time_worked_Tue
result = total_diff
return result
|
Student: If Luke spent $15 on 1 box of markers and 2 packs of colored pencils for $5 each. How much did he spend in total? | def solve() -> int:
markers = 15
pencils = 5
total = markers + (2 * pencils)
result = total
return result
|
Student: A bakery makes 5 types of cakes. Each cake is made up of 3 layers of sponge, each layer has 20g of butter, 30g of flour, and 10g of sugar. If the bakery makes 10 cakes of each type, calculate the total weight of butter used. | def solve() -> int:
cake_types = 5
layers = 3
butter_per_layer = 20
cakes_per_type = 10
total_butter = cake_types * layers * butter_per_layer * cakes_per_type
result = total_butter
return result
|
If a caterer can make 25 appetizers with 3 pounds of shrimp and 2 pounds of cheese, how many appetizers can they make with 10 pounds of shrimp and 8 pounds of cheese? | def solve() -> int:
shrimp_per_appetizer = 3/25
cheese_per_appetizer = 2/25
total_shrimp = 10
total_cheese = 8
appetizers = min(total_shrimp / shrimp_per_appetizer, total_cheese / cheese_per_appetizer)
result = int(appetizers)
return result
|
The ratio of boys to girls in a school is 3:5. If there are 60 boys, how many girls are there? | def solve() -> int:
boys_ratio = 3
girls_ratio = 5
total_ratio = boys_ratio + girls_ratio
boys = 60
each_ratio_value = boys / boys_ratio
girls = each_ratio_value * girls_ratio
result = girls
return result
|
Next question..... Possible questions and programs: Mia baked a cake for her birthday. She cut the cake into 12 equal slices and gave 4 slices to her friends. She ate one slice and left the rest for later. How many slices of cake did Mia have left? | def solve() -> int:
total_slices = 12
slices_given = 4
slices_eaten = 1
slices_left = total_slices - slices_given - slices_eaten
result = slices_left
return result
|
Student: John has a rectangular garden that is 20 feet wide and 30 feet long. He wants to put a fence around the perimeter of the garden. If a fence costs $10 per foot, how much will John spend on the fence? | def solve() -> int:
width = 20
length = 30
perimeter = 2 * (width + length)
cost_per_foot = 10
total_cost = perimeter * cost_per_foot
result = total_cost
return result
|
If a train is traveling 50 miles per hour and it needs to travel 250 miles, how long will the trip take in hours? | def solve() -> int:
speed = 50
distance = 250
time = distance / speed
result = time
return result
|
Aidan can buy 3 shirts or 1 pair of jeans for $48. He purchased 36 clothes evenly split between shirts, pants, and shorts, and the price of 1 short is $10. What is the cost of 1 pair of jeans? | def solve() -> int:
shirts = 3
jeans = 1
price = 48
total_clothes = 36
shorts = total_clothes / 3
short_price = 10
jeans_price = (price - (shirts * short_price)) / jeans
result = jeans_price
return result
|
Mia had $40 to spend at the bookstore. She bought 3 books for $12 each and a bookmark for $2. She also got a 10% discount on her total purchase. How much money did Mia spend and how much money did she save? | def solve() -> int:
money = 40
books = 3
book_price = 12
bookmark = 2
discount = 0.1
subtotal = books * book_price + bookmark
total = subtotal * (1 - discount)
money_spent = total
money_saved = money - money_spent
result = f"Mia spent ${money_spent} and sa... |
There are 55 CDs in a collection. If there are only 11 CDs left after 5 days, and Alice removed the same amount each day, how many CDs did she take out in three days? | def solve() -> int:
cds_in_collection = 55
cds_left_after_5_days = 11
cds_taken_per_day = (cds_in_collection - cds_left_after_5_days) / 5
cds_taken_in_three_days = cds_taken_per_day * 3
result = cds_taken_in_three_days
return result
|
Marcus wants to bike 50 miles and it normally takes him 5 hours. Unfortunately, he has to take a detour of 20 miles due to some road closures. If he keeps the same speed, how much longer will the trip take him? | def solve() -> int:
distance = 50
time = 5
detour = 20
total_distance = distance + detour
new_time = (total_distance / distance) * time
extra_time = new_time - time
result = extra_time
return result
|
Tom has $1000 in his bank account. He withdraws $250 and then deposits $150. What is his new balance in the account? | def solve() -> int:
balance = 1000
withdrawal = 250
deposit = 150
new_balance = balance - withdrawal + deposit
result = new_balance
return result
|
Student: In five years, Adam will be four times as old as Ben. If Ben is currently 10 years old, how old is Adam? | def solve() -> int:
ben_age = 10
adam_age = 0
adam_age = ben_age * 4 + 5
result = adam_age
return result
|
Jack got a new job and decided to upgrade his wardrobe. He bought a suit for $500, a watch for $300, and shoes for half as much as the suit. If he also spends $50/month on dry cleaning, how much will Jack spend on his work attire in the first year? | def solve() -> int:
suit_price = 500
watch_price = 300
shoes_price = suit_price / 2
dry_cleaning_monthly = 50
total_spent = suit_price + watch_price + shoes_price + (dry_cleaning_monthly * 12)
result = total_spent
return result
|
Michael buys a bonsai tree that is 10 years old and stands at 2.5 feet. It grows at a rate of 0.75 feet per year. How old is the bonsai tree when it is 6 feet tall? | def solve() -> int:
years_old = 10
height = 2.5
growth_rate = 0.75
while height < 6:
years_old += 1
height += growth_rate
result = years_old
return result
|
In an aquarium, for every shark there are two dolphins, and for every dolphin there are 15 penguins. If there are 30 million penguins in the aquarium, what is the shark population of the aquarium, in millions? | def solve() -> int:
dolphins_per_shark = 2
penguins_per_dolphin = 15
total_penguins = 30_000_000
total_dolphins = total_penguins / penguins_per_dolphin * dolphins_per_shark
total_sharks = total_dolphins / dolphins_per_shark
shark_population = total_sharks / 1_000_000
resu... |
Tom wants to make 5 copies of a contract for 8 employees. The contract is 10 pages long. How many pages will Tom copy in total? | def solve() -> int:
num_copies = 5
num_employees = 8
num_pages = 10
total_pages = num_copies * num_employees * num_pages
result = total_pages
return result
|
On Monday, 250 people attended a concert in a stadium. During the concert, there was a total of 75 admissions and exits at a rate of 5 admissions or exits per minute. If everyone who entered the stadium stayed for the entire concert, how many people left the stadium before the end of the concert? | def solve() -> int:
people_start = 250
admissions_exits = 75
time = admissions_exits / 5
people_end = people_start - int(time)
result = people_start - people_end
return result
|
Dan is renting bikes for a group of friends. He pays $10 for an hour of rental for a regular bike, $12 for an hour of rental for a mountain bike, and $15 for an hour of rental for an electric bike. He spent $210 in total. If he rented 4 electric bikes and 6 regular bikes, how many mountain bikes did he rent? | def solve() -> int:
regular_price = 10
mountain_price = 12
electric_price = 15
electric_rented = 4
regular_rented = 6
electric_cost = electric_price * electric_rented
regular_cost = regular_price * regular_rented
mountain_cost = 210 - electric_cost - regular_cost
... |
Student: Logan is going to buy lunch and dinner. If he orders 3 burgers for $4 each and 4 salads for $5 each, how much would he pay? | def solve() -> int:
burger_price = 4
salad_price = 5
burger_quantity = 3
salad_quantity = 4
burger_cost = burger_price * burger_quantity
salad_cost = salad_price * salad_quantity
total_cost = burger_cost + salad_cost
result = total_cost
return result
|
Eli, Max, and Leo collected buttons. Eli had half as many buttons as Max. Max had 40 buttons. Leo had 15 more buttons than Eli. How many buttons did the 3 children have in total? | def solve() -> int:
max_buttons = 40
eli_buttons = max_buttons / 2
leo_buttons = eli_buttons + 15
total_buttons = max_buttons + eli_buttons + leo_buttons
result = total_buttons
return result
|
A park has 10 benches and 30% of them need repairs. If each bench takes 20 minutes to repair, how many hours are needed to repair all the benches that need it? | def solve() -> int:
benches = 10
repair_percentage = 30
repair_time = 20
benches_to_repair = benches * repair_percentage / 100
total_repair_time = benches_to_repair * repair_time
hours_needed = total_repair_time / 60
result = hours_needed
return result
|
Isabella and Sophie have a total of 12 necklaces. They bought some more necklaces from a jewelry store. Isabella got 4 new gold necklaces and 3 pearl necklaces. Sophie got 2 more than Isabella. How many necklaces do they have now altogether? | def solve() -> int:
isabella_necklaces = 12
isabella_gold_necklaces = 4
isabella_pearl_necklaces = 3
sophie_necklaces = isabella_necklaces + 2
total_necklaces = isabella_necklaces + isabella_gold_necklaces + isabella_pearl_necklaces + sophie_necklaces
result = total_necklaces
... |
David has a lemonade stand. He bought two types of lemons. He has 60% of type A and 40% of type B. Type A produces 2 liters a day, and 70% of them are sour. Type B produces 3 liters a day, and 1/5 of them are sour. If he has 3.5 liters of sour lemonade today, how many total lemons does he have? | def solve() -> int:
percent_A = 0.6
percent_B = 0.4
liters_A = 2
liters_B = 3
percent_sour_A = 0.7
percent_sour_B = 1/5
sour_lemonade = 3.5
total_liters = (liters_A * percent_A * percent_sour_A) + (liters_B * percent_B * percent_sour_B)
total_lemons = sour_lemonade / total_... |
A cake recipe calls for 2 cups of sugar and makes 20 cupcakes. If there is only 1 cup of sugar available, how many cupcakes can be made? | def solve() -> int:
available_sugar = 1
recipe_sugar = 2
cupcakes_per_recipe = 20
max_cupcakes = available_sugar // recipe_sugar * cupcakes_per_recipe
result = max_cupcakes
return result
|
A clothing store has a sale with 20% off all items. If a customer bought a dress that was originally $80, how much did they pay after the discount? | def solve() -> int:
original_price = 80
discount_percent = 0.2
discount_amount = original_price * discount_percent
final_price = original_price - discount_amount
result = final_price
return result
|
A rope has a length of 250 meters. Jonathan divides the rope into seven equal parts, gives his neighbor one-sixth of the pieces, and subdivides the remaining pieces into five more equal parts. What is the length of each piece? | def solve() -> int:
rope_length = 250
num_parts = 7
part_length = rope_length / num_parts
num_given = num_parts / 6
num_remaining = num_parts - num_given
remaining_part_length = part_length * num_remaining / 5
result = remaining_part_length
return result
|
Lisa has 4 jars, each with 50 marbles. 30% of the marbles are red and the rest are blue. If Lisa wants to take out all the red marbles and put them in a separate jar, how many red marbles will she have in the end? | def solve() -> int:
total_marbles = 4*50
red_marbles = total_marbles*0.3
result = red_marbles
return result
|
A jewelry store has a 20% discount on all items. Jane wants to buy a necklace for $80 and a pair of earrings for $40. What is the total cost of her purchase? | def solve() -> int:
necklace_price = 80
earrings_price = 40
discount = 0.2
total_price = necklace_price + earrings_price
total_with_discount = total_price - (total_price * discount)
result = total_with_discount
return result
|
Student: Carmen, Vivian, Lewis, and Peyton each have 6 more balls than Yvonne but five less than Benny. If Benny has 37 balls, calculate the total number of balls that the five have? | def solve() -> int:
benny = 37
yvonne = benny - 11
carmen = yvonne + 6
vivian = yvonne + 6
lewis = yvonne + 6
peyton = yvonne + 6
total = benny + yvonne + carmen + vivian + lewis + peyton
result = total
return result
|
Some possible new questions are: Martin wants to bake a cake that requires 4 eggs, 2 cups of flour, and 0.5 cups of sugar. He only has 3 eggs, 1.5 cups of flour, and 0.75 cups of sugar. How many times can he make the cake with the ingredients he has? Round down to the nearest whole number. | def solve() -> int:
eggs = 3 // 4
flour = 1.5 // 2
sugar = 0.75 // 0.5
result = min(eggs, flour, sugar)
return result
|
Student: You have 90$ to spend on shoes. You buy a pair of sneakers for 50$, and a pair of dress shoes for 30$. You spend 1/5 of what's left on socks. How much money do you have left? | def solve() -> int:
total_money = 90
sneakers_price = 50
dress_shoes_price = 30
remaining_money = total_money - sneakers_price - dress_shoes_price
socks_price = remaining_money / 5
money_left = remaining_money - socks_price
result = money_left
return result
|
Student: Michael spent 3.25 hours driving at an average speed of 60 mph and 2.5 hours at an average speed of 80 mph. What was his average speed for the entire trip? | def solve() -> int:
time_1 = 3.25
speed_1 = 60
time_2 = 2.5
speed_2 = 80
distance_1 = time_1 * speed_1
distance_2 = time_2 * speed_2
total_distance = distance_1 + distance_2
total_time = time_1 + time_2
average_speed = total_distance / total_time
result = average_speed
... |
A group of mountaineers requires 9 hours and 30 minutes to climb a 7,000-foot mountain. How long would it take them to climb a 14,000-foot mountain? | def solve() -> int:
hours = 9
minutes = 30
total_minutes = (hours * 60) + minutes
feet = 7000
time_per_foot = total_minutes / feet
new_feet = 14000
new_time = new_feet * time_per_foot
new_hours = int(new_time / 60)
new_minutes = int(new_time % 60)
result ... |
Ella and her friends decided to make different shapes with colored paper. They cut out 20 squares, 15 more triangles than squares, 10 fewer rectangles than the total number of squares and triangles combined, 5 more circles than rectangles, and the number of stars was half the number of circles. What was the total numbe... | def solve() -> int:
square = 20
triangle = square + 15
rectangle = square + triangle - 10
circle = rectangle + 5
star = circle // 2
total = square + triangle + rectangle + circle + star
result = total
return result
|
Sarah runs 3 miles in 25 minutes. If she runs twice as fast, how long will it take her to run 6 miles? | def solve() -> int:
time = 25/3
speed = 2
distance = 6
new_time = distance/(speed*time)
result = new_time
return result
|
There are 800 people in a company. 15% of them were absent on a Monday and 10% of the remaining were absent on a Tuesday. How many people came to work on Tuesday? | def solve() -> int:
people = 800
absent_Monday = 0.15*people
remaining1 = people - absent_Monday
absent_Tuesday = 0.1*remaining1
result = remaining1 - absent_Tuesday
return result
|
Two friends decided to run a race. Tom runs 2km in 10 minutes, while Jack runs 3km in 15 minutes. Who ran a longer distance within one hour? | def solve() -> int:
Tom_speed = 2 / 10
Jack_speed = 3 / 15
Tom_distance = Tom_speed * 60
Jack_distance = Jack_speed * 60
if Tom_distance > Jack_distance:
result = "Tom ran a longer distance in 1 hour"
else:
result = "Jack ran a longer distance in 1 hour"
return result
|
A bag contains 8 green marbles and 4 yellow marbles. If 3 marbles are randomly chosen without replacement, what is the probability that all 3 marbles are green? | def solve() -> int:
total_marbles = 8 + 4
prob_green = 8/total_marbles
prob_all_green = prob_green * (7/11) * (6/10)
result = prob_all_green
return result
|
Ben, Leo, and Anna are preparing for a charity hike to support a local conservation area. If Ben takes 3 hours and Anna is twice as fast as Leo, how long does it take Leo to finish the hike? What is the total time for the three to complete the hike? | def solve() -> int:
leo_time = 1
anna_time = 2 * leo_time
ben_time = 3
total_time = leo_time + anna_time + ben_time
result = total_time
return result
|
A man has $80 in his bank account. He withdraws $25 and then deposits $50. How much money does he have in his account now? | def solve() -> int:
bank_balance = 80
withdrawal = 25
deposit = 50
new_balance = bank_balance - withdrawal + deposit
result = new_balance
return result
|
=========================== A recipe for a cake requires 250 grams of flour, 150 grams of sugar, 100 grams of butter, and 3 eggs. How much flour do you need to make 8 cakes? | def solve() -> int:
flour_per_cake = 250
cakes = 8
flour = flour_per_cake * cakes
result = flour
return result
|
Rachel had $100 in her bank account. She withdrew $20 every day for a week. How much money does she have left in her account? | def solve() -> int:
day = 7
withdraw = 20
init_balance = 100
remaining_balance = init_balance - (day * withdraw)
result = remaining_balance
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.