question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A store is having a sale of 20% off all items. If a shirt that originally cost $25 is on sale, what is the sale price? | def solve() -> int:
original_price = 25
discount = original_price * 0.2
sale_price = original_price - discount
result = sale_price
return result
|
A fan uses 100 watts of electricity per hour. It is used for 8 hours a day. If electricity cost 20 cents per kw/h, how many cents does the fan cost to run for a day? | def solve() -> int:
consumption = 100 * 8 / 1000
cost = consumption * 20
result = cost
return result
|
If Susan, riding her bike, covers a distance of 48 km in 2.5 hours, what is her speed in km/h? | def solve() -> int:
distance = 48
time_minutes = 150
speed = 0
while distance > 0:
speed += 1
distance -= speed
result = speed
return result
|
Mary has 12 chocolates. She eats 4 of them. How many chocolates does Mary have left? | def solve() -> int:
total_chocolates = 12
chocolates_eaten = 4
chocolates_left = total_chocolates - chocolates_eaten
result = chocolates_left
return result
|
Mike has 3 times as many toy cars as Tom. Together, they have 32 toy cars. How many toy cars does Tom have? | def solve() -> int:
total_cars = 32
ratio = 4
tom_cars = total_cars / ratio
result = tom_cars
return result
|
Maria and her track team competed in a championship where each win gives 7 points, each tie gives 3 points to each team, and losing teams get none. Maria's team won 3 games and tied 1, while the leading team won 4 games and tied none. What is the point difference between Maria's team and the leading team? | def solve() -> int:
WIN_POINTS = 7
TIE_POINTS = 3
maria_wins = 3
maria_ties = 1
maria_points = maria_wins * WIN_POINTS + maria_ties * TIE_POINTS
leading_wins = 4
leading_points = leading_wins * WIN_POINTS
point_difference = leading_points - maria_points
result = p... |
Ricki builds a rectangular box that is 9 inches long, 6 inches wide, and 4 inches tall. Jamie creates a cylindrical tube that is 11 inches in diameter and 5 inches tall. What is the difference in volume between the two objects? | def solve() -> int:
length = 9
width = 6
height = 4
rectangular_volume = length * width * height
radius = 11 / 2
height = 5
cylindrical_volume = 3.14 * radius ** 2 * height
difference = rectangular_volume - cylindrical_volume
result = difference
return result
|
A store offers a 20% discount on all items plus an additional 15% discount on items that are on sale. A customer bought 3 items, one of which was on sale for $50. The other two items cost $30 and $40. How much did the customer pay in all? | def solve() -> int:
item_prices = [30, 40, 50]
sale_item_index = 2
sale_discount = 0.15
discount = 0.2
subtotal = sum(item_prices)
total_discount = item_prices[sale_item_index] * sale_discount + subtotal * discount
total = subtotal - total_discount
result = total
return result
|
10. A rectangular prism has a surface area of 130 m², a width of 5 m and a height of 8m. What is the length of the Prism? | def solve() -> int:
surfaceArea = 130
width = 5
height = 8
result = surfaceArea / (width*height)
return result
|
A mail carrier is to deliver 200 packages in a day. Each package weighs 5 kg. If the carrier burns 3.5 calories while carrying 1 kg of weight for 1 kilometer, and assuming that the carrier walks 5 km for each delivery, calculate how many calories does the carrier burn in total in a day. | def solve() -> int:
packages = 200
package_weight = 5
distance_per_delivery = 5
calories_per_kg_per_km = 3.5
total_distance = distance_per_delivery * packages
total_weight = package_weight * packages
total_calories_burnt = total_distance * total_weight * calories_per_kg_per_km
result = t... |
Emily wants to read as many books as possible this year. She reads 67 books in the first 4 months of the year. In January, she reads 1 book every 2 days. The rest of the books were read in February, March, and April. If in those three months she read an equal number of books each week, how many books did Emily read eac... | def solve() -> int:
jan_books = 31 // 2 + 1
feb_mar_apr_books = 67 - jan_books
feb_mar_apr_weeks = 3 * 4
books_per_week = feb_mar_apr_books / feb_mar_apr_weeks
result = books_per_week
return result
|
There are 12 cupcakes and 9 muffins in a bakery. If each cupcake costs $1.50 and each muffin costs $2.00, how much money will the bakery make if they sell all of them? | def solve() -> int:
cupcakes = 12
cupcake_price = 1.5
muffins = 9
muffin_price = 2.0
cupcake_revenue = cupcakes * cupcake_price
muffin_revenue = muffins * muffin_price
total_revenue = cupcake_revenue + muffin_revenue
result = total_revenue
return result
|
Mary is baking cookies and uses 3 cups of sugar for the first batch and 2 cups of sugar for the second batch. If she makes 4 more batches, using 2 cups of sugar for each, how many cups of sugar did she use in total? | def solve() -> int:
sugar = 3 + 2 + 2 + 2 + 2
result = sugar
return result
|
Jaden is baking cookies for his friends and he needs 2 cups of flour, 1 cup of sugar, 1/2 cup of butter, and 2 eggs. The flour costs $0.30 per pound, the sugar costs $0.40 per pound, the butter costs $2.50 per pound, and the eggs cost $2.00 per dozen. How much will the ingredients cost him? | def solve() -> int:
flour = 2 * 8 / 16
sugar = 1 * 8 / 16
butter = 0.5 * 8 / 16
eggs = 2 / 12
flour_cost = flour * 0.3
sugar_cost = sugar * 0.4
butter_cost = butter * 2.5
eggs_cost = eggs * 2
total_cost = flour_cost + sugar_cost + butter_cost + eggs_cost
result = total_c... |
A company produces 40000 units a month. Each unit has a cost of $3.5. If the company sells each unit for $6, what is their monthly profit? | def solve() -> int:
units_per_month = 40000
unit_cost = 3.5
unit_price = 6
total_cost = units_per_month * unit_cost
total_income = units_per_month * unit_price
monthly_profit = total_income - total_cost
result = monthly_profit
return result
|
Peter bought 40 boxes of chocolates for an average cost of $4, 24 toffees for an average cost of $1.50 and 28 toys for an average cost of $5. What was the average cost across all products? | def solve() -> int:
choco_num = 40
choco_cost = 4
toffee_num = 24
toffee_cost = 1.5
toys_num = 28
toys_cost = 5
total_cost = choco_num * choco_cost + toffee_num * toffee_cost + toys_num * toys_cost
total_num = choco_num + toffee_num + toys_num
result = total_cost / total_nu... |
Lily is going to her friend's house. An Uber ride costs $8 more than a Lyft ride. A Lyft ride costs $3 more than a bike ride. If the Uber ride costs $24, what is the total cost of a bike ride to her friend's house with a 25% tip? | def solve() -> int:
uber_ride_cost = 24
lyft_ride_cost = uber_ride_cost - 8
bike_ride_cost = lyft_ride_cost - 3
tip_percentage = 25
tip_amount = (bike_ride_cost * tip_percentage) / 100
total_cost = bike_ride_cost + tip_amount
result = total_cost
return result
|
A school raised $2500 through a bake sale, If there were 50 volunteers, each volunteering the same amount of time, how much money would they have collected if there were 10 fewer volunteers? | def solve() -> int:
volunteers = 50
money_raised = 2500
money_per_volunteer = money_raised / volunteers
new_volunteers = volunteers - 10
new_money_raised = money_per_volunteer * new_volunteers
result = new_money_raised
return result
|
Ben and Lisa are running a marathon of 42 kilometers. Ben runs at 12 kilometers per hour and Lisa runs at 10 kilometers per hour. Lisa starts 15 minutes after Ben. How long will it take for Lisa to finish the marathon? | def solve() -> int:
start_gap = 15 / 60
ben_distance = 12 * start_gap
catch_up_time = ben_distance / (12 - 10)
catch_up_distance = 10 * catch_up_time
remaining_distance = 42 - (ben_distance + catch_up_distance)
remaining_time = remaining_distance / 10
result = start_gap + catch_up_time + rem... |
Student: Anna has a pile of coins that she wants to count. The pile contains 50-cent coins, 20-cent coins, and 10-cent coins. She knows that the total value of the coins is 25 dollars. She also knows that the number of 50-cent coins is twice the number of 20-cent coins, and the number of 10-cent coins is three times th... | def solve() -> int:
total_value = 25
fifty_cent_coins = 0
twenty_cent_coins = 0
ten_cent_coins = 0
total_coins = total_value / 0.1
fifty_cent_coins = total_coins / 3
twenty_cent_coins = fifty_cent_coins / 2
ten_cent_coins = twenty_cent_coins * 3
result = (fifty_cent_coins, tw... |
10. Dave is trying to budget for his rent and food. His rent takes 30% of his total monthly budget while his food is 30%. If the total cost of his rent and food is $360, what is his total monthly budget? | def solve() -> int:
cost_rent_food = 360
rent_budget = cost_rent_food * 0.3
food_budget = cost_rent_food * 0.3
tot_budget = rent_budget + food_budget
result = tot_budget
return result
|
Two consecutive odd integers have a sum of 88. What is the larger integer? | def solve() -> int:
x = (88 - 1) // 2
y = x + 2
result = y
return result
|
Mary has 120 stickers. She gave 1/6 of them to her sister, and 1/3 of the remaining stickers to her friend. How many stickers did she give to her friend? | def solve() -> int:
stickers = 120
sister = stickers/6
remaining = stickers - sister
friend = remaining/3
result = friend
return result
|
A pizza place makes 15 pizzas per hour. If each pizza has 8 slices and each slice costs $2, how much money will the pizza place make in 4 hours? | def solve() -> int:
pizzas_per_hour = 15
slices_per_pizza = 8
slice_price = 2
total_slices = pizzas_per_hour * slices_per_pizza * 4
total_money = total_slices * slice_price
result = total_money
return result
|
A gym has 1000 members. If 60% of them regularly attend workout classes, and 2/3 of the remaining use the gym equipment, how many members do not attend classes or use the equipment? | def solve() -> int:
total_members = 1000
attend_classes = total_members * 0.6
remaining_members = total_members - attend_classes
use_equipment = remaining_members * (2/3)
not_attend_or_use = total_members - attend_classes - use_equipment
result = not_attend_or_use
return result
|
A restaurant serves 275 customers in a day. In the first hour, 30 customers are served and then 75 customers are served during lunchtime. In the afternoon they served twice the number of customers during lunchtime. How many more customers do they need to serve in the last hour to reach the target? | def solve() -> int:
served_customers_first = 30
served_customers_lunch = 75
served_customers_after_lunch = served_customers_lunch * 2
total_customers = 275
served_customers = served_customers_first + served_customers_lunch + served_customers_after_lunch
remaining_customers = total_customers - s... |
A rectangular prism has a length of 8 cm, a width of 6 cm, and a height of 10 cm. What is the volume of the rectangular prism in cubic centimeters? | def solve() -> int:
length = 8
width = 6
height = 10
volume = length * width * height
result = volume
return result
|
Student: A jar contains 20 blue marbles, 30 yellow marbles, 40 orange marbles, and 10 green marbles. If each color of marbles has to be tripled, how many more marbles does the jar need? | def solve() -> int:
blue_marbles = 20
yellow_marbles = 30
orange_marbles = 40
green_marbles = 10
tripled_blue_marbles = blue_marbles * 3
tripled_yellow_marbles = yellow_marbles * 3
tripled_orange_marbles = orange_marbles * 3
tripled_green_marbles = green_marbles * 3
total_marbles_nee... |
Robert is planning to purchase a musical instrument priced at $650. The music store offers a monthly payment plan of $75 with a 10% initial payment needed. If Robert pays an extra $80 for the down payment, what will be his remaining balance after 3 months of paying installments? | def solve() -> int:
price = 650
monthly_payment = 75
initial_payment_percentage = 0.1
initial_payment = price * initial_payment_percentage + 80
remaining_balance = price - initial_payment
remaining_balance -= monthly_payment
remaining_balance -= monthly_payment
... |
Student: It takes John 45 minutes to walk 2 miles. If he wants to walk 6 miles, how long will it take him? | def solve() -> int:
time = 45
distance = 2
rate = distance / time
distance = 6
time = distance / rate
result = time
return result
|
A recipe requires 3/4 cups of flour and 2/3 cups of sugar. If you want to make half the recipe, how much flour and sugar do you need? | def solve() -> int:
flour = (3/4) * 0.5
sugar = (2/3) * 0.5
result = (flour, sugar)
return result
|
After buying a set of 10 pencils, Elaine gave 2 pencils to Sarah, 4 pencils to Rick and kept the remaining for herself. How many pencils did Elaine keep? | def solve() -> int:
total_pencils = 10
pencils_sarah = 2
pencils_rick = 4
pencils_elaine = total_pencils - (pencils_sarah + pencils_rick)
result = pencils_elaine
return result
|
Liam goes to gym, he lifts 15 kettlebells of 25 pounds each. The kettlebells are designed to be 15% lighter on the pushing portion. Determine how much the weights will feel when pushing down? | def solve() -> int:
kettlebell_weight = 25
percentage_lighter = 15
pushing_weight = kettlebell_weight - (kettlebell_weight * percentage_lighter / 100)
result = pushing_weight
return result
|
Jasmine buys two dozen donuts and gives away 59% of them. How many donuts does she have left? | def solve() -> int:
donuts_bought = 2 * 24
donuts_given_away = donuts_bought * 0.59
donuts_left = donuts_bought - donuts_given_away
result = donuts_left
return result
|
Student: Anna and Ben share a pizza that has 12 slices. Anna eats 1/4 of the pizza and Ben eats 2/3 of what is left. How many slices does Ben eat? | def solve() -> int:
total_slices = 12
anna_slices = total_slices * 1/4
remaining_slices = total_slices - anna_slices
ben_slices = remaining_slices * 2/3
result = ben_slices
return result
|
On Monday, Ruby walked 2.5 miles. The next day she walked 0.5 miles more than twice what she walked on Monday. On Wednesday, she walked 3/4 of what she walked on Tuesday. How far, to the nearest tenth of a mile, did she walk on Wednesday? | def solve() -> int:
tuesday_walk = 5.5
wednesday_walk = round(0.75 * tuesday_walk, 1)
result = wednesday_walk
return result
|
Emily had 18 flowers in her garden. She picked 1/3 of them and then planted 10 more flowers. How many flowers does Emily have now? | def solve() -> int:
flowers_in_garden = 18
picked_flowers = flowers_in_garden * (1/3)
planted_flowers = 10
total_flowers = flowers_in_garden - picked_flowers + planted_flowers
result = total_flowers
return result
|
A music store is offering a "Create Your Own Playlist" special. Each song costs $1.50 and each album costs $10. Any headphones cost $25 and any Bluetooth speakers cost $50. If Tina creates a playlist with 10 songs, 3 albums, headphones, and Bluetooth speakers, how much will her music setup cost? | def solve() -> int:
songs = 10
albums = 3
headphones = 1
bluetooth_speakers = 1
song_cost = 1.50
album_cost = 10
headphones_cost = 25
bluetooth_speakers_cost = 50
total_cost = (songs * song_cost) + (albums * album_cost) + (headphones * headphones_cost) + (bluetooth_speakers... |
A recipe calls for 1/4 cup of sugar but you only have a 1/8 cup measuring cup. How many times do you need to fill up the measuring cup to get the amount of sugar you need? | def solve() -> int:
sugar_needed = 1/4
measuring_cup = 1/8
fills_needed = sugar_needed / measuring_cup
result = fills_needed
return result
|
Henry has seven times as many quarters as dimes in his wallet. He decides to donate 1/4 of the dimes to a charity. If he has 21 quarters, calculate the combined number of quarters and dimes he has after donating 1/4 of the dimes. | def solve() -> int:
dimes_before = 21 / 7
dimes_donated = 1/4 * dimes_before
dimes_after = dimes_before - dimes_donated
total_coins = dimes_after + 21
result = total_coins
return result
|
A fruit vendor sold 50 apples and 75 oranges. If an apple costs $0.30 and an orange costs $0.50, how much money did the vendor make in total? | def solve() -> int:
num_apples_sold = 50
num_oranges_sold = 75
apple_price = 0.30
orange_price = 0.50
total = (num_apples_sold * apple_price) + (num_oranges_sold * orange_price)
result = total
return result
|
John earns $12.5 per hour and worked 45 hours last week. If he gets time-and-a-half for every hour over 40 hours worked, calculate his total income. | def solve() -> int:
hours_worked = 45
hourly_rate = 12.5
if hours_worked > 40:
overtime_hrs = hours_worked - 40
overtime_pay = overtime_hrs * (hourly_rate * 1.5)
total_pay = (40 * hourly_rate) + overtime_pay
else:
total_pay = hours_worked * hourly_rate
result = total_... |
Student: A group of 12 friends went out for lunch and decided to split the bill equally. The first 4 friends ordered meals that cost $12 each. The next 4 friends ordered meals that cost $15 each. The last 4 friends ordered meals that cost $9 each. What is the average cost per person for the lunch? | def solve() -> int:
friends = 12
cost_12 = 12
cost_15 = 15
cost_9 = 9
bill = 0
bill = cost_12 * 4 + cost_15 * 4 + cost_9 * 4
average = bill / friends
result = average
return result
|
A rectangular pizza with a length of 16 inches and Width of 12 inches was cut into 8 equal parts. What is the area of each slice? | def solve() -> int:
length = 16
width = 12
total_area = length * width
slices = 8
slice_area = total_area / slices
result = slice_area
return result
|
When Emily went to the bakery to sell her baked goods, she realized that the price of croissants had risen by $2 for each croissant. The price of muffins had also increased by half the price that the price of croissants increased by per muffin. If she had planned to sell the croissants at $4 and the muffins at $3, and ... | def solve() -> int:
croissant_price = 4
muffin_price = 3
croissant_increase = 2
muffin_increase = croissant_increase / 2
croissant_count = 70
muffin_count = 110
new_croissant_price = croissant_price + croissant_increase
new_muffin_price = muffin_price + muffin_increase
tota... |
An artist is making three paintings for an exhibition. The first painting needs 25 milliliters of paint, the second painting is twice the size of the first painting, and the third painting is half the size of the second painting. How many milliliters of paint does the artist need in total? | def solve() -> int:
first_painting = 25
second_painting = first_painting * 2
third_painting = second_painting / 2
total_paint = first_painting + second_painting + third_painting
result = total_paint
return result
|
Dan works at a bakery making pies. He can make 3 pies in 20 minutes. How many pies can he make in 6 hours? | def solve() -> int:
hours = 6
minutes = hours * 60
pies = 3
time = 20
pies_per_minute = pies / time
result = pies_per_minute * minutes
return result
|
Tom and his family went to a theme park on a Sunday afternoon. Adult tickets cost $50 and children's tickets cost $35. They received a 25% discount for purchasing more than 6 tickets. If Tom bought 2 adult tickets and 4 children's tickets, what was the total cost? | def solve() -> int:
adult_ticket_price = 50
child_ticket_price = 35
adult_tickets = 2
child_tickets = 4
total_tickets = adult_tickets + child_tickets
if total_tickets > 6:
discount = 0.25
else:
discount = 0
subtotal = (adult_tickets * adult_ticket_price) + (chil... |
On Saturday afternoon, Tom had $60 to spend. He first went to a sporting goods store and spent $30 on a new baseball glove. Later, he went to a convenience store and spent $8 on snacks. He then went to a movie theater and spent $12 on a ticket. After the movie, he won $25 playing a video game at an arcade. How much mon... | def solve() -> int:
money_start = 60
spent_sporting_goods = 30
spent_snacks = 8
spent_movie_ticket = 12
won_arcade = 25
money_left = money_start - spent_sporting_goods - spent_snacks - spent_movie_ticket + won_arcade
result = money_left
return result
|
Sophie walked 8 kilometers, and she managed to take 13,000 steps. If she walks around the area 4 times, how many steps will she take every time she walks around it? | def solve() -> int:
distance_walked = 8
total_steps = 13000
times_around_area = 4
steps_per_walk = total_steps / times_around_area
result = steps_per_walk
return result
|
Jack and his family are going on a vacation, Jack's plane ticket costs $355 while the rest of his family's tickets cost $245 each. What is the total for the tickets? | def solve() -> int:
jack_ticket = 355
family_tickets = 3 * 245
total_cost = jack_ticket + family_tickets
result = total_cost
return result
|
Student: David spent 400 dollars on clothes, 25 percent of his remaining money on gas, and donated 10 percent of what's left to charity. If David now has 800 dollars left, how much money did he originally have? | def solve() -> int:
clothes = 400
gas = 0.25
charity = 0.1
final = 800
before_charity = final / (1 - charity)
before_gas = before_charity / (1 - gas)
original = clothes + before_gas
result = original
return result
|
Emma walks 3/4 miles every day. She plans to walk for four weeks. How many miles will she walk during that time? | def solve() -> int:
distance_per_day = 3/4
days_per_week = 7
num_weeks = 4
distance_per_week = distance_per_day * days_per_week
total_distance = distance_per_week * num_weeks
result = total_distance
return result
|
Frank bought a dozen apples at the store. Each apple cost him 40 cents. How much money did Frank spend on the apples in total? | def solve() -> int:
apples = 12
price = 0.4
total = apples * price
result = total
return result
|
Lisa jogged 2 miles to the park. She then hiked 4 miles to a waterfall. After her hike, she jogged back home. How many miles did Lisa travel in total? | def solve() -> int:
miles_to_park = 2
miles_to_waterfall = 4
total_miles = miles_to_park + miles_to_waterfall + miles_to_park
result = total_miles
return result
|
Student: Two cities A and B are 360 km apart. A bus takes 6 hours to travel from A to B. If a cyclist left city A 6 hours after the bus and both of them travel at constant speed, how much faster did the cyclist travel than the bus? | def solve() -> int:
distance = 360
bus_time = 6
cyclist_time = bus_time + 6
bus_speed = distance / bus_time
cyclist_speed = distance / cyclist_time
difference_in_speed = cyclist_speed - bus_speed
result = difference_in_speed
return result
|
A group of 20 friends went out to dinner and decided to split the bill evenly. If the bill came to $150 and they also want to leave a 20% tip, how much will each person have to pay? | def solve() -> int:
total_bill = 150
tip_amount = total_bill * 0.2
total_amount = total_bill + tip_amount
per_person = total_amount/20
result = per_person
return result
|
Lauren is planning to decorate her bedroom. She wants to buy a new bed frame that costs $300 and a new dresser that costs $250. She also needs to buy new bedding that costs $80. How much will Lauren spend in total? | def solve() -> int:
bed_frame_cost = 300
dresser_cost = 250
bedding_cost = 80
total_cost = bed_frame_cost + dresser_cost + bedding_cost
result = total_cost
return result
|
3. In a certain container, there are 6 times as many apples as oranges. If the total amount of fruit is 420, how many apples are there? | def solve() -> int:
total_fruit = 420
oranges = total_fruit / 7
apples = oranges * 6
result = apples
return result
|
Leila bought 3 packs of pencils, each containing 12 pencils. She gave 4 pencils to her brother, 6 pencils to her sister, and 2 pencils to her friend. How many pencils does she have left? | def solve() -> int:
total_pencils = 3 * 12
pencils_left = total_pencils - (4 + 6 + 2)
result = pencils_left
return result
|
At a zoo, a train can carry 50 people in 30 minutes. If the train operates from 9:00 am until 2:00 pm, how many people can ride it? | def solve() -> int:
people_per_minute = 50/30
operating_minutes = (2-9)*60
total_people = people_per_minute * operating_minutes
result = total_people
return result
|
Sally has 5 times as many pencils as pens. If she has 10 pens, how many pencils does she have? | def solve() -> int:
num_pens = 10
num_pencils = num_pens * 5
result = num_pencils
return result
|
Sarah ran for 30 minutes at a pace of 9 miles per hour. How many miles did she run? | def solve() -> int:
time = 30/60
pace = 9
distance = time * pace
result = distance
return result
|
Jackson and Samantha need to plan how many hours they will spend rehearsing their play for the next week. They have 6 scenes to perfect, which will take 2 hours each, and they plan to take a 5-minute break every 30 minutes. If they only want to rehearse for a maximum of 4 hours each day, how many days will it take for ... | def solve() -> int:
scenes = 6
scene_duration = 2
break_duration = 5
break_interval = 30
max_rehearse_time = 4
total_rehearse_time = scenes * scene_duration
total_break_time = (total_rehearse_time // break_interval) * break_duration
total_time = total_rehearse_time + total_brea... |
A company has a total of 250 employees, of which 60% are male. How many female employees are there? | def solve() -> int:
total_employees = 250
male_employees = total_employees * 0.6
female_employees = total_employees - male_employees
result = female_employees
return result
|
Tom jogged 4 miles each day for the first 5 days of the week. On the last day of the week, he jogged for 6 miles. What is the total distance Tom jogged over the week? | def solve() -> int:
total_distance = (4*5) + 6
result = total_distance
return result
|
Charlotte has 40 oak tree seeds and 40 maple tree seeds. If 60% of oak tree seeds germinate and 90% of maple tree seeds germinate, and 70% of the resulting trees produce foliage, how many foliage-producing trees will she have? | def solve() -> int:
oak_seeds = 40
maple_seeds = 40
oak_germination_rate = 0.6
maple_germination_rate = 0.9
oak_trees = oak_seeds * oak_germination_rate
maple_trees = maple_seeds * maple_germination_rate
oak_foliage_rate = 0.7
maple_foliage_rate = 0.7
oak_foliage_... |
``` A baseball team has played 50 games so far and won 35 of those games. What percentage of the games did they win? | def solve() -> int:
total_games = 50
games_won = 35
percent_wins = (games_won / total_games) * 100
result = percent_wins
return result
|
Maya buys a book that costs $12 and a pen that costs $3. She pays with a $20 bill and gets some change back. How much change does she get? | def solve() -> int:
total_cost = 12 + 3
change = 20 - total_cost
result = change
return result
|
Joe has 10 buckets, each can hold 20 liters of water. How many liters of water can Joe carry in total? | def solve() -> int:
buckets = 10
liters = 20
total = buckets * liters
result = total
return result
|
In a group of five friends, a pizza with 10 slices was divided equally among them. How many pizza slices do two friends get combined? | def solve() -> int:
num_friends = 5
num_slices = 10
slices_per_friend = num_slices / num_friends
num_friends_combined = 2
slices_combined = slices_per_friend * num_friends_combined
result = slices_combined
return result
|
A man earns $3000 per month plus a 5% commission on sales. If he makes sales totaling $10,000 in a month, how much money does he earn that month? Solution: Let x be the commission the man receives on his total sales of $10,000. Therefore, his total earnings is his monthly salary of $3000 plus his commission x. The comm... | def solve() -> int:
monthly_salary = 3000
commission = 0.05 * 10000
total_earnings = monthly_salary + commission
result = round(total_earnings, 2)
return result
|
After baking 600 sugar cookies, Jack's nephew took 10%, and his niece took 70 cookies. If he gave away 25% of the remaining cookies to his colleagues, how many cookies does he have left? | def solve() -> int:
cookies_baked = 600
nephew_share = 10/100 * cookies_baked
niece_share = 70
remaining_cookies = cookies_baked - nephew_share - niece_share
colleague_share = 25/100 * remaining_cookies
cookies_left = remaining_cookies - colleague_share
result = cookies_left
return ... |
A company produces 500 widgets per day. If there are 21 working days in a month, how many widgets are produced in a month? | def solve() -> int:
widgets_per_day = 500
working_days_per_month = 21
widgets_per_month = widgets_per_day * working_days_per_month
result = widgets_per_month
return result
|
Lucy bought a dress that was on sale for 20% off. She also had a coupon that gave her an extra 15% off. The original price of the dress was $40. How much did she pay for the dress? | def solve() -> int:
original_price = 40
discount_1 = 0.2
discount_2 = 0.15
price_1 = original_price * (1 - discount_1)
price_2 = price_1 * (1 - discount_2)
result = price_2
return result
|
Student: A student wants to earn a grade of B in a class that weighs assignments as 30%, exams as 50%, and attendance as 20%. If the student’s current score is 75% on assignments, 80% on exams, and 90% on attendance, what grade must they get on the final exam to earn a grade of B? | def solve() -> int:
assignments = 0.75
exams = 0.8
attendance = 0.9
grade_needed = 0.8
total_score = assignments * 0.3 + exams * 0.5 + attendance * 0.2
score_needed = grade_needed - total_score
percentage_needed = score_needed / 0.5
result = percentage_needed * 100
return result
|
A jar contains 1200 marbles, 25% of which are blue and the rest are red. How many red marbles are there in the jar? | def solve() -> int:
total_marbles = 1200
blue_marbles_ratio = 0.25
red_marbles_ratio = 1 - blue_marbles_ratio
red_marbles = red_marbles_ratio * total_marbles
result = red_marbles
return result
|
Student: A family has 360 coins to split between 5 children. How many coins must each child receive? | def solve() -> int:
coins = 360
children = 5
coins_per_child = coins // children
remaining_coins = coins % children
result = coins_per_child
return result
|
ally buys 3 pieces of jewelry worth $60 each and gets a discount of 10% on the total price. If she pays with a gift card worth $100, how much money does she still owe? | def solve() -> int:
price = 60
quantity = 3
subtotal = price * quantity
discount = 0.1
total = subtotal * (1 - discount)
gift_card = 100
still_owe = total - gift_card
result = still_owe
return result
|
While mowing the lawn, Kyle accidentally mowed over a beehive and 20 bees flew away. 5 bees were not able to fly away. How many bees were in the beehive in total? | def solve() -> int:
bees_escaped = 20
bees_left = 5
bees_total = bees_escaped + bees_left
result = bees_total
return result
|
A recipe for cookies calls for 2 eggs for every 1 cup of sugar. If a batch of cookies requires 6 cups of sugar, how many eggs are needed? | def solve() -> int:
eggs = 2 * 6
result = eggs
return result
|
Jared purchased 6 bottles of soda for $1.50 each and 2 bags of chips for $2.75 each. If he paid with a $20 bill, how much change will he receive? | def solve() -> int:
total_soda_cost = 6 * 1.5
total_chips_cost = 2 * 2.75
total_cost = total_soda_cost + total_chips_cost
change = 20 - total_cost
result = change
return result
|
Student: A cinema sold 250 tickets for a movie. If the revenue is equal to $3 per ticket sold, what is the total revenue made from that movie? | def solve() -> int:
tickets = 250
price_per_ticket = 3
total_revenue = tickets * price_per_ticket
result = total_revenue
return result
|
Eric is setting up his new laptop. He needs to connect to the internet, and he has three options that range from $25 for 25 gigs, $45 for 45 gigs, and $70 for 85 gigs. If Eric needs 80 gigs, which option should he choose? | def solve() -> int:
option_25 = 25
option_45 = 45
option_70 = 70
gig_needed = 80
if gig_needed <= option_25:
result = option_25
elif gig_needed <= option_45:
result = option_45
else:
result = option_70
return result
|
Dave needs 8 gallons of paint to paint three walls of his room. He already has 3 gallons of paint. How many more gallons does he need? | def solve() -> int:
total_gallons_needed = 8
gallons_already_have = 3
gallons_needed = total_gallons_needed - gallons_already_have
result = gallons_needed
return result
|
Student: Isabella wants to buy a jacket that costs $120. She has a gift card that covers 40% of the cost of the jacket. She also has a coupon that gives her a 15% discount on the remaining amount. How much money does Isabella need to pay for the jacket after using the gift card and the coupon? | def solve() -> int:
cost = 120
gift_card_percentage = 0.4
coupon_percentage = 0.15
gift_card_amount = cost * gift_card_percentage
remaining_amount = cost - gift_card_amount
coupon_amount = remaining_amount * coupon_percentage
result = remaining_amount - coupon_amount
return result
|
Jack can run 8 miles before taking a rest. Madison can run only a quarter as many miles as Jack, and Ethan can only run two fewer than Madison. They had a route of 20 miles, and all of them ran until they had to rest. If they divide the remaining miles equally, how many miles will they each have? | def solve() -> int:
jack_miles = 8
madison_miles = jack_miles / 4
ethan_miles = madison_miles - 2
total_miles = 20
remaining_miles = total_miles - jack_miles - madison_miles - ethan_miles
miles_each = remaining_miles / 3
result = miles_each
return result
|
Anna needs to drive a distance of 315 miles. If her car uses 35 miles per gallon of gasoline and gasoline costs $3.00 per gallon, how much will it cost her for gasoline? | def solve() -> int:
distance = 315
mpg = 35
price = 3
gasoline = distance/mpg * price
result = gasoline
return result
|
There are 200 students in a science class, 30% of them are girls and the remainder are boys. If every girl takes 4 notebooks and every boy takes 6 notebooks at the beginning of the year, how many total notebooks are in the classroom? | def solve() -> int:
girls = 0.3 * 200
boys = 200 - girls
tot_notebooks = girls * 4 + boys * 6
result = tot_notebooks
return result
|
An airplane covers a distance of 360 miles at an average speed of 70 mph. What is the total time spent on the flight? | def solve() -> int:
distance = 360
speed = 70
minutes = distance // speed
result = minutes
return result
|
At the end of 2019, a certain building was 200 meters tall. It grows 15% more than its previous height each year. How tall was the building at the end of 2017 and how many years has it grown? John needs to buy multiple gym memberships for his friends. For each of the first 4 memberships, he has to pay $30, and for each... | def solve() -> int:
height_2019 = 200
growth_rate = 0.15
years = 2
height_2017 = height_2019 / (1 + growth_rate) ** years
total_memberships = 10
discounted_memberships = total_memberships - 4
if discounted_memberships > 0:
cost = 4 * 30 + discounted_memberships * 25
else:
... |
-Make sure there is only one question per line Possible similar questions and programs are: Ali can paint 12 tiles in 45 minutes. Ben can paint 10 tiles in 45 minutes and Cara can paint 8 tiles in 45 minutes. If they start painting at the same time, how many tiles can they paint in 3 hours? | def solve() -> int:
ali_tiles_per_hour = 12 * 60 / 45
ben_tiles_per_hour = 10 * 60 / 45
cara_tiles_per_hour = 8 * 60 / 45
total_tiles_per_hour = ali_tiles_per_hour + ben_tiles_per_hour + cara_tiles_per_hour
total_tiles_per_three_hours = total_tiles_per_hour * 3
result = total_tiles_per_three_hou... |
If a painting appraises for $250,000, but it depreciates at a rate of 5% per year, what will its value be in 10 years? | def solve() -> int:
initial_value = 250000
depreciation_rate = 0.05
years = 10
depreciation = initial_value * depreciation_rate * years
final_value = initial_value - depreciation
result = final_value
return result
|
In a class of 30 students, 18 of them are females. What percentage of the total class are males? | def solve() -> int:
total_students = 30
female_students = 18
male_students = total_students - female_students
male_percentage = (male_students / total_students) * 100
result = male_percentage
return result
|
John runs 2.5 miles every day for 5 days a week. He also runs an extra 3 miles every alternate day. Find out how many miles he ran in a week. | def solve() -> int:
daily_distance = 2.5
additional_distance = 3
distance_5_days = daily_distance * 5
distance_extra_days = additional_distance * 2.5
total_distance = distance_5_days + distance_extra_days
result = total_distance * 7
return result
|
A person buys a stock for $100. After a year, the stock price fell by 10% and then rose by 10%. What is the current price of the stock? | def solve() -> int:
initial_price = 100
price_after_fall = initial_price * (1-0.10)
current_price = price_after_fall * (1+0.10)
result = current_price
return result
|
A tank has a capacity of 80 liters. If it starts with 30 liters of water, how much water needs to be added to fill it up? | def solve() -> int:
tank_capacity = 80
initial_water = 30
water_needed = tank_capacity - initial_water
result = water_needed
return result
|
Mike needs to buy a new fridge. The cost of the fridge is $400 plus a 5% sales tax. How much does he have to pay in total? | def solve() -> int:
price = 400
tax = price * 0.05
result = price + tax
return result
|
A roller coaster ride lasts 3 minutes 45 seconds. If the ride consists of two parts and the second part lasts twice longer than the first, how long does each part last? | def solve() -> int:
total_time_in_seconds = 3 * 60 + 45
time_of_first_part = total_time_in_seconds / 3
time_of_second_part = 2 * time_of_first_part
result = time_of_first_part, time_of_second_part
return result
|
A bag of candy weighs 1.2 kg and contains 30% chocolate, 40% gummy bears, and 30% jelly beans. How many grams of chocolate are in the bag? | def solve() -> int:
grams_in_kg = 1000
grams_in_bag = 1.2 * grams_in_kg
chocolate_percentage = 30
chocolate_grams = grams_in_bag * chocolate_percentage / 100
result = chocolate_grams
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.