question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A group of five friends decided to pitch in for a birthday gift. The gift costed $75. However, one friend decided to not contribute to the gift. How much does each friend now have to pay? | def solve() -> int:
num_friends = 4
gift_cost = 75
not_participating = 1
share = (gift_cost / (num_friends - not_participating))
result = share
return result
|
Student: John drove 8 miles in 1 hour, how many miles did he drive in 4 hours? | def solve() -> int:
miles_driven = 8
hours_driven = 4
result = miles_driven * hours_driven
return result
|
Lily is a cookie seller. Each cookie costs 1 dollar. She sells 10 cookies to her classmates and 4 cookies to her neighbors. How much money did Lily make from the cookie sales? | def solve() -> int:
cookies_to_classmates = 10
cookies_to_neighbors = 4
total_cookies_sold = cookies_to_classmates + cookies_to_neighbors
money_made = total_cookies_sold * 1
result = money_made
return result
|
Bob has an interest-only student loan for the course fees of $5,000. The loan has an interest rate of 5% per year. How much does Bob pay in total after 3 years? | def solve() -> int:
interest = 5000 * 0.05 * 3
result = interest + 5000
return result
|
Two math teachers can grade 200 papers in 5 days. How long will it take 3 math teachers to grade 450 papers? | def solve() -> int:
num_teachers = 2
num_papers = 200
num_days = 5
papers_per_teacher_per_day = num_papers/(num_teachers*num_days)
papers_per_day = (3/2)*papers_per_teacher_per_day
num_days_3t = 450/papers_per_day
result = num_days_3t
return result
|
A shoe store sells a pair of sneakers for 30% above its wholesale price. But during its annual sale, a 20% discount was given. If the wholesale price of the sneakers is $80, what is the store's percentage profit? | def solve() -> int:
wholesale_price = 80
markup_percentage = 30
discount_percentage = 20
selling_price = wholesale_price + (wholesale_price * markup_percentage / 100)
selling_price_after_discount = selling_price - (selling_price * discount_percentage / 100)
profit_percentage = ((s... |
Student: A recipe calls for 3/4 cups of sugar for every 2 cups of flour. If you want to make a recipe using 6 cups of flour, how much sugar will you need? | def solve() -> int:
flour = 6
sugar = (3/4)*(flour/2)
result = sugar
return result
|
In a grocery store, apples are $0.75 per pound and oranges are $1.20 per pound. Jamal bought 4 pounds of apples and 2 pounds of oranges. How much did he spend? | def solve() -> int:
apple_cost = 0.75*4
orange_cost = 1.20*2
total_cost = apple_cost + orange_cost
result = total_cost
return result
|
A company has 36 employees. If the ratio of male to female employees is 5:3, how many male employees are there? | def solve() -> int:
total_employees = 36
ratio_mf = 5/3
num_males = total_employees * (ratio_mf/(1+ratio_mf))
result = num_males
return result
|
Student: A bakery sells cookies for $1.50 each and muffins for $2.00 each. On Monday, they sold 10 cookies and 6 muffins and made $20.50. On Tuesday, they sold 4 cookies and 8 muffins and made $18.00. How much do they charge for a dozen cookies and a half dozen muffins? | def solve() -> int:
cookie_price = 1.5
muffin_price = 2.0
monday_revenue = 10 * cookie_price + 6 * muffin_price
tuesday_revenue = 4 * cookie_price + 8 * muffin_price
dozen_cookies = 12 * cookie_price
half_dozen_muffins = 6 * muffin_price
result = dozen_cookies + half_dozen_muffins
retur... |
A recipe calls for 2/3 cups of sugar to make 12 muffins. How many cups of sugar are required to make 18 muffins? | def solve() -> int:
sugar_per_muffin = 2/3
muffins = 18
sugar = (sugar_per_muffin * muffins) / 12
result = sugar
return result
|
Emily wants to make 20 friendship bracelets to give to her friends. Each bracelet takes 4 hours to make. How many hours will it take Emily to make all 20 bracelets? | def solve() -> int:
bracelets = 20
time_per_bracelet = 4
total_time = bracelets * time_per_bracelet
result = total_time
return result
|
Jane can complete a task 40% faster than Bob. If Bob can complete the task in 5 days, how long will it take Jane to complete? | def solve() -> int:
days_per_task_bob = 5
days_per_task_jane = days_per_task_bob * 0.6
result = days_per_task_jane
return result
|
Pat has a collection of 50 CDs. Each CD contains 10 different songs. If Pat listens to 3 songs per CD, how many songs will he listen to in total? | def solve() -> int:
cds = 50
songs_per_cd = 10
songs_per_listen = 3
total_songs = cds * songs_per_cd * songs_per_listen
result = total_songs
return result
|
Student: The ratio of the speeds of three cars is 3:4:5, respectively. If the fastest car travels 150 km in 2 hours, find the distance traveled by the slowest car in the same time. | def solve() -> int:
speed_fastest = 150
speed_middle = speed_fastest * 4/3
speed_slowest = speed_fastest * 5/3
time = 2
distance_slowest = speed_slowest * time
result = distance_slowest
return result
|
3. Sandy bought 9 books. The seven of them cost $4.50 each, and the other two cost $3.20 each. How much did Sandy pay in total? | def solve() -> int:
a = 7
b = 2
x = 4.5
y = 3.2
result = a * x + b * y
return result
|
Ken cycles for 4 hours each day when it rains and 6 hours when it snows. Over a 4-day period, how many kilometers has he traveled if it rains for 6 hours and snows for 3 hours each day? | def solve() -> int:
days = 4
time_rain = 6
time_snow = 3
distance_rained = time_rain * 30 * days
distance_snowed = time_snow * 10 * days
distance_total = distance_rained + distance_snowed
distance_km = distance_total / 1.609
result = distance_km
return result
|
Student: Susan has 10 pounds of apples. If she wants to sell them in 1-pound bags and each bag costs $2, how much money can she earn from selling all the apples? | def solve() -> int:
apples = 10
bag_weight = 1
bag_price = 2
bags = apples / bag_weight
money = bags * bag_price
result = money
return result
|
A librarian has prepared 32 boxes of books and wants to store them in 3 different shelves. If each shelf can take the same number of boxes, how many boxes can fit into each shelf? | def solve() -> int:
boxes = 32
shelves = 3
each_shelf = boxes / shelves
result = each_shelf // 1
return result
|
Julia has 15 dolls and her friend has 3 times as many dolls as she does. If they combine their dolls and each removes 4, how many dolls do they have left? | def solve() -> int:
julias_dolls = 15
friends_dolls = 3 * julias_dolls
total_dolls = julias_dolls + friends_dolls
total_dolls -= 4
total_dolls -= 4
result = total_dolls
return result
|
A shop sells pencils for $0.25 each and pens for $0.75 each. If a customer buys 16 pencils and 8 pens, how much change does he receive from a $20 bill in dollars? | def solve() -> int:
result = 20 - 10
return result
|
Question7: If Bill has $85, and spends twice as much money as he saved, how much money does he have left? | def solve() -> int:
billMoney = 85
amountSaved = billMoney/3
moneySpent = 2 * amountSaved
remainingMoney = billMoney - moneySpent
result = remainingMoney
return result
|
-Here are some possible questions and programs: Abigail and Blake are saving for a trip. Abigail has $300 more than Blake. If they both save $50 every month, how much will they have together after 6 months? | def solve() -> int:
abigail = 0
blake = 0
difference = 300
monthly = 50
months = 6
abigail = blake + difference
abigail = abigail + monthly * months
blake = blake + monthly * months
total = abigail + blake
result = total
return result
|
A recipe calls for 2 cups of sugar for every 3 cups of flour. If you only have 4 cups of flour, how much sugar do you need? | def solve() -> int:
flour_cups = 4
sugar_cups = (2/3) * flour_cups
result = sugar_cups
return result
|
Maria wants to go to a Coldplay concert, but she cannot afford the VIP tickets. She opts for the less expensive regular tickets that are 60% cheaper. While a VIP ticket costs $500, a regular ticket costs $200. If Maria buys five regular tickets, how much money does she save? | def solve() -> int:
vip_ticket = 500
regular_ticket = 200
discount = 60
num_tickets = 5
discounted_ticket = regular_ticket - (regular_ticket * discount / 100)
total_cost = num_tickets * discounted_ticket
savings = (vip_ticket - total_cost)
result = savi... |
Neil wants to build a bicycle. He buys a bike frame that cost $200, a set of wheels that cost $75 each, and a 3-piece tool set that cost $30. How much does Neil spend to build the bicycle? | def solve() -> int:
amount_frame = 200
amount_wheels = 75 * 2
amount_tools = 30
total = amount_frame + amount_wheels + amount_tools
result = total
return result
|
10% of the cats at a local animal shelter are pregnant. If there are 56 cats in total, how many cats are pregnant? | def solve() -> int:
total = 56
percent_pregnant = 0.1
pregnant = total * percent_pregnant
result = pregnant
return result
|
Paul has 3 times as many books as Nick. If Nick has 18 books, how many books does Paul have? | def solve() -> int:
nick_books = 18
paul_books = nick_books * 3
result = paul_books
return result
|
A real estate agent has a total of 500 apartments up for sale. The original price was $12,000,000, but as a result of 213 units being in poor condition, the agent had to reduce the price by $5000 per apartment. If the agent sells off all the remaining apartments at the reduced price, how much less money would they make... | def solve() -> int:
total_apartments = 500
original_price = 12000000
poor_condition = 213
reduced_price = original_price - (poor_condition * 5000)
remaining_apartments = total_apartments - poor_condition
reduced_price_total = remaining_apartments * reduced_price
original_price_total = total_... |
A pizza costs $20. Carol ordered 6 pizzas and received a 20% discount for the whole order if the order exceeds $100. How much did Carol pay in all? | def solve() -> int:
cost = 20
quantity = 6
discount = 0.2
limit = 100
total_cost = cost * quantity
if total_cost > limit:
final_cost = total_cost * (1 - discount)
else:
final_cost = total_cost
result = final_cost
return result
|
If a recipe calls for 3/4 cup of flour for every 2 eggs, how many cups of flour are needed for a dozen eggs? | def solve() -> int:
flour_per_egg = 3/8
flour_needed = 12 * flour_per_egg
result = flour_needed
return result
|
A store sells shoes at $50 a pair. They just increased the price by 25%. What is the new price? | def solve() -> int:
shoe_price = 50
increase = 0.25
new_price = shoe_price + (shoe_price * increase)
result = new_price
return result
|
A cake recipe calls for 2 cups of flour, 1 cup of sugar, 3 eggs, and 1/2 cup of oil. If flour costs $2 per cup, sugar is $3 per cup, eggs are $0.75 each, and oil costs $4 per cup, what is the total cost of ingredients for one cake? | def solve() -> int:
flour_cost = 2 * 2
sugar_cost = 3
egg_cost = 3 * 0.75
oil_cost = 4 * 0.5
total_cost = flour_cost + sugar_cost + egg_cost + oil_cost
result = total_cost
return result
|
Sarah and her friends are planning to go to a concert. The tickets cost $25 each and they have $150 altogether. How many friends can join Sarah? | def solve() -> int:
num_tickets = 25
total_money = 150
num_friends = (total_money // num_tickets) - 1
result = num_friends
return result
|
Student: Five bushels of corn cost the farmer $460. How much do 19 bushels cost? | def solve() -> int:
bushels = 5
cost = 460
cost_per_bushel = cost / bushels
total_bushels = 19
total_cost = total_bushels * cost_per_bushel
result = total_cost
return result
|
Student: 8. Richard has some coins. Tommy has 40 coins. If the number of Tommy's coins is four times more than the number of Richard's coins, what is the number of Richard's coins? | def solve() -> int:
tommy_coins = 40
richard_coins = tommy_coins / 4
result = richard_coins
return result
|
Student: Jane, Jill, and June planted flowers. Jane planted 12 flowers, but Jill planted 6 flowers more than Jane. If June planted 3 flowers less than half of Jill's flowers, how many flowers did June plant? | def solve() -> int:
jane_flowers = 12
jill_flowers = jane_flowers + 6
june_flowers = jill_flowers / 2 - 3
result = june_flowers
return result
|
A box contains 5 red balls, 3 blue balls, and 4 green balls. If one ball is selected at random, what is the probability of selecting a red ball? | def solve() -> int:
total_balls = 5 + 3 + 4
red_balls = 5
probability = red_balls / total_balls
result = probability
return result
|
Student: Q10: Mark needs to save $5500 in his account in order to buy a new car. If he deposits cash at a rate of $200 per month, how many months will it take him to have the required amount? | def solve() -> int:
required_amount = 5500
monthly_deposit = 200
months = required_amount // monthly_deposit
result = months
return result
|
Olivia has 800 stickers and wants to make sticker albums for herself and her sister. If each album requires 280 stickers, how many more stickers does Olivia need to complete both albums? | def solve() -> int:
stickers = 800
album_stickers = 280
num_albums = 2
total_stickers = album_stickers * num_albums
needed_stickers = total_stickers - stickers
result = needed_stickers
return result
|
Student: If Billy and David each buy a box of ice cream containing 8 bars, how many bars of ice cream do they have in total? | def solve() -> int:
box_size = 8
num_boxes_billy = 1
num_boxes_david = 1
total_bars = box_size * (num_boxes_billy + num_boxes_david)
result = total_bars
return result
|
Lily has a square garden with sides of 20 feet. What is the area of her garden in square feet? | def solve() -> int:
side = 20
area = side**2
result = area
return result
|
A contractor needs to build a wall that is 24 feet long and 8 feet tall. The width of each brick is 6 inches. How many bricks will the contractor need to build the wall? | def solve() -> int:
width_bricks = 24*12 // 6
height_bricks = 8*12 // 6
total_bricks = width_bricks * height_bricks
result = total_bricks
return result
|
Student: A rectangular garden has an area of 36 square feet. If the length of the garden is 6 feet, what is the width? | def solve() -> int:
length = 6
area = 36
width = area / length
result = width
return result
|
A basketball team scored 96 points in 8 games. If they scored the same number of points in each game, what was their average score per game? | def solve() -> int:
total_points = 96
total_games = 8
average_score = total_points / total_games
result = average_score
return result
|
Noah needs to buy books for his summer reading list. He needs 10 books in total, and half of them cost $10.00 each and half of them cost $15.00 each. How much will he spend on all of the books? | def solve() -> int:
books = 10
half_books = books / 2
cost_of_10_dollar_books = half_books * 10.00
cost_of_15_dollar_books = half_books * 15.00
total_cost = cost_of_10_dollar_books + cost_of_15_dollar_books
result = total_cost
return result
|
An ice cream parlor can sell 45 ice cream cones per hour. If they are open for 8 hours each day, how many ice cream cones can they sell in 1 week (7 days)? | def solve() -> int:
icecreams_per_hour = 45
hours_per_day = 8
days_per_week = 7
icecreams_per_week = icecreams_per_hour * hours_per_day * days_per_week
result = icecreams_per_week
return result
|
In a restaurant, there are 40 customers and 20 more men than women. If each customer got a free soda, and a soda costs $2.25 each, how much did the restaurant spend on sodas? | def solve() -> int:
total_customers = 40
extra_men = 20
soda_cost = 2.25
women = (total_customers - extra_men) / 2
total_sodas = total_customers
total_cost = total_sodas * soda_cost
result = total_cost
return result
|
A pizza has a diameter of 14 inches. If the cost is $0.10 per square inch, how much does the pizza cost? | def solve() -> int:
diameter = 14
radius = diameter / 2
area = 3.14 * radius**2
cost_per_inch = 0.10
total_cost = area * cost_per_inch
result = total_cost
return result
|
Student: Charley can run 20 miles at top speed, while a bullet fired from his gun flies at 3000 miles per hour. Assuming the gun is fired in the same direction that Charley is running, how much faster, in miles per hour, is the bullet flying than if he fired the bullet in the opposite direction? | def solve() -> int:
charley_speed = 20
bullet_speed = 3000
difference_in_speed = bullet_speed - (2 * charley_speed)
result = difference_in_speed
return result
|
A bicycle with a regular price of $250 is on a 20% discount. How much money will you spend on this bicycle after the discount? | def solve() -> int:
regular_price = 250
discount = 0.20
discounted_price = regular_price - (regular_price * discount)
result = discounted_price
return result
|
A man can bike 20 miles per hour. If he bikes for 2 and a half hours, how many miles did he travel? | def solve() -> int:
distance_travelled = 20 * 2.5
result = distance_travelled
return result
|
Alice has 6 balls. If 2 balls are yellow, 2 balls are blue, and the rest are green, what percentage of balls are green? | def solve() -> int:
ball_num = 6
yellow_num = 2
blue_num = 2
green_num = ball_num - yellow_num - blue_num
percentage_green = (green_num / ball_num) * 100
result = percentage_green
return result
|
Tom starts with $500 in his bank account and deposits $250 each month. If he withdraws $100 every other month, how much money will he have in his account after 10 months? | def solve() -> int:
total_deposits = 250 * 10
total_withdrawals = 100 * 5
total = 500 + total_deposits - total_withdrawals
result = total
return result
|
Rachel runs 3 miles every day for 2 weeks. How many miles does she run in total? | def solve() -> int:
distance_per_day = 3
number_of_days = 14
total_distance = distance_per_day * number_of_days
result = total_distance
return result
|
If a store sells 50 shirts for $500, how much is one shirt? | def solve() -> int:
cost_per_shirt = 500/50
result = cost_per_shirt
return result
|
Alex has 40 shoes. Lily has 12 more shoes than Alex, and Sam has 18 fewer shoes than Alex. What is the total number of shoes that Lily and Sam have together? | def solve() -> int:
alex_shoes = 40
lily_shoes = alex_shoes + 12
sam_shoes = alex_shoes - 18
total_shoes = lily_shoes + sam_shoes
result = total_shoes
return result
|
Alice and Bob are classmates who share expenses for their projects. Last week, Alice paid $500 for some materials, which Bob promised to repay with an interest of 8%. How much will Bob pay back? | def solve() -> int:
principal = 500
rate = 0.08
interest = principal * rate
total = principal + interest
result = total
return result
|
John has to pay $500 for rent and $200 for utilities each month. If he makes $1500 a month, how much money does he have left after paying his bills? | def solve() -> int:
income = 1500
rent = 500
utilities = 200
total_bills = rent + utilities
left_over = income - total_bills
result = left_over
return result
|
Ben counted the number of pencils in a box and found that he had 60 pencils. He shared them equally among his 5 friends. After everyone got their share, Ben's dog ate 5 pencils. How many pencils did each of Ben's friends get? | def solve() -> int:
pencils_in_box = 60
pencils_eaten_by_dog = 5
num_friends = 5
pencils_shared_among_each_friend = (pencils_in_box - pencils_eaten_by_dog) // num_friends
result = pencils_shared_among_each_friend
return result
|
Student: A car can travel 30 miles per gallon of fuel. If the car has 10 gallons of fuel, how far can it travel? | def solve() -> int:
miles_per_gallon = 30
fuel = 10
distance = miles_per_gallon * fuel
result = distance
return result
|
5. A family ate 11 cans of soup costing $7 each, and 6 cans of soda costing $2 each. How much did they spend in total? | def solve() -> int:
soupTotalCost = 7 * 11
sodaTotalCost = 2 * 6
total = soupTotalCost + sodaTotalCost
result = total
return result
|
A store has 120 notebooks. If a student purchases 25 notebooks, how many notebooks are left? | def solve() -> int:
notebooks = 120
purchased = 25
remaining = notebooks - purchased
result = remaining
return result
|
Heather decided to go for a run and run 9 miles at the start of the day. She then decided to run an extra 6 miles by the end of the day. However, she had to run at a slower pace and ended up running 11% fewer miles. How many miles did she run in total? | def solve() -> int:
miles_start = 9
miles_end = (miles_start * 89) / 100
total_miles = miles_start + miles_end
result = total_miles
return result
|
A company sells 15 shirts for 45 dollars per shirt, and incurred manufacturing costs of 400 dollars. What was their profit margin? | def solve() -> int:
num_of_shirts = 15
price_per_shirt = 45
manufacturing_costs = 400
total_sales = num_of_shirts * price_per_shirt
profit = total_sales - manufacturing_costs
profit_margin = (profit / total_sales) * 100
result = profit_margin
return result
|
Student: 3 numbers together add up to 28. The first is twice the second, and the third number is 8. What is the first number? | def solve() -> int:
total = 28
third_number = 8
second_number = total - third_number
first_number = second_number * 2
result = first_number
return result
|
Michael bought a bundle of 20 magazines with each magazine having 100 pages. If he reads 5 pages per day, how many days will it take him to complete all the magazines? | def solve() -> int:
magazines = 20
pages_per_magazine = 100
pages_per_day = 5
total_pages = magazines * pages_per_magazine
total_days = total_pages / pages_per_day
result = total_days
return result
|
At a library, there are 500 books. 20% of all books are science fiction. If the library adds 50 new science fiction books, how many science fiction books will the library have if all other books remain the same? Emma and Jackson have a total of 50 balls. If Emma has 3 more balls than Jackson, how many balls does Jackso... | def solve() -> int:
books = 500
science_fiction_percentage = 0.20
new_science_fiction_books = 50
science_fiction_books = books * science_fiction_percentage
total_science_fiction_books = science_fiction_books + new_science_fiction_books
result = total_science_fiction_books
emma... |
Jade wants to buy 7 boxes of chocolates for her friends. Each box cost $13. How much money will Jade need to spend in total? | def solve() -> int:
boxes = 7
price_per_box = 13
total_cost = boxes * price_per_box
result = total_cost
return result
|
Jack earns 20 points for every $5 he spends at a movie theater. If he spends more than $50, he gets a bonus of 100 points. Jack buys 2 movie tickets for $12 each, a large popcorn for $8, and other snacks for $20. How many points does Jack get? | def solve() -> int:
tickets_price = 12
popcorn_price = 8
snacks_price = 20
total_spent = (tickets_price * 2) + popcorn_price + snacks_price
points_earned = (total_spent // 5) * 20
if total_spent > 50:
points_earned += 100
result = points_earned
return result
|
A store has a discount where you can get $5 off every purchase of $50 or more. If you purchase $120 worth of items, what is the total cost after the discount? | def solve() -> int:
total_purchase_amount = 120
discount_amount = (total_purchase_amount // 50) * 5
total_cost_after_discount = total_purchase_amount - discount_amount
result = total_cost_after_discount
return result
|
David ran 5 miles for 35 minutes. What was his average speed in miles per hour? | def solve() -> int:
speed = 5/(35/60)
result = speed
return result
|
Jack has 4 times the number of stickers as Marc. After they traded their stickers, Jack had 2 more stickers than Marc. How many stickers did Jack have before the trade? | def solve() -> int:
count_Jack = 0
count_Marc = 0
count_Jack = count_Jack + 4*count_Marc + 2
result = count_Jack
return result
|
Lucas the leopard has a spotted fur coat. One-fifth of his spots are located on his legs, with two-thirds of the spots located on his back and the remainder on his head. If Lucas has 12 spots on his legs, how many spots does he have on his head? | def solve() -> int:
spots_on_legs = 12
total_spots = spots_on_legs / (1/5)
spots_on_back = total_spots * (2/3)
spots_on_head = total_spots - spots_on_legs - spots_on_back
result = spots_on_head
return result
|
Aditya has a collection of 300 stamps. He gave away 72 stamps to his cousin and bought 45 new stamps at a store. How many stamps does he have now? | def solve() -> int:
remaining = 300 - 72
new = remaining + 45
result = new
return result
|
A school has a total of 1000 students, and every day, 20 students are absent. If the school admits 50 new students every day, how many students would the school have after 2 weeks? | def solve() -> int:
total_students = 1000
absent_students = 20
new_students = 50
days_in_two_weeks = 14
total_absent_students = absent_students * days_in_two_weeks
total_new_students = new_students * days_in_two_weeks
total_students_after_two_weeks = total_students + total_new_stud... |
Student: Jack has $100 to buy 48 items. If each item costs $2, how much money will he have left after buying all of these items? | def solve() -> int:
money = 100
items = 48
cost = 2
total_cost = items * cost
remaining_money = money - total_cost
result = remaining_money
return result
|
In a supermarket, there are 2000 items. 70% of them are fruits or vegetables. Among them, 1/12 of fruits or vegetables are organic. How many fruits or vegetables are not organic? | def solve() -> int:
total_items = 2000
fruits_vegetables_percentage = 0.7
organic_percentage = 1/12
fruits_vegetables = total_items * fruits_vegetables_percentage
not_organic = fruits_vegetables - (fruits_vegetables * organic_percentage)
result = not_organic
return result
|
Miguel walks 8 blocks to the barber shop, then walks 3 blocks to the grocery store, and finally walks 6 blocks to get home. If Miguel takes this route five times each day, how many blocks does he walk in total each day? | def solve() -> int:
blocks_to_barber_shop = 8
blocks_to_grocery_store = 3
blocks_to_home = 6
total_blocks = (blocks_to_barber_shop + blocks_to_grocery_store + blocks_to_home) * 5
result = total_blocks
return result
|
Emma has 8 postcards to send during her 4 day vacation. A pack of 20 postcards costs $6. How much will she spend on postcards over 30 days? | def solve() -> int:
postcards = 8
vacation_days = 4
pack_cost = 6
packs_needed = (postcards / 20) + 1
vacation_cost = packs_needed * pack_cost
total_cost = vacation_cost * (30 / vacation_days)
result = total_cost
return result
|
A library has 300 books. One sixth of the books are fiction, one fifth are non-fiction, and the rest are reference. How many reference books are there in the library? | def solve() -> int:
fiction = 300 * (1/6)
non_fiction = 300 * (1/5)
reference = 300 - fiction - non_fiction
result = reference
return result
|
Student: A car travels 180 miles in 3 hours. If it maintains this speed, how far will it travel in 5 hours? | def solve() -> int:
distance = 180
time_1 = 3
time_2 = 5
speed = distance / time_1
distance_2 = speed * time_2
result = distance_2
return result
|
A delivery service can transport a package to a nearby city in 75 minutes or to a far-off city in 120 minutes. Tom sent a package to the nearby city and another package to the far-off city, but only halfway. How long did it take to transport both packages? | def solve() -> int:
nearby_city_time = 75
far_off_city_time = 120
halfway_time = (nearby_city_time + far_off_city_time) / 2
result = halfway_time
return result
|
Andy has saved $1500 for his first year of college, but tuition for his college costs $34000. He was awarded a grant that will cover 70% of the remainder of his tuition. How much more money does he need to apply for to receive a loan that will cover his tuition? | def solve() -> int:
tuition = 34000
grant = tuition * (1 - 0.7)
result = grant - 1500
return result
|
``` A particular score is considered "passing" if it is 60 or greater. A student receives a grade of 55 and has one more test to take. If this student needs a minimum score of 77 in order to pass the class, what is the minimum score they must receive on the last test? | def solve() -> int:
current_grade = 55
minimum_passing = 60
minimum_grade_needed = 77
points_needed = minimum_grade_needed - (minimum_passing - current_grade)
result = points_needed
return result
|
Theo is driving from Denver to Boulder, which is 30 miles away. If he drives at a constant speed of 60 miles per hour, how long in minutes will it take him to reach Boulder? | def solve() -> int:
distance = 30
speed = 60
time_in_hours = distance / speed
time_in_minutes = time_in_hours * 60
result = time_in_minutes
return result
|
Sarah needs to buy new books for her book club. She plans to buy 3 books on Monday and double the number of books she bought each following day. How many books does Sarah buy in total on Thursday? | def solve() -> int:
books_bought = 3
books_bought *= 2
books_bought *= 2
books_bought *= 2
result = books_bought
return result
|
A hospital has 20 floors. It takes 3 seconds to go up the stairs to the floors with odd tens digit and 7 seconds to go up to the others. How many minutes does it take to get to the 20th floor? | def solve() -> int:
floor = 20
time = 0
for i in range(1, floor+1):
if i % 10 == 0:
time += 7
elif i % 2 == 1:
time += 3
else:
time += 7
result = time/60
return result
|
In a baking contest, 12 teams entered with each team producing 5 desserts. How many desserts were entered in the contest in total? | def solve() -> int:
teams = 12
desserts = 5
total = teams * desserts
result = total
return result
|
Karen has 5 apples. She gives 2 apples to John and 1 apple to Sarah. How many apples does Karen have left? | def solve() -> int:
karen_apples = 5
john_apples = 2
sarah_apples = 1
remaining_apples = karen_apples - john_apples - sarah_apples
result = remaining_apples
return result
|
Ben, Bob, and Bill bought some candy bars at a store. Ben bought 6 candy bars, Bob bought 4 less than Ben, and Bill bought 3 more than Bob. If each candy bar cost $1.25, how much did Bill spend on candy bars? | def solve() -> int:
ben = 6
bob = ben - 4
bill = bob + 3
cost = 1.25
bill_spending = bill * cost
result = bill_spending
return result
|
A farmer spent $1100 on two types of crops. The cost of one crop was $327 more than the other. What was the cost of the more expensive crop? | def solve() -> int:
crop1_cost = (1100 - 327) / 2
crop2_cost = crop1_cost + 327
result = crop2_cost
return result
|
Possible questions and programs: Selena buys 12 oranges for $3.00 and 18 apples for $4.50. She gives 4 oranges and 6 apples to her friend. How much money did she spend on the fruits that she kept? | def solve() -> int:
orange_price = 3.00 / 12
apple_price = 4.50 / 18
oranges_left = 12 - 4
apples_left = 18 - 6
cost = oranges_left * orange_price + apples_left * apple_price
result = cost
return result
|
Student: Tom and his friends go out for dinner. The bill is $120 and they want to leave a 20% tip. What is the total cost? | def solve() -> int:
bill = 120
tip_percentage = 0.2
tip = bill * tip_percentage
total_cost = bill + tip
result = total_cost
return result
|
Max has $7000. He spends $1800 on a new TV, and then spends three-fifths of what's left on a music concert. Max then donates a seventh of what he has left. How much money does he have left? | def solve() -> int:
money = 7000
tv_cost = 1800
money -= tv_cost
concert_cost = (3/5) * money
money -= concert_cost
donation = money / 7
money -= donation
result = money
return result
|
If a bag can hold 50 marbles altogether, and there are 5 times as many blue marbles as red, how many red marbles are there? | def solve() -> int:
total_marbles = 50
blue_marbles = 5
red_marbles = 1
total_blue = total_marbles / (blue_marbles + red_marbles) * blue_marbles
total_red = total_marbles - total_blue
red_marbles = total_red / (blue_marbles + red_marbles) * red_marbles
result = red_marble... |
From Sunday to Thursday, Sophia studies for 4 hours a day. On Friday and Saturday, she studies for 6 hours a day. How much time does she spend studying in a month? | def solve() -> int:
sunday_to_thursday = 4
friday_and_saturday = 6
days_in_month = 30
study_time_sunday_to_thursday = sunday_to_thursday * 5
study_time_friday_and_saturday = friday_and_saturday * 2
total_study_time = study_time_sunday_to_thursday + study_time_friday_and_saturday
... |
A toy store sold twice as many dolls as action figures last week. If the store sold 18 dolls, and each doll costs $10, how much money did the store make from selling dolls last week? | def solve() -> int:
dolls_sold = 18
action_figures_sold = dolls_sold / 2
doll_cost = 10
doll_sales = dolls_sold * doll_cost
result = doll_sales
return result
|
Lauren bought a new laptop worth $1,300 for her college studies. She paid a $200 deposit and a small portion of the rest of the balance. The rest of the balance was paid using a loan with 7% interest per annum that was paid off in installments. The loan had a term length of 2 years and Lauren pays the same weekly payme... | def solve() -> int:
Interest_rate = 7/100
Term_in_years = 2
Total_amount = 1300
Deposit = 200
Weekly_payments = (Total_amount - Deposit) * (Interest_rate/4) / (1-1/(1+Interest_rate/4)**(Term_in_years*16))
result = Weekly_payments/100
return result
|
A bike shop sells four different types of bikes. A road bike for $500, a mountain bike for $750, a cruiser bike for $300, and a BMX bike for $200. If the shop sold 5 road bikes, 2 mountain bikes, 10 cruiser bikes, and 15 BMX bikes, how much did they make from these sales? | def solve() -> int:
road_bikes_sold = 5
mountain_bikes_sold = 2
cruiser_bikes_sold = 10
BMX_bikes_sold = 15
price_of_road_bike = 500
price_of_mountain_bike = 750
price_of_cruiser_bike = 300
price_of_BMX_bike = 200
total_sales = (road_bikes_sold*price_of_road_bike) + (mounta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.