question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A pizza that costs $12 is sliced into 8 equal pieces. If John eats 3 slices, how much money should John pay for his pizza? | def solve() -> int:
price_of_pizza = 12
num_of_slices = 8
num_of_slices_eaten = 3
price_per_slice = price_of_pizza / num_of_slices
johns_total_price = num_of_slices_eaten * price_per_slice
result = johns_total_price
return result
|
Jacob is making copies of a 400 page manuscript for his book club. If he prints double-sided at 5 pages per side, how many pieces of paper will he need? | def solve() -> int:
num_pages = 400
num_sides_per_page = 2
num_pages_per_side = 5
total_num_sides = num_pages * num_sides_per_page
num_pieces_of_paper = total_num_sides / num_pages_per_side
result = num_pieces_of_paper
return result
|
A company has 30 employees, 10 of whom are part-time. What percentage of the workforce is full-time? | def solve() -> int:
total_employees = 30
part_time = 10
full_time = total_employees - part_time
percent_full_time = (full_time/total_employees) * 100
result = percent_full_time
return result
|
Possible questions and programs are: Kim and Lee are running on a track. Kim runs at a speed of 9 kilometers per hour. Lee runs at a speed of 8.5 kilometers per hour. If they start at the same point and run for 20 minutes, how far apart will they be at the end? | def solve() -> int:
kim_distance = 9 * 1000 / 3600 * 20 / 60
lee_distance = 8.5 * 1000 / 3600 * 20 / 60
difference = abs(kim_distance - lee_distance)
result = difference
return result
|
If Bob has 128 pencils and he wants to divide them equally into 8 boxes, how many pencils will be in each box? | def solve() -> int:
total_pencils = 128
n_box = 8
pencils_per_box = total_pencils / n_box
result = pencils_per_box
return result
|
A group of 6 friends shared a bag of 60 candies equally. How many candies did each friend receive? | def solve() -> int:
candies = 60
friends = 6
each_friend = candies/friends
result = each_friend
return result
|
The total cost of a ticket to a concert is $75. If the ticket price is increased by 20%, what is the new ticket price? | def solve() -> int:
ticket_price = 75
increase_percentage = 0.2
new_ticket_price = ticket_price + (ticket_price * increase_percentage)
result = new_ticket_price
return result
|
Tom enjoys collecting stamps. He buys a sheet of 25 stamps every week for two years, but then misplaces half of them. How many stamps does Tom have left? | def solve() -> int:
total_stamps = 25 * 52 * 2
misplaced_stamps = total_stamps / 2
stamps_left = total_stamps - misplaced_stamps
result = stamps_left
return result
|
Student: A school has 12 classes, with 30 students each. If 2 classes are absent, how many students are enrolled in the school? | def solve() -> int:
num_classes = 12
num_students_per_class = 30
num_absent_classes = 2
total_students = num_classes * num_students_per_class
absent_students = num_absent_classes * num_students_per_class
enrolled_students = total_students - absent_students
result = enrolled_students
ret... |
In a bag of marbles, there are 4 blue marbles, double as many yellow marbles and some red marbles. In total there are 15 marbles in the bag. How many red marbles are in the bag? | def solve() -> int:
blue_marbles = 4
yellow_marbles = 2 * blue_marbles
total_marbles = 15
red_marbles = total_marbles - (blue_marbles + yellow_marbles)
result = red_marbles
return result
|
The utility company allocates 20% of its revenue on infrastructure maintenance. If they had $10,000 in revenue, how much money is left for other expenses? | def solve() -> int:
revenue = 10000
maintenance = revenue * 0.2
other_expenses = revenue - maintenance
result = other_expenses
return result
|
A company purchased 1000 shares of stock at $25 per share. The value of the stock went up 10%. The company decided to sell half of its shares and keep the rest. At what price per share must the company sell its stock in order to make a profit of $3000? | def solve() -> int:
paid_price = 25 * 1000
current_value = paid_price * 1.1
num_shares_sold = 1000 / 2
target_profit = 3000
selling_price = (target_profit + (paid_price - current_value)) / num_shares_sold
result = selling_price
return result
|
John has 4 horses. Each of them needs to be fed 10 pounds of hay. Most of the bales of hay cost $8 but one premium bale costs 3 times as much. How much did John spend on hay? | def solve() -> int:
num_horses = 4
hay_per_horse = 10
cost_regular_bale = 8
cost_premium_bale = cost_regular_bale * 3
total_hay_needed = num_horses * hay_per_horse
num_regular_bales = total_hay_needed // 100
num_premium_bales = total_hay_needed % 100 // 10
total_cost = num_regu... |
Grace is planning her morning routine. She knows it takes 10 minutes to shower, 5 minutes to brush her teeth, and 20 minutes to get dressed. If Grace wants to be ready by 7:30 am and wakes up at 7:00 am, what time should she start her morning routine? | def solve() -> int:
shower_time = 10
teeth_brushing_time = 5
dressing_time = 20
total_time = shower_time + teeth_brushing_time + dressing_time
wakeup_time = 7 * 60
ready_time = 7 * 60 + 30
start_time = ready_time - total_time
result = f'{start_time // 60}:{start_time ... |
A recipe calls for 2/3 cup of sugar, but you only have a 1/4 measuring cup. How many 1/4 cup measures do you need to get 2/3 cup? | def solve() -> int:
cup_fraction = 2/3
measuring_cup_fraction = 1/4
cups_needed = cup_fraction / measuring_cup_fraction
result = cups_needed
return result
|
Possible math questions and programs: To make a lemonade, Sue needs 3 lemons, 1 cup of sugar, and 4 cups of water. She has 15 lemons, 5 cups of sugar, and 20 cups of water. How many cups of lemonade can she make? | def solve() -> int:
lemons = 15
sugar = 5
water = 20
lemons_per_lemonade = 3
sugar_per_lemonade = 1
water_per_lemonade = 4
lemonade_with_lemons = lemons // lemons_per_lemonade
lemonade_with_sugar = sugar // sugar_per_lemonade
lemonade_with_water = water // water_per_lemonade
lem... |
Mike bought a total of 18 eggs for his breakfast. If he cracked 2 eggs for each omelet, how many omelets did he prepare? | def solve() -> int:
total_omelets = 18 // 2
result = total_omelets
return result
|
If an apple costs $0.50, how much will it cost to buy 5 apples? | def solve() -> int:
one_apple_cost = 0.50
number_of_apples = 5
total_cost = one_apple_cost * number_of_apples
result = total_cost
return result
|
Donny has a set of football cards, out of 80 cards, he gave away half of them to his friends. How many cards does Donny have left? | def solve() -> int:
total_cards = 80
cards_left = total_cards - int(total_cards* 0.5)
result = cards_left
return result
|
Amy and Ben have a lemonade stand. They sold 25 cups of lemonade for $0.5 each on Monday, 30 cups of lemonade for $0.4 each on Tuesday, and 35 cups of lemonade for $0.3 each on Wednesday. How much money did they make in total? | def solve() -> int:
money_monday = 25 * 0.5
money_tuesday = 30 * 0.4
money_wednesday = 35 * 0.3
money_total = money_monday + money_tuesday + money_wednesday
result = money_total
return result
|
``` A train is traveling at a speed of 50 miles per hour. How long will it take to travel 200 miles? | def solve() -> int:
speed = 50
distance = 200
time = distance / speed
result = time
return result
|
Student: A fish tank is a rectangular prism. The length is 12 inches, the width is 8 inches, and the height is 10 inches. What is the volume of the fish tank in cubic inches? | def solve() -> int:
length = 12
width = 8
height = 10
volume = length * width * height
result = volume
return result
|
A jacket costs $80, but is on sale for 15% off. How much is the jacket after the discount? | def solve() -> int:
original_price = 80
discount_percentage = 15
sale_price = original_price * (1 - discount_percentage/100)
result = sale_price
return result
|
A number is increased by 40% and then decreased by 20%. If the result is 80, what was the original number? | def solve() -> int:
result = 80
percent_increase = 40
percent_decrease = 20
new_value = result/(1-0.01*percent_decrease)
original_value = new_value/(1+0.01*percent_increase)
result = original_value
return result
|
Mary had 25 flowers in her garden. Her neighbor gave her one-third of their 60 flowers. How many flowers does Mary have in her garden now? | def solve() -> int:
mary_flowers = 25
neighbor_flowers = 60
neighbor_gives = neighbor_flowers / 3
mary_flowers += neighbor_gives
result = mary_flowers
return result
|
If a pizza place charges $12 for a small pizza, $16 for a medium pizza, and $22 for a large pizza, and they sold 25 small pizzas, 20 medium pizzas, and 15 large pizzas in one day, how much money did they make from pizza sales that day? | def solve() -> int:
small_pizza_price = 12
medium_pizza_price = 16
large_pizza_price = 22
total_small_pizza_sales = small_pizza_price * 25
total_medium_pizza_sales = medium_pizza_price * 20
total_large_pizza_sales = large_pizza_price * 15
total_sales = total_small_pizza_sales + total_medium_... |
A cylindrical container has a volume of 840cm³. Its radius is 7cm. What is the height of the container? | def solve() -> int:
volume = 840
radius = 7
pi = 3.14
height = volume / (pi * radius ** 2)
result = height
return result
|
Lucas wants to buy a smartwatch worth $300. He works at a gas station for a month earning $10 per hour for a 20-hour workweek. How many more hours does he have to work to buy the smartwatch? | def solve() -> int:
watch_price = 300
hourly_wage = 10
weekly_hours = 20
monthly_hours = weekly_hours * 4
monthly_income = hourly_wage * monthly_hours
hours_needed = watch_price / hourly_wage
hours_left = hours_needed - monthly_hours
result = hours_left
return res... |
Student: Charlie and his friends can pile up 12 hay bales in 10 seconds. If Charlie and his friends have double the number of bales but with half the time, how many bales can they stack up? | def solve() -> int:
bales_per_second = 12/10
double_bales = 12*2
half_time = 10/2
double_bales_per_second = double_bales/half_time
result = double_bales_per_second
return result
|
3. A construction company earned a total of $100,000 for building a new car park. If they received 40% of the total amount upfront and the rest on successful completion, how much did they receive upfront? | def solve() -> int:
total_earnings = 100000
percent_upfront = 0.4
upfront_payment = total_earnings * percent_upfront
result = upfront_payment
return result
|
If a dozen bagels cost $12.50, how much money does John need to buy 48 bagels? | def solve() -> int:
dozen_bagels_cost = 12.50
dozen_bagels = 12
total_bagels = 48
cost_per_bagel = dozen_bagels_cost / dozen_bagels
total_cost = cost_per_bagel * total_bagels
result = total_cost
return result
|
Jake has $30 and wants to buy a shirt for $12 and a hat for $7. If he's left with $5, how much did Jake originally have? | def solve() -> int:
shirt_cost = 12
hat_cost = 7
remaining_money = 5
total_cost = shirt_cost + hat_cost
original_money = total_cost + remaining_money
result = original_money
return result
|
The ages of John and David are in the ratio 3:5. If John is 24 years old, how old is David? | def solve() -> int:
david_age = ((24/3)*5)
result = david_age
return result
|
A pizza has a diameter of 16 inches. What is the circumference of the pizza? | def solve() -> int:
diameter = 16
radius = diameter/2
pi = 3.14159
circumference = 2*pi*radius
result = circumference
return result
|
A train travels four times the distance as a bus in the same time. If the bus travels 80 kilometers in an hour, how far does the train travel in two hours? | def solve() -> int:
d = 4 * 80
result = 2 * d
return result
|
Nadia is baking cupcakes for a bake sale. She has enough ingredients to make 48 cupcakes. She sells each cupcake for $1.50 and spends $12 on packaging and transportation. If she wants to make a profit of at least $50, how many cupcakes does she have to sell? | def solve() -> int:
total = 48
cost = 12
price = 1.5
profit = 50
sold = 0
while (price * sold - cost) < profit:
sold = sold + 1
result = sold
return result
|
Betty bought 15 liters of lemonade for a party. She poured one-fifth of it into a pitcher with ice. Then she added one liter of water to the pitcher. What fraction of the lemonade in the pitcher is pure lemonade? | def solve() -> int:
lemonade = 15
lemonade_in_pitcher = lemonade / 5
lemonade = lemonade - lemonade_in_pitcher
water_in_pitcher = 1
liquid_in_pitcher = lemonade_in_pitcher + water_in_pitcher
fraction_of_lemonade = lemonade_in_pitcher / liquid_in_pitcher
result = fraction_of_lemonade
ret... |
An ice cream truck has 6 different flavors of ice cream. If a customer can choose 2 scoops from any of the flavors, how many different ice cream cone combinations are there? | def solve() -> int:
flavors = 6
permutations = (flavors * (flavors-1)) / 2
result = permutations
return result
|
Student: 2. Marie, Lucas, and Tom are building a wall. Marie can build 15 blocks in 10 minutes, Lucas can build 21 blocks in 15 minutes, and Tom can build 10 blocks in 20 minutes. How many blocks can they build in one hour? | def solve() -> int:
marie_blocks = 15
marie_minutes = 10
lucas_blocks = 21
lucas_minutes = 15
tom_blocks = 10
tom_minutes = 20
marie_blocks_per_hour = marie_blocks * (60 / marie_minutes)
lucas_blocks_per_hour = lucas_blocks * (60 / lucas_minutes)
tom_blocks_per_hour = tom_blocks * (6... |
Student: Rachel wants to buy a new phone which costs $500. She has saved $150 from birthday and Christmas. She is planning on doing odd jobs for her neighbors for $20 each. However, she needs to give her mom 10% of her earnings. How many jobs does she have to do to reach her goal? | def solve() -> int:
phone_cost = 500
saved_money = 150
job_cost = 20
mom_percentage = 0.1
total_needed = phone_cost - saved_money
mom_money = total_needed * mom_percentage
earn_money = total_needed - mom_money
jobs_needed = earn_money / job_cost
result = jobs_needed
return resul... |
A field of dimension 50m x 80m is to be fenced all around. If each fence is 2m wide, what is the total length of the fence in meters? | def solve() -> int:
width = 2
l = 50 + 2*width
b = 80 + 2*width
perimeter = 2*l + 2*b
result = perimeter
return result
|
Two baseball teams play each other on Thursday. The first team has 15 players and the second team has 20 players. How many total players are on both teams? | def solve() -> int:
a = 15
b = 20
totalPlayers =a + b
result = totalPlayers
return result
|
Student: - Leah can knit a scarf in 8 hours. Mia can knit the same scarf in 10 hours. If they work together, how long will it take them to knit 3 scarves? | def solve() -> int:
leah_time = 8
mia_time = 10
scarves = 3
total_time = (leah_time + mia_time) * scarves
result = total_time
return result
|
A company has 5 employees who work 8 hours a day for 5 days a week. If each employee earns $15 per hour, what is the total weekly payroll for the company? | def solve() -> int:
num_employees = 5
hours_per_day = 8
days_per_week = 5
hourly_rate = 15
total_hours = num_employees * hours_per_day * days_per_week
total_payroll = total_hours * hourly_rate
result = total_payroll
return result
|
A rectangular garden has a length of 10 meters and a width of 5 meters. What is its area in square meters? | def solve() -> int:
length = 10
width = 5
area = length * width
result = area
return result
|
A train travels at a speed of 60 miles per hour. How many miles will it travel in 3 hours? | def solve() -> int:
speed = 60
time = 3
distance = speed * time
result = distance
return result
|
A car travels 400 miles in 8 hours. If the car travels at a constant speed, how many miles can it travel in 12 hours? | def solve() -> int:
speed = 400/8
distance = speed * 12
result = distance
return result
|
In a basket of vegetables, there are 4 potatoes, three times as many carrots, and some onions. In total there are 16 vegetables in the basket. How many onions are in the basket? | def solve() -> int:
potatoes = 4
carrots = 3 * potatoes
total_vegetables = 16
onions = total_vegetables - potatoes - carrots
result = onions
return result
|
Possible questions and programs are: Maria works as a nurse and earns 50000$ a year. She pays 25 percent of her income to taxes, 15 percent to her mortgage, and 5000$ to her student loans. How much money does Maria have left after paying these expenses? | def solve() -> int:
taxes = 50000 * 0.25
mortgage = 50000 * 0.15
left = 50000 - taxes - mortgage - 5000
result = left
return result
|
Student: Mike attended 5 classes last week. Each class was one hour long. How many total hours did Mike spend in all of his classes? | def solve() -> int:
num_classes = 5
class_length = 1
total_hours = num_classes * class_length
result = total_hours
return result
|
A group of friends decide to buy a pizza that is 20 inches in diameter. The pizza costs $15.00. If there are 8 friends, each friend wants to have a slice with an area equal to 1/8th of the total pizza, how many square inches are in each slice? Round to the nearest whole number. | def solve() -> int:
radius = 10
total_area = 3.14 * (radius**2)
num_slices = 8
area_per_slice = total_area / num_slices
result = round(area_per_slice)
return result
|
Leo wants to buy a cake. The cake has a rectangular shape with a length of 16 inches and a width of 12 inches. The cake is decorated with 20 strawberries, each costing 25 cents. The cake itself costs $8 per square foot. How much does the cake cost in total? | def solve() -> int:
length = 16
width = 12
number_of_strawberries = 20
cost_of_strawberry = 0.25
cost_of_cake_per_square_foot = 8
area_in_square_inches = length * width
area_in_square_feet = area_in_square_inches / 144
cost_of_cake = area_in_square_feet * cost_of_cake_per_square_foot
... |
A school has 200 students and 10 teachers. If there are 30 students per teacher, how many teachers does the school need to hire to have 400 students in total? | def solve() -> int:
students_per_teacher = 30
new_total_students = 400
current_teachers = 10
current_students = 200
students_to_add = new_total_students - current_students
required_teachers = (students_to_add // students_per_teacher) + current_teachers
result = required_teachers
return r... |
A factory can produce 64 units in 16 hours. How many units can they produce in 1 day? | def solve() -> int:
units_in_day = (24/16)*64
result = units_in_day
return result
|
A recipe calls for 3/4 cups of sugar to make 12 cookies. If Maria wants to make 24 cookies, how many cups of sugar does she need? | def solve() -> int:
cups_of_sugar = (24/12)*3/4
result = cups_of_sugar
return result
|
The city of Arlington spends 22% of its budget on city infrastructure. If they spent $12,500 on infrastructure, how much is left in the budget? | def solve() -> int:
budget = 0
infrastructure_spending = 12500
budget = infrastructure_spending / (1 - 0.22)
result = budget - infrastructure_spending
return result
|
A shopkeeper sells ice-cream cones at $1.50 each. He sold 3 times as many chocolate cones as strawberry cones. If he sold a total of 60 cones and earned $75, how many cones of each flavor did he sell? | def solve() -> int:
strawberry = 12
chocolate = 36
result = strawberry, chocolate
return result
|
To win a new pair of headphones, Anna needs to earn 25 purple tickets; each purple ticket is obtained by trading in 10 green tickets; each green ticket is obtained by trading in 15 yellow tickets; and yellow tickets are earned by completing a homework assignment. If Anna has already traded in 18 purple tickets, 35 gree... | def solve() -> int:
purple_tickets_needed = 25
green_tickets_needed = purple_tickets_needed * 10
yellow_tickets_needed = green_tickets_needed * 15
purple_tickets_traded = 18
green_tickets_traded = 35
yellow_tickets_earned = 150
purple_tickets_remaining = purple_tickets_needed - pur... |
Rachel gets paid $18 per hour up to a total of 50 hours, after which she gets paid an extra $8 per hour. How much does Rachel get paid for a 70-hour workweek? | def solve() -> int:
num_hours = 70
if num_hours <= 50:
result = num_hours * 18
else:
overtime_hours = num_hours - 50
result = (50 * 18) + (overtime_hours * 26)
result
return result
|
Student: Joanne invited 8 of her friends to her birthday party. She bought 10 donuts for them to share. How many donuts will each friend get if they share the donuts equally? | def solve() -> int:
joanne = 1
friends = 8
donuts = 10
total_people = joanne + friends
donuts_per_person = donuts / total_people
result = donuts_per_person
return result
|
Olivia has a coop filled with chickens. Every day, Olivia feeds each chicken 10 grains of corn. It takes Olivia 6 minutes to find each grain of corn. If it takes Olivia 14 hours to find enough corn to feed all of her chickens, how many chickens does Olivia have in her coop? | def solve() -> int:
grains_per_chicken = 10
time_per_grain = 6
total_time = 14 * 60
total_grains = total_time / time_per_grain
chickens = total_grains / grains_per_chicken
result = chickens
return result
|
For every 2 cups of flour, Maria uses 1 egg in her cake recipe. If she needs to use 10 eggs, how many cups of flour will she need? | def solve() -> int:
flour_per_egg = 2
eggs_needed = 10
flour_needed = (eggs_needed / 1) * flour_per_egg
result = flour_needed
return result
|
Emma's family is going camping. If each person brings 2 tents, 3 sleeping bags, and 4 flashlights, how many pieces of equipment is the entire family bringing? | def solve() -> int:
family_members = 4
tents_per_person = 2
sleeping_bags_per_person = 3
flashlights_per_person = 4
total_pieces = (family_members * tents_per_person) + (family_members * sleeping_bags_per_person) + (family_members * flashlights_per_person)
result = total_pieces
return... |
Oscar sells t-shirts for $15 each. If his expenses are 80% of total sales for the day, how many t-shirts would he need to sell to make a $300 profit for the day? | def solve() -> int:
t_shirts_sold = 0
expenses = 0
profit = 0
while profit < 300:
t_shirts_sold += 1
expenses = 0.8 * (t_shirts_sold * 15)
profit = (t_shirts_sold * 15) - expenses
result = t_shirts_sold
return result
|
If the ratio of the ages of two brothers is 3:2 and the difference in their ages is 4, what is the age of the younger brother? | def solve() -> int:
ratio_difference = 3-2
older_brother_age = ratio_difference * 4
younger_brother_age = older_brother_age - 4
result = younger_brother_age
return result
|
After fixing his bike, John found out that the length of his bike chain was equal to the perimeter of the back wheel of his bike. If the length of the chain is 150 cm, what is the diameter of the wheel in centimeters? Samantha bikes 15 kilometers to the library. After picking up some books at the library, she bikes bac... | def solve() -> int:
chain_length = 150
time = 0.75
speed = 10
distance_to_library = 15
perimeter = chain_length
radius = perimeter / (2 * 3.14)
diameter = radius * 2
distance_from_library = distance_to_library
total_distance = (distance_to_library * 2) + distance_from_l... |
A store sells apples for $0.50 each, bananas for $0.25 each, and oranges for $0.30 each. If Jack buys 6 apples, 10 bananas, and 8 oranges, how much does he spend in total? | def solve() -> int:
price_per_apple = 0.5
price_per_banana = 0.25
price_per_orange = 0.3
apples = 6
bananas = 10
oranges = 8
total_cost = price_per_apple*apples + price_per_banana*bananas + price_per_orange*oranges
result = total_cost
return result
|
Ethan is going to a concert and wants to buy 7 t-shirts. He has already bought 2 t-shirts. How many more t-shirts does Ethan need to buy to reach his goal? | def solve() -> int:
goal = 7
already_bought = 2
remaining_tshirts = goal - already_bought
result = remaining_tshirts
return result
|
James has 2 daughters and 1 son. They own 5 chickens and 2 horses. Including James, how many feet are there in total in James's household? | def solve() -> int:
daughters = 2
son = 1
chickens = 5
horses = 2
total_human_feet = (daughters + son + 1) * 2
total_chicken_feet = chickens * 2
total_horse_feet = horses * 4
total_feet = total_human_feet + total_chicken_feet + total_horse_feet
result = total... |
Student: 1. A theater sells 240 cups of soda a day. They buy bottles of syrup that make 6 cups of soda, and each bottle cost $9. How much do they pay for syrup a day? | def solve() -> int:
cups_of_soda = 240
cups_per_bottle = 6
cost_per_bottle = 9
num_bottles = cups_of_soda / cups_per_bottle
total_cost = num_bottles * cost_per_bottle
result = total_cost
return result
|
A store is having a sale where all items are 30% off. If a shirt originally costs $20, how much will it cost during the sale? | def solve() -> int:
original_price = 20
percent_off = 0.3
discounted_price = original_price * (1-percent_off)
result = discounted_price
return result
|
Chris drives from town A to town B, the distance is 300 miles. Once he reaches town B, he drives for another 200 miles. How many miles did he drive in total? | def solve() -> int:
distanceA = 300
distanceB = 200
total_distance = distanceA + distanceB
result = total_distance
return result
|
``` A toy company makes 500 toys a day. If they sold 275 toys, how many toys are left? | def solve() -> int:
total_toys = 500
sold_toys = 275
left_toys = total_toys - sold_toys
result = left_toys
return result
|
Mark wants to reduce his plastic use by using a reusable shopping bag. For every grocery bag he doesn't use, he reduces his plastic usage by. 01 kg. If he wants to reduce his plastic usage by 2 kg, how many grocery bags does he need to not use and how much will he reduce his plastic use by? | def solve() -> int:
plastic_reduction_per_bag = 0.01
total_plastic_reduction = 2
bags_not_used = total_plastic_reduction / plastic_reduction_per_bag
plastic_reduction = bags_not_used * plastic_reduction_per_bag
result = f'{bags_not_used} bags not used, reducing plastic use by {plastic_reduction} kg'... |
Amalia owns a bakery and she needs to buy new cupcake holders. If she buys 100 cupcake holders at a total cost of $50, how much money would she save if the store offers a 20% discount? | def solve() -> int:
price_holder = 50
num_holder = 100
total_cost = price_holder * num_holder
discount = 0.2
discounted_cost = total_cost * (1-discount)
money_saved = total_cost - discounted_cost
result = money_saved
return result
|
There are 40 flowers in a garden. Two-thirds of the flowers are roses. The rest of them are daisies. How many daisies are in the garden? | def solve() -> int:
total_flowers = 40
roses = total_flowers * 2/3
daisies = total_flowers - roses
result = daisies
return result
|
Student: Mr. Chen is a history teacher who has 200 students in four different classes. His classes are World History, US History, European History, and Asian History. Each class has 50 students. Of the students in World History, 40 percent are freshmen. Of the students in US History, 60 percent are sophomores. Of the s... | def solve() -> int:
world_history_students = 50
us_history_students = 50
european_history_students = 50
asian_history_students = 50
world_history_freshmen = 0.4 * world_history_students
us_history_sophomores = 0.6 * us_history_students
european_history_juniors = 0.5 * european_history_studen... |
Student: Jason has a collection of 300 stamps. 50 of them, Jason bought for $3 each. Of the rest, 25% were bought for $2. All others had a price of $1 each. How much did Jason spend on all the stamps in his collection? | def solve() -> int:
stamps = 300
stamps_3 = 50
price_3 = 3
stamps_2 = 0.25 * (stamps - stamps_3)
price_2 = 2
stamps_1 = stamps - stamps_3 - stamps_2
price_1 = 1
total_price = stamps_3 * price_3 + stamps_2 * price_2 + stamps_1 * price_1
result = total_price
return result
|
Thomas has 5 blocks. Stephanie has 12 more blocks than Thomas, and Alvin has 4 times as many blocks as Thomas. How many blocks do Thomas, Stephanie and Alvin have together? | def solve() -> int:
thomas_blocks = 5
stephanie_blocks = thomas_blocks + 12
alvin_blocks = thomas_blocks * 4
total_blocks = thomas_blocks + stephanie_blocks + alvin_blocks
result = total_blocks
return result
|
In a pet store, there are 16 tails wagging, not including the cat's. Assuming every cat has 1 tail, how many cats are in the store? | def solve() -> int:
tails_wagging = 16
tails_per_cat = 1
cats_in_store = tails_wagging / tails_per_cat
result = cats_in_store
return result
|
Caleb wants to save up $250 to buy a new gaming console. His parents will give him $8 for each additional chore he does beyond his normal 9 chores each week. If he completes 15 additional chores per week for five weeks, how much will he earn in total? Tommy has to complete 180 units to graduate from college. If each cl... | def solve() -> int:
normal_chores = 9
additional_chores_per_week = 15
weeks = 5
payment_per_additional_chore = 8
total_additional_chores = additional_chores_per_week * weeks
total_payment = total_additional_chores * payment_per_additional_chore
total_units = 180
units_per_class... |
Sara is planning to go on a hike. She needs to buy a backpack, a water bottle, and a pair of hiking boots. The backpack costs $80, the water bottle costs $10, and the hiking boots cost $150. If Sara has a coupon for 15% off her purchase, how much will she spend? | def solve() -> int:
backpack_cost = 80
water_bottle_cost = 10
boots_cost = 150
total_cost = backpack_cost + water_bottle_cost + boots_cost
discount = total_cost * 0.15
total_cost -= discount
result = total_cost
return result
|
Isaac needs 15 more balloons to have four times as many balloons as Ryan, and Ethan has 6 times as many balloons as Ryan. If Ethan has 60 balloons, how many more balloons does Isaac need to reach his goal? | def solve() -> int:
ryan_balloons = 60/6
isaac_balloons = 4*ryan_balloons - 15
balloons_needed = isaac_balloons - ryan_balloons
result = balloons_needed
return result
|
A company produces 800 bottles of apple juice with two different sizes: 300ml and 500ml. If the company produces 75% of 500ml bottles, how many 300ml bottles were produced? | def solve() -> int:
big_bottles = int(800 * 0.75)
small_bottles = 800 - big_bottles
result = small_bottles
return result
|
6. Fiona has 88 stickers that she wants to divide between herself and her 2 friends. How many stickers will each of them get and how many stickers will Fiona have left over? | def solve() -> int:
a = 88
b = 3
c = a//b
d = a%b
result = (c,d)
return result
|
If Jake weighs 12 pounds more than Emma, and Jake weighs a quarter as much as Tyler, and Emma weighs 97 pounds, how many pounds do Jake and Tyler weigh together? | def solve() -> int:
emma_weight = 97
jake_weight = emma_weight + 12
tyler_weight = jake_weight / 0.25
total_weight = jake_weight + tyler_weight
result = total_weight
return result
|
Alex pays $50/hour for 5 hours per week of boxing lessons and $20/hour for 7 hours a week of basketball lessons. How much more does he spend on boxing lessons than basketball lessons in a year? | def solve() -> int:
boxing_rate = 50
boxing_hours_per_week = 5
basketball_rate = 20
basketball_hours_per_week = 7
boxing_cost_per_week = boxing_rate * boxing_hours_per_week
basketball_cost_per_week = basketball_rate * basketball_hours_per_week
boxing_cost_per_year = boxing_cost_per... |
Student: A bag contains 5 red balls and 7 blue balls. What is the probability of getting a red ball on the first draw? | def solve() -> int:
red_balls = 5
blue_balls = 7
total_balls = red_balls + blue_balls
probability = red_balls / total_balls
result = probability
return result
|
A bus travels 200 miles in 4 hours and 15 minutes. What is the average speed of the bus in miles per hour? | def solve() -> int:
distance = 200
time = 4.25
speed = distance / time
result = speed
return result
|
Student: The mass of a container is 2 kg. If the container's mass was subtracted from 16 kg of apples, what is the total mass left? | def solve() -> int:
container_mass = 2
apple_mass = 16
total_mass = apple_mass - container_mass
result = total_mass
return result
|
10. There are 24 boxes in a storage room. 8 of the boxes are filled with books and the remaining boxes are filled with other items. If each box filled with books weighs 50 kg, how much does the remaining boxes weigh? | def solve() -> int:
total = 24
books = 8
remaining = total - books
weight_remaining = remaining * 50
result = 400
return result
|
A bike store has 15 bikes. They want to display them in groups of 3. How many groups of bikes will they have and how many bikes will be left out? | def solve() -> int:
num_bikes = 15
bikes_per_group = 3
groups = num_bikes // bikes_per_group
leftover_bikes = num_bikes % bikes_per_group
result = (groups, leftover_bikes)
return result
|
There are 25 more girls than boys in a classroom. If the total number of students is 100, how many boys are there? | def solve() -> int:
total_students = 100
girls = (total_students + 25)/2
boys = total_students - girls
result = boys
return result
|
Student: A store has a discount of 25% on all items. If the original price of an item is $80, what is the new price after the discount is applied and sales tax at 10% is included? | def solve() -> int:
discount = 0.25
original_price = 80
discounted_price = original_price * (1 - discount)
sales_tax = discounted_price * 0.1
result = discounted_price + sales_tax
return result
|
A manufacturing company produces 3 different products with different production times. The first product takes 2 hours to produce, the second takes 3 hours, while the third takes 4 hours. What is the shortest time after which all three products will have been produced the same number of times? | def solve() -> int:
product1_time = 2
product2_time = 3
product3_time = 4
def find_lcm(a, b):
if a > b:
greater = a
else:
greater = b
while True:
if greater % a == 0 and greater % b == 0:
lcm = greater
... |
The distance between cities X and Y is 500 kilometers. Tom is travelling from city X to city Y on a car that travels at a speed of 60 kilometers per hour. How long will Tom take to reach city Y? | def solve() -> int:
distance = 500
car_speed = 60
result = distance / car_speed
return result
|
Student: Elena is a tutor who charges $40 per hour for math and $50 per hour for science. She tutored 12 hours of math and 8 hours of science last week. How much did she earn in total last week? | def solve() -> int:
math_rate = 40
science_rate = 50
math_hours = 12
science_hours = 8
total_math_earning = math_rate * math_hours
total_science_earning = science_rate * science_hours
result = total_math_earning + total_science_earning
return result
|
There were 90 guests at a wedding reception, and one-third of them were family members of the bride and groom. If twice as many guests were family members of the bride as of the groom, how many guests were family members of the groom? | def solve() -> int:
total_guests = 90
family_members_ratio = 1/3
family_members_bride = (total_guests * family_members_ratio) / (1 + 2)
family_members_groom = family_members_bride / 2
result = family_members_groom
return result
|
Olivia has $50. She needs to buy some books, which cost $15 each and some pencils that cost $0.50 each. After buying the books and pencils, she has $5 left. How many books did she buy? | def solve() -> int:
books_cost = 15
pencil_cost = 0.50
total_money = 50
remaining_money = 5
total_cost = (total_money - remaining_money)
num_pencils = (total_cost % books_cost) / pencil_cost
num_books = (total_cost - (num_pencils * pencil_cost)) / books_cost
result = ... |
Michael wants to upgrade all his computer peripherals at home. He purchased a keyboard, a mouse, a headset, and a webcam. The total amount of the purchase is worth $200. The store offers 20% discount during weekends plus an additional 8% discount if you pay in full by cash. How much will Michael save if he pays in cash... | def solve() -> int:
total_purchase = 200
weekend_discount = 0.2 * total_purchase
total_purchase -= weekend_discount
cash_discount = 0.08 * total_purchase
total_purchase -= cash_discount
amount_saved = weekend_discount + cash_discount
emma_age = 8
grandmother_age = 64
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.