question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Lily fills up water balloons for 45 minutes at a rate of 6 water balloons every minute. Ami fills up water balloons for 35 minutes at a rate of 8 water balloons every minute. In the process, 18 of the water balloons pop on the ground. How many filled water balloons do Lily and Ami have in total? | def solve() -> int:
lily_time = 45
lily_rate = 6
ami_time = 35
ami_rate = 8
total_popped = 18
lily_taken = lily_time * lily_rate
ami_taken = ami_time * ami_rate
total = lily_taken + ami_taken - total_popped
result = total
return result
|
Student: In the month of April, Mr. and Mrs. Clark collected a total of 20 apples from the apple tree in their backyard. They gave half of the apples away and used the remaining apples to make 12 apple pies. How many apples were used for the pies? | def solve() -> int:
apples_collected = 20
apples_given_away = apples_collected / 2
apples_used_for_pies = apples_collected - apples_given_away
result = apples_used_for_pies
return result
|
A box of cookies contains 24 cookies. How many boxes of cookies are needed for a group of 20 people, if each person is to get 2 cookies? | def solve() -> int:
num_cookies = 24
num_people = 20
cookies_per_person = 2
cookies_needed = num_people * cookies_per_person
boxes_needed = (cookies_needed // num_cookies) + 1
result = boxes_needed
return result
|
Mary made 60 cookies for a fundraiser. She sold 8 cookies to the first customer, 12 more to the second customer, and 6 more to the third customer. She also gave 4 cookies to each of her neighbors. How many neighbors does she have, and how many cookies does she have left? | def solve() -> int:
cookies = 60
sold_first = 8
sold_second = 12
sold_third = 6
neighbors = (cookies - sold_first - sold_second - sold_third) // 4
cookies_left = cookies - sold_first - sold_second - sold_third - neighbors * 4
result = f'{neighbors}, {cookies_left}'
return resul... |
A soccer team attempted 12 shots on goal. If 2/3 of those shots were blocked, how many shots got through? | def solve() -> int:
total_shots = 12
shots_blocked = (2/3)*total_shots
shots_through = total_shots - shots_blocked
result = shots_through
return result
|
Amy is 12 years old and her uncle, David, is 36 years old. How old is David when Amy is half his age? | def solve() -> int:
amy_age = 12
david_age = 36
age_difference = david_age - amy_age
half_age = david_age / 2 - age_difference
david_half_age = half_age + amy_age
result = david_half_age
return result
|
The pet store sells dog toys for $3 each and cat toys for $2 each. If a group of 6 friends each buys 2 dog toys and 1 cat toy, how much money will they need in total? | def solve() -> int:
dog_price = 3
cat_price = 2
num_friends = 6
num_dog_toys_per_friend = 2
num_cat_toys_per_friend = 1
total_dog_toys = num_friends * num_dog_toys_per_friend
total_cat_toys = num_friends * num_cat_toys_per_friend
total_cost = (total_dog_toys * dog_price) + (tot... |
The number of people attending the fair this year is twice the number of people attending the fair last year. If the number of people attending the fair this year is 500, how many people attended the fair last year? | def solve() -> int:
a = 500
b = 2
result = a/b
return result
|
Student: A painter can paint a wall in 6 hours. If he works with a friend who can paint the same wall in 9 hours, how long will it take them to paint the wall together? | def solve() -> int:
painter_time = 6
friend_time = 9
total_time = 1 / (1/painter_time + 1/friend_time)
result = total_time
return result
|
A group of 20 students takes a trip to a nearby park. They walk 2 miles to reach the park, walk 3 miles inside the park and then walk 1 mile back to school. What was the total distance walked by the group and what was their average distance walked per student? | def solve() -> int:
students = 20
distance_to_park = 2
distance_in_park = 3
distance_back_to_school = 1
total_distance_walked = distance_to_park + distance_in_park + distance_back_to_school
average_distance_walked = total_distance_walked / students
result = f'Total distance walked:... |
Student: Elsie wants to buy a pair of earrings that costs 20 euros. Elsie has 100 pounds, and there are 1.2 euros to a pound. How many euros will Elsie have left after buying the earrings? | def solve() -> int:
pounds = 100
euros_per_pound = 1.2
earring_cost = 20
total_euros = pounds * euros_per_pound
remaining_euros = total_euros - earring_cost
result = remaining_euros
return result
|
If a class has 25 students and the student-teacher ratio is 5:1, how many teachers are there? | def solve() -> int:
total_people = 25
ratio = 5
students = total_people / (ratio + 1)
teachers = total_people - students
result = teachers
return result
|
Jerry wants to bake a cake for a party. If the recipe calls for 2 cups of sugar, but he only has a 1/2 cup measuring cup, how many times will he need to use the measuring cup to get the right amount of sugar? | def solve() -> int:
recipe_sugar = 2
measuring_cup = 1/2
cups_needed = recipe_sugar / measuring_cup
result = cups_needed
return result
|
Tom is preparing for a camping trip and wants to know how long it will take to set up camp. He decides to drive for an hour, hike for 30 minutes to his campsite, and set up the tent in half the time it took him to hike. If Tom's entire trip takes 5 hours, how long did it take him to set up camp? | def solve() -> int:
drive_time = 1
hike_time = 0.5
total_time = 5
camp_setup_time = (total_time - drive_time - hike_time) / 2
result = camp_setup_time
return result
|
A rectangular room measures 12 feet by 15 feet. If its ceiling is 10 feet high, what is the volume of the room in cubic feet? | def solve() -> int:
length = 12
width = 15
height = 10
volume = length * width * height
result = volume
return result
|
A fruit basket contains 3 apples, 2 oranges, and 1 banana. If the apples cost $0.50 each, the oranges cost $0.75 each, and the banana costs $0.25, how much does the fruit basket cost in total? | def solve() -> int:
num_apples = 3
num_oranges = 2
num_bananas = 1
apple_price = 0.5
orange_price = 0.75
banana_price = 0.25
total_cost = (num_apples * apple_price) + (num_oranges * orange_price) + (num_bananas * banana_price)
result = total_cost
return result
|
Student: Mia is making bracelets for a fundraiser. She uses 6 beads for each bracelet and 3 beads for each charm. She has 120 beads in total. She wants to make as many bracelets as possible and use the remaining beads for charms. How many bracelets and charms can she make? | def solve() -> int:
beads_per_bracelet = 6
beads_per_charm = 3
total_beads = 120
max_bracelets = total_beads // beads_per_bracelet
remaining_beads = total_beads % beads_per_bracelet
charms = remaining_beads // beads_per_charm
result = (max_bracelets, charms)
return result
|
Student: A car gets 25 miles per gallon of gas. If the car has a 15-gallon tank, how far can the car travel on a full tank of gas? | def solve() -> int:
miles_per_gallon = 25
tank_size = 15
result = miles_per_gallon * tank_size
return result
|
A carpenter can make a chair in 3 hours and a table in 5 hours. If they work for 15 hours, how many chairs and tables can they make? | def solve() -> int:
num_of_chairs = 15/3
num_of_tables = 15/5
result = (num_of_chairs, num_of_tables)
return result
|
Mike and Nancy are painting a mural for the school. Mike paints 36% more of the mural than Nancy. If Nancy paints 96% of the mural, how much of the mural has Mike painted? | def solve() -> int:
Nancys_mural = 0.96
Mikes_mural = Nancys_mural + 0.36
result = Mikes_mural
return result
|
Sam has 20 marbles of different colors. He puts them in a bag and draws one marble at random. He records the color of the marble and puts it back in the bag. He repeats this process 10 times. If he draws 3 red marbles, 4 blue marbles, and 3 green marbles, what is the probability of drawing a yellow marble in the next d... | def solve() -> int:
total_marbles = 20
yellow_marbles = total_marbles - 3 - 4 - 3
probability = yellow_marbles / total_marbles
result = probability
return result
|
A rectangular field is 15 meters wide and 50 meters long. What is the perimeter of the field? | def solve() -> int:
width = 15
length = 50
perimeter = 2 * (width + length)
result = perimeter
return result
|
In a library, there are 200 books. 75% of them are non-fiction, while 50% of the books have been borrowed more than once. How many books have been borrowed only once? | def solve() -> int:
books_total = 200
non_fiction_percentage = 75
books_borrowed_more_than_once_percentage = 50
non_fiction_books = (non_fiction_percentage / 100) * books_total
books_borrowed_more_than_once = (books_borrowed_more_than_once_percentage / 100) * books_total
books_borrowed... |
Student: Tim has 100 candies. Every 2 hours, he eats 1 candy. Every 5 hours, he gets 10 new candies. How many candies will Tim have in 24 hours? | def solve() -> int:
candies = 100
candies -= 1
candies += 10
candies -= 12
candies += 40
result = candies
return result
|
David went to the gym to work out, buy a protein shake, and two energy bars. He paid a total of $28. How much did the protein shake cost, if one energy bar was for $4 and the gym session was half that price? | def solve() -> int:
gym_session = 28 / 2
energy_bar = 4
protein_shake = 28 - (gym_session + (2 * energy_bar))
result = protein_shake
return result
|
Rachel has $2400. This is two-thirds of the money Peter has. How much money does Peter have? | def solve() -> int:
rachel_money = 2400
peter_money = rachel_money / (2 / 3)
result = peter_money
return result
|
Zack has 4 notebooks, 5 pencils, and 6 erasers. If he wants to make sure that he has the same amount of each item, what is the greatest number of each item Zack should keep? | def solve() -> int:
notebooks = 4
pencils = 5
erasers = 6
lowest = min(notebooks, pencils, erasers)
result = lowest
return result
|
am and his friends are collecting cans for recycling. They get 5 cents for each can they bring to the recycling center. Sam has collected 86 cans, Kelly has collected 74 cans, and Ben has collected 65 cans. How much money will they get in total if they split it equally among themselves? | def solve() -> int:
cents_per_can = 5
sam_cans = 86
kelly_cans = 74
ben_cans = 65
total_cans = sam_cans + kelly_cans + ben_cans
total_money = total_cans * cents_per_can
equal_share = total_money // 3
if total_money % 3 > 0:
sam_share = equal_share + 1
else... |
Lisa has a box that is 6 inches long, 4 inches wide, and 3 inches high. She wants to fill the box with cubes that are 1 inch on each side. How many cubes can she fit in the box? | def solve() -> int:
volume = 6 * 4 * 3
cube = 1 * 1 * 1
cubes = volume / cube
result = int(cubes)
return result
|
John went to the bank to deposit some cash. He deposited $31 more than Carla. If Carla deposited $276, how much money did John deposit? | def solve() -> int:
total_amount = 0
carla = 276
total_amount += carla
john = carla + 31
total_amount += john
result = john
return result
|
Jake gets paid hourly and is paid every Friday. He puts aside 20% of his earnings into a travel fund. In November, he worked 50 hours and spent $300 on a new laptop. What is the balance in his travel fund? | def solve() -> int:
hours_worked = 50
hourly_rate = 0
earnings = hours_worked * hourly_rate
expenses = 300
savings_percentage = 0.2
savings = earnings * savings_percentage
balance = savings - expenses
result = balance
return result
|
Student: You have a rectangular piece of paper that measures 16 inches by 10 inches. What is the perimeter of this piece of paper? | def solve() -> int:
length = 16
width = 10
perimeter = 2 * (length + width)
result = perimeter
return result
|
am's car gets 28 miles per gallon and he needs to travel 196 miles. If gas costs $2.50 per gallon, how much will he spend on gas for this trip? | def solve() -> int:
miles_per_gallon = 28
distance_to_travel = 196
cost_per_gallon = 2.50
gallons_needed = distance_to_travel / miles_per_gallon
cost_of_gas = gallons_needed * cost_per_gallon
result = cost_of_gas
return result
|
A recipe calls for 2/3 cups of sugar. If you want to make half of the recipe, how much sugar will you need in cups? | def solve() -> int:
sugar_required = 2/3
recipe_multiplier = 1/2
sugar_needed = sugar_required * recipe_multiplier
result = sugar_needed
return result
|
Tim needs to repair the roof of his house. He pays $100 for the permits. The contractor he hires charges $90 per hour and works for 4 days, 6 hours per day. How much will Tim have to pay the contractor? | def solve() -> int:
permits_cost = 100
hourly_rate = 90
days_worked = 4
hours_per_day = 6
total_hours_worked = days_worked * hours_per_day
contractor_cost = total_hours_worked * hourly_rate
result = permits_cost + contractor_cost
return result
|
Juanita wrote 60 pages of a novel and 20 pages of a script. If she edited 30 pages of the novel and 15 pages of the script, how many more pages does she need to edit? | def solve() -> int:
novel_pages = 60
script_pages = 20
novel_edited = 30
script_edited = 15
novel_left = novel_pages - novel_edited
script_left = script_pages - script_edited
total_left = novel_left + script_left
result = total_left
return result
|
Joe bought 4 packs of markers for his project. Each pack contains 2 blue, 3 green and 4 yellow markers. What is the total number of yellow markers Joe has in the 4 packs? | def solve() -> int:
number_blue_in_one_pack = 2
number_green_in_one_pack = 3
number_yellow_in_one_pack = 4
number_packs_bought = 4
total_number_yellow_markers = number_yellow_in_one_pack * number_packs_bought
result = total_number_yellow_markers
return result
|
Alex has 50 stickers. He wants to give his friend, who is collecting stickers, twice as many stickers as his other friends. How many stickers will Alex's collecting friend receive? | def solve() -> int:
alex_stickers = 50
friend_stickers = 2 * (alex_stickers / (1 + 1))
result = friend_stickers
return result
|
There are 24 students in a class. If each student has 2 pencils, how many pencils are there in total? | def solve() -> int:
students = 24
pencils_per_student = 2
total_pencils = students * pencils_per_student
result = total_pencils
return result
|
Lisa has 60 beads. She used 15 beads to make a bracelet and 18 beads to make a necklace. She then lost 5 beads while playing. She decided to sell the bracelet and the necklace for $3 each. If she bought the beads for $0.1 each, how much profit did she make? | def solve() -> int:
beads = 60
bracelet = 15
necklace = 18
price = 0.1
beads = beads - (bracelet + necklace + 5)
revenue = (bracelet + necklace) * 3
cost = beads * price
profit = revenue - cost
result = profit
return result
|
Jason swam in the pool for 1 hour. He covers 2 kilometers per hour. How many more hours does he need to swim to reach 10 kilometers? | def solve() -> int:
hours_swam = 1
speed = 2
distance_covered = hours_swam * speed
remaining_distance = 10 - distance_covered
hours_needed = remaining_distance / speed
result = hours_needed
return result
|
Student: John invested $7500 in a company, and the return of the investment after 3 months was 15%. What was the total amount that John got from his investment? | def solve() -> int:
principal = 7500
rate = 0.15
time = 3
time_in_years = time / 12
interest = principal * rate * time_in_years
total = principal + interest
result = total
return result
|
Paul has 15 green apples. After eating 5, he gave 3 to his siblings and 2 to his neighbor. How many green apples does he have left? | def solve() -> int:
total_apples = 15
eaten_apples = 5
given_apples = 3 + 2
remaining_apples = total_apples - (eaten_apples + given_apples)
result = remaining_apples
return result
|
A pack of pencils contains 24 pencils. If each student in a class of 35 gets one pencil each, how many pencils will be left in the pack? | def solve() -> int:
total_pencils = 24
num_students = 35
pencils_used = num_students
pencils_left = total_pencils - pencils_used
result = pencils_left
return result
|
To bake a cake, Sarah needs 1.5 cups of sugar. She has a 10 lb bag of sugar that needs to be measured in 1 cup portions. If Sarah can measure 1 cup of sugar in 1 minute, how many hours will it take her to measure all the sugar? | def solve() -> int:
sugar_needed = 1.5
sugar_bag = 10
sugar_per_cup = sugar_bag / 16
time_per_cup = 1
total_cups = sugar_needed / sugar_per_cup
total_time = total_cups * time_per_cup
hours = total_time / 60
result = hours
return result
|
A chef can prepare a 3-course meal in 2 hours. Her trainee takes 1/2 more time to complete the same meal. If the chef gives her trainee 20 orders, how many hours will it take her to finish them? | def solve() -> int:
chef_time = 2
trainee_time = chef_time * 1.5
total_orders = 20
time_per_order = (chef_time + trainee_time) / 20
total_time = total_orders * time_per_order
result = total_time
return result
|
The sum of two numbers is 20 and the difference between the two numbers is 4. What is the product of the two numbers? | def solve() -> int:
sum_nums = 20
diff_nums = 4
num1 = (sum_nums + diff_nums)/2
num2 = sum_nums - num1
product_nums = num1 * num2
result = product_nums
return result
|
Leo has $60 in his pocket. He goes to the arcade with his friends. He spends $3 for each game he plays. He plays 5 games on Monday, 4 games on Tuesday, and 6 games on Wednesday. He also buys a soda for $2 each day. On Thursday, he goes to the bank and exchanges as many $1 bills as he can for quarters. He keeps the rest... | def solve() -> int:
game_spending = 3
weekly_game_spending = (5 + 4 + 6) * game_spending
weekly_soda_spending = 2 * 3
remaining_money = 60 - weekly_game_spending - weekly_soda_spending
one_bills = remaining_money
quarters = one_bills * 4
result = quarters
return result
|
A store offers a 20% discount on all items in the store. If a customer buys a jacket for $60, how much money will they save with the discount? | def solve() -> int:
discount_percentage = 20
original_price = 60
discount_amount = original_price * (discount_percentage / 100)
result = discount_amount
return result
|
There are three boxes of fruit: apples, oranges, and lemons. The first box has 10 apples, the second box has 7 oranges, and the third box has 3 lemons. If a fruit is to be picked at random, what is the probability of it being an orange? | def solve() -> int:
total_fruits = 10 + 7 + 3
chance_of_orange = 7 / total_fruits
result = chance_of_orange
return result
|
A boat travels a distance of 25 km downstream in 5 hours. On the way back, it covers the same distance in 7 hours. What is the speed of the boat in still water and what is the speed of the current? | def solve() -> int:
distance = 25
time_downstream = 5
time_upstream = 7
speed_still = (distance / ((time_downstream * time_upstream) ** 0.5 + time_downstream + time_upstream)) * 2
speed_current = ((speed_still / time_downstream) - (speed_still / time_upstr... |
For the school field trip, the teacher wants to pack lunches for the students. She wants to have enough food so each student can have a sandwich, fruit, and a drink. At the grocery store, she can buy bread for $2, apples for $1 per pound, and juice boxes for $3 per pack of 8. If there are 30 students, how much will she... | def solve() -> int:
bread_price = 2
apple_price = 1
juice_price = 3/8
num_students = 30
sandwiches = num_students
fruits = num_students
drinks = num_students
bread_needed = sandwiches
apples_needed = fruits
juice_boxes_needed = drinks/8
total_cost = bread_... |
Leo wants to play three different games at the arcade. The shooting game costs 6 tokens, the racing game costs 5 tokens, and the claw machine costs 4 tokens. Leo has 12 tokens. How many more tokens should Leo get? | def solve() -> int:
shooting = 6
racing = 5
claw = 4
tokens = 12
total_cost = shooting + racing + claw
difference = total_cost - tokens
result = difference
return result
|
Sarah and her friends went to the bowling alley. A game costs $4.75 per person and shoe rental costs $3.00 per person. They were given a $1 discount per person if they played two games. How much did Sarah and her friends spend if they played one game and rented shoes? | def solve() -> int:
num_people = 5
game_cost = 4.75
shoe_rental = 3.00
discount = 1.00
total_cost = (num_people * game_cost) + (num_people * shoe_rental) - (num_people * discount)
result = total_cost
return result
|
The baker sold 7 pies today. If 2 pies were strawberry flavored and 5 were blueberry, how many blueberry pies were sold? | def solve() -> int:
total_pies = 7
strawberry = 2
blueberry = 5
result = total_pies - strawberry
return result
|
Student: In a small town, there were 45 workers in total. The number of men totaled to 28 while the number of women was 17. If the salary for each man was 30% more than each woman, how much was the total salary for the men in the town? | def solve() -> int:
men = 28
women = 17
total_workers = men + women
woman_salary = 1
man_salary = 1.3 * woman_salary
total_man_salary = men * man_salary
result = total_man_salary
return result
|
A rectangle measures 8 cm by 15 cm. What is its area? | def solve() -> int:
length = 15
width = 8
area = length * width
result = area
return result
|
Niki has $50 but needs to buy 5 notebooks all of the same price. If the notebooks cost $7.50 each, how much money will Niki have left? | def solve() -> int:
notebooks = 5
notebook_price = 7.50
money = 50
total = 0
total = notebooks * notebook_price
remaining_money = money - total
result = remaining_money
return result
|
Student: Alice is planning a road trip. She has a map that tells her that the total distance of the trip is 200 miles. If she drives at a constant speed of 60 miles per hour, how long will the trip take her? | def solve() -> int:
distance = 200
speed = 60
time = distance / speed
result = time
return result
|
Leo buys tickets for a movie and some snacks. The movie ticket costs $12 for adults and $8 for children, and he buys 2 adult tickets and 3 child tickets. The popcorn costs $5 per bucket, and he buys one bucket for himself and one for the children to share. The soda costs $2 per cup, and he buys one cup for each person.... | def solve() -> int:
movie_tickets = 2 * 12 + 3 * 8
popcorn = 1 * 5 + 1 * 5
soda = (2 + 3) * 2
total = movie_tickets + popcorn + soda
result = total
return result
|
Rachel has 8 workbooks, each with 150 pages. She printed out her homework and used single-sided printing, with 1 page per sheet of paper. How many sheets of paper did she use for her homework? | def solve() -> int:
workbooks = 8
pages_per_workbook = 150
sheets_per_page = 1
total_sheets = workbooks * pages_per_workbook * sheets_per_page
result = total_sheets
return result
|
A loaf of bread costs $2.50 and a bag of chips costs twice as much as a loaf of bread. If Alex plans to buy 3 loaves of bread and 2 bags of chips, how much will it cost? | def solve() -> int:
chip_cost = 2 * 2.50
bread_cost = 2.50
total_cost = (chip_cost * 2) + (bread_cost * 3)
result = total_cost
return result
|
A software company has 5 programmers and each programmer can write 500 lines of code per day. If they work for 5 days, how many lines of code can be written in total? | def solve() -> int:
programmers = 5
lines_per_day = 500
days = 5
total_lines = programmers * lines_per_day * days
result = total_lines
return result
|
Kelly has a jar of peanuts. If the total value of the peanuts is $12, and the jar contains a mix of almonds and peanuts in a ratio of 1:3, how many peanuts does she have? | def solve() -> int:
total_value = 12
ratio_peanuts_to_almonds = 1/3
total_nuts = total_value * 3 / (1+3)
peanuts = total_nuts * 1 / 3
result = peanuts
return result
|
6. Alan works 28 hours per week and earns $15 per hour for regular hours and any hours over 24 are paid at 1.5 times the regular rate. How much money does he earn in 7 weeks? | def solve() -> int:
hours_worked = 7 * 28
overtime_hours = 0
overtime_pay = 0
reg_pay = hours_worked * 15
if (hours_worked > 24):
overtime_hours = hours_worked - 24
overtime_pay = overtime_hours * (15 * 1.5)
result = reg_pay + overtime_pay
return result
|
Johnny has 20 marbles and he wants to share them with his 4 friends. If he gives each friend 2 marbles, how many marbles does he have left? | def solve() -> int:
total_marbles = 20
friends = 4
marbles_given_out = friends * 2
marbles_left = total_marbles - marbles_given_out
result = marbles_left
return result
|
If a bottle of soda costs $5 and Fred buys 3 bottles each week, how much will he spend on soda at the end of the month? | def solve() -> int:
cost_per_bottle = 5
bottles_weekly = 3
weeks_month = 4
total_cost = cost_per_bottle * bottles_weekly * weeks_month
result = total_cost
return result
|
Olivia and Max go to a bookstore on a Monday, where all books are 25% off. Olivia buys 2 novels for $12 each and Max buys 3 comic books for $5 each. How much do they pay altogether after the discount? | def solve() -> int:
novel_price = 12
comic_price = 5
novel_quantity = 2
comic_quantity = 3
novel_total = novel_price * novel_quantity
comic_total = comic_price * comic_quantity
total = novel_total + comic_total
discount = total * 0.25
final_total = total - discount
... |
A grocery store sells bananas for $0.50 per pound. If they sold 100 pounds of bananas on Monday, 80 pounds on Tuesday, 120 pounds on Wednesday, 90 pounds on Thursday, and 200 pounds on Friday, how much money did they make selling bananas for the whole week? | def solve() -> int:
monday_bananas = 100
tuesday_bananas = 80
wednesday_bananas = 120
thursday_bananas = 90
friday_bananas = 200
price_per_pound = 0.50
total_bananas = monday_bananas + tuesday_bananas + wednesday_bananas + thursday_bananas + friday_bananas
total_bananas_sa... |
Student: Sam received 32 lollipops for his birthday. He gave 3 lollipops each to his two siblings and 4 lollipops to his best friend. How many lollipops does Sam have left? | def solve() -> int:
lollipops_received = 32
lollipops_given_to_siblings = 3 * 2
lollipops_given_to_friend = 4
lollipops_left = lollipops_received - lollipops_given_to_siblings - lollipops_given_to_friend
result = lollipops_left
return result
|
Mary is practicing the piano. She wants to play a song that is 5 minutes long. If she can play at a speed of 120 beats per minute, how many beats does the song have? | def solve() -> int:
beats = 120 * 5
result = beats
return result
|
Student: Q5: The area of a rectangular field is 25 meters. If the length of the field is 7 meters, what is the width of the field? | def solve() -> int:
area = 25
length = 7
width = area / length
result = width
return result
|
In a bingo game, Aisha and Bilal each have a card with 25 numbers from 1 to 75. A random number is drawn from a basket and the players mark it on their cards if they have it. The first player to mark five numbers in a row, column, or diagonal wins. Aisha marks the numbers 5, 15, 25, 35, and 45 in a column on her card. ... | def solve() -> int:
aisha = 5 + 15 + 25 + 35 + 45
bilal = 3 + 18 + 33 + 48 + 63
sum = aisha + bilal
result = sum
return result
|
A grocery store has 48 items that need to be restocked. Each item takes 2 minutes to restock and restocking can only be done during store closing hours, which lasts for 1 hour. How many days will it take to restock all the items? | def solve() -> int:
num_items = 48
restock_time = 2
closing_hours = 1
total_time = num_items * restock_time
total_time_hours = total_time / 60
num_days = total_time_hours / closing_hours
result = num_days
return result
|
Student: A circle has a diameter of 10cm. What is the circumference of the circle? | def solve() -> int:
diameter = 10
radius = diameter / 2
circumference = 2 * 3.14 * radius
result = circumference
return result
|
A recipe serves 6 people and calls for 1.5 cups of flour. How many cups of flour are needed to serve 18 people? | def solve() -> int:
flour = 1.5 * 18 / 6
result = flour
return result
|
Student: A music store sells CDs for $10 each. If you buy 4 CDs you get a discount of $5. If John buys 7 CDs, how much will he pay? | def solve() -> int:
price = 10
discount = 5
quantity = 7
total = price * quantity
num_discounts = quantity // 4
final = total - num_discounts * discount
result = final
return result
|
A new fitness program earns $500,000 in sales during its first two months. Over its lifetime, it earns 3 times that amount. The program creators keep 65% of the revenue, and the development cost was $100,000. How much profit do they make? | def solve() -> int:
sales_first_two_months = 500000
lifetime_earnings = 3 * sales_first_two_months
revenue = lifetime_earnings - 100000
profit = revenue * 0.65
result = profit
return result
|
A factory has twelve trucks to haul goods to a warehouse. Each truck has a capacity of eight crates filled with 100 items. What is the total amount of items that the factory can transport in all of its trucks? | def solve() -> int:
num_trucks = 12
capacity_per_truck = 8
items_per_crate = 100
total_capacity = num_trucks * capacity_per_truck
total_items = total_capacity * items_per_crate
result = total_items
return result
|
Frank and Grace are painting a fence that is 60 meters long. Frank can paint 5 meters in an hour, while Grace can paint 4 meters in an hour. They start at the same time from opposite ends of the fence. How many meters of the fence will be left unpainted when they meet? | def solve() -> int:
fence_length = 60
frank_rate = 5
grace_rate = 4
combined_rate = frank_rate + grace_rate
time = fence_length / combined_rate
frank_distance = frank_rate * time
grace_distance = grace_rate * time
unpainted_distance = fence_length - frank_distance - grace_distance
re... |
A store sells t-shirts for $20 each. If a customer buys 3 t-shirts, they get a 10% discount. How much will the customer pay for 3 t-shirts after the discount? | def solve() -> int:
price_per_shirt = 20
num_of_shirts = 3
total_price = price_per_shirt * num_of_shirts
discount_amount = total_price * 0.1
final_price = total_price - discount_amount
result = final_price
return result
|
If each person skated for 2 hours and the rink was open for 5 hours, how many people can skate at the same time if they all take turns and each person gets to skate for 30 minutes? | def solve() -> int:
total_skate_time = 2
opening_hours = 5
time_per_person = 0.5
available_time = opening_hours / time_per_person
people_skating = available_time / total_skate_time
result = people_skating
return result
|
A store sells 4 types of candies. Candy A costs $1, Candy B costs $2, Candy C costs $3, and Candy D costs $4. If Jane buys 3 Candy A, 2 Candy B, 4 Candy C, and 1 Candy D, how much money did she spend? | def solve() -> int:
candy_a_cost = 1
candy_b_cost = 2
candy_c_cost = 3
candy_d_cost = 4
candy_a_qty = 3
candy_b_qty = 2
candy_c_qty = 4
candy_d_qty = 1
total_cost = (candy_a_cost * candy_a_qty) + (candy_b_cost * candy_b_qty) + (candy_c_cost * candy_c_qty) + (candy_d_cost * candy_d_qt... |
Possible new questions and python programs: There are 8 pens in a pencil case. There are 4 more pencils than pens, and there are three times as many erasers as pencils and twice as many sharpeners as erasers. After 3 of each item is removed from the pencil case, how many items are left in total? | def solve() -> int:
pens = 8
pencils = pens + 4
erasers = pencils * 3
sharpeners = erasers * 2
pens = pens - 3
pencils = pencils - 3
erasers = erasers - 3
sharpeners = sharpeners - 3
total = pens + pencils + erasers + sharpeners
result = total
return result
|
am spent some time running on 2 days. He ran for 5 kilometers on the first day and 10 kilometers on the second day. How many kilometers did Sam run in total? | def solve() -> int:
total_distance = 0
total_distance = total_distance + 5
total_distance = total_distance + 10
result = total_distance
return result
|
A factory produces 500 cans every hour, but the machines break down for 15 minutes every 3 hours. How many cans will be produced per day if the factory operates for 12 hours? | def solve() -> int:
hours_per_day = 12
cans_per_hour = 500
broken_time_per_day = hours_per_day // 3 * 0.25
cans_per_day = (hours_per_day - broken_time_per_day) * cans_per_hour
result = cans_per_day
return result
|
A watermelon costs six times as much as an apple. If an apple costs $0.50, how much will Anna pay for 2 watermelons? | def solve() -> int:
cost_of_watermelon = 0.5 * 6
cost_of_2_watermelons = cost_of_watermelon * 2
result = cost_of_2_watermelons
return result
|
A parcel delivery service charges $10 for the first pound and $5 for each additional pound or fraction thereof. If James shipped a parcel that weighed 3.6 pounds, how much was he charged? | def solve() -> int:
weight = 3.6
base_price = 10
additional_weight = weight - 1
additional_cost = 5 * (round(additional_weight))
cost = base_price + additional_cost
result = cost
return result
|
A car travels 250 km using 15 liters of petrol. What is the average fuel consumption of the car in liters per 100 km? | def solve() -> int:
distance = 250
fuel = 15
average_fuel_consumption = (fuel / distance) * 100
result = average_fuel_consumption
return result
|
Student: Blake, Philip, and Doug are friends who like cards. Blake has 12 cards, which is 30% of Philip's cards, and Doug has four times as many cards as Philip. How many cards do all of the friends have? | def solve() -> int:
blake_cards = 12
philip_cards = 0
doug_cards = 0
philip_cards = blake_cards / 0.3
doug_cards = philip_cards * 4
result = blake_cards + philip_cards + doug_cards
return result
|
A vase is on sale for 25% off its original price of $80. What is the sale price of the vase? | def solve() -> int:
original_price = 80
discount = 0.25
discount_amount = original_price * discount
sale_price = original_price - discount_amount
result = sale_price
return result
|
A group of 30 friends planned to donate equal amounts for a cause. If 10% of the friends backed out, how much more will the remaining friends have to donate to make up for the loss? | def solve() -> int:
total_friends = 30
backed_out = total_friends * 0.1
remaining_friends = total_friends - backed_out
total_donation = 1000
shortfall = (total_donation / total_friends) * backed_out
additional_donation = shortfall / remaining_friends
result = additional_donation
return ... |
Student: A class has 25 students. If the average score of the class is 70 and 1/5 of the students score an average of 80 each, what is the average score of the remaining students? | def solve() -> int:
num_students = 25
avg_score = 70
num_high_score_students = num_students // 5
high_score_avg = 80
remaining_students = num_students - num_high_score_students
remaining_score_avg = (avg_score * num_students - high_score_avg * num_high_score_students) / remaining_students
re... |
Sarah and John have a combined experience of 80 years in the engineering sector. John has been working for 7 years less than twice the number of years Sarah has been. How long has Sarah been working in engineering? | def solve() -> int:
sarah_years = 0
john_years = 0
sarah_years = (80 + 7) / 3
result = sarah_years
return result
|
In a city, there are 120,000 people and 60% of them use public transportation. If there are 48,000 people who do not use public transportation, how many people use public transportation in that city? | def solve() -> int:
total_people = 120000
public_transportation_percentage = 60
no_public_transportation = 48000
public_transportation = total_people - no_public_transportation
public_transportation = public_transportation * public_transportation_percentage / 100
result = pub... |
Jared went to the hardware store to buy nails. He knows he needs 500 nails. He has already used 215 nails. If each nail costs $0.05, how much change will he get from $25? | def solve() -> int:
nails_needed = 500
nails_used = 215
nail_cost = 0.05
total_cost = nails_needed * nail_cost
change = 25 - total_cost
result = change
return result
|
Farmer Purple has a triangular field that has a base length of 8 meters. The height of the triangle is 6 meters. If each square meter can grow 10 stalks of wheat, find the total number of wheat stalks the field can produce? | def solve() -> int:
area = (8 * 6) / 2
wheat_per_meter = 10
total_wheat = area * wheat_per_meter
result = total_wheat
return result
|
Diana is taking a train from Paris to Berlin and wants to know how long the trip will take. The train has an average speed of 200 km/h, but it has to stop at three stations for 10 minutes each. The distance between Paris and Berlin is 1050 km. How long does the trip take in hours and minutes? | def solve() -> int:
time_travel = 1050 / 200
time_stops = 3 * 10 / 60
time_total = time_travel + time_stops
hours = time_total // 1
minutes = time_total % 1 * 60
result = f"{hours} hours and {minutes} minutes"
return result
|
Robert likes to take the scenic route. For every six steps forward, he takes four steps backwards. If the distance between his house and the museum is 120 steps, how many steps does Robert take to get to the museum? | def solve() -> int:
forward_steps = 6
backward_steps = 4
distance = 120
total_steps = distance / (forward_steps - backward_steps)
result = total_steps * forward_steps
return result
|
A grocery store sold $1,520 worth of products today. If the average price per product was $8, how many products did they sell? | def solve() -> int:
total_sales = 1520
price_per_product = 8
total_products_sold = total_sales/price_per_product
result = total_products_sold
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.