question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A jar has 200 coins consisting of quarters and dimes. The total value of the coins is $35. How many quarters are there? | def solve() -> int:
num_quarters = 0
num_dimes = 0
num_coins = 200
total_value = 35
num_quarters = (total_value - 0.1*num_coins) / 0.15
num_dimes = num_coins - num_quarters
result = num_quarters
return result
|
Timmy collects stickers. He gets 4 stickers every day from Monday to Friday, and 6 stickers on Saturday and Sunday. How many stickers does he have after 5 weeks? | def solve() -> int:
stickers_per_week = 4 * 5 + 6 * 2
stickers = stickers_per_week * 5
result = stickers
return result
|
A bakery sells cupcakes in boxes of 12. If the bakery sold 5 boxes on Monday, 8 boxes on Tuesday, and 3 boxes on Wednesday, how many cupcakes did they sell in total? | def solve() -> int:
monday_sales = 5 * 12
tuesday_sales = 8 * 12
wednesday_sales = 3 * 12
total_sales = monday_sales + tuesday_sales + wednesday_sales
result = total_sales
return result
|
Student: A park has 8 swings and 10 slides. Laura wants to ride the swings 5 times and the slides 7 times. How many tickets does she need to buy? | def solve() -> int:
swings = 8
slides = 10
tickets_for_swings = 5
tickets_for_slides = 7
total_tickets = tickets_for_swings + tickets_for_slides
result = total_tickets
return result
|
Michael had a pack of 50 baseball cards. He traded 15% of them for his favorite player's card. A few days later, Michael received 12 more baseball cards as a gift from his friend. How many baseball cards does he have now? | def solve() -> int:
cards = 50
traded_cards = cards * 0.15
remaining_cards = cards - traded_cards
gift_cards = 12
total_cards = remaining_cards + gift_cards
result = total_cards
return result
|
Lisa buys 6 packs of stickers. Each pack has 12 stickers in it. She gives 3 stickers to each of her 7 friends. How many stickers does she have left? | def solve() -> int:
bought = 6 * 12
given = 3 * 7
left = bought - given
result = left
return result
|
am and Dan have a total of $5000 to split evenly between them. Sam invests his money at 3% annual interest rate compounded quarterly and Dan invests his money at 5% annual interest rate compounded quarterly. After 2 years, how much difference is there between the amount of money Sam and Dan has? | def solve() -> int:
interestPerQuarterSam = 0.03/4
totalInterestSam = 5000/2 * (1 + interestPerQuarterSam)**8 - 5000/2
totalSam = 5000/2 + totalInterestSam
interestPerQuarterDan = 0.05/4
totalInterestDan = 5000/2 * (1 + interestPerQuarterDan)**8 - 5000/2
totalDan = ... |
A recipe requires 3/4 cup of flour to make 12 cookies. If you want to make 60 cookies, how much flour do you need? | def solve() -> int:
cookies = 60
flour_per_cookie = 3/4
total_flour = cookies * flour_per_cookie / 12
result = total_flour
return result
|
One-fifth of a number subtracted from 18 is 14. What is the number? | def solve() -> int:
number = 0
result = 0
number = (18 - 14) * 5
result = number
return result
|
A company makes a profit of 30% on a product that costs $50 to produce. If they sell the product for $75, what is their profit on each product sold? | def solve() -> int:
cost_to_produce = 50
selling_price = 75
profit_percentage = 30
profit_per_product = round(((selling_price - cost_to_produce) * profit_percentage/100), 2)
result = profit_per_product
return result
|
Student: A car travels 60km/hr for the first 2 hours, and then 80km/hr for the next 1.5 hours. How far did the car travel in this time? | def solve() -> int:
speed1 = 60
time1 = 2
speed2 = 80
time2 = 1.5
distance1 = speed1 * time1
distance2 = speed2 * time2
total_distance = distance1 + distance2
result = total_distance
return result
|
Student: Brenda collected 45 marbles on Monday. On Tuesday she collected 3 times as much as she did on Monday. On Wednesday she collected half of what she collected on Tuesday. How many marbles did Brenda collect in total? | def solve() -> int:
monday = 45
tuesday = monday * 3
wednesday = tuesday / 2
result = monday + tuesday + wednesday
return result
|
Maria works 8 hours a day, 5 days a week. If she earns $12 per hour, how much money will she make in 2 weeks? | def solve() -> int:
hours_worked_per_week = 8 * 5
total_hours_worked = hours_worked_per_week * 2
hourly_wage = 12
total_earnings = total_hours_worked * hourly_wage
result = total_earnings
return result
|
Here are some possible questions and programs: Mika bought a jacket that was marked down by 25%. She also used a coupon that gave her an extra 10% off the discounted price. If the original price of the jacket was $80, how much did she pay for it? | def solve() -> int:
discounted_price = 80 * (1 - 0.25)
final_price = discounted_price * (1 - 0.10)
result = final_price
return result
|
A boy has 5 red balls and 4 blue balls. He draws one ball at random. What are the odds that the ball is red? | def solve() -> int:
red_balls = 5
blue_balls = 4
total_balls = red_balls + blue_balls
odds = red_balls/total_balls
result = odds
return result
|
A recipe calls for 4 cups of flour, but you only have 2 cups. If you want to make half the recipe, how much flour do you need? | def solve() -> int:
original_cups = 4
available_cups = 2
recipe_multiplier = 0.5
needed_cups = (original_cups * recipe_multiplier) - available_cups
result = needed_cups
return result
|
A store sells bags of marbles. Each bag contains the same number of marbles. If 6 bags are purchased, there will be 2 marbles left over. If 8 bags are purchased, there will be 4 marbles left over. What is the smallest possible number of marbles in each bag? | def solve() -> int:
for i in range(100):
if i%6 == 2 and i%8 == 4:
result = i
return result
|
Sarah has 24 candy bars to share with her friends. If she wants to give each friend 3 bars, how many friends can she share with? | def solve() -> int:
bars = 24
bars_per_friend = 3
friends = bars // bars_per_friend
result = friends
return result
|
A baby can drink 5 ounces of milk in one feeding, while a toddler needs 8 ounces. If Elizabeth has 6 babies and 3 toddlers to feed, how many ounces of milk does she need in total for one feeding for all of them? | def solve() -> int:
baby_oz = 5
toddler_oz = 8
num_babies = 6
num_toddlers = 3
total_oz = (baby_oz * num_babies) + (toddler_oz * num_toddlers)
result = total_oz
return result
|
John is collecting 50 books each month for the next 2 years. If 10 books are lost each month, how many books will he have at the end of the 2 years? | def solve() -> int:
books_per_month = 50
months_per_year = 12
total_years = 2
books_collected = books_per_month * months_per_year * total_years
books_lost = 10 * months_per_year * total_years
books_remaining = books_collected - books_lost
result = books_remaining
return re... |
Sarah and John are cycling in a 20-mile race. If Sarah cycles at a speed of 15 miles per hour and John cycles at a speed of 18 miles per hour, how many miles will John have covered when Sarah crosses the finishing line? | def solve() -> int:
sarah_speed = 15
john_speed = 18
race_distance = 20
sarah_time = race_distance / sarah_speed
john_distance = john_speed * sarah_time
result = john_distance
return result
|
John needs to buy apples in a grocery store, and the price of each apple is $2.70. He needs to buy 14 apples. How much money does John have to spend in total? | def solve() -> int:
number_of_apples = 14
price_of_each_apple = 2.7
result = number_of_apples * price_of_each_apple
return result
|
Student: Roberta bought a laptop for $800 and got a 15% discount on it because she paid in cash. If she also bought a mouse for $30, what was the total amount she paid? | def solve() -> int:
laptop_price = 800
discount_percentage = 15
mouse_price = 30
discounted_price = laptop_price * (1 - discount_percentage/100)
total_amount = discounted_price + mouse_price
result = total_amount
return result
|
Jack is selling lemonade at a fair. He charges $0.50 for a small cup and $0.75 for a large cup. He sold 36 cups in total and made $24. How many small cups and how many large cups did he sell? | def solve() -> int:
from sympy import symbols, solve
x, y = symbols('x y')
eq1 = x + y - 36
eq2 = 0.5*x + 0.75*y - 24
solutions = solve([eq1, eq2], [x, y])
small_cups = solutions[x]
large_cups = solutions[y]
result = [small_cups, large_cups]
return result
|
Samantha walks 20 minutes to school every day. If there are 180 school days in a year, how many hours does she spend walking to school in a year? | def solve() -> int:
total_walk_time = 20 * 180
total_walk_time_hours = total_walk_time / 60
result = total_walk_time_hours
return result
|
In one pack of pencils, there are 12 boxes, and in each box, there are 24 pencils. If a school orders 10 packs of pencils, how many pencils will they receive in total? | def solve() -> int:
packs_of_pencils = 10
boxes_in_pack = 12
pencils_in_box = 24
total_pencils = packs_of_pencils * boxes_in_pack * pencils_in_box
result = total_pencils
return result
|
9. There are 18 pencils in a box. There are 22 crayons. There are 16 markers. What percentage of art supplies are not pencils? | def solve() -> int:
pencils = 18
crayons = 22
markers = 16
total_supplies = pencils + crayons + markers
non_pencils = crayons + markers
percentage_not_pencils = (100 * non_pencils) / total_supplies
result = percentage_not_pencils
return result
|
- Lily is making bracelets for her friends. She uses 6 beads for each bracelet and she has 60 beads in total. She gives each friend 2 bracelets. How many friends can she make bracelets for? | def solve() -> int:
beads_per_friend = 6 * 2
friends = 60 // beads_per_friend
result = friends
return result
|
Carol needs to go to the store and buy 4 apples, 5 oranges, and 3 bananas. Each apple costs $2, each orange costs $3, and each banana costs $1. How much money does Carol need to spend? | def solve() -> int:
apple = 4
orange = 5
banana = 3
cost_apple = 2
cost_orange = 3
cost_banana = 1
total_cost_apple = apple * cost_apple
total_cost_orange = orange * cost_orange
total_cost_banana = banana * cost_banana
total_cost = total_cost_apple + total_cost_orange + total_cos... |
In a survey of 2000 people, 80% said they prefer tea over coffee, and 20% said they prefer coffee over tea. What is the difference between the number of people who prefer tea and the number of people who prefer coffee? | def solve() -> int:
people_prefer_tea = 2000 * 0.8
people_prefer_coffee = 2000 * 0.2
difference = people_prefer_tea - people_prefer_coffee
result = difference
return result
|
Sarah plants a vegetable garden where the carrots start at a length of 2 inches and increase by 1 inch per day. After how many days will the carrots be 7 inches long? | def solve() -> int:
starting_length = 2
increase_per_day = 1
desired_length = 7
length_difference = desired_length - starting_length
days_needed = length_difference / increase_per_day
result = days_needed
return result
|
Jack has 3 more pens than Jill. Jill has twice as many pens as Joe. If Joe has 5 pens, how many pens do they all have? | def solve() -> int:
joe_pens = 5
jill_pens = joe_pens * 2
jack_pens = jill_pens + 3
total_pens = joe_pens + jill_pens + jack_pens
result = total_pens
return result
|
If John has 81 books with him and gives 2/5 of them away, how many books does he have left? | def solve() -> int:
book_amount = 81
donation_fraction = 2/5
donated_books = book_amount * donation_fraction
remaining_books = book_amount - donated_books
result = remaining_books
return result
|
Student: Sam had 40 candies to share with his friends. He gave 8 candies to Alice, 6 candies to Bob, and 4 candies to Charlie. How many candies does Sam have left for himself? | def solve() -> int:
candies = 40
candies_Alice = 8
candies_Bob = 6
candies_Charlie = 4
candies_Sam = candies - candies_Alice - candies_Bob - candies_Charlie
result = candies_Sam
return result
|
John has 5 baskets of apples. Each basket contains 8 apples. He wants to distribute these apples to his 4 friends. What is the remainder of apples John will be left with? | def solve() -> int:
baskets = 5
apples = 8*baskets
friends = 4
distributed_apples = apples // friends
remainder = apples - distributed_apples*friends
result = remainder
return result
|
Tom is measuring the length of two ropes. Rope A is 40 feet long and Rope B is 15 feet longer than twice the length of Rope A. What is the length of Rope B? | def solve() -> int:
rope_a = 40
rope_b = 2 * rope_a + 15
result = rope_b
return result
|
Lisa has 12 apples and 8 oranges. She wants to share them equally with her 4 friends, including herself. How many apples and oranges will each of them get? | def solve() -> int:
apples = 12
oranges = 8
apple_share = apples / 5
orange_share = oranges / 5
result = (apple_share, orange_share)
return result
|
Mary is buying mealworms for her pet turtle. If she buys 110 mealworms and there are about 50 mealworms in each package, how many packages of mealworms did she buy? | def solve() -> int:
number_of_mealworms = 110
packages_of_mealworms = 50
total_packgage_number = number_of_mealworms // packages_of_mealworms
result = total_packgage_number
return result
|
If a triangle has a base of 10 cm and a height of 5 cm, what is the area of the triangle? | def solve() -> int:
base = 10
height = 5
area = (1/2) * base * height
result = area
return result
|
A group of friends went out to eat, and their bill came out to be $125. If they want to split the bill evenly among themselves, how much will each person pay? | def solve() -> int:
bill = 125
num_people = 5
each_person_pay = bill//num_people
result = each_person_pay
return result
|
Bethany’s stock portfolio is worth $4500. This is an increase of 12.5% comparing to the value of the portfolio 3 months ago. What was the value of the portfolio 3 months ago? | def solve() -> int:
port_now = 4500
port_change_pct = 0.125
port_change = port_now * port_change_pct
port_past = port_now - port_change
result = port_past
return result
|
Q10: David invests in a bank and gets 8% simple interest. He invests $9000. How much money does he have after 1 year? | def solve() -> int:
amount = 9000
interest_rate = 8
time = 1
interest = amount * interest_rate * time * 0.01
total = amount + interest
result = total
return result
|
A company launched a new product and sold 600 units in the first month, 800 units in the second month, and 1200 units in the third month. What is the average monthly sales for the first 3 months? | def solve() -> int:
sales_month1 = 600
sales_month2 = 800
sales_month3 = 1200
num_months = 3
average_sales = (sales_month1 + sales_month2 + sales_month3)/num_months
result = average_sales
return result
|
Two workers are comparing two methods of packaging products. In the first method, they place the products in boxes for 10 minutes, then label them in a quarter of the total time. In the second method, they place the products in boxes for 15 minutes, label them in twice this amount of time, then package them in three ti... | def solve() -> int:
method1_box_time = 10
method1_label_time = method1_box_time / 4
method2_box_time = 15
method2_label_time = method2_box_time * 2
method2_package_time = method2_label_time * 3
method1_total_time = method1_box_time + method1_label_time
method2_total_time = method2_... |
If Alex drives twice as long as he walks on his commute home from work and he spends a total of 60 minutes commuting, how many minutes did he spend walking? | def solve() -> int:
w = 20
result = w
return result
|
A class consists of 30 students. 20 percent of the students received an A, 30 percent received a B, 40 percent received a C, and the rest received a D. How many students received a D? | def solve() -> int:
total_students = 30
num_A = 0.2 * total_students
num_B = 0.3 * total_students
num_C = 0.4 * total_students
num_D = total_students - num_A - num_B - num_C
result = num_D
return result
|
John has 10 marbles, while his friend has four times as much. If John trades a third of his marbles with his friend and his friend loses half of theirs, how many marbles do they have left in total? | def solve() -> int:
john_marbles = 10
friend_marbles = 4 * john_marbles
john_trade = john_marbles / 3
friend_trade = john_trade
john_marbles -= john_trade
friend_marbles += friend_trade
friend_marbles /= 2
total_marbles = john_marbles + friend_marbles
result = total_marbles
... |
Sophia is planning a picnic with her friends. She needs to buy sandwiches for 10 people, and each sandwich serves 2 people. How many sandwiches does she need to buy? | def solve() -> int:
num_people = 10
serving_per_sandwich = 2
num_sandwiches = num_people / serving_per_sandwich
result = num_sandwiches
return result
|
A parcel delivery company has 20 trucks, and each truck can carry 10 parcels. If the company has to deliver 200 parcels, how many trucks do they need? | def solve() -> int:
number_of_trucks = 20
parcels_per_truck = 10
total_parcels = 200
trucks_needed = total_parcels // parcels_per_truck + (total_parcels % parcels_per_truck > 0)
result = trucks_needed
return result
|
Every year, Henry saves as many dollars as he is years old. If he saved a total of $420 by age 14, how much money did he save in the last year? | def solve() -> int:
total_money_saved = 420
age = 14
money_saved_previous_years = (age * (age - 1)) / 2
money_saved_last_year = total_money_saved - money_saved_previous_years
result = money_saved_last_year
return result
|
A store sells apples for $1.50 each and oranges for $2.00 each. If John buys five apples and three oranges, what is the total cost of his purchase? | def solve() -> int:
apple_cost = 1.5
orange_cost = 2
total_apples = 5
total_oranges = 3
total_cost = (total_apples * apple_cost) + (total_oranges * orange_cost)
result = total_cost
return result
|
There are 256 students in a school. If 2/5 of them are girls and 4/13 of the remainder are boys, how many students are boys? | def solve() -> int:
students = 256
girls = 2/5*students
remainder = students - girls
boys = 4/13*remainder
result = boys
return result
|
A school has 108 students. If 12 new students join each month, how many students will the school have in 1 year? Assume that no student leaves during the year. | def solve() -> int:
total_students = 108
new_students_per_month = 12
num_months = 12
total_students += new_students_per_month * num_months
result = total_students
return result
|
Lisa has $200 to save for a vacation. She decided to save $10 each month for 20 months. How much money will Lisa have saved after 20 months? | def solve() -> int:
moneysaved = 0
for month in range(20):
moneysaved = moneysaved + 10
result = moneysaved
return result
|
Student: A box of pencils contains 24 pencils. If a pack contains 10 boxes, how many pencils are there in total? | def solve() -> int:
pencils_per_box = 24
boxes_per_pack = 10
pencils_per_pack = pencils_per_box * boxes_per_pack
result = pencils_per_pack
return result
|
Sarah has 10 coins. She has 2 more quarters than nickels, half as many dimes as quarters, and 1 more penny than nickels. How many of each coin does she have? | def solve() -> int:
coins = 10
quarters = 0
dimes = 0
nickels = 0
pennies = 0
nickels = int((coins-3)/4)
quarters = nickels + 2
dimes = int(quarters/2)
pennies = nickels + 1
result = (quarters, dimes, n... |
A rectangular swimming pool has a length of 20 meters and a width of 10 meters. If each square meter of the pool requires 2 tiles for tiling, how many tiles are needed to cover the entire pool? | def solve() -> int:
length = 20
width = 10
area = length * width
tiles_needed = area * 2
result = tiles_needed
return result
|
A rectangular box is 24 cm long, 18 cm wide and 10 cm deep. What is the volume of the box in cubic meters? | def solve() -> int:
length = 24/100
width = 18/100
depth = 10/100
volume = length * width * depth
result = volume
return result
|
Student: Max wants to save $500 in 10 weeks. If he saves a constant amount each week, how much money should he save per week? | def solve() -> int:
total_amount = 500
weeks = 10
amount_per_week = total_amount / weeks
result = amount_per_week
return result
|
A restaurant sold 150 pizzas yesterday and 200 pizzas today. How many more pizzas did they sell today than yesterday? | def solve() -> int:
yesterday_pizzas = 150
today_pizzas = 200
more_pizzas = today_pizzas - yesterday_pizzas
result = more_pizzas
return result
|
A store sold 8.75kg of tomatoes for $12.25 each. Calculate the total amount of money the store made from the tomato sales. | def solve() -> int:
total_earnings = 0
kg_sold = 8.75
price_per_kg = 12.25
total_earnings = kg_sold * price_per_kg
result = total_earnings
return result
|
A bakery needs to make 100 cupcakes for an event. If each batch can make 12 cupcakes, how many batches does the bakery need to make? | def solve() -> int:
cupcakes_needed = 100
cupcakes_per_batch = 12
batches_needed = cupcakes_needed // cupcakes_per_batch
result = batches_needed
return result
|
A music festival sold 10,000 tickets in the first week of sales. In the second week, a quarter as many tickets were sold as in the first week. In the third week, 5000 more tickets were sold than in the second week. How many tickets were sold in total during the three weeks? | def solve() -> int:
first_week_tickets = 10000
second_week_tickets = first_week_tickets / 4
third_week_tickets = second_week_tickets + 5000
total_tickets_sold = first_week_tickets + second_week_tickets + third_week_tickets
result = total_tickets_sold
return result
|
Ana has a bucket of 24 pinecones. She uses 6 pinecones each day to make a craft. How many days can she make crafts using the pinecones in the bucket? | def solve() -> int:
num_days = 0
for item in range(24):
num_days += 1
result = num_days//6
return result
|
Student: In a quiz show, Dan answered 12 questions, Ella answered twice as many as Dan, and Fred answered 8 fewer than Ella. If each question was worth 5 points, how many points did they score in total? | def solve() -> int:
dan = 12
ella = 2 * dan
fred = ella - 8
point = 5
dan_points = dan * point
ella_points = ella * point
fred_points = fred * point
total_points = dan_points + ella_points + fred_points
result = total_points
return result
|
Sophie is sitting near a busy street and counting the number of vehicles that pass her by. She saw 80 vehicles so far, including 13 trucks carrying 4 people each, 11 buses carrying 18 people each, and the rest were cars carrying 3 people each. How many people did Sophie see today? | def solve() -> int:
trucks = 13
buses = 11
cars = 80 - trucks - buses
people_in_trucks = trucks * 4
people_in_buses = buses * 18
people_in_cars = cars * 3
total_people = people_in_trucks + people_in_buses + people_in_cars
result = total_people
return result
|
The length of a rectangle is 7cm and the width is 4cm. Find the perimeter of the rectangle. | def solve() -> int:
length = 7
width = 4
perimeter = 2*length + 2*width
result = perimeter
return result
|
Lara needs to buy fabric to make a quilt that is 9 meters long and 5 meters wide. If the fabric is 1.5 meters wide, how many meters of fabric does she have to buy? | def solve() -> int:
length = 9
width = 5
width_of_fabric = 1.5
total_area = length * width
area_of_one_piece = width_of_fabric * length
number_of_pieces = total_area // area_of_one_piece
result = number_of_pieces
return result
|
Bash bought 3 jackets, 2 shorts, and 4 t-shirts for $250. The jackets cost $50 each. The shorts cost $10 less than the jackets. How much did each t-shirt cost? | def solve() -> int:
answer = 0
for t_shirt_cost in range (0, 10):
total = 3*50 + 2*(50-10) + 4*t_shirt_cost
if total == 250:
answer = t_shirt_cost
result = t_shirt_cost
return result
|
A company has a ratio of 1 CEO to 5 managers to 10 employees. If there are 30 employees, how many CEOs and managers are in the company? | def solve() -> int:
employees = 30
ceo_ratio = 1
manager_ratio = 5
employee_ratio = 10
ceos = employees // (manager_ratio * employee_ratio)
managers = (employees % (manager_ratio * employee_ratio)) // employee_ratio
result = f'{ceos} CEOs and {managers} managers'
return result
|
Sam has 12 marbles. He loses 2 marbles in each game he plays, and he plays 3 games. How many marbles does he have left? | def solve() -> int:
marble_lost = 2 * 3
sam = 12 - marble_lost
result = sam
return result
|
Student: 4. For a catering service, three chefs need to prepare diners. Chef A can prepare 8 diners in 10 minutes, and Chef B can prepare 6 diners in 8 minutes. Chef C can prepare 5 diners in 9 minutes. How many diners can they prepare altogether in 11 minutes? | def solve() -> int:
chef_A = 8
time_A = 10
chef_B = 6
time_B = 8
chef_C = 5
time_C = 9
time = 11
diners_A = chef_A * (time / time_A)
diners_B = chef_B * (time / time_B)
diners_C = chef_C * (time / time_C)
result = diners_A + diners_B + diners_C
return result
|
Aisha has 36 cupcakes. She wants to share them with her friends, but she wants to keep 4 cupcakes for herself. If she has 6 friends, how many cupcakes will each friend get? | def solve() -> int:
cupcakes = 36
kept = 4
friends = 6
cupcakes_remaining = cupcakes - kept
cupcakes_per_friend = cupcakes_remaining / friends
result = cupcakes_per_friend
return result
|
A bakery has cakes that are either chocolate or vanilla. If there are 55 cakes in total and vanilla cakes make up 40% of the cakes, how many chocolate cakes are there? | def solve() -> int:
total_cakes = 55
vanilla_percentage = 0.4
vanilla_cakes = total_cakes * vanilla_percentage
chocolate_cakes = total_cakes - vanilla_cakes
result = chocolate_cakes
return result
|
Student: John and Jack went to the store. They bought 3 spray bottles together. If one bottle costs $4, how much do they pay in total together? | def solve() -> int:
bottles = 3
cost_per_bottle = 4
total_cost = bottles * cost_per_bottle
result = total_cost
return result
|
If the local grocery store has 300 bags of apples and then orders another 600, and then sells 45% of the total stock, how many bags of apples are left to sell in the store? | def solve() -> int:
bags_of_apples = 300
additional_orders = 600
total_stock = bags_of_apples + additional_orders
sold_percentage = 0.45
bags_left_to_sell = total_stock * (1 - sold_percentage)
result = bags_left_to_sell
return result
|
A pack of cards contains 52 cards. There are 13 cards of each suit: spades, hearts, diamonds, and clubs. There are 4 cards of each rank: ace, 2, 3,... , 10, jack, queen, and king. A card is randomly drawn from the pack. What is the probability that it is a red card or a face card? | def solve() -> int:
probability = 32 / 52
result = probability
return result
|
Ben wants to buy a new bicycle. He has saved up $500 from his allowance and birthday money. The bicycle he likes costs $750, but it is on sale for 20% off. He also has a coupon for $25 off any purchase over $500. How much more money does he need to buy the bicycle? | def solve() -> int:
original_price = 750
discounted_price = original_price * 0.8
final_price = discounted_price - 25
difference = final_price - 500
result = round(difference, 2)
return result
|
In a museum, there were 30 paintings and 50 sculptures. After some time, 3/8 of the total number of artworks were moved to another exhibition. If 12 paintings were moved, how many more sculptures are there than paintings in the museum now? | def solve() -> int:
total_artworks = 30 + 50
moved_artworks = 3/8 * total_artworks
remaining_artworks = total_artworks - moved_artworks
remaining_paintings = remaining_artworks - 12
remaining_sculptures = remaining_artworks - remaining_paintings
difference = remaining_sculptures - remaining... |
Lucas has 50 dollars, Alex has 75 dollars, and Sofia has 150 dollars. How much more money does Sofia have than both Lucas and Alex combined? | def solve() -> int:
lucas_money = 50
alex_money = 75
sofia_money = 150
total_money = lucas_money + alex_money
difference = sofia_money - total_money
result = difference
return result
|
Bill and his family of four went out for a movie. Ticket prices are $10 for adults and $8 for children. How much did Bill spend on movie tickets for his family? | def solve() -> int:
num_adults = 2
cost_adults = 10
num_children = 2
cost_children = 8
cost_adults_total = num_adults * cost_adults
cost_children_total = num_children * cost_children
total_cost = cost_adults_total + cost_children_total
result = total_cost
return ... |
2. Nola's family had 4 bottles of honey and they used one bottle every 2 days. How many days will it take for them to finish all the bottles of honey? | def solve() -> int:
n = 4
days = n * 2
result = days
return result
|
Kevin is mowing lawns for his summer job. He charges $15 for the first lawn, and then $2 more for each additional lawn he mows in a day. If he earns $95 in one day by mowing 7 lawns, how much did he charge for the 7th lawn? | def solve() -> int:
charge_seventh = (80 + 35) / 7
result = charge_seventh
return result
|
``` Mike jogs 3 miles in 20 minutes. If he maintains his pace, how far can he jog in 90 minutes? | def solve() -> int:
distance_covered_in_one_minute = 3/20
total_time = 90
total_distance = distance_covered_in_one_minute * total_time
result = total_distance
return result
|
Lily, Zoe, and Ava picked berries. Lily had 17 more berries than Zoe. Zoe had 6 less than Ava. Ava had 30 berries. How many berries did the 3 children pick in total? | def solve() -> int:
ava = 30
zoe = ava - 6
lily = zoe + 17
total = ava + zoe + lily
result = total
return result
|
A shoe store is offering a discount on sneakers. They sold 75 pairs and made $750, which was $150 less than they would have made selling the same number of pairs without the discount. How many more dollars does a pair of sneakers cost without the discount? | def solve() -> int:
original_price = 12
discounted_price = original_price - 2
price_difference = original_price - discounted_price
result = price_difference
return result
|
Aria collected 24 sea glass pieces. She painted 4 pieces purple and 8 pieces blue. She then split the remaining pieces into 3 groups equally, and painted them green, pink, and orange. What is the difference between the number of blue and green sea glass pieces? | def solve() -> int:
sea_glass_pieces = 24
purple_pieces = 4
blue_pieces = 8
remaining_pieces = sea_glass_pieces - purple_pieces - blue_pieces
green_pieces = remaining_pieces // 3
pink_pieces = remaining_pieces // 3
orange_pieces = remaining_pieces // 3
difference = blue_pieces - green_pi... |
QUESTION 5: You want to buy 7 donuts. The store is running a 12% off sale and the donuts normally retail for $1.75 each. If there is an 8% tax, how much money would you need to pay for all of them? | def solve() -> int:
price = 1.75
discount = 0.12
tax = 0.08
total = price * 7
discount_amount = total * discount
total_after_discount = total - discount_amount
tax_amount = total_after_discount * tax
final_price = total_after_discount + tax_amount
result = final_price
retur... |
A supermarket sells potatoes for $0.75 per pound. If you buy 5 pounds or more, you get a discount of 10%. How much would it cost to buy 7 pounds of potatoes? | def solve() -> int:
potato_cost_per_lb = 0.75
num_potatoes = 7
total_cost = potato_cost_per_lb*num_potatoes
if num_potatoes >= 5:
discount_amount = (10/100)*total_cost
final_cost = total_cost - discount_amount
else:
final_cost = total_cost
result = final_cost
return result
|
Exactly one-fifth of the cars in the parking lot are electric. If half of them are hybrid cars, and there are a total of 200 cars in the parking lot, how many of them are non-electric and non-hybrid cars? | def solve() -> int:
electric_cars = 200 / 5
hybrid_cars = electric_cars / 2
non_electric_non_hybrid_cars = 200 - electric_cars - hybrid_cars
result = non_electric_non_hybrid_cars
return result
|
Tung is selling bracelets. He can sell each bracelet for $3. A bag of beads weighs 5 pounds and costs $2. Each bracelet will need 0.5 pound of beads from the time it is made to the time he sells it. If he makes $70 profit from selling bracelets, how many did he sell? | def solve() -> int:
beads_bag_weight = 5
beads_bag_cost = 2
beads_bracelet_weight = 0.5
bracelet_price = 3
total_beads_cost = (beads_bag_cost / beads_bag_weight) * beads_bracelet_weight
profit_per_bracelet = bracelet_price - total_beads_cost
num_bracelets_sold = round(70 / profit_per_br... |
A farmer has an equal number of cows and sheep. The farmer sold 48 cows and uses the money to buy 24 horses. He then sells 6 of the horses to buy twice the amount of sheep that he has. How many sheep does the farmer now have? | def solve() -> int:
cows = 48
horses = 24
sheep = cows / 2
sheep_sold = horses / 2
remaining_sheep = sheep - sheep_sold
total_sheep = remaining_sheep * 2
result = total_sheep
return result
|
Student: A car rental agency charges $30 per day and $0.15 per mile if a customer rents a car for less than a week. If a customer rents a car for 5 days and drives 150 miles, how much do they owe? | def solve() -> int:
daily_rate = 30
mileage_rate = 0.15
rental_days = 5
driven_miles = 150
total_daily_charge = daily_rate * rental_days
total_mileage_charge = mileage_rate * driven_miles
total_charge = total_daily_charge + total_mileage_charge
result = total_charge
return resul... |
At a store, three apples cost $3. How much will 9 apples cost? | def solve() -> int:
apples_in_three = 3
cost_of_three = 3
apples_in_nine = 9
cost_of_nine = apples_in_nine * (cost_of_three / apples_in_three)
result = cost_of_nine
return result
|
A triangle has a base of 12 cm and a height of 9 cm. A rectangle has the same area as the triangle, but a width of 18 cm. What is the length of the rectangle? | def solve() -> int:
triangle_area = (12 * 9) / 2
length = triangle_area / 18
result = length
return result
|
ve has to buy 20 gallons of gas for his car. If 1 gallon costs $2.50, how much money does Steve have to pay in total? | def solve() -> int:
number_of_gallons = 20
price_per_gallon = 2.50
total_price = number_of_gallons * price_per_gallon
result = total_price
return result
|
Sarah earns $4.50 per unit sewn at a clothing factory. She sews units on Mondays, Wednesdays, and Fridays each week, working for 5 hours at a time. After sewing units for 3 weeks, how much money will Sarah earn? | def solve() -> int:
units_per_hour = 1.5
hours_per_day = 5
days_per_week = 3
weeks_worked = 3
total_units = units_per_hour * hours_per_day * days_per_week * weeks_worked
earnings_per_unit = 4.50
total_earnings = total_units * earnings_per_unit
result = ... |
Student: Mrs. Brown has $1400 invested for 6 years at a simple interest rate of 8%. Find the total amount of interest earned. | def solve() -> int:
principal = 1400
time = 6
rate = 0.08
interest = principal * rate * time
result = interest
return result
|
Martin plays tennis for 3 hours on Thur and Fri, and 6 hours on Sat and Sun. How many hours of playing tennis does he do over 5 weeks? | def solve() -> int:
week1 = 3 + 6
week2 = 3 + 6
week3 = 3 + 6
week4 = 3 + 6
week5 = 3 + 6
total_hours = week1 + week2 + week3 + week4 + week5
result = total_hours
return result
|
Sophie is trying to bake the largest cake ever seen. She starts with a cake that is 12 inches in diameter and adds 2 inches to the diameter each hour. She also adds 5 inches to the height of the cake every 3 hours. If she has been baking for 6 hours, how tall is Sophie's cake? | def solve() -> int:
diameter = 12
growth_rate = 2
height_growth_rate = 5
hours = 6
diameter_growth = growth_rate * hours
height_growth = (hours // 3) * height_growth_rate
final_height = height_growth + diameter
result = final_height
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.