question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
In a store, there are 45 shirts and 7/9 of them are on sale. How many shirts are not on sale? | def solve() -> int:
shirts = 45
on_sale = (7/9) * shirts
not_on_sale = shirts - on_sale
result = not_on_sale
return result
|
Peter has some foxes, 7 wolves and some coyotes. He has 4 times as many foxes as coyotes and half as many wolves as coyotes. How many coyotes does he have? | def solve() -> int:
wolves = 7
coyotes = wolves * 2
foxes = coyotes * 4
result = coyotes
return result
|
Carlos went to the amusement park with 3 friends. It cost each of them $38 to enter, plus there was a one-time $20 parking fee. How much did Carlos end up spending? | def solve() -> int:
num_friends = 3
cost_per_person = 38
parking_fee = 20
total_cost = (num_friends * cost_per_person) + parking_fee
result = total_cost
return result
|
If 12 people chose red in the class survey, what fraction of the class chose colors other than green and pink? | def solve() -> int:
total_people = 30
number_of_green = total_people / 2
number_of_pink = 18/3
number_of_red = 12
other_than_green_and_pink = number_of_red + total_people - (number_of_green + number_of_pink)
fraction = other_than_green_and_pink / total_people
result = fraction
return r... |
If a recipe calls for 3/4 cup of sugar and you only have a 1/4 measuring cup, how many times do you need to fill the measuring cup to get 3/4 cup of sugar? | def solve() -> int:
times_to_fill = 3/4 / 1/4
result = times_to_fill
return result
|
Student: Amy wants to bake some cupcakes for her friends. She needs 2 eggs, 3 cups of flour, and 1 cup of sugar for each batch of 12 cupcakes. She has 18 eggs, 15 cups of flour, and 10 cups of sugar in her pantry. How many batches of cupcakes can she make with the ingredients she has? | def solve() -> int:
eggs_per_batch = 2
flour_per_batch = 3
sugar_per_batch = 1
cupcakes_per_batch = 12
eggs_in_pantry = 18
flour_in_pantry = 15
sugar_in_pantry = 10
batches_with_eggs = eggs_in_pantry // eggs_per_batch
batches_with_flour = flour_in_pantry // flour_per_batch
batch... |
A magician has 50 cards. After each guess, the magician discards half of the remaining cards. If they can make 5 guesses, how many cards will be left? | def solve() -> int:
cards = 50
guesses = 5
for i in range(guesses):
cards = cards // 2
result = cards
return result
|
6. There are 450 boxes in a shipment, the boxes can either have 4 kg or 6 kg in them. How much does the entire shipment weigh in total? | def solve() -> int:
weigth_small_box = 4
ammount_small_box = 300
weigth_large_box = 6
ammount_large_box = 150
result = (weigth_small_box * ammount_small_box) + (weigth_large_box * ammount_large_box)
return result
|
Nick is making a cake. The recipe requires 3 eggs, 1 cup of sugar, 2 cups of flour, and half a cup of butter. If he wants to double the recipe, how much of each ingredient does he need? | def solve() -> int:
eggs = 3
sugar = 1
flour = 2
butter = 0.5
double_eggs = eggs * 2
double_sugar = sugar * 2
double_flour = flour * 2
double_butter = butter * 2
result = f"Eggs: {double_eggs}, Sugar: {double_sugar}, Flour: {double_flour}, Butter: {double_butter}"
retur... |
In a certain math class, 15 students passed, 25 students failed, and 10 students abstained from the final exam. What is the success rate of the class, rounded to the nearest percentile? | def solve() -> int:
total_no_students = 15 + 25 + 10
no_passed = 15
success_rate = (no_passed/total_no_students)*100
result = round(success_rate)
return result
|
Student: A store sells shoes for $80 and sneakers for $50. If the store sells 5 shoes and 8 sneakers, what is the total revenue? | def solve() -> int:
shoes_price = 80
sneakers_price = 50
shoes_sold = 5
sneakers_sold = 8
total_revenue = shoes_price * shoes_sold + sneakers_price * sneakers_sold
result = total_revenue
return result
|
Julia was shopping for a new dress and wanted to spend no more than $100. The dress store had a sale where she could get 20% off and an extra discount of $30. How much lower was the price of the dress than what Julia wanted to spend? 5 cups of coffee are enough to keep one programmer awake for 3 hours, or three manager... | def solve() -> int:
original_price = 100 + 30
discounted_price = original_price - (original_price * 0.2)
price_difference = original_price - discounted_price
result = price_difference
return result
|
In a concert, each artist can bring their 3 backup singers. Fifteen security personnel and a quarter as many stage technicians will also attend the concert. If there are 20 artists, how many chairs must be prepared for the concert? | def solve() -> int:
artists = 20
backup_singers = artists * 3
security_personnel = 15
stage_technicians = security_personnel / 4
total_people = artists + backup_singers + security_personnel + stage_technicians
chairs_needed = total_people
result = chairs_needed
return result
|
Noah bought three apples on Monday for $1.50 each, six bananas on Tuesday for $0.99 each, four oranges on Wednesday for $1.25 each and five pears for $1.10 each on Thursday. What was the total cost? | def solve() -> int:
cost_apple = 1.5 * 3
cost_banana = 0.99 * 6
cost_orange = 1.25 * 4
cost_pear = 1.10 * 5
total_cost = cost_apple + cost_banana + cost_orange + cost_pear
result = total_cost
return result
|
A pizza needs 8 slices, and a family of 5 needs 3 pizzas. How many slices of pizza do they have in total? | def solve() -> int:
slices_per_pizza = 8
num_pizzas = 3
total_slices = slices_per_pizza * num_pizzas * 5
result = total_slices
return result
|
Kyle has 18 markers. He gave away 6 markers. What fraction of markers does he have now? | def solve() -> int:
Markers_Total = 18
Markers_Given = 6
Markers_Left = Markers_Total - Markers_Given
Fraction_Left = Markers_Left/Markers_Total
result = Fraction_Left
return result
|
Four pigs found 9 baskets, each containing 600 oranges. The four pigs then decided to take an equal number of oranges and create 5 baskets with the same number of oranges in each basket. How many oranges were in each basket after the pigs completed the task? | def solve() -> int:
total_number_oranges = 600 * 9
oranges_taken_by_each_pig = total_number_oranges / 4
remaining_oranges = total_number_oranges - (oranges_taken_by_each_pig * 4)
number_oranges_each_basket = remaining_oranges // 5
result = number_oranges_each_basket
return ... |
A rectangular field is 100 meters long and 75 meters wide. What is 70% of the field? | def solve() -> int:
length = 100
width = 75
area = length * width
perc = 70/100
portion = area * perc
result = portion
return result
|
John found out that the perimeter of a square he had just solved was equal to the area of a rectangle he had solved in the previous problem. If the perimeter of the square was 24, what's the length of the rectangle? | def solve() -> int:
p = 24
s = p/4
a = p*s
l = a/s
result = l
return result
|
Sarah is paid to clean the pool. She earns $10 for every hour of pool cleaning. If she can clean the pool for 4 hours straight, how much does she earn? | def solve() -> int:
hours_cleaning = 4
hourly_rate = 10
total_earnings = hours_cleaning * hourly_rate
result = total_earnings
return result
|
A triangle has one angle that measures 50 degrees and another that measures 70 degrees. What is the measure of the third angle? | def solve() -> int:
angle1 = 50
angle2 = 70
angle3 = 180 - angle1 - angle2
result = angle3
return result
|
A company offers packages of pens with discounts for bulk purchases. A package of 10 pens costs $8, while a package of 25 pens costs $18. If a customer needs 70 pens, which package should they choose to get the best deal? | def solve() -> int:
pens_needed = 70
pack1_price = 8
pack1_pens = 10
pack1_cost_per_pen = pack1_price / pack1_pens
pack2_price = 18
pack2_pens = 25
pack2_cost_per_pen = pack2_price / pack2_pens
if pens_needed <= pack1_pens:
total_cost = pack1_price
elif pens_needed >= pack2_p... |
In a jar of marbles, there are 4 red marbles, 5 blue marbles, and 3 green marbles. What is the probability of randomly selecting a blue marble? | def solve() -> int:
total_marbles = 12
blue_marbles = 5
probability = blue_marbles / total_marbles
result = probability
return result
|
A grocery store has some orders to stock and needs to pack fruit baskets for a picnic. 8 local households have each ordered 4 fruit baskets and half of the guests at the picnic have requested 2 fruit baskets each. If the grocery store prepares a total of 48 fruit baskets, how many people are attending the picnic? | def solve() -> int:
local_households = 8
baskets_per_household = 4
guests_at_picnic = 48 / 2
total_baskets = local_households * baskets_per_household
people_attending = total_baskets + guests_at_picnic
result = people_attending
return result
|
Student: Jeff has £51 to buy x items of the same price. What is the maximum number of items Jeffrey can buy if each item costs £3? | def solve() -> int:
money = 51
price = 3
items = money // price
result = items
return result
|
Kim and her friend, Mia, wanted to explore the city by taking the bus. They bought a day pass that costs $5 and allows unlimited rides. They boarded the first bus at 9:00 am and rode for 20 minutes, then got off and walked for 10 minutes to the next bus stop. They boarded the second bus and rode for 25 minutes, then go... | def solve() -> int:
number_of_rides = 9
total_riding_time = 20 + 25 + 30 + 35 + 40 + 45 + 50 + 55 + 60
cost_without_pass = number_of_rides * 2.5
cost_with_pass = 5
savings = cost_without_pass - cost_with_pass
result = savings
return result
|
A jar of honey, which is 500 grams, costs $5. If Sam sells it for $0.02 per gram, and offers a free teaspoon of honey (5 grams) for every 100 grams bought, how much will be his profit? | def solve() -> int:
price = 0.02
sold_grams = 500
free_teaspoons = (sold_grams // 100) * 5
paid_grams = sold_grams - free_teaspoons
revenue = paid_grams * price
cost = 5
profit = revenue - cost
result = profit
return result
|
A train travels at a speed of 60 miles per hour. How many minutes will it take the train to travel 50 miles? | def solve() -> int:
speed = 60
distance = 50
minutes = (distance / speed) * 60
result = minutes
return result
|
A bakery received a large catering order. They need to bake 45 pies. Each box can hold 4 pies. How many boxes do they need? | def solve() -> int:
total_pies = 45
pies_per_box = 4
total_boxes = total_pies / pies_per_box
result = round(total_boxes)
return result
|
Student: Lauren and Dan both decided to split the bill equally after a dinner. If the bill totaled $86 and Dan left a 20% tip, how much did each of them pay? | def solve() -> int:
bill = 86
tip = 0.2
total_amount = bill + bill * tip
each_paid = total_amount / 2
result = each_paid
return result
|
Sarah bought a new car with a starting cost of $20,000. Each year, the value of her car depreciates by 10%. What will the value of her car be in 5 years? | def solve() -> int:
car_value = 20000
for i in range(5):
car_value = car_value * 0.9
result = f'<<<{car_value}>>>'
result = car_value
return result
|
Jill spent 9 hours studying on Monday, 7 hours studying on Tuesday and 8.5 hours studying on Wednesday. What was the average amount of hours Jill spent studying per day? | def solve() -> int:
hours_1 = 9
hours_2 = 7
hours_3 = 8.5
total_days = 3
total_hours = hours_1 + hours_2 + hours_3
result = total_hours/ total_days
return result
|
A family of 4 eats 2 loaves of bread, 1 pound of butter, and 6 eggs per week. If they make 3 sandwiches per day, how many weeks will it take them to finish all the bread, butter, and eggs? | def solve() -> int:
loaves = 2
butter = 1
eggs = 6
sandwiches = 3*4*7
weeks = (loaves*16)/(sandwiches*2) + butter/(sandwiches/10) + eggs/sandwiches
result = weeks
return result
|
ara owns a store. At the end of the day she has a total of $744. She had $591 before the day started. How much money has she made in total? | def solve() -> int:
before = 591
after = 744
revenue = (after - before)
result = revenue
return result
|
A pack of pencils costs $3.50. In the store, there are three different sizes of packs available: small, medium, and large, costing $3.50, $6.00, and $10.00 respectively. If a customer buys one of each size pack, how much did they spend? | def solve() -> int:
cost_small_pack = 3.5
cost_medium_pack = 6
cost_large_pack = 10
total_cost = cost_small_pack + cost_medium_pack + cost_large_pack
result = total_cost
return result
|
The base of a triangle is 12 inches and the height is 8 inches. What is the area of the triangle? | def solve() -> int:
base = 12
height = 8
area = 0.5 * base * height
result = area
return result
|
A hardware store sells hammers for $20 and wrenches for $15. If Steve buys 3 hammers and 4 wrenches, what is his total cost? | def solve() -> int:
cost_hammer = 20
cost_wrench = 15
num_hammers = 3
num_wrenches = 4
total_cost = (num_hammers * cost_hammer) + (num_wrenches * cost_wrench)
result = total_cost
return result
|
Mike traveled 30 miles on foot on Monday. On Tuesday, he traveled 10 more miles, and on Wednesday, he traveled half the distance he traveled on Monday and Tuesday combined. How many miles did Mike travel in total? | def solve() -> int:
monday_distance = 30
tuesday_distance = monday_distance + 10
wednesday_distance = (monday_distance + tuesday_distance) / 2
total_distance = monday_distance + tuesday_distance + wednesday_distance
result = total_distance
return result
|
The price of a laptop is $800. If the price is reduced by 20%, what is the new price? | def solve() -> int:
price = 800
discount = 0.20
new_price = price * (1 - discount)
result = new_price
return result
|
The average of 3 numbers is 20. If one of the numbers is 25 and the other number is 21, what is the third number? | def solve() -> int:
average = 20
first_number = 25
second_number = 21
sum_of_numbers = average * 3
third_number = sum_of_numbers - first_number - second_number
result = third_number
return result
|
Student: In a soccer team, there are 22 players. If 60% of them wear blue socks and 1/4 of the remaining wear white socks, how many players wear black socks? | def solve() -> int:
blue_socks = 22 * 0.6
not_blue_socks = 22 - blue_socks
white_socks = not_blue_socks * 0.25
black_socks = not_blue_socks - white_socks
result = black_socks
return result
|
She packed 20 books into the first box and 4 less books into each of the subsequent boxes. How many books did she pack in the third box? | def solve() -> int:
box_one = 20
box_two = box_one - 4
box_three = box_two - 4
result = box_three
return result
|
Isabella bikes 15 kilometers per day for the first 180 days of the year. For the remaining days of the year she bikes 20 kilometers per day. How many kilometers does she bike in total for the year? | def solve() -> int:
distance_per_day_first_half = 15
days_first_half = 180
distance_per_day_second_half = 20
days_second_half = 365 - days_first_half
distance_first_half = distance_per_day_first_half * days_first_half
distance_second_half = distance_per_day_second_half * days_second_ha... |
Jessica wants to buy 90 pieces of clothing. She bought 15 clothes and 20 pairs of shoes. She wants to buy an equal number of bags and sunglasses. How many of each should she buy? | def solve() -> int:
clothes_bought = 15
shoes_bought = 20
total_items = 90
items_left = total_items - clothes_bought - shoes_bought
bags_and_sunglasses = items_left / 2
bags_bought = bags_and_sunglasses
sunglasses_bought = bags_and_sunglasses
result = f'Jessica should buy ... |
Abigail has collected $200 from acting in a play. She donated half of the money to charity, 30% to the theatre, and bought herself a dress worth $60. How much did she have left? | def solve() -> int:
totalCollected = 0
amountDonated = 0
amountForTheatre = 0
amountForDress = 0
totalCollected = 200
amountDonated = totalCollected / 2
amountForTheatre = totalCollected * 0.3
amountForDress = 60
result = totalCollected - (amountDonated + amountForTheatre +... |
In a class, there are 4 times more boys than girls. If there are 45 students in total, how many girls are there? | def solve() -> int:
total = 45
ratio = 4
x = total / 5
girls = x
result = girls
return result
|
Jenna wants to drive from Atlanta to Nashville, which is 250 miles away. For the first part of the trip, she drives at 55 miles/hour for 3 hours. Then she increases her speed to 75 miles/hour for the rest of the trip. How many miles away is she from Nashville after driving for a total of 5 hours? | def solve() -> int:
total_distance = 250
first_part_distance = 55 * 3
second_part_distance = total_distance - first_part_distance
second_part_time = 5 - 3
second_part_driving_distance = second_part_time * 75
total_driving_distance = first_part_distance + second_part_driving_distan... |
Maya bought 9 pineapples for $5 each. Each pineapple could be cut into 16 pineapple rings. She sold 3 pineapple rings for $4 each. How much profit did Maya make? | def solve() -> int:
pineapples_bought = 9
price_per_pineapple = 5
pineapple_rings_per_pineapple = 16
price_per_pineapple_ring = 4/3
total_cost = pineapples_bought * price_per_pineapple
total_pineapple_rings = pineapples_bought * pineapple_rings_per_pineapple
total_revenue = (total_pinea... |
In a class of 60 students, one third of them play football and one fourth of them play basketball. How many students play neither football nor basketball? | def solve() -> int:
total_students = 60
football_players = total_students / 3
basketball_players = total_students / 4
both_players = total_students / 12
neither_players = total_students - (football_players + basketball_players - both_players)
result = neither_players
return result
|
A company has 20 employees and needs to allocate $4000 for bonuses at the end of the year. If each employee receives the same bonus, how much will each employee receive? | def solve() -> int:
num_employees = 20
total_bonus = 4000
bonus_per_employee = total_bonus / num_employees
result = f'<<<{bonus_per_employee}>>>'
result = bonus_per_employee
return result
|
Ned decide to practice for a swimming competition. He practices 5 days a week and each day he splits the time equally among the four swimming strokes of backstroke, breaststroke, butterfly stroke, and freestyle. He decides to practice for 3 hours each day. How many minutes is he practicing each stroke per week? | def solve() -> int:
result = 0
swim_style = ["backstroke", "breaststroke", "butterfly", "freestlye"]
working_days = 5
time_per_day = 3
total_time_per_week = working_days * time_per_day
total_time_per_style = total_time_per_week / len(swim_style)
result = total_time_per_style * 60
... |
If the distance between two cities is 180 miles and it takes 3 hours and 30 minutes to travel, what is the average speed in miles per hour? | def solve() -> int:
total_minutes = 3 * 60 + 30
total_hours = total_minutes / 60
average_speed = 180 / total_hours
result = average_speed
return result
|
Jack is 18 years younger than his father William, who is 45 years old. In three year, what will be the sum of their ages? | def solve() -> int:
father_age = 45
jack_age = father_age - 18
father_age_in_three_years = father_age + 3
jack_age_in_three_years = jack_age + 3
sum_of_ages_in_three_years = father_age_in_three_years + jack_age_in_three_years
result = sum_of_ages_in_three_years
return result
|
A restaurant is selling pizzas and salads. They have received 80 orders, with 30 orders for pizzas and the rest for salads. The pizzas are 14 inches in diameter, while the salads come in a rectangular bowl with a width of 10 inches and length of 12 inches. If the pizzas cost $12 each and the salads are $10 each, what i... | def solve() -> int:
total_orders = 80
pizza_orders = 30
salad_orders = total_orders - pizza_orders
pizza_diameter = 14
pizza_radius = pizza_diameter / 2
pizza_area = 3.14 * (pizza_radius ** 2)
salad_width = 10
salad_length = 12
salad_area = salad_width * salad_length
... |
Emily went to a music store with $40 and bought 4 CDs. Then her friend asked her to buy thrice as many CDs as she already bought. Each CD costs $5. Finally, she also bought a cassette tape which costs $3. How much money does Emily have remaining? | def solve() -> int:
cd_price = 5
cassette_price = 3
total_cd_cost = 4 * cd_price
additional_cd_cost = 3 * total_cd_cost
total_cost = total_cd_cost + additional_cd_cost + cassette_price
remaining_money = 40 - total_cost
result = remaining_money
return result
|
A recipe calls for 2 cups of flour to make 12 muffins. How much flour is needed to make 36 muffins? | def solve() -> int:
cups_per_muffin = 2 / 12
num_muffins = 36
total_cups = cups_per_muffin * num_muffins
result = total_cups
return result
|
Chad buys a new car at a dealership for $25000. After he buys the car he gets a $3000 discount. However, the dealership charges him 10% sales tax. How much did Chad pay for the car in total? | def solve() -> int:
cost_car = 25000
discount = 3000
tax_rate = 0.1
cost_discount = cost_car - discount
amount_taxes = cost_discount * tax_rate
total_amount_paid = cost_discount + amount_taxes
result = total_amount_paid
return result
|
Student: Out of 60 students, 20% are boys. How many girls are there? | def solve() -> int:
total = 60
percent_boys = 20
boys = percent_boys * total / 100
girls = total - boys
result = girls
return result
|
Ryan buys 4 packs of gum. Each pack has 6 pieces of gum. He chews 2 pieces of gum every day. How many days does it take for him to finish all the gum? | def solve() -> int:
packs = 4
pieces_per_pack = 6
pieces_per_day = 2
total_pieces = packs * pieces_per_pack
days = total_pieces / pieces_per_day
result = days
return result
|
Andrew is making spaghetti and meatballs. He buys 2 pounds of ground beef at $3.00 a pound, 1 can of tomato sauce at $1.25 per can, and 1 box of spaghetti at $2.00 per box. He needs 1/2 cup of breadcrumbs which is $1.50 per container and 1/4 cup of Parmesan cheese which is $4.00 per package. If this serves 6 people, ho... | def solve() -> int:
beef_price = 3.00
beef_weight = 2
beef_cost = beef_price * beef_weight
sauce_price = 1.25
sauce_cost = sauce_price
spaghetti_price = 2.00
spaghetti_cost = spaghetti_price
breadcrumbs_price = 1.50
breadcrumbs_amount = 0.5
breadcrumbs_cost = bread... |
John covers a distance of 450 kilometers from city A to city B in 8 hours. He covers the same distance in 6 hours while returning back to city A. What is the average speed of John during the entire travel? | def solve() -> int:
distance = 450
time1 = 8
time2 = 6
speed1 = distance/time1
speed2 = distance/time2
average_speed = 2*distance/(time1+time2)
result = average_speed
return result
|
A recipe calls for 2 cups of sugar for 4 servings. If you want to make 8 servings, how many cups of sugar will you need? | def solve() -> int:
sugar_for_4servings=2
servings_needed=8
sugar_needed=sugar_for_4servings*(servings_needed/4)
result = sugar_needed
return result
|
A car traveled 120 miles in 2 hours. What was the average speed in miles per hour? | def solve() -> int:
distance = 120
time = 2
average_speed = distance / time
result = average_speed
return result
|
A company has 158 employees. Each employee is paid a salary of $480 per week. What is the total payroll cost for the company for one week? | def solve() -> int:
num_employees = 158
salary_per_employee = 480
total_payroll_cost = num_employees * salary_per_employee
result = total_payroll_cost
return result
|
A tank has a capacity of 8500 liters. If a pump fills it at a rate of 400 liters per minute, how long will it take to fill the tank? | def solve() -> int:
capacity = 8500
fill_rate = 400
fill_time = capacity / fill_rate
result = fill_time
return result
|
A group of 7 volunteers cleaned up a park. If Volunteer A can pick up 4 trash bags, Volunteer B can pick up 6 trash bags, Volunteer C can pick up 8 trash bags, Volunteer D can pick up 10 trash bags, Volunteer E can pick up 12 trash bags, Volunteer F can pick up 14 trash bags, and Volunteer G can pick up 16 trash bags, ... | def solve() -> int:
volunteer_A = 4
volunteer_B = 6
volunteer_C = 8
volunteer_D = 10
volunteer_E = 12
volunteer_F = 14
volunteer_G = 16
total_trash_bags = volunteer_A + volunteer_B + volunteer_C + volunteer_D + volunteer_E + volunteer_F + volunteer_G
result = total_trash_ba... |
Samantha is buying a new phone. The phone costs $700 and the sales tax is 6%. How much will she pay including the sales tax? | def solve() -> int:
phone_cost = 700
sales_tax = 0.06 * phone_cost
total_cost = phone_cost + sales_tax
result = f'Samantha will pay ${total_cost} including sales tax.'
result = total_cost
return result
|
If 5 people can do a job in 50 days, what is the number of days it will take for 10 people to do the same job? | def solve() -> int:
people1 = 5
days1 = 50
people2 = 10
days2 = (people1*days1)/people2
result = days2
return result
|
A train travels at a speed of 100 km/hour. A car starts at the same place at the same time and drives to overtake the train. The car travels at a speed of 130 km/hour. After how long will the car overtake the train if the distance between them is initially 200 km? | def solve() -> int:
speed_difference = 130 - 100
distance = 200
time = distance / speed_difference
result = round(time, 2)
return result
|
Alice had 20 candies in her jar. She ate 5 candies on Monday, 4 candies on Tuesday, and 3 candies on Wednesday. On Thursday, she decided to share her candies equally with her brother. How many candies did each of them get? | def solve() -> int:
candies = 20
candies = candies - 5 - 4 - 3
candies = candies / 2
result = candies
return result
|
Tom is budgeting his expenses for the month. He has $1000 to spend. He wants to spend 30% on rent, 20% on food, 10% on entertainment, and save the rest. How much money will Tom have left to save at the end of the month? Karen is 34 and her husband John is 47 years old. Their son, Kevin was born when John was 33. How ol... | def solve() -> int:
total_money = 1000
rent = total_money * 0.3
food = total_money * 0.2
entertainment = total_money * 0.1
money_left = total_money - rent - food - entertainment
john_age = 47
kevin_age = john_age - 33
karen_age = john_age - kevin_age
result = money_left
... |
Student: The distance between two cities is 400 kilometers. A car drives at a speed of 80 kilometers per hour. How many hours will it take to reach the other city? | def solve() -> int:
distance = 400
speed = 80
time = distance / speed
result = time
return result
|
Lucy has 7 times as many toys as Lily, who has 2 times as many toys as Grace. If Grace has 12 toys, how many toys does Lucy have? | def solve() -> int:
graces_toys = 12
lilys_toys = graces_toys * 2
lucys_toys = lilys_toys * 7
result = lucys_toys
return result
|
sana puts 18 stickers in a box, Selma puts twice as many stickers in her box. How many stickers do they have in total? | def solve() -> int:
stickers_susana = 18
stickers_selma = stickers_susana * 2
result = stickers_susana + stickers_selma
return result
|
Alex finds 2 five dollar bills, 3 one dollar bills, 4 quarters, and 5 dimes. In dollars, how much money did Alex find? | def solve() -> int:
total = 2*5 + 3*1 + 4*(1/4) + 5*(1/10)
result = total
return result
|
In an amusement park, 50% of the rides are water rides and there are 12 non-water rides. How many water rides are there in the park? | def solve() -> int:
water_rides_percentage = 50
non_water_rides = 12
total_rides = non_water_rides / (1 - water_rides_percentage/100)
water_rides = total_rides * (water_rides_percentage/100)
result = water_rides
return result
|
Ben has a lemon farm where he produces 9 lemons per day. How many lemons will Ben have produced after 20 days? | def solve() -> int:
lemons = 9
days = 20
total_lemons = lemons * days
result = total_lemons
return result
|
If the sum of three consecutive multiples of 7 is 161, what is the largest multiple of 7? | def solve() -> int:
x = 7
sum_of_multiples = x + (x + 7) + (x + 14)
if sum_of_multiples == 161:
largest_multiple = x + 14
else:
largest_multiple = None
result = largest_multiple
return result
|
Student: William wants to buy 8 wooden sticks for a project. The sticks are rectangular prisms of 3 cm height, 5 cm length and 2 cm width. The price of wood per cubic centimeter is $0.15. How much will William spend on the sticks? | def solve() -> int:
height = 3
length = 5
width = 2
price = 0.15
volume = height * length * width
cost = 8 * volume * price
result = cost
return result
|
A car's gas mileage is 30 miles per gallon. If the car goes for a distance of 120 miles, how many gallons of gas are required? | def solve() -> int:
gallons = 120 / 30
result = gallons
return result
|
A baker uses 4 cups of flour for every 2 cups of sugar he uses in a recipe. If he uses 8 cups of sugar, how many cups of flour will he use? | def solve() -> int:
sugar = 8
flour_ratio = 4/2
flour = sugar * flour_ratio
result = flour
return result
|
There are 20 red balls and 15 blue balls in a jar. If John randomly selects a ball and then randomly selects another ball without putting the first one back, what is the probability that he selects a red ball followed by a blue ball? | def solve() -> int:
total_balls = 35
red_balls = 20
blue_balls = 15
prob_red_first = red_balls / total_balls
prob_blue_second = blue_balls / (total_balls - 1)
result = prob_red_first * prob_blue_second
return result
|
Sarah is running a marathon which is 26.2 miles long. She runs at a speed of 6 miles/hour for the first 5 hours, then she runs at a speed of 8 miles/hour for the remainder of the race. How long does it take her to complete the marathon? | def solve() -> int:
total_distance = 26.2
first_leg_distance = 5 * 6
second_leg_distance = total_distance - first_leg_distance
second_leg_speed = 8
first_leg_time = 5
second_leg_time = second_leg_distance / second_leg_speed
total_time = first_leg_time + second_leg_time
res... |
At dawn, Chef Johnson told his sous chef, George, to fill up a large mixing bowl with 20 pounds of flour. A few hours later, Chef Johnson instructed George to take out 7 pounds of flour. Soon after that, Chef Johnson asked George to add 15 pounds of flour to the bowl. Finally, Chef Johnson told George to take all of th... | def solve() -> int:
flour_in_bowl = 20
flour_out_bowl = 7
flour_in_bowl += 15
flour_in_bowl -= flour_out_bowl
result = flour_in_bowl
return result
|
A pizza place received an order for 8 pizzas. Each pizza had 10 slices. The pizza place cut each slice in half to make it more manageable. How many pieces will the customer receive in total? | def solve() -> int:
num_pizzas = 8
slices_per_pizza = 10
pieces_per_slice = 2
total_pieces = num_pizzas * slices_per_pizza * pieces_per_slice
result = total_pieces
return result
|
John has 5 ducks. Each duck lays 3 eggs per day. How many eggs will all 5 ducks lay in 2 weeks? | def solve() -> int:
num_ducks = 5
eggs_per_day = 3
days_in_2_weeks = 14*2
total_eggs = num_ducks * eggs_per_day * days_in_2_weeks
result = total_eggs
return result
|
Student: A machine produces 5000 parts in 12 hours. How many parts will it produce in 30 minutes? | def solve() -> int:
hours = 12
parts_in_12_hours = 5000
parts_in_1_hour = parts_in_12_hours / hours
parts_in_30_minutes = parts_in_1_hour / 2
result = parts_in_30_minutes
return result
|
Student: If Sophia baked 2 cakes the first day, then 1 more cake than that the following day, and then triple the previous amount the third day, and then finally 2 more cakes than the previous amount the final day, how many cakes did she bake in that four day period? | def solve() -> int:
day1 = 2
day2 = day1 + 1
day3 = day2 * 3
day4 = day3 + 2
total_cakes = day1 + day2 + day3 + day4
result = total_cakes
return result
|
A group of friends went to a restaurant and the total bill was $250. They decided to split the bill equally, but one person ordered a dessert worth $12. How much should that person pay? | def solve() -> int:
total_bill = 250
number_of_people = 5
equal_share = total_bill / number_of_people
person_share = equal_share + 12
result = person_share
return result
|
A class has 12 boys and 8 girls. If the pass percentage is 65 and only 5 boys failed, what percentage of girls cleared the exam? | def solve() -> int:
total_students = 12 + 8
pass_percentage = 65
num_passed = (total_students * pass_percentage) / 100
num_passed_boys = num_passed - 5
num_passed_girls = num_passed - num_passed_boys
percentage_passed_girls = (num_passed_girls * 100) / 8
result = round(percentage_passed_girl... |
If it takes 3 hours for a train to travel 180 miles, how long will it take for the train to travel 300 miles? | def solve() -> int:
distance = 300
speed = 180 / 3
time = distance / speed
result = time
return result
|
Maya bought 9 bags of popcorn for $3 each. Each bag could make 15 cups of popcorn. She ate 3 cups of popcorn and sold the rest of the cups for $0.4 each. How much profit did Maya make? | def solve() -> int:
cost = 9 * 3
revenue = 0
cups_left = (9 * 15) - 3
revenue = cups_left * 0.4
profit = revenue - cost
result = profit
return result
|
Student: Alex works as a tutor. They charge $30 per hour, but if their students recommends Alex to someone else, they get a $50 bonus. Today, Alex tutored for 5 hours and got recommended to one more student. How much did they earn today? | def solve() -> int:
hourly_rate = 30
bonus = 50
hours = 5
recommendations = 1
earnings = hourly_rate * hours + bonus * recommendations
result = earnings
return result
|
A shop goes on sale and offers a 25% discount on all items. If an item normally costs $75, how much does it cost after the discount? | def solve() -> int:
original_price = 75
discount_percent = 25
discount_amount = (discount_percent / 100) * original_price
price_after_discount = original_price - discount_amount
result = price_after_discount
return result
|
A pizza shop sells small, medium, and large pizzas. A small pizza has 6 slices, a medium pizza has 8 slices, and a large pizza has 12 slices. The pizza shop charges $10 for a small pizza, $15 for a medium pizza, and $20 for a large pizza. A group of 10 friends ordered 2 small pizzas, 3 medium pizzas, and 1 large pizza.... | def solve() -> int:
small = 10
medium = 15
large = 20
friends = 10
small_ordered = 2
medium_ordered = 3
large_ordered = 1
bill = small * small_ordered + medium * medium_ordered + large * large_ordered
share = bill / friends
result = share
return result
|
Lisa wants to buy a new phone. The phone costs $1000, and she can pay for it in installments over 10 months. She must also pay a $50 activation fee. After 6 months, she decides to pay off the remaining balance. How much does she still owe? | def solve() -> int:
phone_cost = 1000
installments = 10
activation_fee = 50
months_paid = 6
monthly_payment = phone_cost/installments
total_paid = monthly_payment * months_paid + activation_fee
remaining_balance = phone_cost - total_paid
result = remaining_balance
retu... |
A store sells 500 pairs of shoes per month. If 20% of the shoes are returned, how many pairs of shoes can the store expect to be returned each month? | def solve() -> int:
shoes_returned = 500 * 0.2
result = shoes_returned
return result
|
If an egg carton holds 12 eggs, and there are 240 eggs to be distributed equally into 15 cartons, how many eggs are left after they are distributed equally? | def solve() -> int:
total_eggs = 240
num_cartons = 15
eggs_per_carton = total_eggs/num_cartons
leftover_eggs = total_eggs - (eggs_per_carton*num_cartons)
result = leftover_eggs
return result
|
A basketball team needs to score 75 points to win the game. The team already has 56 points. If they scored 6 points in the last 5 minutes, and then 8 points in the last 3 minutes, how many more points do they need to win the game? | def solve() -> int:
points_needed = 75 - 56
points_needed = points_needed - 6 - 8
result = points_needed
return result
|
David is considering buying a new car and has two options. The first car costs $5000, and the second car is 10 times as expensive as the first car. How much would David need to pay if he decides to get both? | def solve() -> int:
car1_cost = 5000
car2_cost = 10 * car1_cost
total_cost = car1_cost + car2_cost
result = total_cost
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.