question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Michael is currently 30 years old. His older sister Michelle was 9 years old when he was born. If their elder brother Marcus is 5 years older than Michelle, how old will Marcus be in 6 years? | def solve() -> int:
michael_age = 30
michelle_age = michael_age - 9
marcus_age = michelle_age + 5
marcus_age_in_6_years = marcus_age + 6
result = marcus_age_in_6_years
return result
|
John uses 8 gallons of water per day for his garden. If his water bill is $0.005 per gallon, what is his monthly water bill? | def solve() -> int:
gallon_cost = 0.005
num_gallons = 8 * 30
total_cost = gallon_cost * num_gallons
result = total_cost
return result
|
A recipe calls for 3/4 cups of sugar to make 12 cookies. How much sugar is needed to make 30 cookies? | def solve() -> int:
cookies_needed = 30
sugar_per_cookie = 0.75/12
total_sugar = cookies_needed*sugar_per_cookie
result = total_sugar
return result
|
John, Dave, and Peter are working on an experiment. John has 9 more widgets than Dave and Peter has 10% fewer widgets than John. If Dave has 16 widgets, how many widgets do the three have together? | def solve() -> int:
total = 0
total = total + 16
total = total + (16 + 9)
total = total + (16 + 9)*(1-0.1)
result = total
return result
|
20% of the students in class failed the examination. If there are 45 students in class, how many students failed? | def solve() -> int:
total_students = 45
failed_percentage = 20/100
failed_students = total_students * failed_percentage
result = failed_students
return result
|
Maria spent 70% of her allowance on clothes, and then spent 10% of what was left on a movie ticket. If she has $45 left, what was her allowance? | def solve() -> int:
allowance = 45 / (1 - 0.7 - 0.1)
result = allowance
return result
|
Q5: A farmer planted his vegetables in neat rows. He had 120 squash seedlings and places them 10 in a row. He also had 72 zucchini and planted them 7 in a row. Recently, he planted 48 eggplant with 12 eggplant per row. If the farmer planted two rows per planted bed, how many plant beds did he have for all his plants? | def solve() -> int:
seedlings_per_row_squash = 10
seedlings_per_row_zucchini = 7
seedlings_per_row_eggplant = 12
num_rows = 2
num_plant_bed_squash = int(120/seedlings_per_row_squash/num_rows)
num_plant_bed_zucchini = int(72/seedlings_per_row_zucchini/num_rows)
num_plant_bed_eggplant = i... |
Student: Emilia ran around the town square 6 times. Her speed was 3/4 of what her siblings maximum speed was. It took Emilia 55 minutes to complete the race, how fast did her siblings finish the race? | def solve() -> int:
siblings_max_speed = 0
emilia_speed = 0
time_taken_by_emilia = 55
num_of_times_emilia_ran = 6
emilia_speed = siblings_max_speed * 3/4
siblings_max_speed = (time_taken_by_emilia * emilia_speed) / (num_of_times_emilia_ran)
result = siblings_max_speed
return result
|
A pack of crayons costs $15. If each crayon costs $0.50, how many crayons are in the pack? | def solve() -> int:
total_cost = 15
cost_per_crayon = 0.5
number_of_crayons = total_cost/cost_per_crayon
result = number_of_crayons
return result
|
Student: Uncle Bob has 120 stickers in a book. He wants to give them to his 4 nieces and 2 nephews. He also wants to keep 12 stickers for himself. How many stickers did each niece or nephew receive? | def solve() -> int:
stickers_in_book = 120
num_nieces = 4
num_nephews = 2
stickers_for_uncle_bob = 12
total_stickers_to_give_away = stickers_in_book - stickers_for_uncle_bob
stickers_per_person = total_stickers_to_give_away / (num_nieces + num_nephews)
result = stickers_per_person
retur... |
A recipe calls for 3 eggs per 2 cups of flour. How many eggs are needed for 4 cups of flour? | def solve() -> int:
eggs_per_flour = 3/2
cups_of_flour = 4
num_of_eggs_needed = eggs_per_flour * cups_of_flour
result = num_of_eggs_needed
return result
|
A farmer has 45 chickens and some cows. The total number of legs of the animals is 150. How many cows does the farmer have? | def solve() -> int:
chickens = 45
total_legs = 150
chicken_legs = chickens * 2
cow_legs = total_legs - chicken_legs
cows = cow_legs / 4
result = cows
return result
|
A bakery sells cakes with either 6 or 8 slices. If they sell 3 cakes with 6 slices and 5 cakes with 8 slices, how many total slices of cake did they sell? | def solve() -> int:
slices_per_6_slice_cake = 6
slices_per_8_slice_cake = 8
num_6_slice_cakes_sold = 3
num_8_slice_cakes_sold = 5
total_slices_sold = (slices_per_6_slice_cake * num_6_slice_cakes_sold) + (slices_per_8_slice_cake * num_8_slice_cakes_sold)
result = total_slices_sold
... |
If a restaurant bill is $60, and you would like to leave a 15% tip, how much money should you leave in total? | def solve() -> int:
tip_amount = 60 * 0.15
total_bill = tip_amount + 60
result = total_bill
return result
|
John earns $25.00 a day and saves $10.00 a day for the first week. For the next two weeks, he earns $35.00 a day and saves $20.00 a day. How much money has he saved over 3 weeks? | def solve() -> int:
earnings_week1 = 25.00 * 7
savings_week1 = 10.00 * 7
earnings_week2 = 35.00 * 14
savings_week2 = 20.00 * 14
total_earnings = earnings_week1 + earnings_week2
total_savings = savings_week1 + savings_week2
result = total_savings
return result
|
John bought a car for $15,000 and plans to sell it in five years. If the car depreciates by 10% each year, how much will John be able to sell the car for? | def solve() -> int:
initial_price = 15000
depreciation_rate = 0.1
yearly_depreciation = initial_price * depreciation_rate
price_after_5_years = initial_price - 5*yearly_depreciation
result = price_after_5_years
return result
|
A pizza joint charges $12 for a large pizza and $8 for a small pizza. If John orders 2 large pizzas and 3 small pizzas, how much will his order cost? | def solve() -> int:
order_cost = (2*12) + (3*8)
result = order_cost
return result
|
Nathan is building a bookcase and needs to buy the supplies for it. He needs 52 screws, 48 dowels and 10 feet of wood. If each dowel is 1 foot long, how many feet of wood does he need for the bookcase? | def solve() -> int:
screws = 52
dowels = 48
wood_initial = 10
dowel_length = 1
total_wood = (wood_initial + dowel_length * dowels)
result = total_wood
return result
|
Jane has $50. She buys a dress for $22, a pair of shoes for $30, and a scarf for $18. How much money, in dollars, does Jane have left? | def solve() -> int:
money_left = 50
dress_cost = 22
shoes_cost = 30
scarf_cost = 18
money_left = money_left - dress_cost - shoes_cost - scarf_cost
result = money_left
return result
|
A department store has a sale on t-shirts for $10 each and sweaters for $30 each. If someone wants to spend $80, what is the maximum number of t-shirts they can buy? | def solve() -> int:
t_shirt_price = 10
sweater_price = 30
total_budget = 80
max_t_shirts = total_budget // t_shirt_price
result = max_t_shirts
return result
|
am buys a book for $15. If she gives the cashier $20, how much change will she get back? | def solve() -> int:
book_price = 15
cash_given = 20
change = cash_given - book_price
result = change
return result
|
A shopkeeper has 360 candies. He puts the candies into bags of 15 each. How many bags of candies will he make? | def solve() -> int:
candies = 360
bag_size = 15
bags = candies // bag_size
result = bags
return result
|
If a family has 4 children and the oldest is 3 years older than the second oldest, who is 8 years old, what is the age difference between the youngest and oldest child? | def solve() -> int:
second_oldest_age = 8
oldest_age = second_oldest_age + 3
youngest_age = oldest_age - (4 - 1)
age_difference = oldest_age - youngest_age
result = age_difference
return result
|
A car travels 240 miles in 4 hours. How long would it take to travel 480 miles if the speed increases by 50%? | def solve() -> int:
speed_increase = 1.5
distance_1 = 240
time_1 = 4
distance_2 = 480
speed_1 = distance_1 / time_1
time_2 = distance_2 / (speed_1 * speed_increase)
result = time_2
return result
|
Brandon starts with an annual salary of $60,000 and gets a 5% raise every year. What is his expected salary after 3 years? | def solve() -> int:
salary = 60000
raise_percent = 0.05
years = 3
salary_after_1 = salary*raise_percent+salary
salary_after_2 = salary_after_1*raise_percent+salary_after_1
salary_after_3 = salary_after_2*raise_percent+salary_after_2
result = salary_after_3
return result
|
Student: A package weighs 5 pounds and a box weighs 2 pounds. If you have 10 packages, how much will 100 boxes weigh? | def solve() -> int:
package_weight = 5
box_weight = 2
package_total_weight = package_weight * 10
box_total_weight = box_weight * 100
total_weight = package_total_weight + box_total_weight
result = total_weight
return result
|
Student: A car travels at a speed of 60 miles per hour. How long does it take for the car to travel a distance of 180 miles? | def solve() -> int:
speed = 60
distance = 180
time = distance / speed
result = time
return result
|
Nate has 7500 marbles in his collection. After his favorite team lost the championship, he is feeling very sad. His dad and best friend are trying to cheer him up by giving him more marbles. His dad has given him 200 more marbles than his best friend, who has given him 1300 marbles. How many marbles does Nate have now? | def solve() -> int:
friend_marbles = 1300
dad_marbles = friend_marbles + 200
total_marbles = friend_marbles + dad_marbles + 7500
result = total_marbles
return result
|
If a car travels at an average speed of 60 miles per hour for 3 hours, how many miles has it traveled? | def solve() -> int:
speed = 60
time = 3
distance = speed * time
result = distance
return result
|
Jeremey can lift 85kg of weight at 16. When he turns 24, he can lift 50% more than his previous lifting capacity. How much weight can Jeremy lift at 24? | def solve() -> int:
def old_weight(weight):
return weight
def new_weight(weight):
return old_weight(weight)*1.5
weight = 85
result = new_weight(weight)
return result
|
David has a podcast that he uploads to a platform that pays him $0.01 per listen. He has 20 episodes that have been listened to 500 times each, and 10 episodes that have been listened to 800 times each. How much money has he earned from his podcast so far? | def solve() -> int:
episodes_500 = 20
episodes_800 = 10
listens_500 = 500
listens_800 = 800
payment = 0.01
money_500 = episodes_500 * listens_500 * payment
money_800 = episodes_800 * listens_800 * payment
total_money = money_500 + money_800
result = total_money
return res... |
In a jar of candies, there are 25% red candies and 120 candies in total. How many candies are not red? Jenny's phone storage showed 5.8 gigabytes free and 10.2 gigabytes used. She decided to delete a photo album of size 3.2 gigabytes and download a new app of size 1.5 gigabytes. If she will transfer all her data to a n... | def solve() -> int:
red_candies = 120 * 0.25
not_red_candies = 120 - red_candies
free_storage = 5.8 - 3.2 + 1.5
new_phone_storage = 25
free_gigabytes = new_phone_storage - (10.2 - 3.2 + 1.5)
result = free_gigabytes
return result
|
A car manufacturer produces 150 cars every day. If the demand for cars is 2000 in a month, how many days will it take for the car manufacturer to satisfy the monthly demand? | def solve() -> int:
cars_per_day = 150
month_demand = 2000
days = month_demand // cars_per_day
if month_demand % cars_per_day!= 0:
days += 1
result = days
return result
|
A rectangle has a length of 8cm and a width of 6cm. What is the perimeter of the rectangle? | def solve() -> int:
length = 8
width = 6
perimeter = 2 * (length + width)
result = perimeter
return result
|
Student: A car is driving at 60mph. If the car needs to travel 240 miles, how long will the journey take in hours? | def solve() -> int:
speed = 60
distance = 240
time = distance / speed
result = time
return result
|
Student: In a team, there are 20% more girls than boys. If the team has 30 members, how many girls are there? | def solve() -> int:
boys = 30 * 0.8
girls = 30 * 0.2
result = boys + girls
return result
|
Possible math questions and python programs: Maya and Lena each earn $5 from doing chores. Maya spends half of her money on a book and saves the rest. Lena spends $1.25 on a candy bar and the rest on stickers. How much money do Maya and Lena have left altogether, in cents? | def solve() -> int:
maya_earn = 500
lena_earn = 500
maya_spend = maya_earn / 2
lena_spend = 125 + (lena_earn - 125) * 0.8
maya_save = maya_earn - maya_spend
lena_save = lena_earn - lena_spend
total_save = maya_save + lena_save
result = total_save
return result
|
A grocery store sells bananas at $0.50 each, and apples at $0.40 each. If Linda buys 5 bananas and 10 apples, what is the total cost? | def solve() -> int:
total_price = 0.50 * 5
total_price += 0.40 * 10
result = total_price
return result
|
After a 40% increase, a $25 shirt is now on sale for what price? | def solve() -> int:
starting_price = 25
percentage_increase = 0.40
price_increase = starting_price * percentage_increase
new_price = starting_price + price_increase
result = new_price
return result
|
A boat travels upstream a distance of 60 km in 6 hours. If its speed in still water is 20 km/hr, what is the speed of the stream? | def solve() -> int:
speed_stillwater_in_km_hr = 20
distance_upstream_in_km = 60
time_upstream_in_hours = 6
speed_stream_in_km_hr = (distance_upstream_in_km / time_upstream_in_hours) - speed_stillwater_in_km_hr
result = speed_stream_in_km_hr
return result
|
---- Possible math questions and programs: Anna and Ben both ride their bikes on a straight road. Anna rides her bike 12 km per hour. Ben rides his bike 3 km per hour faster than Anna. If Anna has traveled 36 km from the start point, how far will Ben have traveled by that time? | def solve() -> int:
anna_speed = 12
ben_speed = anna_speed + 3
anna_distance = 36
anna_time = anna_distance / anna_speed
ben_distance = ben_speed * anna_time
result = ben_distance
return result
|
Jack drives 35 miles to work each day and 42 miles back home. If he works for 5 days each week, how many miles does he drive in a week? | def solve() -> int:
miles_to_work = 35
miles_to_home = 42
days = 5
total_miles = (miles_to_work + miles_to_home) * days
result = total_miles
return result
|
Student: 4. Natasha bought 24 oranges, but she ate 9 of them. How many oranges are left with Natasha? | def solve() -> int:
oranges_bought = 24
oranges_eaten = 9
oranges_left = oranges_bought - oranges_eaten
result = oranges_left
return result
|
Jane has 45 marbles in her bag. Each day, she takes out 3 marbles. How many days will it take for her to run out of marbles? | def solve() -> int:
marbles = 45
daily_out = 3
days = marbles // daily_out
result = days
return result
|
Larry speaks for 3.5 hours a day from Monday to Friday, and 2 hours a day on Saturday and Sunday. How many hours does Larry speak in one week? | def solve() -> int:
hours_monday_friday = 3.5 * 5
hours_saturday_sunday = 2 * 2
hours_total = hours_monday_friday + hours_saturday_sunday
result = hours_total
return result
|
After studying for a math test, Haley wants to spend 4 hours studying for her geography exam. How many minutes will she spend studying for geography? | def solve() -> int:
time_in_hours = 4
time_in_minutes = time_in_hours * 60
result = time_in_minutes
return result
|
Ryan and Emma sent out 250 surveys to gather feedback. If 55% of the recipients responded with feedback and 12% indicated they didn't want to provide feedback, how many recipients did not respond at all? | def solve() -> int:
total_surveys = 250
responded = total_surveys * 0.55
did_not_respond = total_surveys - responded
did_not_want_to_respond = total_surveys * 0.12
did_not_respond -= did_not_want_to_respond
result = did_not_respond
return result
|
John took a flight that was 820 miles long. The flight was 2.5 hours long. If he spent 30 minutes waiting at the airport before the flight, and it took him an additional 45 minutes to get to the airport, how much total time (in hours) did it take John from leaving home to arriving at his destination? | def solve() -> int:
flight_distance = 820
flight_time = 2.5
pre_flight_wait_time = 0.5
time_to_airport = 0.75
total_time = pre_flight_wait_time + flight_time + time_to_airport
result = total_time
return result
|
Tilley spent $145 to buy toys for her 2 kids. The first kid got 4 times as much as the second kid. How much did the first kid get? | def solve() -> int:
first_kid_money = 0
second_kid_money = 0
total = 145
first_kid_money = 4 * second_kid_money
total_amount = first_kid_money + second_kid_money
if total == total_amount:
result = first_kid_money
else:
result = "incorrect"
return result
|
Jack can travel 80 miles in 2 hours. Kelly can travel 120 miles in 3 hours. How long does it take for them to travel 200 miles together? | def solve() -> int:
distance1 = 80
time1 = 2
distance2 = 120
time2 = 3
rate1 = distance1/time1
rate2 = distance2/time2
rate_total = rate1 + rate2
distance_total = 200
time_together = distance_total/rate_total
result = time_together
return result
|
Student: During a recent sale, a store sold all four models of televisions for the same price. Model A was twice as expensive as Model B, which was twice as expensive as Model C, which was twice as expensive as Model D. If the store sold 80 of Model A televisions, how many of Model D televisions did the store sell? | def solve() -> int:
price_d = 1
price_c = 2 * price_d
price_b = 2 * price_c
price_a = 2 * price_b
num_a = 80
num_b = num_a / 2
num_c = num_b / 2
num_d = num_c / 2
result = num_d
return result
|
If the wildlife center relocated 900 cats from Tatoosh Island to a sanctuary, and at first the island had 1,800 cats, how many cats were left on the island? | def solve() -> int:
initial_cats = 1800
relocated_cats = 900
result = initial_cats - relocated_cats
return result
|
A hotel manager wants to increase their occupancy rate and has set a goal of having all rooms booked for 40 days out of a 120-day season. For each 20% increase in the number of fully booked days, their owner will give them a bonus of $200. How much will the hotel manager earn from their owner? | def solve() -> int:
total_days = 120
goal_days = 40
bonus_per_increase = 200
current_occupancy_rate = (goal_days / total_days) * 100
num_increases = (current_occupancy_rate - 100) / 20
total_bonus = num_increases * bonus_per_increase
result = total_bonus
return result... |
A case of three dozen water bottles costs $24 and Mike has already spent $19 on soda and a quarter that much on juice. What's the maximum number of water bottles Mike can buy if he left his house with only $55 and needs to pay the $2.75 subway fare each way? | def solve() -> int:
cost_per_case = 24
num_bottles_per_case = 36
total_spent = 19
quarter_spent_on_juice = total_spent / 4
total_money = 55
subway_fare = 2.75
money_left = total_money - (2 * subway_fare) - total_spent - quarter_spent_on_juice
cost_per_bottle = cost_per_case / num_bo... |
A baseball team played 162 games in a season. If they won 85 games, what percentage of their games did they win? | def solve() -> int:
total_games = 162
games_won = 85
win_percentage = (games_won/total_games)*100
result = win_percentage
return result
|
A rectangular prism has a length of 10 cm, a width of 8 cm, and a height of 6 cm. Find the surface area of the prism. | def solve() -> int:
l = 10
w = 8
h = 6
surface_area = 2 * (l*w + w*h + h*l)
result = surface_area
return result
|
Noah got 6 toy cars from his uncle. The next day he got 9 more, and on the third day, he got four times the number he got from the first two days. How many toy cars does Noah have now? | def solve() -> int:
toy_cars_day1 = 6
toy_cars_day2 = 9
toy_cars_day3 = 4 * (toy_cars_day1 + toy_cars_day2)
total_toy_cars = toy_cars_day1 + toy_cars_day2 + toy_cars_day3
result = total_toy_cars
return result
|
John buys a mobile phone for $345, which is 15% off due to the store's promotion. What is the amount of discount? | def solve() -> int:
phone_price = 345
discount_percent = 15
discount_amount = discount_percent / 100 * phone_price
result = discount_amount
return result
|
If Danny can bake a cake in 30 minutes, and he needs to bake 7 cakes for a party, how long will it take him to finish baking all 7 cakes? | def solve() -> int:
cakes_to_bake = 7
time_per_cake = 30
total_time = cakes_to_bake * time_per_cake
result = total_time
return result
|
Anna's car gets 25 miles per gallon. If Anna wants to drive from her house to her parents' house, which is 400 miles away, how much will she spend on gas if the price per gallon is $2.50? | def solve() -> int:
mpg = 25
distance = 400
price_per_gallon = 2.50
gallons = distance/mpg
cost = gallons*price_per_gallon
result = cost
return result
|
Possible questions and programs are: David has 120 marbles in his collection. He trades 20 marbles with his brother for a toy car. He then loses 25% of his remaining marbles in a game. How many marbles does David have left? | def solve() -> int:
marbles = 120
marbles = marbles - 20
lost = 0.25 * marbles
marbles = marbles - lost
result = marbles
return result
|
Jane invested $20000 in a mutual fund with an average annual return of 7%. If she does not withdraw any money from it, how many years would it take for Jane to earn a total of $30000? | def solve() -> int:
balance = 20000
years = 0
while balance < 30000:
balance *= 1.07
years += 1
result = years
return result
|
The length of a rectangle is 6 cm more than twice its breadth. If the perimeter of the rectangle is 80 cm, find its area. | def solve() -> int:
p = 80
l = 0
b = 0
for i in range(10, int(p/2)):
if (((2*i)+6) + i)*2 == p:
l = 2*i+6
b = i
break
area = l*b
result = area
return result
|
A store offers a 20% discount on all items. An item is marked $50, but with the discount, it costs $40. How much would the item cost without the discount? | def solve() -> int:
original_price = 50
discounted_price = 40
discount_rate = 0.2
undiscounted_price = discounted_price / (1 - discount_rate)
result = undiscounted_price
return result
|
Noah is stocking up on paper towels. He can buy a pack of 12 at Costco for $15. At the convenience store, a pack of 6 costs $8. How much money does he save by buying the Costco pack? | def solve() -> int:
costco_pack = 12
costco_price = 15
convenience_pack = 6
convenience_price = 8
costco_total = costco_price / costco_pack
convenience_total = convenience_price / convenience_pack
savings = convenience_total - costco_total
result = savings
return resul... |
James is a computer repair technician and charges $80 per repair. His expenses are 70% of his total sales. How many repairs does he need to complete to make a profit of $500 in a day? | def solve() -> int:
repair_cost = 80
expenses_percentage = 0.7
profit = 500
total_expenses = repair_cost * expenses_percentage
total_sales_needed = total_expenses + profit
repairs_needed = total_sales_needed / repair_cost
result = repairs_needed
return result
|
Nico spends $20 each time he goes to the store. How much money will Nico spend in total after visiting the store 9 times? | def solve() -> int:
spends = 20
times = 9
result = spends * times
return result
|
A circle has a diameter of 10 cm. What is the circumference of this circle? | def solve() -> int:
diameter = 10
radius = diameter/2
pi = 3.14159
circumference = 2 * pi * radius
result = circumference
return result
|
A classroom has 25 students. If the teacher assigns 5 math problems per student, how many math problems are assigned in total? | def solve() -> int:
total_math_problems = 25 * 5
result = total_math_problems
return result
|
On Monday, John has 15 pencils. On Tuesday, John shares a quarter of his pencils with his friend. On Wednesday, John finds 5 more pencils. On Thursday, he buys half of what he had on Tuesday. How many pencils does he have on Thursday? | def solve() -> int:
monday_pencils = 15
tuesday_pencils = monday_pencils / 4
wednesday_pencils = tuesday_pencils + 5
thursday_pencils = tuesday_pencils / 2
result = thursday_pencils
return result
|
Alex has $30 and wants to buy as many books as he can that cost $7 each. How many books can he buy and how much money will he have left over? | def solve() -> int:
cash = 30
cost_per_book = 7
num_books = cash // cost_per_book
leftover_cash = cash % cost_per_book
result = (num_books, leftover_cash)
return result
|
Mike had $75, but he decided to lend $50 to his friend. If Mike's friend returns the money in three months with 5% interest, how much money will Mike have? | def solve() -> int:
mike_money = 75
lent_money = 50
interest = lent_money * 0.05
total_payback = lent_money + interest
mike_money = mike_money + total_payback
result = mike_money
return result
|
Student: A piece of cloth costs $15. If the price is increased by 20%, how much would it cost? | def solve() -> int:
cost = 15
increase = cost * 0.2
new_cost = cost + increase
result = new_cost
return result
|
Eva has a kettle that uses 1500 watts per hour. She boils water for 5 minutes twice a day. She also has a coffee maker that uses 900 watts per hour. She makes coffee for 10 minutes twice a day. How many watts does she use for these appliances in a year (365 days)? | def solve() -> int:
kettle_power = 1500
coffee_maker_power = 900
kettle_time = 5
coffee_maker_time = 10
kettle_time_hours = kettle_time / 60
coffee_maker_time_hours = coffee_maker_time / 60
kettle_power_day = kettle_power * kettle_time_hours * 2
coffee_maker_power_day = coffee_maker_powe... |
In a zoo, the number of monkeys was four times the number of tigers. If there were 80 monkeys in total, how many tigers were there in the zoo? | def solve() -> int:
monkeys = 80
tigers = monkeys / 4
result = tigers
return result
|
Student: Megan used 2/7 of a cup of sugar to bake a cake. Her cousin used 4/7 of a cup of sugar to bake a cake. How much more sugar did Megan use than her cousin? | def solve() -> int:
megan = 2/7
cousin = 4/7
difference = megan - cousin
difference = difference / 2
result = difference
return result
|
Maya has two flower pots. The first pot is three times the size of the second pot. There are 15 flowers in the second pot. Maya follows the rule of one flower per two square inches of pot space. If she keeps two-inch flowers in the second pot and three-inch flowers in the first pot, how many more flowers would Maya hav... | def solve() -> int:
second_pot_size = 15 * 2
first_pot_size = 3 * second_pot_size
second_pot_flowers = 15
first_pot_flowers = first_pot_size // 3
first_pot_flowers -= 1
difference = first_pot_flowers - second_pot_flowers
result = difference
return result
|
If Michael saved $40 more than Peter and Peter saved $200, what is the total amount of money they have together if they divide it equally? | def solve() -> int:
peter_saved = 200
michael_saved = peter_saved + 40
total_saved = peter_saved + michael_saved
total_money = total_saved * 2
equal_share = total_money / 2
result = equal_share
return result
|
The sales tax in a state is 8%. If someone goes to a store and buys a sweater for $35, how much will they pay in total? | def solve() -> int:
item_price = 35
tax_rate = 0.08
total_price = item_price + (item_price * tax_rate)
result = total_price
return result
|
Naomi bakes six cupcakes every week for her friends. If each cupcake has 150 calories, then how many calories does Naomi consume from cupcakes in 12 weeks? | def solve() -> int:
cupcakes_per_week = 6
calories_per_cupcake = 150
weeks = 12
calories_from_cupcakes = cupcakes_per_week * calories_per_cupcake * weeks
result = calories_from_cupcakes
return result
|
Student: If a company has 15 employees and the average salary is $50,000 per year, what is the total annual payroll? | def solve() -> int:
num_employees = 15
avg_salary = 50000
total_payroll = num_employees * avg_salary
result = total_payroll
return result
|
Gia earned $8000 in a writing contest. She paid 40% in taxes and donated 15% of the remaining money to a non-profit organization. If she spent $1000 on a new laptop and invested $2000, how much money does she have left? | def solve() -> int:
earnings = 8000
taxes = earnings * 0.4
remaining_money = earnings - taxes
donation = remaining_money * 0.15
remaining_money_after_donation = remaining_money - donation
laptop_cost = 1000
investment = 2000
remaining_money_after_spending = remaining_money_after_donation... |
A department store sells a pair of shoes for $82.50. If the shoes originally cost $150, what is the percentage discount that the store is offering? | def solve() -> int:
original_price = 150
discounted_price = 82.50
percent_discount = ((original_price - discounted_price) / original_price) * 100
result = percent_discount
return result
|
Jacob has 100 cents in nickels. If Jacob gives 15 cents to Sophia, and four times as many cents to Mia as he gave to Sophia, how many nickels does Jacob have left? | def solve() -> int:
nickels = 100
cents_given_to_sophia = 15
cents_given_to_mia = 4 * cents_given_to_sophia
nickels_left = (nickels - cents_given_to_sophia - cents_given_to_mia) / 5
result = nickels_left
return result
|
Student: Sam has cows and chickens on his farm. Cows have four legs and chickens have two legs. If he has 15 cows and two less than twice as many chickens as cows, how many legs do all his animals have? | def solve() -> int:
cows = 15
chickens = 2 * cows - 2
legs = cows * 4 + chickens * 2
result = legs
return result
|
A toy car drives 6 meters in 2 seconds on a straight track. What is the car's speed in meters per second? | def solve() -> int:
distance = 6
time = 2
speed = distance / time
result = speed
return result
|
A family went to a store to buy some eggplants. There is 20% discount on eggplants if the family spends more than $50. How much will the family pay for 5 eggplants worth $6 each, if they qualify for the discout? | def solve() -> int:
cost_per_eggplant = 6
number_of_eggplants = 5
discount_threshold = 50
discount_percentage = 0.2
total_cost = cost_per_eggplant * number_of_eggplants
if total_cost < discount_threshold:
discounted_cost = total_cost
else:
discounted_cost = tot... |
A car travels at a speed of 60 km/h for 3 hours. How far does it travel? | def solve() -> int:
speed = 60
time = 3
distance = speed * time
result = distance
return result
|
Amy, Ben, and Cole went to a juice-making party. Amy brought 2 gallons of apple juice. Ben brought 4 times as much apple juice as Amy, but Cole brought 1 quart less than the amount of apple juice Ben brought. How much apple juice, in cups, did Cole bring to the party? | def solve() -> int:
juice_amy = 2 * 4 * 4
juice_ben = juice_amy * 4
juice_cole = juice_ben - 1 * 4
result = juice_cole
return result
|
A laptop normally costs $800, but it is on sale for 20% off. There is also a $50 mail-in rebate. What is the final price after the sale and the rebate? | def solve() -> int:
discount = 0.2
original_price = 800
rebate = 50
sale_price = original_price - (discount * original_price)
final_price = sale_price - rebate
result = final_price
return result
|
A restaurant has enough ingredients to make 100 pizzas. Each pizza will last the restaurant for 2 days. After 5 days, 30 pizzas are sold. How many more days can the remaining pizzas last for the restaurant? | def solve() -> int:
pizzas_available = 100
pizzas_sold = 30
pizzas_last_for_days = 2
remaining_pizzas = pizzas_available - pizzas_sold
remaining_days = remaining_pizzas * pizzas_last_for_days
result = remaining_days
return result
|
Mr. Smith is ordering pizza for his math club. Each pizza feeds 6 people and there are 5 pizzas ordered. How many people can he feed? | def solve() -> int:
pizzas_ordered = 5
people_per_pizza = 6
total_people = pizzas_ordered * people_per_pizza
result = total_people
return result
|
Possible questions and programs: Anna and Ben shared 3 large pizzas. Each pizza has 8 slices. Ben ate 5/8 of one pizza and 1/4 of another pizza. How many slices of pizza did Ben eat? | def solve() -> int:
total_slices_from_two_pizzas = 5/8 + 2/8
total_slices_ben_ate = total_slices_from_two_pizzas * 8
result = total_slices_ben_ate
return result
|
Some possible questions and programs are: Anna collects stickers and puts them in albums. Each album has 12 pages and each page can fit 8 stickers. She has 5 full albums and 96 stickers that are not in any album. How many more stickers does she need to buy to fill up a new album? | def solve() -> int:
stickers_per_album = 12 * 8
stickers_in_new_album = 96 % stickers_per_album
missing_stickers = stickers_per_album - stickers_in_new_album
result = missing_stickers
return result
|
If there are 52 weeks in a year, how many weeks are there in 5 years? | def solve() -> int:
weeks_in_one_year = 52
years = 5
total_weeks = weeks_in_one_year * years
result = total_weeks
return result
|
If a delivery truck travels 200 miles in 4 hours, how many miles can it travel in 8 hours assuming it travels at the same speed? | def solve() -> int:
distance = 200
time = 4
new_time = 8
speed = distance / time
new_distance = speed * new_time
result = new_distance
return result
|
James can run 10 kilometers per hour, and he ran for 2.5 hours. How far did he travel? | def solve() -> int:
speed = 10
time = 2.5
result = speed * time
return result
|
A single serving of cereal is 1/2 cup, and a box contains 12 servings. How many cups of cereal are in 3 boxes of cereal? | def solve() -> int:
servings_in_box = 12
cups_in_serving = 0.5
cups_in_three_boxes = servings_in_box * 3 * cups_in_serving
result = cups_in_three_boxes
return result
|
Caleb has a lemonade stand that sells lemonade for 50 cents per cup. He buys lemons for 10 cents each and uses 4 lemons to make a jug of lemonade. He can fill 12 cups from one jug. How many lemons does he need to buy to break even if he sells 120 cups of lemonade? | def solve() -> int:
cup_price = 0.5
lemon_price = 0.1
lemons_per_jug = 4
cups_per_jug = 12
cups_sold = 120
cost = cups_sold / cups_per_jug * lemons_per_jug * lemon_price
revenue = cups_sold * cup_price
break_even = cost / lemon_price
result = break_even
return result
|
Will is playing a new game and has earned 1,000 points at the start. He earns double the amount of points every day. How many points will Will have after 8 days? | def solve() -> int:
points = 1000
double_points = points*2
days = 8
total = points + (double_points * days)
result = total
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.