question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Some possible questions and programs are: Yara can read 20 pages of a book in an hour. Omar can read 15 pages in the same time, and Rana can read 25 pages. They all started reading the same book at 10 am, but Yara stopped at 11:30 am, Omar stopped at 12 pm, and Rana stopped at 12:15 pm. How many pages did they read in ... | def solve() -> int:
yara_rate = 20
omar_rate = 15
rana_rate = 25
yara_hours = 1.5
omar_hours = 2
rana_hours = 2.25
yara_pages = yara_rate * yara_hours
omar_pages = omar_rate * omar_hours
rana_pages = rana_rate * rana_hours
total_pages = yara_pages + omar_pages + rana_pages
re... |
James has 16 cookies. He has 4 cookies that are chocolate chip, 6 cookies that are oatmeal, and the rest are peanut butter. He ate 2 cookies of each type. How many cookies does James have left? | def solve() -> int:
james = 16
chocolate = 4
oatmeal = 6
peanut = james - chocolate - oatmeal
james = james - 2 * (chocolate + oatmeal + peanut)
result = james
return result
|
A pizza can be divided into 8 slices. If a group of 6 people want to share 2 pizzas, how many slices will each person get? | def solve() -> int:
pizzas = 2
slices_per_pizza = 8
people = 6
slices_per_person = (pizzas * slices_per_pizza) / people
result = int(slices_per_person)
return result
|
I have 24 cupcakes and I want to divide them equally between 3 people. How many cupcakes will each person get and how many will be left over? | def solve() -> int:
each_person = 24 // 3
leftover = 24 % 3
result = each_person, leftover
return result
|
Emma needs to finish at least 10 pieces of art in two days to submit them for an exhibition. She has finished 2 pieces already on the first day. Assuming she finishes twice the amount of art as the first day each day in the remaining day, how many pieces will she have finished after two days? | def solve() -> int:
pieces_finished_first_day = 2
total_days = 2
remaining_days = total_days - 1
pieces_finished_second_day = pieces_finished_first_day * 2
total_pieces_finished = pieces_finished_first_day + pieces_finished_second_day
total_pieces_finished = total_pieces_fini... |
Student: Cara had $80. She bought a dress for $40 and a pair of shoes for $25. How much will Cara have if she returned the dress for a full refund and got a 20% discount on the shoes? | def solve() -> int:
cara_money = 80
dress_price = 40
shoes_price = 25
discount_rate = 0.2
cara_spent = dress_price + shoes_price
cara_refund = dress_price
shoes_discount = shoes_price * discount_rate
shoes_final_price = shoes_price - shoes_discount
cara_money = cara_money - car... |
Samantha wants to make a profit by selling lamps which she bought for $5000. If she wants to make a 35% profit on each lamp, and she has 200 units in total, what should be the selling price for each lamp including the profit margin? | def solve() -> int:
cost_per_lamp = 5000 / 200
profit_margin = cost_per_lamp * 0.35
selling_price = cost_per_lamp + profit_margin
result = selling_price
return result
|
A cake recipe requires 250 g of flour, 150 g of sugar, 100 g of butter, and 3 eggs. How many cakes can you make with 1 kg of flour, 750 g of sugar, 400 g of butter, and 12 eggs? | def solve() -> int:
flour_per_cake = 250
sugar_per_cake = 150
butter_per_cake = 100
eggs_per_cake = 3
flour_available = 1000
sugar_available = 750
butter_available = 400
eggs_available = 12
cakes_by_flour = flour_available // flour_per_cake
cakes_by_sugar = sugar_available /... |
Normally Emma can finish her homework in 1 hour, but today it takes her 1.5 hours to finish it. How much longer would it take her to finish 5 homework assignments today? | def solve() -> int:
hour_to_finish_homework = 1.5
num_homework_assignments = 5
extra_time = hour_to_finish_homework - 1
total_extra_time = extra_time * num_homework_assignments
result = total_extra_time
return result
|
Student: A bag contains 7 red balls, 8 green balls, and 5 blue balls. If three balls are drawn at random without replacement, what is the probability that one ball is red, one is green, and one is blue? | def solve() -> int:
red_balls = 7
green_balls = 8
blue_balls = 5
total_balls = red_balls + green_balls + blue_balls
prob_red = red_balls / total_balls
prob_green = green_balls / (total_balls - 1)
prob_blue = blue_balls / (total_balls - 2)
prob_all = prob_red * prob_green * prob_blue
... |
At the local carnival, Mia is playing the fish catching game. She must catch 5 fish to win the game and each fish costs 2 dollars. How much money will she need to win the game? | def solve() -> int:
fish_needed_to_win = 5
cost_per_fish = 2
total_cost = fish_needed_to_win * cost_per_fish
result = total_cost
return result
|
A chef has 40 dishes in their menu. On a busy night, they served 12 dishes and on a quiet night they served 5 dishes. If they plan to serve all of their dishes, how many dishes will they serve on average on the third and fourth night? | def solve() -> int:
total_dishes = 40
busy_night_dishes = 12
quiet_night_dishes = 5
average_dishes = (busy_night_dishes + quiet_night_dishes) / 2
total_dishes_served = average_dishes * 2
result = total_dishes_served
return result
|
Student: There are 10 cakes, 8 ice creams, 12 chocolates, and 5 candies in the store. If a cake costs $5, an ice cream costs $2, a chocolate costs $3, and a candy costs $1, how much does the store earn if there are only 2 cakes, 6 ice creams, 4 chocolates, and 1 candy left? | def solve() -> int:
cakes = 10
ice_creams = 8
chocolates = 12
candies = 5
cake_cost = 5
ice_cream_cost = 2
chocolate_cost = 3
candy_cost = 1
total_cost = cakes * cake_cost + ice_creams * ice_cream_cost + chocolates * chocolate_cost + candies * candy_cost
remaining_cost = 2 * cake... |
Emily is baking a cake that requires 5 cups of flour. If she is using a measuring cup that holds 1 cup of flour every 30 seconds, how much more time does she need to finish measuring all the flour for the cake? | def solve() -> int:
cups_of_flour_needed = 5
measuring_cup_capacity = 1
time_per_cup = 30
total_time_needed = cups_of_flour_needed * time_per_cup
result = total_time_needed
return result
|
On Monday, Marci bought 30 candy bars for $0.50 each. On Tuesday, Marci bought twice as many candy bars for $0.60 each. On Wednesday, Marci bought 5 more candy bars for $0.80 each. How much more money did she spend on Wednesday than on Monday? | def solve() -> int:
bars_on_monday = 30
price_on_monday = 0.50
total_on_monday = bars_on_monday * price_on_monday
bars_on_tuesday = bars_on_monday * 2
price_on_tuesday = 0.60
total_on_tuesday = bars_on_tuesday * price_on_tuesday
bars_on_wednesday = bars_on_monday + 5
price... |
Student: A local band had 17 musicians and each musician brought two instruments with them. How many total instruments did the band bring for their performance? | def solve() -> int:
musicians = 17
instruments_per_musician = 2
total_instruments = musicians * instruments_per_musician
result = total_instruments
return result
|
Hannah and Peter agreed to split their earnings such that Peter takes 20% and Hannah takes the rest. If Peter's share is $850, how much did they earn? | def solve() -> int:
x = 850 / 0.2
result = x
return result
|
On Monday, John sews 25 garments at a rate of 5 garments every 1 hour. On Tuesday, John sews 15 garments at a rate of 3 garments every 45 minutes. How many garments does John sew in total from Monday to Tuesday? | def solve() -> int:
r1 = 25 * 5
r2 = 15 * (60//45)
garments = r1 + r2
result = garments
return result
|
Betty is having her 7th birthday and she wants to share 16 pieces of cake with 10 of her classmates. How many pieces of cake will each classmate get? | def solve() -> int:
num_cake = 16
num_classmates = 10
result = num_cake // num_classmates
return result
|
A recipe for a cake requires 2 eggs and 1 cup of sugar. If there are 10 cups of sugar, how many eggs are needed to make the cake? | def solve() -> int:
eggs_per_cup_sugar = 2
sugar = 10
eggs = (sugar / 1) * eggs_per_cup_sugar
result = eggs
return result
|
A family of 6 went to a local amusement park. They decided to buy season passes which cost $150 per person. They also rented a cabana for the day for $100. If there was a 15% discount on the season passes and they left a 20% tip, what was the total cost of their day at the amusement park? | def solve() -> int:
family_members = 6
pass_cost = 150
cabana_cost = 100
discount_percent = 15
tip_percent = 20
total_pass_cost = family_members * pass_cost
total_pass_cost *= (1 - (discount_percent/100))
total_cost = total_pass_cost + cabana_cost
tip_amount = total_cost * (tip_perce... |
Possible additional questions and programs: You buy some books from an online store that offers free shipping for orders above $50. Each book costs $12, but you get a 10% discount for every book after the first one. How many books do you need to buy to get the free shipping? | def solve() -> int:
cost = 0
books = 0
discount = 0.1
while cost <= 50:
books += 1
cost += 12 * (1 - discount * (books - 1))
result = books
return result
|
The fairy godmother Cinderella charges for every magical transformation she makes. She is paid $20 per animal transformation and $25 per inanimate object transformation. She transforms 70% of the maximum number of animals and 12 inanimate objects, and earns $595. There were half as many inanimate objects as animals. Wh... | def solve() -> int:
animals = 0
inanimate_objects = 0
max_animals = (12 * 2) / 0.7
total_earnings = (20 * 0.7 * max_animals) + (25 * 12)
percentage_inanimate_objects = (12 / max_animals) * 100
result = percentage_inanimate_objects
return result
|
A recipe to make 20 cookies requires 2 cups of flour. If you only have 1 cup of flour, how many cookies can you make? | def solve() -> int:
cookies_recipe_yield = 20
needed_flour = 2
avail_flour = 1
cookies_with_avail_flour = (cookies_recipe_yield * avail_flour) / needed_flour
result = cookies_with_avail_flour
return result
|
Student: Jared had 12 candy bars and 7 apples. He gave away 5 candy bars and 2 apples. He then ate 4 candy bars and 1 apple. How many pieces of candy and apples does Jared have now? | def solve() -> int:
candy_bars = 12
apples = 7
candy_bars = candy_bars - 5
apples = apples - 2
candy_bars = candy_bars - 4
apples = apples - 1
result = (candy_bars, apples)
return result
|
John has 4 geese and 6 pigeons. Joe wants to buy 2 times as many geese as John has and 4 times as many pigeons as John has. How many animals does Joe want to have? | def solve() -> int:
geese = 4
pigeons = 6
total_geese = geese * (1 + 2)
total_pigeons = pigeons * (1 + 4)
result = total_geese + total_pigeons
return result
|
A swimming pool is 25 meters long, 12 meters wide and 3 meters deep. If a cubic meter of water weighs 1000 kg, how much water is in the pool? | def solve() -> int:
volume = 25 * 12 * 3
mass = volume * 1000
result = mass
return result
|
A pack of pencils contains 12 pencils of different colors. Alice wants to share the pencils equally with her 3 friends, including herself. How many pencils does each person get? | def solve() -> int:
pencils = 12
people = 4
quotient = pencils // people
remainder = pencils % people
result = (quotient, remainder)
return result
|
A bakery sells muffins for $1.50 each. Charlie buys 6 muffins and pays with a $10 bill. How much change will Charlie get back? | def solve() -> int:
muffin_price = 1.50
num_muffins = 6
total_cost = muffin_price * num_muffins
amount_paid = 10.00
change = amount_paid - total_cost
result = change
return result
|
It takes Linda 3 hours to mow the lawn. She can do it faster if she works with her brother, but it still takes them a total of 2 and a half hours. How long would it take Linda to mow the lawn alone? | def solve() -> int:
total_time_together = 2.5
time_with_brother = total_time_together - (total_time_together/2)
time_alone = total_time_together + time_with_brother
result = time_alone
return result
|
A family of 4 goes to the amusement park. The cost of each ride is 3 tokens. Each family member goes on a different number of rides. Dad goes on 4 rides, mom goes on 2 rides, son goes on 3 rides, and their daughter goes on 1 ride. How many tokens are used by the family in total? | def solve() -> int:
token_per_ride = 3
dad_rides = 4
mom_rides = 2
son_rides = 3
daughter_rides = 1
total_token_used = token_per_ride * (dad_rides + mom_rides + son_rides + daughter_rides)
result = total_token_used
result
return result
|
There are a total of 24 chairs in a room. One out of every three chairs is blue. How many chairs are blue? | def solve() -> int:
blue_chairs = 0
total_chairs = 24
blue_chairs = total_chairs / 3
result = blue_chairs
return result
|
Samantha and Sandra shared a sum of money in the ratio 2:7. If Samantha got $120, what was the total sum shared? | def solve() -> int:
ratio = 2/7
samantha_share = 120
sandra_share = samantha_share*(1-ratio)/ratio
sum_shared = samantha_share + sandra_share
result = sum_shared
return result
|
Nick and Emma took a trip to the nearest big city. Nick drove for 8 hours, while Emma drove for 6 hours at the same speed as Nick. The total distance of the trip was 411 miles. How many miles did Nick drive, assuming both drivers had the same speed? | def solve() -> int:
total_distance_covered_by_nick = 0
total_distance_covered_by_trip = 411
total_time_taken_by_nick = 8
total_time_taken_by_emma = 6
total_distance_covered_by_nick = (total_distance_covered_by_trip * total_time_taken_by_nick) / total_time_taken_by_emma
result = total_distance_co... |
Carlos is wrapping presents for his friends. He needs 24 inches of ribbon for each present. A spool of ribbon has 360 inches of ribbon. How many presents can he wrap with one spool of ribbon? | def solve() -> int:
ribbon_inches = 360
presents = ribbon_inches // 24
result = presents
return result
|
Student: Kash bought 3 cases of water for $18 in total. Each case contains 6 bottles of water. How much did it cost Kash for each bottle of water? | def solve() -> int:
total_cost = 18
num_cases = 3
num_bottles = 6
cost_per_bottle = total_cost / (num_cases * num_bottles)
result = cost_per_bottle
return result
|
Charlotte's cable plan starts out at $85/month. It goes up 10% for every premium channel added and $30/month for every DVR box. If she adds 2 premium channels and 1 DVR box, what's her new cable plan price? | def solve() -> int:
cable_plan_price = 85
premium_channels_added = 2
dvr_boxes_added = 1
premium_channel_cost = cable_plan_price * 0.1 * premium_channels_added
dvr_box_cost = 30 * dvr_boxes_added
new_cable_plan_price = cable_plan_price + premium_channel_cost + dvr_box_cost
res... |
A store has 200 shirts on Monday. On Tuesday, they sold 1/4 of the shirts, and on Wednesday, they sold 20 more shirts than they did on Tuesday. How many shirts does the store have left if they started with 200? | def solve() -> int:
shirt_sold_tuesday = 200 * 1/4
shirt_sold_wednesday = shirt_sold_tuesday + 20
shirts_left = 200 - (shirt_sold_tuesday + shirt_sold_wednesday)
result = shirts_left
return result
|
A singer sold 500 tickets for a concert. If the tickets cost $25 each, how much money was made from ticket sales? | def solve() -> int:
number_of_tickets_sold = 500
ticket_price = 25
total_sales = number_of_tickets_sold * ticket_price
result = total_sales
return result
|
If a company has $500,000 in revenue and their expenses are $345,800, what is their net income? | def solve() -> int:
revenue = 500000
expenses = 345800
net_income = revenue - expenses
result = net_income
return result
|
A grocer has three kinds of oranges, each costing a different amount. Orange A costs $1.50 each, Orange B costs $1.75 each, and Orange C costs $2.00 each. If a customer bought 2 of each kind of orange, what was the total cost? | def solve() -> int:
cost_of_orange_a = 1.50
cost_of_orange_b = 1.75
cost_of_orange_c = 2.00
quantity = 2
total_cost = quantity*(cost_of_orange_a + cost_of_orange_b + cost_of_orange_c)
result = total_cost
return result
|
There are 24 roses to be divided equally among 8 vases. How many roses will be in each vase? | def solve() -> int:
total_roses = 24
total_vases = 8
roses_per_vase = total_roses/total_vases
result = roses_per_vase
return result
|
Kevin likes to collect stamps. He has 180 stamps in his album. He wants to increase his collection by 25% in the next month. How many new stamps does he need to buy in the next month? | def solve() -> int:
percent = 0.25
increase = percent * 180
increase = int(increase) if increase.is_integer() else int(increase) + 1
result = increase
return result
|
A company has 45 employees. 1/4 of them are managers, half of the remainder are salespeople, and the rest are support staff. How many support staff are there? | def solve() -> int:
employees = 45
managers = employees * 1/4
remaining = employees - managers
salespeople = remaining / 2
support = remaining - salespeople
result = support
return result
|
Student: Sarah is planning a party for 20 guests. She wants to serve 2 appetizers per person. If each appetizer serving costs $5 and the party will last for 3 hours, how much will she spend on appetizers? | def solve() -> int:
num_guests = 20
num_appetizers_per_person = 2
cost_per_appetizer = 5
duration_in_hours = 3
total_cost = num_guests * num_appetizers_per_person * cost_per_appetizer * duration_in_hours
result = total_cost
return result
|
Jena bakes a dozen of cakes. Each cake requires 8 eggs. How many eggs does Jena need in total to bake all dozen of cakes? | def solve() -> int:
cakes = 12
eggs_per_cake = 8
total_eggs = cakes * eggs_per_cake
result = total_eggs
return result
|
Student: Clara wants to save $800.00 for a vacation in 10 months. She already has $120.00 saved from her previous month. How much money does Clara need to save each month in order to reach her goal in 10 months? | def solve() -> int:
goal = 800.00
saved = 120.00
months = 10
monthly_saving = (goal - saved) / months
result = monthly_saving
return result
|
Possible new questions are: - A music teacher charges 30 dollars per hour for private lessons. She decides to offer a 10% discount to a group of friends who want to learn guitar together. If there are 6 friends and they want to take 2 hours of lessons per week for a month, how much does each friend have to pay? | def solve() -> int:
discount_rate = 30 * 0.9
total_cost = discount_rate * 2 * 4 * 6
cost_per_friend = total_cost / 6
result = cost_per_friend
return result
|
In a race, Jordan and Alex are both running. Jordan runs at 7 miles/hour and Alex runs at 9 miles/hour. If they run for 45 minutes, how much farther will Alex have run than Jordan? | def solve() -> int:
jordan_speed = 7 / 60
alex_speed = 9 / 60
jordan_distance = jordan_speed * 45
alex_distance = alex_speed * 45
distance_difference = alex_distance - jordan_distance
result = distance_difference
return result
|
Student: Tom has a total of 58 pieces of stationery that consists of pencils, pens and erasers. He has twice as many erasers than pens and 4 times as many pencils than pens. How many pens does he have? | def solve() -> int:
total_stationery = 58
x = 0
erasers = 2 * x
pencils = 4 * x
total_stationery = erasers + pencils + x
result = total_stationery - erasers - pencils
return result
|
In a meeting, there are 50 attendees, and 4/5 of them are managers. How many managers and other attendees are present in the meeting? | def solve() -> int:
total_attendees = 50
num_managers = total_attendees * 4/5
num_other_attendees = total_attendees - num_managers
result = f'{num_managers} managers and {num_other_attendees} other attendees'
return result
|
Mason and Ava both purchased 7 books at $10 per book from a thrift store and decided to sell them online. Mason sold his books at $15 each, while Ava sold her books at $13 each. How much more profit did Mason make compared to Ava? | def solve() -> int:
books_purchased = 7
cost_per_book = 10
mason_sell_price = 15
ava_sell_price = 13
mason_total_cost = books_purchased * cost_per_book
ava_total_cost = books_purchased * cost_per_book
mason_total_revenue = books_purchased * mason_sell_price
ava_total_revenue = ... |
Danny likes to read books, and he has a bookshelf with 6 shelves. Each shelf can hold 14 books, but Danny only fills 75% of each shelf. How many books does Danny have in his bookshelf? | def solve() -> int:
book_per_shelf = 14 * 0.75
book_total = book_per_shelf * 6
result = book_total
return result
|
Maya picked up some strawberries at $6 per pound from the local market. She was short of $35 while paying for it and her friend Lily helped her out. What was the total price of the strawberries if Maya had $70? | def solve() -> int:
strawberries_price_per_pound = 6
shortage_amount = 35
mayas_money = 70
total_price = (mayas_money + shortage_amount) / strawberries_price_per_pound
result = total_price
return result
|
A school donated 130 books to a library. One-seventh of the books are in the mathematics section and four-fifths of the remaining are in the history section. How many books are in the history section? | def solve() -> int:
donated_books = 130
math_frac = 1/7
math_books = donated_books * math_frac
remaining_books = donated_books - math_books
history_frac = 4/5
history_books = remaining_books * history_frac
result = history_books
return result
|
Daisy runs a 5k in 30 minutes. What is her speed in miles per hour? | def solve() -> int:
kilometers_per_hour = 10
miles_per_kilometer = 0.621371
speed_mph = kilometers_per_hour * miles_per_kilometer
result = speed_mph
return result
|
Student: Wanda is making a quilt. She needs 16 squares of fabric of 25 centimeters by 25 centimeters each. If she has a piece of fabric that is 2 meters by 1.5 meters, how much fabric will she have left after cutting out the squares? | def solve() -> int:
squares = 16
side = 25
width = 200
length = 150
square_area = side**2
total_area = squares * square_area
fabric_area = width * length
remaining_area = fabric_area - total_area
result = remaining_area
return result
|
Lilly wants to drink an average of 1.5 liters of water per day. On Monday, she drank 1.3 liters of water and on Tuesday she drank 1.8 liters of water. She had a busy day on Wednesday and forgot to drink water. On Thursday she drank 1.4 liters of water, and on Friday she drank 1.2 liters of water. How many liters of wat... | def solve() -> int:
goal = 1.5
monday = 1.3
tuesday = 1.8
wednesday = 0
thursday = 1.4
friday = 1.2
total = monday + tuesday + wednesday + thursday + friday
days = 5
remaining = goal * days - total
result = remaining
return result
|
If it takes 2 hours to drive 120 miles, how many miles can be driven in 3 hours? | def solve() -> int:
mph = 120/2
distance = mph * 3
result = distance
return result
|
Ivan and Jenny cut a pizza in the ratio 2:3. If Jenny eats 6 slices of pizza (which is the larger share), how many slices are there in the pizza? | def solve() -> int:
unit = 6 / 3
slices = unit * (2 + 3)
result = slices
return result
|
Student: A rectangular prism is 2.2 feet wide, 4 feet long, and 5.5 feet tall. What is the volume of the prism? | def solve() -> int:
width = 2.2
length = 4
height = 5.5
volume = width * length * height
result = volume
return result
|
``` The cost price of an article was $4000. The article was sold at a profit of 12.5%. What was the selling price of the article? | def solve() -> int:
selling_price = 4000 + (4000*0.125)
result = selling_price
return result
|
Student: Emma needs to paint her bedroom, and she has a total of 48 liters of paint. If she use only 2/3 of the paint, how many liters will she use? | def solve() -> int:
total_paint = 48
fraction_used = 2/3
amount_used = total_paint * fraction_used
result = round(amount_used, 2)
return result
|
A school has 240 students and 12 teachers. The school wants to divide the students into equal groups and assign one teacher to each group. How many students will be in each group? | def solve() -> int:
group_size = 240 / 12
result = group_size
return result
|
Lily bought 2 gallons of paint. She used two-fifths of the paint for the walls and the rest of the paint for the ceiling. How many quarts of paint did she need to paint the ceiling? | def solve() -> int:
ceiling_paint = 0
total_paint = 2 * 4
used_paint = 2/5 * total_paint
result = total_paint - used_paint
return result
|
John saved 30% of his monthly salary in June. If his savings for June were $480, what was his salary for the month? | def solve() -> int:
savings = 480
percentage = 0.3
salary = savings / percentage
result = salary
return result
|
Maria has a box of candy that is 6 inches long, 4 inches wide, and 8 inches deep. How many cubic inches of candy are in the box? | def solve() -> int:
length = 6
width = 4
depth = 8
volume = length * width * depth
result = volume
return result
|
John filled up his car with gas for $2.50 per gallon. He bought 12 gallons of gas and paid with a $50 bill. How much change did he receive? | def solve() -> int:
price_per_gallon = 2.50
num_gallons = 12
total_cost = price_per_gallon * num_gallons
amount_paid = 50
change = amount_paid - total_cost
result = change
return result
|
You invest $350 in an investment bank that gives 7 percent interest at the end of every 5 months. Find the total amount, including the interest, in the account at the end of 15 months. | def solve() -> int:
total_interest = 0
for x in range(3):
interest = 350 * 0.07 * x
total_interest += interest
total = 350 + total_interest
result = total
return result
|
A movie theater has 100 seats. If each row has 10 seats, how many rows does the theater have? | def solve() -> int:
seats_per_row = 10
total_seats = 100
number_of_rows = total_seats/seats_per_row
result = number_of_rows
return result
|
A bag contains 4 red marbles, 3 blue marbles, and 5 green marbles. If you select one marble at random, what is the probability that it will be blue? | def solve() -> int:
blue = 3
total_marbles = 12
probability = blue / total_marbles
result = probability
return result
|
John is making grape jelly. He needs 900 grapes per quart of jelly. It takes him 5 hours to pick 600 grapes and 3 hours to make the jelly. How long will it take him to make 7 quarts of jelly? | def solve() -> int:
grapes_per_quart = 900
grapes_picked_per_hour = 600 / 5
jelly_making_time = 3
quarts_of_jelly = 7
total_grapes_needed = grapes_per_quart * quarts_of_jelly
total_grape_picking_time = total_grapes_needed / grapes_picked_per_hour
total_jelly_making_time = jelly_making_t... |
A food truck menu offers 3 types of dishes: A, B, and C. If the menu has a total of 200 dishes, and dish A is twice as popular as dish B, how many dishes of dish A are there? | def solve() -> int:
total_dishes = 200
a_to_b_ratio = 2
total_ratio = a_to_b_ratio + 1
dishes_A = (a_to_b_ratio / total_ratio) * total_dishes
result = dishes_A
return result
|
One quarter is equal to 20% of what value? | def solve() -> int:
quarter = 0.25
percent = 20
percent_decimal = (percent / 100)
value = (quarter / percent_decimal)
result = value
return result
|
Student: John has 32 pencils in total. He is giving away 3/4 of his pencils to his classmates. How many pencils will John have left? | def solve() -> int:
total_pencils = 32
give_away_pencils = 3/4 * total_pencils
left_pencils = total_pencils - give_away_pencils
result = left_pencils
return result
|
Amber received her monthly salary of $1500 and decided to treat herself to a relaxing spa day. She got a massage that cost $100, a pedicure that cost $40 and a facial that cost $80. How much money will Amber be left with from her salary? In a baking contest, a cake was baked for many minutes. From the first 20 minutes ... | def solve() -> int:
salary = 1500
massage_cost = 100
pedicure_cost = 40
facial_cost = 80
total_cost = massage_cost + pedicure_cost + facial_cost
money_left = salary - total_cost
time_baked_before_setting_timer = 10
time_baked_at_325 = 30 - 20
time_baked_at_350 = 60 - 30
... |
Mary had $1,500. John gave her another $300. Mary then gave Paul $900 and kept the rest. What was the value, in dollars, of the rest? | def solve() -> int:
initial_amount = 1500
amount_received = 300
amount_given = 900
final_amount = initial_amount + amount_received - amount_given
result = final_amount
return result
|
Ryan wants to buy a new phone that costs $800. He works part-time and earns $10/hour. If he saves all his hourly wages for 5 weeks, how many hours does he have to work in total to save up enough money for the phone? | def solve() -> int:
phone_cost = 800
hourly_wage = 10
total_hours = phone_cost / hourly_wage
total_weeks = 5
hours_per_week = total_hours / total_weeks
result = hours_per_week
return result
|
Kevin is painting his bedroom wall. The wall is a rectangle that measures 3 meters by 4 meters. He has a can of paint that covers 12 square meters per liter. How much paint does he need to paint the wall? | def solve() -> int:
length = 3
width = 4
coverage = 12
area = length * width
paint = area / coverage
result = paint
return result
|
Ethan will be at a funfair for 8 hours. He spends 40 minutes in line for the haunted house, 50 minutes for the spinning teacups, and 30 minutes for the Viking ship. If Ethan goes to the haunted house 3 times and the spinning teacups twice, how many times can he ride the Viking ship? | def solve() -> int:
total_time_minutes = 8 * 60
haunted_house_time = 40 * 3
spinning_teacups_time = 50 * 2
time_remaining = total_time_minutes - haunted_house_time - spinning_teacups_time
Viking_ship_ride_count = time_remaining // 30
result = Viking_ship_ride_count
return result
|
A box has 80 chocolates. A group of children ate 10 chocolates and lost the box with 25 chocolates. How many chocolates are left in the box? | def solve() -> int:
total_chocolates = 80
chocolates_eaten = 10
chocolates_lost = 25
remaining_chocolates = total_chocolates - chocolates_eaten - chocolates_lost
result = remaining_chocolates
return result
|
A piece of land measuring 300 square meters is divided into 2 equal rectangular plots. What is the area of each rectangular plot? | def solve() -> int:
total_area = 300
num_plots = 2
area_per_plot = total_area/num_plots
result = area_per_plot
return result
|
Alex eats three times more pizza than Sophia, but Sophia eats 1/2 a slice more per serving than Alex. If Alex eats 6 slices of pizza per serving, how many pizza slices altogether did they eat if Sophia ate pizza 12 times? | def solve() -> int:
alex_slices_per_serving = 6
sophia_slices_per_serving = alex_slices_per_serving + 1/2
sophia_servings = 12
alex_slices = alex_slices_per_serving * sophia_servings
sophia_slices = sophia_slices_per_serving * sophia_servings
total_slices = alex_slices + sophia_slices
... |
-Example question and solution: A soccer team scored 15 goals in their first four games of the season. They scored two more goals in their fifth game than in their fourth game. They scored three times as many goals in their sixth game as in their fifth game. How many goals did they score in total in the first six games... | def solve() -> int:
goals = 15
goals_fifth = goals / 4 + 2
goals += goals_fifth
goals_sixth = goals_fifth * 3
goals += goals_sixth
result = goals
return result
|
If John has 6 apples and Jane gives him 3 more, how many apples does John have in total? | def solve() -> int:
john_apples = 6
jane_apples = 3
total_apples = john_apples + jane_apples
result = total_apples
return result
|
Felix works at a company where he earns $20/hour for the first 40 hours in a week and $30/hour for any additional hours worked. If he worked 50 hours this week, how much did he earn in total? | def solve() -> int:
hourly_rate_first = 20
hourly_rate_extra = 30
hours_worked = 50
if hours_worked <= 40:
total_wages = hours_worked * hourly_rate_first
else:
total_wages = 40 * hourly_rate_first + (hours_worked - 40) * hourly_rate_extra
result = total_wages
return result
|
Naomi can knit 6 scarves, 4 hats, and 2 sweaters in a day. If she works 6 days a week, how many items of clothing can she knit? | def solve() -> int:
items_per_day = 6 + 4 + 2
items_per_week = items_per_day * 6
result = items_per_week
return result
|
John has 100 books on history and twice as many on geography. He wants to add books on politics, which will represent 10% of all his books. How many books does John have in total after adding the politics books? | def solve() -> int:
history_books = 100
geography_books = 2 * history_books
total_books_before = history_books + geography_books
politics_books = 0.1 * total_books_before
total_books_after = total_books_before + politics_books
result = total_books_after
return r... |
Nasir is stocking shelves. Each shelf is 4 feet long, and each box of supplies can cover 6 feet. How many boxes of supplies will he need for 60 feet of shelves? | def solve() -> int:
shelves_length = 60
length_per_shelf = 4
length_per_box = 6
boxes_needed = shelves_length / (length_per_shelf + length_per_box)
result = boxes_needed
return result
|
Emma wants to make a rectangle with a 90cm rope. She wants the shorter sides to be 12cm. What will the length of the longer sides be? | def solve() -> int:
rope_length = 90
shorter_sides = 12
longer_sides = (rope_length - 2 * shorter_sides) / 2
result = longer_sides
return result
|
A rectangle has a length twice its width. If the width is 6cm, what is the perimeter of the rectangle? | def solve() -> int:
width = 6
length = width * 2
perimeter = 2 * length + 2 * width
result = perimeter
return result
|
If it takes 2 painters 6 hours to paint a room, how long will it take for 4 painters to paint the same room? | def solve() -> int:
painters_1 = 2
hours_1 = 6
painters_2 = 4
time_1_painter = hours_1 * painters_1
time_4_painters = time_1_painter / painters_2
result = time_4_painters
return result
|
There are 10 bottles of juice on a table. Each bottle contains 300 ml of juice. A group of friends decides to share the juice equally among themselves. They pour 50 ml of juice from each bottle into a large jug, then fill 5 glasses with 100 ml of juice each from the jug. How much juice is left in the bottles and in the... | def solve() -> int:
initial_juice = 10 * 300
poured_juice = 10 * 50
bottle_juice = initial_juice - poured_juice
filled_juice = 5 * 100
jug_juice = poured_juice - filled_juice
total_juice = bottle_juice + jug_juice
result = total_juice
return result
|
Student: Carl has a rock collection of 48 rocks. How many more rocks does he need to make the collection 54 rocks? | def solve() -> int:
num_rocks = 48
target_rocks = 54
rocks_needed = target_rocks - num_rocks
result = rocks_needed
return result
|
A rectangular plot of land has an area of 720 sq ft. If the length of the plot is 24 feet, what is the width of the plot? | def solve() -> int:
area = 720
length = 24
width = area / length
result = width
return result
|
A train is traveling at a speed of 20 m/s. If it wants to stop in 100 m, what should be its acceleration, assuming constant acceleration? | def solve() -> int:
velocity_in_mps = 20
distance_in_m = 100
acceleration = (velocity_in_mps**2) / (2*distance_in_m)
result = acceleration
return result
|
Bing got an 84 and a 90 on his tests. What is the difference between his scores? | def solve() -> int:
score1 = 84
score2 = 90
difference = score2 - score1
result = difference
return result
|
When Samantha was 8 years old, her age was four times the age of her brother Michael. Now, 25 years later, if Michael's wife is 2 years younger than him, how old is she? | def solve() -> int:
samantha_age_at_start = 8
michael_age_at_start = samantha_age_at_start / 4
michael_age_now = michael_age_at_start + 25
wife_age = michael_age_now - 2
result = wife_age
return result
|
Harry has a rectangular yard that is 10 feet wide and 15 feet long. How much fence will he need to surround his yard? | def solve() -> int:
width = 10
length = 15
perimeter = 2*width + 2*length
result = perimeter
return result
|
Sophie and Max plan to purchase a new coffee maker, toaster, and blender. The coffee maker costs $80, the toaster costs $50, and the blender costs $30. Sophie will buy the coffee maker and Max will pay for the toaster. Max also wants to pay 1/2 of the price of the blender and the rest will be paid by Sophie. How much m... | def solve() -> int:
coffee_maker_cost = 80
toaster_cost = 50
blender_cost = 30
max_payment_blender = blender_cost / 2
sophie_payment_blender = blender_cost - max_payment_blender
max_total_payment = toaster_cost + max_payment_blender
sophie_total_payment = coffee_maker_cost + sophie... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.