question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Student: In the fall, 40,000 students apply to Brown University for college. In the spring, 18% of those 40,000 students are accepted to the university. Of the students who are accepted, 92.5% choose to attend the university, and the other 7.5% choose to go to other schools. How many students choose to attend Brown Uni... | def solve() -> int:
total_applicants = 40000
acceptance_rate = 0.18
attendance_rate = 0.925
other_rate = 0.075
accepted_students = total_applicants * acceptance_rate
attending_students = accepted_students * attendance_rate
other_students = accepted_students * other_rate
result = atte... |
In a 40-item exam, Ryan got 25 more correct answers than Jack. If Jack got 15% of the questions correct, what is the percentage of the correct answers that Ryan got? | def solve() -> int:
score_jack = 40 * 0.15
score_ryan = score_jack + 25
percentage_ryan = score_ryan/40
result = percentage_ryan
return result
|
If you invest $500 for 3 years with an annual interest rate of 2%, what is the total balance at maturity? | def solve() -> int:
principle = 500
years = 3
interest_rate = 0.02
compound_interest = principle * (1+interest_rate)**years
result = compound_interest
return result
|
If Amy can finish her project in 4 hours and 30 minutes, how much faster can she finish it in 3 hours? | def solve() -> int:
time_original = 4.5
time_3hours = 3
time_saved = time_original - time_3hours
result = round(time_saved, 1)
return result
|
Michael has $700 in his bank account. He withdrew $85 to pay his credit card bill. A few days later, he deposited $50. Then he withdrew another $25. How much does he have in his bank account now? | def solve() -> int:
withdrawn_amount_1 = 85
initial_amount = 700
deposited_amount = 50
withdrawn_amount_2 = 25
final_amount = initial_amount - withdrawn_amount_1 + deposited_amount - withdrawn_amount_2
result = final_amount
return result
|
In a cooking competition, 30 chefs are competing to win a prize of $5000. If there are twice as many female chefs as male chefs and 1/4 of the male chefs and 3/5 of the female chefs make it to the final round, how many total chefs are in the final round? | def solve() -> int:
male_chefs = 30 / (2 + 1)
female_chefs = 2 * male_chefs
male_chefs_final = male_chefs * 1/4
female_chefs_final = female_chefs * 3/5
total_chefs_final = male_chefs_final + female_chefs_final
result = total_chefs_final
return result
|
Leah's scores in the first 3 tests in a class are 78, 85, and 87 out of 100, respectively. She needs to get a cumulative average of 90 to get an A in the class. Each subsequent test is worth the same as each of the previous 3 tests. What does she need to score on the next tests to achieve an A? | def solve() -> int:
test1 = 78
test2 = 85
test3 = 87
cumulative_avg = 90
total_score = test1 + test2 + test3
next_test_weight = 3
next_test_score = (cumulative_avg * (next_test_weight + 3) - total_score) / next_test_weight
result = next_test_score
return result
|
A rectangular garden is 10m long and 8m wide. How much fence material is needed to enclose the garden if the fencing costs $2.50 per meter? | def solve() -> int:
length = 10
width = 8
perimeter = 2 * (length + width)
fencing_cost_per_meter = 2.5
total_cost = perimeter * fencing_cost_per_meter
result = total_cost
return result
|
At Shoe Boutique, a pair of shoes costs $50 with a minimum purchase of 3 pairs. If Rachel spent $175 on shoes, how many pairs over the minimum did she purchase? | def solve() -> int:
cost_per_pair = 50
min_purchase = 3
total_spent = 175
max_pairs = total_spent // cost_per_pair
pairs_over_min = max_pairs - min_purchase
result = pairs_over_min
return result
|
Chloe and Evan are decorating a Christmas tree. Chloe puts on 7 more ornaments than Evan for every 10 ornaments he puts on. If they put on a total of 60 ornaments, how many ornaments did Chloe put on? | def solve() -> int:
evan_ornaments = 10
chloe_ornaments = evan_ornaments + 7
total_ornaments = evan_ornaments + chloe_ornaments
while total_ornaments < 60:
evan_ornaments += 10
chloe_ornaments += 7
total_ornaments = evan_ornaments + chloe_ornaments
result = chl... |
Tom walks to the grocery store at a speed of 4 miles per hour. After walking for 10 minutes, he realizes that he has forgotten his grocery list and walks back home. When he reaches home, he jumps in the car and drives to the store at a speed of 20 miles per hour. How long will it take him to catch up with his original ... | def solve() -> int:
distance = 0.5
time_car = distance / 20 * 60
time_walk = (distance / 4 + distance / 20) * 60
time_catch_up = time_car - time_walk
result = time_catch_up
return result
|
After a student passed their exams, their score improved from 45% to 68%. If the maximum possible score was 100%, what was the student's score before improvement? | def solve() -> int:
before_score = 45
after_score = 68
max_score = 100
difference = after_score - before_score
percent_improvement = difference / max_score
bef_score_before_improvement = before_score - percent_improvement * before_score
result = bef_score_before_improvement
return result... |
Madison sells headphones. She sold nine times as many headphones in June as she sold in May. In June, Madison sold a tenth of what she sold in July. If Madison sold 6,000 headphones in July, how many headphones did Madison sell from May to July? | def solve() -> int:
may_sales = 6000 / 9
june_sales = may_sales * 9
july_sales = 6000
total_sales = may_sales + june_sales + july_sales
result = total_sales
return result
|
Student: 7. In a year, how many dozen eggs does Mortdecai donate to charity? | def solve() -> int:
eggs_per_week = 18
weeks_in_year = 52
eggs_in_dozen = 12
total_eggs = eggs_per_week * weeks_in_year
dozen_eggs = total_eggs / eggs_in_dozen
result = dozen_eggs
return result
|
If you have to purchase 24 pens that cost $5 each. How much money will it cost you? | def solve() -> int:
num_pens = 24
cost_per_pen = 5
total_cost = num_pens*cost_per_pen
result = total_cost
return result
|
At a concert, there were 6721 visitors. 4 out of every 5 visitors bought drinks, how many visitors bought drinks? | def solve() -> int:
total_visitors = 6721
drink_ratio = 4/5
total_bought_drink = total_visitors * drink_ratio
result = total_bought_drink
return result
|
Bob is 1 year younger than his cousin, Alex. If Alex is currently 27, what will be their total age in 4 years? | def solve() -> int:
age_bob = 0
age_alex = 27
age_bob = age_alex - 1
total_age_in_4_years = age_bob + age_alex + 4
result = total_age_in_4_years
return result
|
A rectangle has a length of 10 cm and a width of 4 cm. What is the area of the rectangle? | def solve() -> int:
length_of_rectangle = 10
width_of_rectangle = 4
area_of_rectangle = length_of_rectangle * width_of_rectangle
result = area_of_rectangle
return result
|
Mark and his teammates collected 96 baseball cards in total. They traded 8 cards with each other. How many cards were left with each person? | def solve() -> int:
total_cards = 96
traded_cards = 8
cards_left = total_cards - traded_cards
result = cards_left
return result
|
Possible new questions and programs are: --- Lisa has a collection of stamps from different countries. She has 120 stamps from Canada, 80 stamps from France, and three times as many stamps from Japan as from France. If she gives away one-fifth of her stamps to a friend, how many stamps will she have left? | def solve() -> int:
japan_stamps = 3 * 80
total_stamps = 120 + 80 + japan_stamps
given_stamps = total_stamps / 5
left_stamps = total_stamps - given_stamps
result = left_stamps
return result
|
A store sells four types of snacks, chips at $2 each, cookies at $2 each, cake at $4 each and candy at $1 each. Alex buys three chips, two cookies and one candy. Lee buys one candy and two cakes. How much do Alex and Lee spend together? | def solve() -> int:
chips_price = 2
cookies_price = 2
cake_price = 4
candy_price = 1
Alex_chips = 3
Alex_cookies = 2
Alex_candy = 1
Lee_candy = 1
Lee_cakes = 2
Alex_spend = Alex_chips*chips_price+Alex_cookies*cookies_price+Alex_candy*candy_price
Lee_spend = Lee_candy*candy_p... |
Lily is making a necklace with beads. She has 36 red beads, 24 blue beads, and 18 green beads. She wants to arrange the beads in a pattern that repeats every 6 beads. She starts with a red bead, followed by a blue bead, then a green bead. What is the next color of bead she should use to continue the pattern? | def solve() -> int:
red_beads = 36
blue_beads = 24
green_beads = 18
pattern_length = 6
pattern = ["red", "blue", "green"]
next_color = ""
position = (red_beads + blue_beads + green_beads + 1) % pattern_length
if position == 0:
position = pattern_length
next_color = patter... |
At a toy store, they are having a sale on teddy bears and dolls. If you buy 3 teddy bears and 5 dolls, the total is $39. If you buy 5 teddy bears and 7 dolls, the total is $63. How much does one teddy bear cost? | def solve() -> int:
teddy_bears_1 = 3
dolls_1 = 5
total_1 = 39
teddy_bears_2 = 5
dolls_2 = 7
total_2 = 63
teddy_bear_cost = ((total_1 * dolls_2) - (total_2 * dolls_1)) / ((teddy_bears_1 * dolls_2) - (teddy_bears_2 * dolls_1))
result = teddy_bear_cost
return result
|
Student: Maria bakes a rectangular cake that is 40 cm by 20 cm. She cuts the cake into equal pieces that are 5 cm by 4 cm. She sells each piece for $2. How much money does she make from selling the whole cake? | def solve() -> int:
cake_length = 40
cake_width = 20
piece_length = 5
piece_width = 4
piece_area = piece_length * piece_width
cake_area = cake_length * cake_width
num_pieces = cake_area // piece_area
price_per_piece = 2
total_money = num_pieces * price_per_piece
result =... |
Daniel has 60 marbles in his collection and he decides to keep only three-fifths of it. Olivia has 42 marbles and she kept only two-thirds of it. How many marbles do they have together after reducing their collection? | def solve() -> int:
daniels_marbles = 60
olivias_marbles = 42
daniels_marbles_kept = (3/5) * daniels_marbles
olivias_marbles_kept = (2/3) * olivias_marbles
total_marbles = daniels_marbles_kept + olivias_marbles_kept
result = total_marbles
return result
|
Terry needs to drive from his house to his school in one hour. He drove three different sections of the road, the first one at 40 km/h, the second one at 50 km/h and the third one at 70 km/h. How many kilometers did he drive in total? | def solve() -> int:
speed1 = 40
speed2 = 50
speed3 = 70
time = 1
dist1 = speed1 * time
dist2 = speed2 * time
dist3 = speed3 * time
total_distance = dist1 + dist2 + dist3
result = total_distance
return result
|
A student's lunch costs $8 for each of the 10 school days in a 2-week period. He had planned to spend $100 for the 2-week lunch period. How much money did he save per week? | def solve() -> int:
week_costs = 8 * 10
total_costs = 100
money_saved = total_costs - week_costs
result = money_saved/2
return result
|
A piano has 88 keys. If 1/3 of the keys are black, how many keys are black? | def solve() -> int:
total_keys = 88
percent_black = 1/3
num_black_keys = total_keys * percent_black
result = num_black_keys
return result
|
In a city park, there are 150 joggers doing their morning run. Twenty joggers get distracted and follow a different trail, then half of the remaining joggers stumble and get minor injuries. If only 1/4 of the injured joggers feel better after stretching, how many joggers are able to complete their run unaffected? | def solve() -> int:
joggers = 150
distracted_joggers = 20
remaining_joggers = joggers - distracted_joggers
injured_joggers = remaining_joggers / 2
recovered_joggers = injured_joggers / 4
unaffected_joggers = remaining_joggers - injured_joggers + recovered_joggers
result = unaf... |
John runs 4 miles every day for a week. How many miles did John run at the end of the week? | def solve() -> int:
days = 7
distance = 4
total_distance = days * distance
result = total_distance
return result
|
A car traveled 220 miles in 4 hours. How many miles per hour did it average? | def solve() -> int:
distance = 220
time = 4
average_speed = distance / time
result = average_speed
return result
|
A store sells a jacket for $80 plus a 10% tax. What is the total cost of the jacket? | def solve() -> int:
tax = 0.10 * 80
total_cost = 80 + tax
result = total_cost
return result
|
Ben has 12 toy cars. He wants to arrange them in rows on his shelf. He can either arrange them in 2 rows of 6 cars each, 3 rows of 4 cars each, or 4 rows of 3 cars each. What is the total length of the rows if each car is 10 cm long? | def solve() -> int:
length_6 = 6 * 10
length_4 = 4 * 10
length_3 = 3 * 10
total_length = 2 * length_6 + 3 * length_4 + 4 * length_3
result = total_length
return result
|
Tom would like to buy a new TV which costs $730. He pays an initial $290 and pays the rest in 15 monthly installments of $35. How many months will it take for Tom to pay for the TV? | def solve() -> int:
initial_down_payment = 290
monthly_payment = 35
total_price = 730
payment = initial_down_payment + (15 * monthly_payment)
number_of_months = (total_price - initial_down_payment) / monthly_payment
result = round(number_of_months)
return result
|
The park buries a time capsule 30 feet deep. The school buries their time capsule 20 feet shallower than the park's time capsule. How deep is the school's time capsule buried? | def solve() -> int:
park_depth = 30
school_depth = park_depth - 20
result = school_depth
return result
|
An orchard yielded 250 apples. 30% of them were not ripe and had to be thrown away. If each apple weighs 120 grams, what is the weight of the good apples? | def solve() -> int:
total_apples = 250
percentage_nonripe = 30
ripe_apples = int((total_apples * (100-percentage_nonripe))/100)
apple_weight = 120
good_apples_weight = ripe_apples * apple_weight
result = good_apples_weight
return result
|
Rohan bought a new printer for $200. After three months, its value had decreased by 15%. The next month, the value of the printer dropped an additional 20%. How much is the printer worth now? | def solve() -> int:
original_price = 200
discount_1 = 0.15
discount_2 = 0.20
new_price = original_price - original_price * discount_1
result = new_price - new_price * discount_2
print (result)
return result
|
If Bill and Steve both had 25 coins and they put them together, for how many coins did they have in total? | def solve() -> int:
bills_coins = 25
steves_coins = 25
total_coins = bills_coins + steves_coins
result = total_coins
return result
|
On a Thursday, Oscar and Sydney go to the store to buy some clothes. Oscar picks up 5 shirts from the $7.50 rack and Sydney grabs 3 pants from the $19.90 rack. How much money do they need to give to the cashier? | def solve() -> int:
price_oscar = 7.50
price_sydney = 19.90
quant_oscar = 5
quant_sydney = 3
total_price = price_oscar * quant_oscar + price_sydney * quant_sydney
result = total_price
return result
|
Tony had 25 toy cars and his cousin Maria had twice as many toy cars as him. During a toy exchange event, their aunt gave each of them an equal amount of toy cars so that they had a total of 61 cars. How many toy cars did their aunt give each of them? | def solve() -> int:
tony_cars = 25
maria_cars = 2 * tony_cars
total_cars = tony_cars + maria_cars
aunt_cars = (total_cars - 61) / 2
result = aunt_cars
return result
|
If a rectangle is twice as long as it is wide and has a perimeter of 60cm, what are the dimensions of the rectangle? | def solve() -> int:
from sympy.solvers import solve
from sympy import Symbol
l = Symbol('l')
w = Symbol('w')
eq1 = 2*l + 2*w - 60
eq2 = l - 2*w
sol = solve((eq1,eq2), (l,w))
result = round(sol[l],2), round(sol[w],2)
return result
|
Amy's cats have two separate litters of kittens. The first litter has 6 blue-eyed kittens and 8 brown-eyed kittens, and the second litter has 7 blue-eyed kittens and 5 brown-eyed kittens. How many more blue-eyed kittens than brown-eyed kittens are there in total? | def solve() -> int:
total_blue_eyed = 6 + 7
total_brown_eyed = 8 + 5
difference = total_blue_eyed - total_brown_eyed
result = difference
return result
|
Emily has 15 cupcakes that she wants to equally distribute among her 3 friends and herself. However, she eats one of the cupcakes before giving them out. How many cupcakes will each person get? | def solve() -> int:
cupcakes = 15
friends = 3
cupcakes -= 1
cupcakes_per_person = cupcakes // friends
result = f'<<<Each person will get {cupcakes_per_person} cupcakes.>>>'
result = cupcakes_per_person
return result
|
In a class of 50 students, 20 study Spanish, 30 study French, and 10 study both languages. How many students study only Spanish? | def solve() -> int:
total_students = 50
spanish_students = 20
french_students = 30
both_languages_students = 10
only_spanish_students = spanish_students - both_languages_students
result = only_spanish_students
return result
|
In a school, 25 students are absent out of 200. What percentage of students are absent? | def solve() -> int:
total_students = 200
absent_students = 25
percent_absent = (absent_students / total_students) * 100
result = percent_absent
return result
|
Tom is a freelance writer who works on different types of articles. He wrote four articles in the last month. The first article was a news report that had 500 words and he got paid 0.1$ per word. The second article was a book review that had 800 words and he got paid 20% less per word than the first article. The third ... | def solve() -> int:
words_news = 500
rate_news = 0.1
words_book = 800
rate_book = rate_news * 0.8
words_feature = 1200
rate_feature = (rate_news + rate_book) / 2 * 1.25
words_opinion = 1000
rate_opinion = rate_feature * 1.1
earnings_news = words_news * rate_news
earnings_book ... |
A garden is 9 meters wide and 15 meters long. What is the area of the garden? | def solve() -> int:
width = 9
length = 15
area = width * length
result = area
return result
|
am increased his savings by 20%. If his savings were originally $1000, how much does he now have? | def solve() -> int:
initial_savings = 1000
increase_percent = 0.20
increase = initial_savings * increase_percent
final_savings = initial_savings + increase
result = final_savings
return result
|
A bookstore sells a pack of 5 pencils for $3. If you buy them individually, they will cost $0.70 each. How much money can you save by buying 8 packs of 5 pencils? | def solve() -> int:
quantity = 5*8
set_cost = 3*8
individual_cost = 0.7*quantity
savings = individual_cost - set_cost
result = savings
return result
|
If Maya and Ethan each buy a $22 jacket and $12 hat, how much will Maya have to pay in tips if she wants to cover 85% of a 15% tip for both of them? | def solve() -> int:
jacket_price = 22
hat_price = 12
tip_percentage = 0.15
total_cost = (jacket_price + hat_price) * 2
tip_amount = total_cost * tip_percentage
maya_tip = tip_amount * 0.85
result = maya_tip
return result
|
In a pond, 5 turtles are sunbathing when they are joined by 3 ducks. Each duck brings a family of 6 snails and each snail attracts 2 worms to the area. How many animals are present in the pond now? | def solve() -> int:
turtles = 5
ducks = 3
snails_per_duck = 6
worms_per_snail = 2
snails = ducks * snails_per_duck
worms = snails * worms_per_snail
animals = turtles + ducks + snails + worms
result = animals
return result
|
Rachel needs to print flyers for a school event. It will take 2 sheets of paper to make 1 flyer. If she wants to print 100 flyers, how many sheets of paper does she need? Samantha is a farmer. She has 15 acres of land that she plows every day. Each acre yields 5 bushels of wheat. If Samantha sells each bushel for $10, ... | def solve() -> int:
flyers = 100
sheets_per_flyer = 2
total_sheets = flyers * sheets_per_flyer
acres = 15
bushels_per_acre = 5
total_bushels = acres * bushels_per_acre
price_per_bushel = 10
total_income = total_bushels * price_per_bushel
result = total_sheets, total_income
... |
In an amusement park, 50% of the rides are roller coasters and the rest are water rides. Of the water rides, 60% are suitable for children under 10 years old and the remaining 10 are only for adults. How many roller coasters are there in the park? | def solve() -> int:
rides_total = 100
roller_coasters_percentage = 50
water_rides_percentage = 100 - roller_coasters_percentage
water_rides_suitable_percentage = 60
water_rides_adults = 10
roller_coasters = (rides_total * roller_coasters_percentage) / 100
water_rides = rides_total - rol... |
Ryan had $450 in his backpack. He made a bet with his friend, Finn, that the stock price of a particular company will rise by 10% in the next month. If he was right, and they agreed to give the winner four times the amount in Ryan's backpack, calculate Ryan's total amount after winning the bet? | def solve() -> int:
backpack_amount = 450
percent_increase = 0.1
new_amount = backpack_amount * (1 + percent_increase)
winning_amount = 4 * new_amount
result = winning_amount
return result
|
Joe needs to charge his laptop and smartphone simultaneously. If it takes 55 minutes to fully charge the laptop and 8 minutes to fully charge the smartphone. How long will it take before both devices are fully charged? | def solve() -> int:
time_laptop = 55
time_smartphone = 8
total_time = time_laptop + time_smartphone
result = total_time
return result
|
Michael had 3/8 of a pot of chili that he had brought to Natalie's chili cook-off. Victoria had also brought 1/5 of a pot of chili to the cook-off, while Noah brought 55 more pots of chili than Michael and Victoria combined. If Natalie had four pots of chili already, calculate the total number of pots of chili thatOliv... | def solve() -> int:
michael_chili = 3/8
victoria_chili = 1/5
total_chili = michael_chili + victoria_chili
noah_chili = total_chili + 55
natalie_chili = 4
total_pots = michael_chili + victoria_chili + noah_chili + natalie_chili
result = total_pots
return result
|
If a farmer has 100 cows and wants to put them into pens that each hold 25 cows, how many pens will they need? | def solve() -> int:
cows = 100
pen_capacity = 25
pens_needed = cows // pen_capacity
result = pens_needed
return result
|
A car company has three factories and each factory produces cars every 2 years. If the first factory produced a car 10 years ago, what will be the total number of cars produced by all three factories in 6 years? | def solve() -> int:
factory1_production_year = 10
factory2_production_year = factory1_production_year + 2
factory3_production_year = factory2_production_year + 2
total_production_years = 6
factory1_cars_produced = total_production_years // 2
factory2_cars_produced = factory1_cars_produ... |
- Leo is the fastest swimmer of the swimming team. His average speed per 50 meters is 25 meters per second, and his teammates' average speed per 50 meters is 20 meters per second. How long will it take their team to swim a 200 meter medley relay race? | def solve() -> int:
total_time_per_50 = 1 / 25 + 1 / 20 * 3
total_time = total_time_per_50 * 4
result = total_time
return result
|
Michael can play the guitar at a rate of 20 chords per minute. He is considering upgrading his playing skills to either 30 chords per minute or 40 chords per minute. If the rate of 40 chords per minute is twice his current speed and the rate of 30 chords per minute is $50 more than his current fee, how much will he ear... | def solve() -> int:
current_speed = 20
rate_30 = current_speed + 50
rate_40 = current_speed * 2
earnings_per_minute_30 = rate_30 - current_speed
earnings_per_minute_40 = rate_40 - current_speed
earnings_per_minute_more = earnings_per_minute_30 - earnings_per_minute_40
result =... |
Some additional questions and programs are: A baker makes 60 cupcakes. He sells half of them in the morning and then makes 15 more cupcakes in the afternoon. He sells 80% of the cupcakes he has left in the evening. How many cupcakes does he have at the end of the day? | def solve() -> int:
cupcakes = 60
cupcakes = cupcakes - cupcakes / 2
cupcakes = cupcakes + 15
cupcakes = cupcakes - cupcakes * 0.8
result = cupcakes
return result
|
Student: It takes John 5 hours to complete a math homework, 2 hours to complete an English homework, and 1 hour to complete a science homework. If John completes 2 math homework, 3 English homework, and 4 science homework, how many hours did he work? | def solve() -> int:
math_homework = 2
english_homework = 3
science_homework = 4
math_time = 5
english_time = 2
science_time = 1
total_time = math_homework * math_time + english_homework * english_time + science_homework * science_time
result = total_time
return result
|
Tom bought 6 cakes. Each cake contains 8 slices. He ate 4 slices, how many slices does he have left? | def solve() -> int:
number_of_cakes = 6
number_of_slices_in_each_cake = 8
number_of_slices_eaten = 4
slices_left = (number_of_cakes * number_of_slices_in_each_cake) - number_of_slices_eaten
result = slices_left
return result
|
Mike has 30 stickers and his sister Jen has 4/5 the number of stickers he has. Their age difference is equal to the difference between their stickers. If Mike is 12 years old, how old is Jen? | def solve() -> int:
mike_stickers = 30
jen_stickers = (4/5) * mike_stickers
age_difference = jen_stickers - mike_stickers
mike_age = 12
jen_age = mike_age + age_difference
result = jen_age
return result
|
Student: 4. In a family, each mother has 4 children and each father has 6 children. How many children would a family of 6 mothers and 4 fathers have? | def solve() -> int:
children_per_mother = 4
children_per_father = 6
num_mothers = 6
num_fathers = 4
total_children = (children_per_mother * num_mothers) + (children_per_father * num_fathers)
result = total_children
return result
|
A circular pizza with a diameter of 16 inches needs to be cut into 8 equal slices. What is the area of each slice? | def solve() -> int:
diameter = 16
radius = diameter / 2
slices = 8
area_of_pizza = 3.14 * radius ** 2
area_of_slice = area_of_pizza / slices
result = area_of_slice
return result
|
Mike has 50 baseballs. He gave 10 baseballs to his teammates and sold 20 baseballs to his neighbor. The remaining baseballs were divided equally among 5 kids. How many baseballs did each kid receive? | def solve() -> int:
baseballs = 50
teammates = 10
neighbor = 20
remaining_baseballs = baseballs - teammates - neighbor
kids = 5
baseballs_per_kid = remaining_baseballs // kids
result = baseballs_per_kid
return result
|
Lisa is designing a dress. She currently has 3 buttons on it and no other accessories. She plans to add twice as many accessories for 3 different sections each. She then adds 11 more accessories. How many accessories does she have in total? | def solve() -> int:
buttons = 3
accessories_per_section = 2 * buttons
total_sections = 3
total_accessories = accessories_per_section * total_sections + 11
result = total_accessories
return result
|
A car travels 60 miles per hour. If it drives for 3.5 hours, how far has it gone? | def solve() -> int:
total_distance = 60 * 3.5
result = total_distance
return result
|
An ice cream parlor purchased 12 liters of ice cream. If they sold it in 36 cups of equal size, what is the volume of each cup? | def solve() -> int:
total_ice_cream = 12
cups = 36
volume_per_cup = total_ice_cream/cups
result = volume_per_cup
return result
|
Zeke is shopping for new clothes and needs to buy shirts and pants. The ratio of shirts to pants that he needs to buy is 3:2. If he has a budget for buying 50 clothes, how many shirts can he buy? | def solve() -> int:
x = (50 * 3) / 5
result = x
return result
|
1. Miguel needs to paint his fence. He first needs to buy paint, which costs $45 for 5 gallons. How many gallons does Miguel need to buy to paint his entire fence, which is 400 feet long. | def solve() -> int:
volume = 400*6/12
cost = 45/5
result = volume*cost
return result
|
Sarah has 12 crayons. During her art class, Sarah gave 4 crayons to her friend, broke 1, found 3, and got 2 new crayons. How many crayons does Sarah have now? | def solve() -> int:
crayons = 12
crayons_given = 4
crayons_broken = 1
crayons_found = 3
crayons_new = 2
crayons -= crayons_given
crayons -= crayons_broken
crayons += crayons_found
crayons += crayons_new
result = crayons
return result
|
Sara, Max, and Lily sold their old clothes at a yard sale. Sara received $55 more than Max from her sales. Max received 40% more money than Lily from selling her clothes. If Lily sold her clothes for $20, calculate the total amount of money the three friends received together from the sale of their clothes. | def solve() -> int:
lily_sales = 20
max_sales = lily_sales * 1.4
sara_sales = max_sales + 55
total_sales = lily_sales + max_sales + sara_sales
result = total_sales
return result
|
Nick jogs from his house to the park in 15 minutes. From the park, he has to jog back to his house and it takes him 20 minutes. When he arrives back home, he will have been gone for a total of 50 minutes. If he jogged to the convenience store from his house before taking the jog to the park, how long is the jog from hi... | def solve() -> int:
time_to_park = 15
time_to_home = 20
total_time = 50
jog_to_convenience_store = (total_time - time_to_park - time_to_home) / 2
result = jog_to_convenience_store
return result
|
Q9: For her party, Ben has bought 30 cans of cola, each containing 8 bottles. How many bottles of cola does Ben have in total? | def solve() -> int:
cans = 30
bottles = 8
total_bottles = cans * bottles
result = total_bottles
return result
|
At a sale, shoes are 25% off the original price. If the original price of a pair of shoes is $60, what is the sale price? | def solve() -> int:
discount = 0.25
original_price = 60
sale_price = original_price * (1 - discount)
result = sale_price
return result
|
Student: A department store is having a sale and is offering a 20% discount on all clothing items. If a shirt normally costs $25, how much will it cost during the sale? | def solve() -> int:
normal_price = 25
discount_percentage = 0.2
discounted_price = normal_price * (1 - discount_percentage)
final_price = round(discounted_price, 2)
result = final_price
return result
|
A train travels 40 miles per hour for 2 hours, then slows down to 30 miles per hour for 1 hour. What is the total distance the train traveled? | def solve() -> int:
speed1 = 40
speed2 = 30
time1 = 2
time2 = 1
distance1 = speed1 * time1
distance2 = speed2 * time2
total_distance = distance1 + distance2
result = total_distance
return result
|
Sarah goes to a flower garden. Counting Sarah's favorite flower, 70% of the flowers are red and 1/4 are fragrant. If there are 35 red flowers, how many are fragrant? | def solve() -> int:
red_flowers = 35
total_flowers = red_flowers / 0.7
fragrant_flowers = total_flowers / 4
result = fragrant_flowers
return result
|
A company's profits decreased by 20% today, and they earned $4,000. What were the company's profits before the decrease? | def solve() -> int:
profit_after_decrease = 4000
decrease_percentage = 20
profit_before_decrease = profit_after_decrease / (1 - decrease_percentage/100)
result = profit_before_decrease
return result
|
Ben is 18 years old and his grandpa is 80 years old. How many years will it take for Ben to reach half his grandpa's age? | def solve() -> int:
ben_age = 18
grandpa_age = 80
years = 0
while ben_age < grandpa_age / 2:
ben_age += 1
years += 1
result = years
return result
|
The karaoke bar charges five dollars per hour for any microphone borrowed by its customers to sing at home. At the start of September, Miranda borrowed three microphones to practice her singing at home. If she returned one of the microphones after three hours, and the other two stayed at her house until the end of Sept... | def solve() -> int:
microphones_borrowed = 3
hourly_rate = 5
hours_returned = 3
hours_kept = 30
total_hours = hours_returned + hours_kept
total_cost = (microphones_borrowed * total_hours) * hourly_rate
result = total_cost
return result
|
Olivia cycles 20 kilometers to her dance class. On the way back she has to take a detour that is 10% longer. She spends 30 minutes at her dance class. She cycles at a speed of 16 km/h. How long did Olivia spend away from home? | def solve() -> int:
distance_to_class = 20
detour = distance_to_class * 0.1
total_distance = distance_to_class + detour
time_to_class = total_distance / 16
time_at_class = 0.5
total_time = time_to_class * 2 + time_at_class
result = total_time * 60
return result
|
A delivery truck carries 200 parcels from a warehouse to a store and drops off 120 parcels on the way back. If the truck makes two more round trips carrying the same number of parcels, how many parcels would have been delivered in total? | def solve() -> int:
parcels_start = 200
parcels_dropped_off = 120
parcels_per_round_trip = (parcels_start - parcels_dropped_off) * 2
total_parcels_delivered = parcels_start + parcels_per_round_trip
result = total_parcels_delivered
return result
|
Student: A recipe calls for 2 cups of sugar for every 3 cups of flour. If you have 12 cups of flour, how much sugar do you need? | def solve() -> int:
sugar_per_flour = 2 / 3
flour = 12
sugar = sugar_per_flour * flour
result = sugar
return result
|
A football team has scored 120 points in 8 games. If they continue to score at the same rate, how many points will they score in 15 games? | def solve() -> int:
points_per_game = 120/8
num_games = 15
total_points_scored = points_per_game * num_games
result = total_points_scored
return result
|
A family has 500 dollars but spends 50 dollars per day. They earn 100 dollars every week. After 6 months, they merge with another family that has 750 dollars. How much money do they have now? | def solve() -> int:
days_in_six_months = 6 * 30
initial_money = 500
daily_spending = 50
weekly_earning = 100
additional_family_money = 750
total_spending = daily_spending * days_in_six_months
total_earning = weekly_earning * (days_in_six_months // 7)
total_money = initial_money + to... |
Ella ran a total of 42 kilometers in the first 6 days of a marathon training. She wants to run an average of 8 kilometers per day for the whole month of 30 days. How many kilometers does she need to run in the remaining 24 days? | def solve() -> int:
total_kilometers = 8 * 30
current_kilometers = 42
kilometers_needed = total_kilometers - current_kilometers
average_needed = kilometers_needed / 24
result = average_needed
return result
|
Alice wants to cut a 20-inch rope into pieces that are each 2 2/3 inches long. How many pieces can she cut? | def solve() -> int:
rope_length = 20
piece_length = 8/3
pieces = rope_length // piece_length
result = pieces
return result
|
John had some money in his piggy bank. He spent 6 dollars every time he went to the store. He made 3 trips to the store every month. If he had $72 dollars left in his piggy bank after a year, how much money, in dollars, did he have at first? | def solve() -> int:
total_spent = 6*3*12
result = 72 + total_spent
return result
|
Bob has $55 in his pocket and he needs to buy 2 notebooks and 8 pencils. Each notebook cost $4.00 meanwhile each pencil cost $0.50. How much money will be left from Bob after the purchase? | def solve() -> int:
total_price = 4 * 2 + 0.50 * 8
change = 55 - total_price
result = change
return result
|
Jack has 15 apples. He eats 2 apples every day and buys 3 apples every 3 days. How many apples will Jack have in 12 days? | def solve() -> int:
apples = 15
days = 0
while days < 12:
apples = apples - 2
if days % 3 == 0:
apples = apples + 3
days = days + 1
result = apples
return result
|
Student: A bookshelf has 5 shelves, each 3 feet long. If Tom wants to place books on the shelves, and each book is 0.5 feet wide, how many books can fit on the bookshelf? | def solve() -> int:
shelves = 5
length_of_each_shelf = 3
width_of_each_book = 0.5
total_length_of_bookshelf = shelves * length_of_each_shelf
number_of_books = total_length_of_bookshelf // width_of_each_book
result = number_of_books
return result
|
A breakfast diner offers bacon strips in groups of 3. If they anticipate 150 customers and every 8th customer orders bacon, how many groups of bacon strips will the diner need to prepare for their customers? | def solve() -> int:
count = 0
for i in range(1, 151):
if i % 8 == 0:
count += 1
result = (count // 3) + 1
return result
|
Student: A store is having a sale where all items are 25% off. If you have a coupon for an additional 10% off, how much will you save on a $75 purchase? | def solve() -> int:
price = 75
discount_1 = 0.25
discount_2 = 0.10
total_discount = discount_1 + discount_2
discounted_price = price * (1 - total_discount)
amount_saved = price - discounted_price
result = amount_saved
return result
|
A pizza parlor delivers 24 pizzas in an hour. If a delivery driver delivers six pizzas in one round, how many rounds of delivery does the driver make per hour? | def solve() -> int:
pizzas_per_hour = 24
pizzas_per_round = 6
rounds_per_hour = pizzas_per_hour / pizzas_per_round
result = rounds_per_hour
return result
|
A store has nine aisles, and each aisle has four shelves. Each shelf has eight boxes of cereal. How many boxes of cereal are there in the store in total? | def solve() -> int:
aisles = 9
shelves_per_aisle = 4
boxes_per_shelf = 8
total_boxes = aisles * shelves_per_aisle * boxes_per_shelf
result = total_boxes
return result
|
A car rental company charges $40 per day plus $0.25 per mile to rent a certain car. If the total charge was $125 for a 3-day rental, how many miles were driven? | def solve() -> int:
total_charge = 125
rental_days = 3
rental_charge_per_day = 40
charge_per_mile = 0.25
miles_driven = (total_charge - rental_days * rental_charge_per_day) / charge_per_mile
result = miles_driven
return result
|
Nancy's candy store had a clearance sale of 50% off on all chocolates, but only for the first 200 customers. If they had 1280 chocolates in the store, sold 560 of them during the sale, and 240 more at the regular price, how many chocolates and how much money did they make from the sale? | def solve() -> int:
stock = 1280
sold = 0
remaining = 0
money = 0
regular_price = 1
sale_price = regular_price * 0.5
sold = 560 + 240
remaining = stock - sold
money = (560 * sale_price) + (240 * regular_price)
result = (remaining, money)
return resul... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.