question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A group of chefs can make 200 cakes in 5 hours. If they start by making 20 cakes on Monday, and continue making 50 cakes every day, how long will it take for them to make all the cakes? | def solve() -> int:
monday_cakes = 20
daily_cakes = 50
total_cakes = 200
hourly_cakes = total_cakes / 5
daily_cakes = daily_cakes + monday_cakes
hourly_cakes = daily_cakes / 24
hours_needed = total_cakes / hourly_cakes
result = hours_needed
return r... |
A group of 4 friends went to a restaurant and ordered 3 pizzas, 2 salads, and 4 sodas. The bill for each pizza is $15, each salad is $10, and each soda is $5. Write a program to find the total cost of the meal and the cost per person if they split the bill equally. | def solve() -> int:
pizzas = 3
salads = 2
sodas = 4
pizza_price = 15
salad_price = 10
soda_price = 5
total_cost = pizzas*pizza_price + salads*salad_price + sodas*soda_price
cost_per_person = total_cost / 4
result = total_cost, cost_per_person
return result
|
A bookstore ordered 450 books for a sale. If they sold 328 books on the first day of the sale, how many books are left? | def solve() -> int:
books_ordered = 450
books_sold_day1 = 328
books_left = books_ordered - books_sold_day1
result = books_left
return result
|
James went to the grocery store and found a deal where customers could buy one pack of hot dogs at full price and get a second pack for half off the full price. If he purchased two packs of hot dogs that were each originally marked at a full price of $5, how much did he spend on both packs, in dollars? | def solve() -> int:
full_price = 5
half_price = full_price / 2
total_cost = full_price + half_price
cost_in_dollars = total_cost * 2
result = cost_in_dollars
return result
|
Rachel is going to the movies with her friends. The tickets cost $12 each and they want to buy popcorn, which costs $8 per bag. If there are 5 people going to the movies, how much will they spend in total? | def solve() -> int:
ticket_cost = 12
total_tickets = 5
total_ticket_cost = ticket_cost * total_tickets
popcorn_cost = 8
total_popcorn = 1
total_popcorn_cost = popcorn_cost * total_popcorn
total_cost = total_ticket_cost + total_popcorn_cost
result = total_cost
return result
|
Jack has three times as many basketballs as Jill. If Jill has 18 basketballs, how many basketballs does Jack have? | def solve() -> int:
jill_basketballs = 18
jack_basketballs = 3 * jill_basketballs
result = jack_basketballs
return result
|
A family with three siblings went to an amusement park with four cousins. The cost per sibling is $35 and the total bill was $245. What is the cost per cousin? | def solve() -> int:
siblings = 3
cousins = 4
cost_per_sibling = 35
total_bill = 245
total_cost_siblings = siblings * cost_per_sibling
cost_cousins = (total_bill - total_cost_siblings) / cousins
result = cost_cousins
return result
|
There are 64 students in a school. 25% of the students are in the chess club, 16 students are in the drama club, and the rest are in the science club. How many students are in the science club? | def solve() -> int:
total_students = 64
chess_club = 0.25 * total_students
science_club = total_students - chess_club - 16
result = science_club
return result
|
In a class of 30 students, 5/6 of the students opted for math and remaining opted for science. If the number of students who opted for math is 20 more than the number of students who opted for science, how many students opted for math and science respectively? | def solve() -> int:
total_students = 30
math_students_ratio = 5/6
science_students_ratio = 1 - math_students_ratio
math_students = math_students_ratio * total_students
science_students = total_students - math_students
math_students = science_students + 20
result = "Math students: "... |
When Lily crawls, for every two crawls forward, she crawls one crawl backwards. Therefore, if the distance between her bedroom and the living room is 30 crawls, what is the total number of crawls Lily has to make to go from her bedroom to the living room? | def solve() -> int:
distance = 30
forward_crawls = distance * 2
backward_crawls = forward_crawls // 3
total_crawls = forward_crawls + backward_crawls
result = total_crawls
return result
|
A company sells 2000 products each month for $15 each. If the cost of producing each product is $8, how much profit does the company make each month? | def solve() -> int:
num_products = 2000
product_sale_price = 15
product_cost_price = 8
profit = (num_products * (product_sale_price - product_cost_price))
result = profit
return result
|
A recipe for lemonade requires 6 lemons, 8 cups of water, and 1 cup of sugar. Sam has 18 lemons, 24 cups of water, and 3 cups of sugar. How many batches of lemonade can he make with these ingredients? | def solve() -> int:
lemon_batch = 6
lemon_available = 18
lemon_ratio = lemon_available / lemon_batch
water_batch = 8
water_available = 24
water_ratio = water_available / water_batch
sugar_batch = 1
sugar_available = 3
sugar_ratio = sugar_available / sugar_batch
min_ratio = min(le... |
Noah has five times as many cookies as does Ava. Together, they have 70 more cookies than Ellie. If Ava has 15 cookies, how many cookies do the three have altogether? | def solve() -> int:
ava_cookies = 15
noah_cookies = 5 * ava_cookies
ellie_cookies = (ava_cookies + noah_cookies) - 70
total_cookies = ava_cookies + noah_cookies + ellie_cookies
result = total_cookies
return result
|
Karen had 18 stickers in her album. She traded 4 stickers with Lisa and got 6 new stickers in return. She also gave 2 stickers to Max as a gift. How many stickers did Karen have left in her album after the trades and the gift? | def solve() -> int:
stickers_left = 18 - 4 - 2
stickers_left = stickers_left + 6
result = stickers_left
return result
|
Ben and his three friends bought a large pizza that had 12 slices. They also ordered a small salad that cost $6 and four drinks that cost $2 each. They split the bill equally among themselves. How much did each person pay? | def solve() -> int:
cost_pizza = (12 / 4) * 3
cost_salad = 6 / 4
cost_drinks = 4 * 2
total_cost = cost_pizza + cost_salad + cost_drinks
amount_per_person = total_cost / 4
result = amount_per_person
return result
|
Kiana's monthly rent is $1200. She works at a coffee shop that gives her a 20% discount on rent, and she has a roommate that shares half of the rent. If Kiana needs to pay rent within 1 month, how much does Kiana still need to pay? | def solve() -> int:
rent = 1200
discount = 0.2
shared = 0.5
discounted_rent = rent * (1 - discount)
kiana_share = discounted_rent * shared
kiana_still_needs_to_pay = discounted_rent - kiana_share
result = kiana_still_needs_to_pay
return result
|
A car traveled 225 km in 3 hours 45 minutes. What was the average speed in km/hour? | def solve() -> int:
distance = 225
time = (3 * 60) + 45
speed = distance / (time / 60)
result = speed
return result
|
A ruler costs $2.50 at the campus store, or $6.00 for a pack of three on Amazon. How much money would Sara save by buying 9 rulers online? | def solve() -> int:
ruler_cost_store = 2.5
num_rulers_pack = 3
ruler_cost_online = 6.0
num_rulers = 9
num_packs = num_rulers // num_rulers_pack
if num_rulers % num_rulers_pack == 0:
total_cost_online = num_packs * ruler_cost_online
else:
total_cost_online = (num_packs * ruler_cos... |
A recipe calls for 2 cups of flour and 1/2 cup of sugar. If you want to triple the recipe, how many cups of flour and how many cups of sugar will you need? | def solve() -> int:
flour = 2
sugar = 0.5
multiplier = 3
total_flour = flour * multiplier
total_sugar = sugar * multiplier
result = total_flour + total_sugar
return result
|
Ben and Emma have a lemonade stand. They sell a cup of lemonade for 25 cents. Ben makes 8 cups of lemonade every morning and Emma makes 10 cups of lemonade every afternoon. They sell all the cups they make every day. How much money do they earn in 15 days? | def solve() -> int:
ben_cups = 8
emma_cups = 10
price = 0.25
total_cups = ben_cups + emma_cups
daily_earnings = total_cups * price
total_earnings = daily_earnings * 15
result = total_earnings
return result
|
Mary received $200 as a gift. She spent $50 on a jacket and then 20% of the remaining amount on a book. If the book costs $15, how much did Mary initially receive? | def solve() -> int:
gift_amount = 200
jacket_cost = 50
remaining_amount = gift_amount - jacket_cost
book_cost = 15
book_percentage = 0.2
book_percentage_of_remaining = remaining_amount * book_percentage
initial_amount = remaining_amount + book_percentage_of_remaining
result = initia... |
There are 540 people with no tickets in a concert hall with each ticket costing $20. How much should the concert hall earn from selling tickets? | def solve() -> int:
no_ticket_people = 540
ticket_price = 20
money_earned = no_ticket_people * ticket_price
result = money_earned
return result
|
A book costs $12.50 before tax. If the tax rate is 8%, how much will the total cost of the book be? | def solve() -> int:
book_price = 12.5
tax_rate = 0.08
total_cost = book_price + (book_price * tax_rate)
result = total_cost
return result
|
There are 64 students in a classroom. On the first day of school, 29 students brought a snack. On the next day, 35 students brought a snack. How many more students brought a snack on the second day than on the first? | def solve() -> int:
day_one_snacks = 29
day_two_snacks = 35
total_students = 64
difference_snacks = day_two_snacks - day_one_snacks
result = difference_snacks
return result
|
Student: Jake has 15 marbles. If 5 marbles are green, 3 marbles are red, and the rest are blue, what percentage of marbles are blue? | def solve() -> int:
total_marbles = 15
green_marbles = 5
red_marbles = 3
blue_marbles = total_marbles - green_marbles - red_marbles
blue_percentage = blue_marbles / total_marbles * 100
result = blue_percentage
return result
|
Anna has a library where she has 600 books. On Monday, 50 books were added to the library. On Tuesday, 30 old and torn books were discarded. On Wednesday, 3 students each borrowed 10 books. How many books does Anna's library currently have? | def solve() -> int:
books_in_library = 600
books_added_on_monday = 50
books_discarded_on_tuesday = 30
books_borrowed_by_students_on_wednesday = 3 * 10
books_in_library = books_in_library + books_added_on_monday
books_in_library = books_in_library - books_discarded_on_tuesday
books_in_li... |
In a school, there are 200 students. 100 students participate in sports, 50 students participate in music, and 30 students participate in both. How many students do not participate in either sports or music? | def solve() -> int:
students = 200
sports = 100
music = 50
both = 30
neither = students - (sports + music - both)
result = neither
return result
|
You order 44 pizzas. Each pizza is cut into 8 pieces. How many pieces of pizza are there in total? | def solve() -> int:
pizzas = 44
piecesPerPizza = 8
total = pizzas * piecesPerPizza
result = total
return result
|
Emily’s garden is 36 square feet; it is 4 times smaller than John’s garden. How large is John’s garden? | def solve() -> int:
emilys_garden = 36
johns_garden = emilys_garden * 4
result = johns_garden
return result
|
A restaurant has 12 tables that can seat 4 people each. Every table is occupied half of the day on average. If every customer spends an average of $25 on their meal, how much money does the restaurant make in a week? | def solve() -> int:
total_customers_per_day = 12 * 4 * 0.5
weekly_customers = total_customers_per_day * 7
weekly_earnings = weekly_customers * 25
result = weekly_earnings
return result
|
Tom drives 50 miles to work and 50 miles back home each day. If gas costs $3.50 per gallon and his car gets 25 miles per gallon, how much will he spend on gas in a year? | def solve() -> int:
distance_per_day = 100
distance_per_year = distance_per_day * 365
cost_per_gallon = 3.50
miles_per_gallon = 25
gallons_per_day = distance_per_day / miles_per_gallon
cost_per_day = gallons_per_day * cost_per_gallon
cost_per_year = cost_per_day * 365
... |
John wants to buy 5 DVDs, each costing $10. If he uses a 15% discount on the total purchase and then uses a $7 coupon, how much will he pay in total? | def solve() -> int:
price = 5 * 10
discount = price * 0.15
total_price = price - discount - 7
result = total_price
return result
|
A factory produces 100 units of a product per day. If they have 7 days of production per week, and they sell each unit for $50, what is their weekly revenue? | def solve() -> int:
units_per_day = 100
days_per_week = 7
price_per_unit = 50
weekly_revenue = units_per_day * days_per_week * price_per_unit
result = f'<<<{weekly_revenue}>>>'
result = weekly_revenue
return result
|
A rectangular kitchen table is 4 feet long and 3 feet wide. If you want to cover it completely with a tablecloth, and the tablecloth is 5 feet by 4 feet, how much of the tablecloth will be hanging off the table? | def solve() -> int:
table_area = 4 * 3
tablecloth_area = 5 * 4
hanging_area = tablecloth_area - table_area
result = hanging_area
return result
|
Lena bought 3 books for $15 each and a notebook for $5. The store gave her a discount of 20% and she ended up paying $44. What was the original price of all items before the discount? | def solve() -> int:
book_price = 15
num_books = 3
notebook_price = 5
discount_percent = 20
total_price = (book_price*num_books) + notebook_price
discount_amount = total_price*(discount_percent/100)
final_price = total_price - discount_amount
original_price = final_price + discount_a... |
A fruit stand sold 500 apples on Monday, which is 50% of the total stock. After selling another 400 apples on Tuesday, they still had 60% of the initial stock left. How many apples did they initially have in stock? | def solve() -> int:
sold_on_monday = 500
sold_on_tuesday = 400
initial_stock = (sold_on_monday*2 + sold_on_tuesday*10)/3
result = initial_stock
return result
|
Five months ago, Carol and Dan worked on a project and received a payment of $12,000. They agreed to split the payment in the ratio of 3:2. Carol invested her share in a bank account that pays 4 percent interest per annum compounded quarterly, while Dan invested his share in a stock that increased in value by 10 percen... | def solve() -> int:
payment = 12000
ratio_c = 3
ratio_d = 2
share_c = payment * ratio_c / (ratio_c + ratio_d)
share_d = payment * ratio_d / (ratio_c + ratio_d)
interest_rate = 0.04
quarterly_rate = interest_rate / 4
quarters = 5 / 3
growth_rate = 0.1
value_c = share... |
A cake recipe calls for 2 cups of sugar. If there are 3 teaspoons of sugar in a tablespoon, how many tablespoons of sugar are needed for the recipe? | def solve() -> int:
cup_sugar_count = 2
tablespoon_sugar_count = cup_sugar_count * 16
teaspoon_sugar_count = tablespoon_sugar_count * 3
result = teaspoon_sugar_count
return result
|
A bakery used 7 pounds of flour to make 54 cupcakes. How many pounds of flour are needed to make 78 cupcakes assuming the amount of flour needed is proportional to the number of cupcakes made? | def solve() -> int:
num_cupcakes_1 = 54
flour_needed_1 = 7
num_cupcakes_2 = 78
flour_needed_2 = (num_cupcakes_2/flour_needed_1)*num_cupcakes_1
result = flour_needed_2
return result
|
Student: John has 6 apples on Monday. How many apples will he have in total if he eats one apple every day for the next three days? | def solve() -> int:
apples_monday = 6
apples_eaten = 3
apples_total = apples_monday - apples_eaten
result = apples_total
return result
|
An ostrich can run 5 km in 30 minutes. How many kilometers can it run in 2 hours? | def solve() -> int:
distance = 5
time = 0.5
new_time = 2
new_distance = (new_time / time) * distance
result = new_distance
return result
|
A train is travelling at 60 miles per hour. How long will it take to travel 150 miles at this speed? | def solve() -> int:
distance = 150
speed = 60
time = distance / speed
result = time
return result
|
A company has 150 employees. If the ratio of male to female employees is 2:3, how many female employees are there in the company? | def solve() -> int:
total_ratio_parts = 2 + 3
female_employees = (3/total_ratio_parts) * 150
result = female_employees
return result
|
A store sells 20 shirts for $10 each and 15 pants for $15 each. What is the total revenue of the store if all the shirts and pants are sold? | def solve() -> int:
shirts_sold = 20
shirt_price = 10
pants_sold = 15
pants_price = 15
revenue = (shirts_sold * shirt_price) + (pants_sold * pants_price)
result = f'The total revenue of the store is ${revenue}.'
result = revenue
return result
|
Possible questions and programs are: Sara is making a slideshow about her science project. She has 12 photos of different experiments and plans to spend the same amount of time on each one. She also has 20 seconds of introduction and 30 seconds of conclusion. How long will her slideshow be in total? | def solve() -> int:
photos = 12
intro = 20
conclusion = 30
photo_time = 10
total_time = intro + conclusion + photos * photo_time
total_time_minutes = total_time / 60
result = total_time_minutes
return result
|
Student: Lily's parents were proud of her math skills so they decided to reward her with a family vacation to Italy. However, they had a condition; her average math test score of her next two tests had to be higher than 94. She scored 91 on the first test and 95 on the second test. What was Lily's average math test sco... | def solve() -> int:
test1 = 91
test2 = 95
total = test1 + test2
average = total / 2
result = average
return result
|
A new car costs $20,000. If a person puts a down payment of $5,000 and pays 5% interest on a 60 month loan, how much will the total cost of the car be, in dollars? | def solve() -> int:
car_cost = 20000
down_payment = 5000
loan_amount = car_cost - down_payment
interest_rate = 0.05
num_months = 60
monthly_interest_rate = interest_rate / 12
total_interest = loan_amount * monthly_interest_rate * num_months
total_cost = car_cost + total_interest
resu... |
There are 12 kids on a soccer team and 10 of them show up for practice. What percentage of the team showed up? | def solve() -> int:
percent_of_team = (10/12) * 100
result = percent_of_team
return result
|
Alex has missed two payments on his car loan, but his bank doesn't charge late fees. He can pay for both payments with 2/5 of his salary after taxes. If Alex makes $4800 per month and his tax rate is 22%, what is the amount of his monthly car loan payment? | def solve() -> int:
salary = 4800
tax_rate = 0.22
missed_payments = 2
payment_percentage = 2/5
total_missed_payment = missed_payments * payment_percentage * salary
monthly_payment = total_missed_payment / payment_percentage
result = monthly_payment
return result
|
arah drives to work every day, and it takes her 30 minutes to cover 15 miles. How long will it take her to cover 60 miles to go from home to work? | def solve() -> int:
time_per_mile = 0.5/15
time_for_60_miles = time_per_mile * 60
result = time_for_60_miles
return result
|
A rectangle has a length of 10 units and a width of 5 units. What is the perimeter of the rectangle? | def solve() -> int:
length = 10
width = 5
perimeter = 2 * (length + width)
result = perimeter
return result
|
A classroom has 20 students. If each student is given a bag with 3 pencils and each pencil costs $0.50, how much will the teacher spend on pencils? | def solve() -> int:
total_cost = 20*3*0.50
result = total_cost
return result
|
Student: A company had $150,000 in profit last quarter. If the company spent $80,000 on expenses, what percent of their profit did they keep? | def solve() -> int:
profit = 150000
expenses = 80000
kept = profit - expenses
percent = (kept / profit) * 100
result = percent
return result
|
Student: A garage has operational costs amounting to $3000 a day. This cost covers the purchase of car parts as well as payment for the mechanics. If 2/5 of the total cost goes towards car parts and 1/4 of the remaining amount is used to pay mechanics, how much does each mechanic get paid daily? | def solve() -> int:
total_cost = 3000
car_parts_cost = total_cost * 2/5
mechanics_cost = (total_cost - car_parts_cost) * 1/4
mechanics_pay = mechanics_cost / 4
result = mechanics_pay
return result
|
Anna and Bob share a bag of candy. At first, Anna had 36 pieces of candy and Bob had 24 pieces of candy. They split the remaining candy equally between them. How many pieces of candy did they each get in the end? | def solve() -> int:
total_candy = 36 + 24
remaining_candy = total_candy - (total_candy//2)
anna_candy = remaining_candy//2
bob_candy = remaining_candy//2
result = anna_candy
return result
|
Alex practices the guitar every other day for 2 weeks. For each practice, he plays 3 chords. 2 of the chords take him 10 minutes to master and the last chord takes him twice as long. How long did Alex practice each day? | def solve() -> int:
days_in_a_week = 7
weeks = 2
days = weeks * days_in_a_week
practice_days = days // 2
chords_per_practice = 3
time_per_chord = 10
time_per_last_chord = 2 * time_per_chord
total_time = (chords_per_practice - 1) * time_per_chord + time_per_last_chord
time_p... |
If a salesperson closes 15 deals out of 20 attempted sales, what percentage of deals did they close? | def solve() -> int:
attempted_sales = 20
closed_sales = 15
percentage_closed = (closed_sales / attempted_sales) * 100
result = percentage_closed
return result
|
The high school held a car show to raise money for new textbooks. They made $480 by selling tickets at $4 each. If they sold 90 tickets, how much money did they gain in total? | def solve() -> int:
total_revenue = 480
ticket_cost = 4
total_tickets = 90
total_gain = total_revenue - (total_tickets * ticket_cost)
result = total_gain
return result
|
Peter saved $360 from his weekend job. He decided to put it in a bank account that offers 3.25% interest per year. If he doesn't withdraw any money, how much will he have in the account after 3 years? | def solve() -> int:
principal = 360
interest_rate = 0.0325
years = 3
final_amount = principal * ((1 + interest_rate) ** years)
result = final_amount
return result
|
A bakery uses 200 eggs to make 100 cakes, costing them $600. How many cakes can they make with 500 eggs at the same rate? | def solve() -> int:
eggs_used = 200
cakes_made = 100
cost = 600
eggs_available = 500
eggs_per_cake = eggs_used / cakes_made
cakes_possible = eggs_available / eggs_per_cake
result = cakes_possible
return result
|
A school has 60 more boys than girls. If 3/5 of the boys and 2/3 of the girls attend an event, and there are 300 attendees in total, how many students go to the school in total? | def solve() -> int:
remaining_attendees = 300
boys_initially = remaining_attendees/(3/5)
girls_initially = boys_initially - 60
remaining_boys = boys_initially - boys_initially/5
remaining_girls = girls_initially - girls_initially/3
total_students = remaining_boys + remaining_girls... |
Lucas is making a sandwich with three ingredients: bread, cheese and ham. 10% of the loaves of bread are stale and the rest are fresh. 30% of the slices of cheese are moldy and the rest are good. 1/6 of the packages of ham are expired and the rest are fresh. If Lucas picks a loaf of bread, a slice of cheese and a packa... | def solve() -> int:
result = 0.9 * 0.7 * 5/6
return result
|
Lisa has a bag of candy. She has 10 pieces of chocolate, 15 pieces of gummy bears, and 20 pieces of jelly beans. She eats 30% of the chocolate, 25% of the gummy bears, and 40% of the jelly beans. How many pieces of candy does she have left in the bag? | def solve() -> int:
total_candy = 10 + 15 + 20
eaten_chocolate = 0.3 * 10
eaten_gummy_bears = 0.25 * 15
eaten_jelly_beans = 0.4 * 20
left_candy = total_candy - eaten_chocolate - eaten_gummy_bears - eaten_jelly_beans
result = left_candy
return result
|
A librarian is stocking books, and one-tenth of the time, a book is damaged and cannot be added to the collection. However, one-fifth of the time, two books are added instead of only one. If the librarian has added books to 300 shelves this year, how many damaged books has she encountered? | def solve() -> int:
total_shelves = 300
damaged_books = total_shelves // 10
extra_books = total_shelves // 5
actual_books = total_shelves - extra_books
actual_damaged_books = actual_books // 10
result = damaged_books + actual_damaged_books
return result
|
Student: Lily collects 5 stamps per day, except on Sundays, when she collects 10 stamps. Max collects 7 stamps per day, except on Sundays, when he collects none. How many more stamps does Lily collect than Max collect in a year of 365 days? | def solve() -> int:
lily_stamps_per_day = 5
max_stamps_per_day = 7
lily_stamps_sunday = 10
max_stamps_sunday = 0
lily_total_stamps = (365 - 52) * lily_stamps_per_day + 52 * lily_stamps_sunday
max_total_stamps = (365 - 52) * max_stamps_per_day + 52 * max_stamps_sunday
result = lily_total_stam... |
George deposits $500 in a savings account with an 8% interest rate per year. How much money would he earn after 3 years? | def solve() -> int:
amount_deposited = 500
interest_rate = 0.08
amount_earned_3_years = amount_deposited * (1 + interest_rate)**3
result = amount_earned_3_years
return result
|
A pizza place charges $14 for a medium pizza and $18 for a large pizza. If John spends $62 and buys only pizzas, how many medium pizzas and how many large pizzas did he buy? | def solve() -> int:
total_spent = 62
medium_pizza_cost = 14
large_pizza_cost = 18
medium_pizzas = (total_spent - large_pizza_cost) // medium_pizza_cost
large_pizzas = (total_spent - medium_pizzas*medium_pizza_cost) // large_pizza_cost
result = (medium_pizzas, large_pizzas)
return result
|
A recipe calls for 2 cups of sugar for every 3 cups of flour. If the recipe requires 12 cups of flour, how many cups of sugar are needed? | def solve() -> int:
flour = 12
sugar = (2/3) * flour
result = sugar
return result
|
Student: A factory produces 3,500 units per day. How many units will be produced in a 5-day week? | def solve() -> int:
units_per_day = 3500
days = 5
total_units = units_per_day * days
result = total_units
return result
|
Jake bought a 10-foot chain to make necklaces. If he cuts the entire chain into equal length pieces of 2-feet and 3-feet, how many pieces will he have cut? | def solve() -> int:
total_chain_length = 10
piece1_length = 2
piece2_length = 3
pieces_of_length_2 = total_chain_length // piece1_length
remaining_chain_length = total_chain_length - (pieces_of_length_2 * piece1_length)
pieces_of_length_3 = remaining_chain_length // piece2_length
... |
A group of 5 friends decided to go on a trip. The cost of the trip is $1200. If all the friends contribute equally and one of them decides to contribute an extra $200, what is the new amount each friend has to pay? | def solve() -> int:
total_cost = 1200
number_of_friends = 5
each_contribution = total_cost / number_of_friends
new_total_cost = total_cost - 200
new_each_contribution = new_total_cost / (number_of_friends - 1)
result = new_each_contribution - each_contribution
return result
|
Diana drove 120 miles in 2 hours. What was her average speed in miles per hour? | def solve() -> int:
distance = 120
time = 2
average_speed = distance / time
result = average_speed
return result
|
Student: Taylor has 6 apples, and she bought 5 more. However, she gave 3 apples to her brother. How many apples does Taylor have now? | def solve() -> int:
apples_original = 6
apples_bought = 5
apples_given = 3
apples_total = apples_original + apples_bought - apples_given
result = apples_total
return result
|
Marcy wants to collect 900 rocks for her collection. She has already collected 200 small stones and 125 medium-size pebbles. How many large rocks does she need to find to reach her goal? | def solve() -> int:
total_rocks = 900
small_stones = 200
medium_pebbles = 125
rocks_collected = small_stones + medium_pebbles
large_rocks_needed = total_rocks - rocks_collected
result = large_rocks_needed
return result
|
Lucas has a collection of 120 stamps. He gives away 15% of his stamps to his friend and then buys 35 new stamps from a store. How many stamps does Lucas have now? | def solve() -> int:
stamps_given = 120 * 0.15
stamps_left = 120 - stamps_given
stamps_new = stamps_left + 35
result = stamps_new
return result
|
Student: Lily is making a fruit salad for a potluck. She needs 3 bananas, which cost $0.25 each, 2 apples, which cost $0.50 each, 1 pineapple, which cost $3.00, and 1/2 cup of yogurt, which cost $1.00 per cup. She also adds some nuts, which cost $2.00 per bag. She can make 10 servings from this recipe. How much does ea... | def solve() -> int:
bananas = 3
banana_price = 0.25
apples = 2
apple_price = 0.50
pineapple = 1
pineapple_price = 3.00
yogurt = 0.5
yogurt_price = 1.00
nuts = 1
nuts_price = 2.00
servings = 10
total_cost = bananas * banana_price + apples * apple_price + pineapple * pineap... |
Rachel bought 3 CDs each costing $12.25, how much money did she spend in total? | def solve() -> int:
no_CDs = 3
cost_each = 12.25
total_cost = no_CDs * cost_each
result = 36.75
return result
|
san works in a retail store and is paid $10 per hour for the first 8 hours, and $15 per hour afterwards. If she works 10 hours today, how much will she earn? | def solve() -> int:
hourly_wage_1 = 10
hourly_wage_2 = 15
hour_1 = 8
hour_2 = 10 - hour_1
earned = (hour_1 * hourly_wage_1) + (hour_2 * hourly_wage_2)
result = earned
return result
|
Rebecca has a set of toy cars. The biggest car is 5 inches long. Each car is 3/4th the length of the car that encases it. What is the length of the 6th biggest car? | def solve() -> int:
biggest_car_length = 5
car_length_ratio = 3/4
sixth_biggest_car_length = biggest_car_length * (car_length_ratio ** 5)
result = sixth_biggest_car_length
return result
|
A school has 300 students and 15 teachers. Each student takes 6 classes and each teacher teaches 4 classes. Each class has 25 students and meets for 45 minutes a day. How many hours do the students and teachers spend in class in a week (assume 5 days a week)? | def solve() -> int:
students = 300
teachers = 15
student_classes = 6
teacher_classes = 4
class_size = 25
minutes = 45
days = 5
hours = 60
school_classes = students * student_classes // class_size
student_minutes = students * student_classes * minutes
teacher_minutes = school_... |
Mary has twice as many marbles as Alice. Alice has three marbles. How many marbles does Mary have? | def solve() -> int:
alice_marbles = 3
mary_marbles = 2 * alice_marbles
result = mary_marbles
return result
|
Lisa bought 6 packs of pencils with 24 pencils in each pack. She gave half of the pencils to her friend. How many pencils does Lisa have left? | def solve() -> int:
pencils = 6 * 24
friend_pencils = pencils / 2
remaining_pencils = pencils - friend_pencils
result = remaining_pencils
return result
|
A pizza has 8 slices. If you eat 1/4 of a pizza, how many slices are left? | def solve() -> int:
slices_per_pizza = 8
slices_eaten = slices_per_pizza / 4
slices_left = slices_per_pizza - slices_eaten
result = slices_left
return result
|
Student: John wants to buy 4 ice cream cones. Each ice cream cone costs $3.50. How much does he need to pay for them? | def solve() -> int:
num_cones = 4
price_cone = 3.50
total_cost = num_cones * price_cone
result = total_cost
return result
|
Emily receives a monthly allowance from her parents. She spends a third of it on clothes and saves half of it. In April, she received $200 and spent $75 on clothes. What is the total amount of money she saved at the end of the month? | def solve() -> int:
allowance = 200
clothes_expense = 75
clothes_spend = allowance / 3
savings = allowance / 2 - clothes_spend
result = savings
return result
|
There are 90 ducks in a pond. 25 percent of them are Muscovies and 65 percent of them are Mallards. How many Muscovies are there? | def solve() -> int:
total_ducks = 90
Mallards = 0.65*total_ducks
Muscovies = total_ducks - Mallards
result = Muscovies
return result
|
There are 10 apples and 6 oranges in a basket. What is the ratio of apples to oranges in the basket? | def solve() -> int:
a = 10
o = 6
ratio = a/o
result = ratio
return result
|
Student: Ann has 3 coins in her pocket. If each coin is worth $10 and she needs to pay the bill of $27, how much more should Ann have to get the bill? | def solve() -> int:
coins = 3
coin_value = 10
bill = 27
total_value = coins * coin_value
amount_needed = bill - total_value
result = amount_needed
return result
|
Samantha is paid $0.30 for every cookie she bakes. If it takes her 25 seconds to bake a cookie, how much does she earn per hour? | def solve() -> int:
cookies_per_hour = 3600 / 25
earnings_per_hour = cookies_per_hour * 0.30
result = earnings_per_hour
return result
|
Tracy types at a speed of 40 words per minute. If she works for 8 hours a day with a 10-minute break each hour, how many words can she type in 5 days? | def solve() -> int:
speed_per_min = 40
hours_per_day = 8
num_days = 5
break_in_min = 10
num_of_breaks = hours_per_day
total_min_for_break = num_of_breaks * break_in_min
total_min_for_typing = hours_per_day * 60 - total_min_for_break
words_in_1day = speed_per_min * total_min_for_typi... |
Student: 4. Mandy was shopping for her family and bought 36 bananas and 24 apples. She gave away half of the bananas and three-fourths of the apples. How many fruits does she have left? | def solve() -> int:
bananas = 36
apples = 24
bananas_left = bananas / 2
apples_left = apples * 3 / 4
result = bananas_left + apples_left
return result
|
A fruit basket has 3 apples for every 4 oranges. If there are 21 oranges, how many apples are in the basket? | def solve() -> int:
oranges = 21
apples_ratio = 3/4
apples = oranges / apples_ratio
result = apples
return result
|
Liam has a job where he earns $11 per hour for the first 40 hours and $16 per hour for any hours after that. If Liam works 45 hours during one week, how much money does he make for just that week? | def solve() -> int:
normal_pay_rate = 11
overtime_rate = 16
hours_normal_pay_rate = 40
hours_overtime_rate = 5
total_pay = normal_pay_rate * hours_normal_pay_rate + overtime_rate * hours_overtime_rate
result = total_pay
return result
|
Julia went to the bookstore and spent $50 on books and $30 on school supplies. She paid only $40 in cash and put the remaining balance on her credit card. What is Julia's credit card balance after her bookstore purchase? Emma earns $60 daily in her job. 8% of her money is deducted as taxes. How much money will Emma hav... | def solve() -> int:
books = 50
supplies = 30
total = books + supplies
cash = 40
credit_card = total - cash
credit_card_balance = credit_card
daily_earnings = 60
tax_rate = 0.08
after_tax_rate = 1 - tax_rate
days_worked = 20
earnings_after_taxes = daily_ear... |
Emma received 24 presents for Christmas. If one-third of them were in small boxes and half of them were in medium boxes, how many presents were in large boxes? | def solve() -> int:
total_presents = 24
small_boxes = total_presents / 3
medium_boxes = total_presents / 2
large_boxes = total_presents - small_boxes - medium_boxes
result = large_boxes
return result
|
Fiona has five times as many balloons as George. George has 10 fewer than Harry, who has 40 balloons. How many balloons do Fiona and Harry have together? | def solve() -> int:
george = (40 - 10)
fiona = (5 * george)
total_balloons = (fiona + 40)
result = total_balloons
return result
|
Nate works part-time at a library for 10 dollars an hour, working 25 hours per week. He estimates that 5% of his pay will be withheld for taxes and other deductions. If he works 35 weeks a year, what is his annual take-home pay? | def solve() -> int:
hourly_rate = 10
hours_per_week = 25
tax_withholding_rate = 0.05
weeks_per_year = 35
weekly_pay = hourly_rate * hours_per_week
annual_pay = weekly_pay * weeks_per_year
tax_withholding = annual_pay * tax_withholding_rate
take_home_pay = annual_pay - tax_withholdin... |
A company made a profit of $7500 on sales of $50000. What was the percentage profit? | def solve() -> int:
profit = 7500
sales = 50000
percentage_profit = (profit/sales)*100
result = percentage_profit
return result
|
A triangle has a perimeter of 30 cm. Two sides are of equal length and the third side is 5 cm longer than each of the other sides. What are the lengths of the three sides? | def solve() -> int:
perimeter = 30
third_side_diff = 5
half_perimeter = perimeter / 2
third_side = half_perimeter - third_side_diff / 2
equal_side = half_perimeter - third_side_diff / 2
third_side_length = third_side + third_side_diff
result = (equal_side, equal_side, third_side_length)
... |
Daniel has $500. He wants to buy tickets at $25 each and give some of them to his family members, Tom and Alice. Tom will receive 2/3 of the tickets, and Alice will receive 1/4 of the tickets. How many tickets does Daniel give to his family members? | def solve() -> int:
tickets_price = 25
total_money = 500
num_tickets = total_money // tickets_price
num_tickets_tom = num_tickets * (2/3)
num_tickets_alice = num_tickets * (1/4)
total_tickets_given = num_tickets_tom + num_tickets_alice
result = total_tickets_given
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.