question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Mason is cleaning his house. The living room takes 1 hour to clean. The kitchen takes 50% longer to clean than the living room. The bathroom takes 30 minutes less than the combined time of the previous 2 rooms. How long does it take Mason to clean his entire house? | def solve() -> int:
living_room = 1
kitchen = living_room * 1.5
bathroom = (living_room + kitchen) - 0.5
total_time = living_room + kitchen + bathroom
result = total_time
return result
|
A man has 2500 dollars. How much more money does he need to have 5000 dollars? | def solve() -> int:
current_money = 2500
required_money = 5000
money_needed = required_money - current_money
result = money_needed
return result
|
Student: If a store has a 20% off sale, how much would an item that costs $80 be after the discount? | def solve() -> int:
original_price = 80
discount_percentage = 0.2
discounted_price = original_price * (1 - discount_percentage)
result = discounted_price
return result
|
John goes to a restaurant that has 4 appetizers, 5 entrees, and 3 desserts. If he selects 2 dishes at random, what is the probability that he chooses one appetizer and one dessert? | def solve() -> int:
P_one_appetizer_one_dessert = (4/12) * (3/11) * 2 + (3/12) * (4/11) * 2
result = P_one_appetizer_one_dessert
return result
|
A cruise ship has 100 cabins. A family of 4 takes up a total of 2 cabins. How many individual passengers can still be accommodated if 5 families of 4 are currently taking the cruise? | def solve() -> int:
total_cabins = 100
family_size = 4
occupied_cabins = 5 * 2
remaining_cabins = total_cabins - occupied_cabins
remaining_passengers = remaining_cabins * (family_size - 1)
result = remaining_passengers
return result
|
Possible new questions and Python programs are: Ernesto and Lucia sold 240 cookies at a bake sale. If Lucia sold 8 more than 4 times as many cookies as Ernesto, how many cookies did Ernesto sell? | def solve() -> int:
total = 240
result = (total - 8) / 5
return result
|
Marcus had a collection of 35 baseball cards that he was organizing. He found 9 more baseball cards, but then lost 6 of them. His older brother felt bad and gave him twice as many baseball cards as he had lost. How many baseball cards did Marcus end up with? | def solve() -> int:
cards_initial = 35
cards_found = 9
cards_lost = 6
cards_given_by_brother = 2 * cards_lost
total_cards = cards_initial + cards_found - cards_lost + cards_given_by_brother
result = total_cards
return result
|
If Janet bought a jacket for $100 and a dress for $75, how much change will she have left if Janet gave the cashier $250? | def solve() -> int:
jacket = 100
dress = 75
total = jacket + dress
cash_given = 250
change = cash_given - total
result = change
return result
|
Maria has seven birds. Each one eats 0.2 ounces of seeds, four times a day, and 1 piece of fruit once a day. How many ounces of seeds and pieces of fruit does Maria need to feed her birds for 6 days? | def solve() -> int:
birds = 7
seeds_per_bird_per_day = 0.2
fruit_per_bird_per_day = 1
days = 6
seeds_needed = birds * seeds_per_bird_per_day * 4 * days
fruit_needed = birds * fruit_per_bird_per_day * days
result = seeds_needed + fruit_needed
return result
|
An aquarium has 3 times as many fish as turtles. If there are 24 animals in total in the aquarium, how many fish are in the aquarium? | def solve() -> int:
num_animals = 24
fish_to_turtle_ratio = 3
fish = num_animals / (1 + fish_to_turtle_ratio)
result = fish
return result
|
Mark bought 6 boxes of chips for $\$$3.90 each. How much did he spend on chips? | def solve() -> int:
cost_per_box = 3.90
num_of_boxes = 6
total_cost = cost_per_box * num_of_boxes
result = total_cost
return result
|
A bag contains 80 marbles. 40% of the marbles are blue, 30% are red, and the rest are green. How many green marbles are in the bag? | def solve() -> int:
total_marbles = 80
blue_percentage = 0.4
red_percentage = 0.3
blue_marbles = total_marbles * blue_percentage
red_marbles = total_marbles * red_percentage
green_marbles = total_marbles - blue_marbles - red_marbles
result = int(green_marbles)
return result
|
David is a carpenter and has to climb ladders multiple times a day. He climbs his full ladder, which has 10 steps, 8 times today. He also climbs his smaller ladder, which has 5 steps, 6 times today. In total, how many times has David climbed a step today? | def solve() -> int:
full_ladder = 10
small_ladder = 5
full_ladder_climbs = 8
small_ladder_climbs = 6
total_climbs = (full_ladder * full_ladder_climbs) + (small_ladder * small_ladder_climbs)
result = total_climbs
return result
|
If the total elevator weight is 1000kg and if it is travelling at a speed of 24 km/h for 10 minutes, how much time does it take to travel 720 km? | def solve() -> int:
distance = 720
time_travelled = 10
speed = 24
distance_travelled = speed * time_travelled
remaining_distance = distance - distance_travelled
remaining_time = remaining_distance / speed
total_time = time_travelled + remaining_time
result = total_time
return result... |
Ben is collecting stamps from different countries. He has 120 stamps in total, and 15% of them are from Canada, 25% are from France, and the rest are from Brazil. How many stamps does he have from Brazil? | def solve() -> int:
canada_stamps = 120 * 0.15
france_stamps = 120 * 0.25
brazil_stamps = 120 - canada_stamps - france_stamps
result = brazil_stamps
return result
|
Amy is selling muffins. She figured the cost of production per muffin was $0.50. Amy made 5 dozen muffins and ended up eating 7 muffins. If Amy resells the remaining muffins at $1.00 each, how much profit does she make? | def solve() -> int:
muffin_cost = 0.50
muffins_to_start_with = 5 * 12
muffins_to_eat = 7
muffins_to_sell = muffins_to_start_with - muffins_to_eat
total_muffin_cost = muffins_to_start_with * muffin_cost
total_sales = muffins_to_sell * 1.00
net_profit = total_sales - total_muffin_cos... |
Student: Emma likes to knit scarves. She can knit one scarf in 4 hours. She has 24 skeins of yarn, each skein can make one scarf. She wants to knit as many scarves as possible before the winter. She can knit for 2 hours a day on weekdays, and 4 hours a day on weekends. How many weeks will it take her to use up all the ... | def solve() -> int:
scarves_per_hour = 1
skeins_of_yarn = 24
weekday_hours = 2
weekend_hours = 4
total_hours = (5 * weekday_hours) + (2 * weekend_hours)
total_scarves = total_hours * scarves_per_hour
weeks = skeins_of_yarn / total_scarves
result = weeks
return result
|
Corey had a goal to save up 45 dollars so that he could buy a new toy. He has saved 18 dollars this month. How much more does he need to save to reach his goal? | def solve() -> int:
goal = 45
saved = 18
more = goal - saved
result = more
return result
|
A pack of stickers contains 12 sheets and costs $4. How much does each sheet cost? How many sheets can you buy with $2.50? | def solve() -> int:
cost_per_sheet = 4 / 12
sheets_with_2_50 = 2.50 / cost_per_sheet
result = int(sheets_with_2_50)
return result
|
If Amy can swim at 5 MPH with her favorite music compared to 4 MPH without it, and she wants to complete a 500 meter lap, how long will she have to listen to her music? | def solve() -> int:
speed_with_music = 5
speed_without_music = 4
distance = 500
time_without_music = distance / speed_without_music
time_with_music = distance / speed_with_music
time_difference = time_with_music - time_without_music
result = time_difference
... |
A car drove 180 miles in 3 hours. What is its speed in miles per hour? | def solve() -> int:
distance = 180
time = 3
speed = distance / time
result = speed
return result
|
During a beach walk, Jackson saw 9 seashells, 13 crabs, and 6 starfish. Sophia saw 5 crabs, 7 starfish, and 8 seashells. What percentage more creatures did Jackson see than Sophia? | def solve() -> int:
jackson_seashells = 9
jackson_crabs = 13
jackson_starfish = 6
sophia_seashells = 8
sophia_crabs = 5
sophia_starfish = 7
jackson_total = jackson_seashells + jackson_crabs + jackson_starfish
sophia_total = sophia_seashells + sophia_crabs + sophia_starfish
... |
Student: A triangle has a base of 10 cm and a height of 8 cm. What is the area of the triangle? | def solve() -> int:
base = 10
height = 8
area = 0.5 * base * height
result = area
return result
|
Mark is a driver planning for a long trip. He has 6 tanks of gas, and each tank holds 12 gallons of fuel. If he needs to travel 1200 miles during the trip, and his car uses 2 gallons of fuel per mile, will he have enough fuel for the whole trip? | def solve() -> int:
tanks_of_gas = 6
gallons_per_tank = 12
total_gallons = tanks_of_gas * gallons_per_tank
miles_to_travel = 1200
gallons_per_mile = 2
total_gallons_needed = miles_to_travel * gallons_per_mile
if total_gallons >= total_gallons_needed:
result = "Yes, Mark wil... |
Possible questions and programs: Ben's father gave him $75 to buy some groceries. Ben bought 3 bags of apples, 2 dozen eggs, and 4 boxes of cereal. Each bag of apples cost $6, each dozen eggs cost $4, and each box of cereal cost $5. How much money does Ben have left? | def solve() -> int:
amount = 75
apple_cost = 6
egg_cost = 4
cereal_cost = 5
total_cost = 3 * apple_cost + 2 * egg_cost + 4 * cereal_cost
remaining = amount - total_cost
result = remaining
return result
|
Emily splits a dinner bill with 3 friends. If the total cost of the bill is $80 and they want to leave a 20% tip, how much does each person have to pay? | def solve() -> int:
bill_total = 80
tip_percent = 20
tip_amount = bill_total * tip_percent / 100
total_cost = bill_total + tip_amount
num_people = 4
even_split = total_cost / num_people
result = even_split
return result
|
Maggie buys 4 toasters and pays the same price for the first 3. The 4th toaster is 25% more expensive than the other 3. How much did all the toasters cost? | def solve() -> int:
price1 = 30
price2 = price1
price3 = price1
price4 = price3 * 1.25
result = price1 + price2 + price3 + price4
return result
|
Student: Sarah bought 3 packs of pencils for $2 each and a pack of pens for $3. If she gave the cashier a $20 bill, how much change did she receive? | def solve() -> int:
pencil_packs = 3
pencil_cost = 2
pen_cost = 3
total_pencil_cost = pencil_packs * pencil_cost
total_cost = total_pencil_cost + pen_cost
amount_paid = 20
change = amount_paid - total_cost
result = change
return result
|
There are 150 white marbles, 200 red marbles, and 250 green marbles in a jar. What is the ratio of red marbles in the jar to white marbles in the jar? | def solve() -> int:
white_marbles = 150
red_marbles = 200
green_marbles = 250
red_to_white_ratio = red_marbles/white_marbles
result = red_to_white_ratio
return result
|
Leo baked 24 cookies and 18 brownies for a bake sale. He sold each cookie for $0.50 and each brownie for $0.75. He also bought a lemonade for $1.25 from another stall. How much money did he make from the bake sale after paying for the lemonade? | def solve() -> int:
cookie_money = 24 * 0.5
brownie_money = 18 * 0.75
revenue = cookie_money + brownie_money
lemonade_cost = 1.25
profit = revenue - lemonade_cost
result = round(profit, 2)
return result
|
A box contains 20 red balls and 30 blue balls. If one ball is randomly chosen from the box, what is the probability that it will be red? | def solve() -> int:
num_of_red_balls = 20
num_of_blue_balls = 30
total_balls = num_of_red_balls + num_of_blue_balls
probability_of_red_ball = num_of_red_balls / total_balls
result = probability_of_red_ball
return result
|
John went to the store with $100. He bought a t-shirt for $25, a pair of shoes for $50, and a hat for $15. How much money does John have left? | def solve() -> int:
total_money = 100
t_shirt_cost = 25
shoe_cost = 50
hat_cost = 15
total_expense = t_shirt_cost + shoe_cost + hat_cost
remaining_money = total_money - total_expense
result = remaining_money
return result
|
Lily walked 2 miles on Monday. She walks 0.5 more miles each day than the day before. How far did Lily walk by Wednesday that week? | def solve() -> int:
monday_distance = 2
tuesday_distance = monday_distance + 0.5
wednesday_distance = tuesday_distance + 0.5
total_distance = monday_distance + tuesday_distance + wednesday_distance
result = total_distance
return result
|
A bookshelf has 6 more books than twice the number of magazines. If the bookshelf has 12 magazines, how many books does it have? | def solve() -> int:
magazines = 12
two_magazines = 2 * magazines
books = two_magazines + 6
result = books
return result
|
David wants to paint his living room. The room is 15 feet long, 12 feet wide, and 8 feet high. A gallon of paint covers 350 square feet. How many gallons of paint does David need to buy? | def solve() -> int:
room_length = 15
room_width = 12
room_height = 8
paint_coverage = 350
total_sqft = (2*room_length*room_height) + (2*room_width*room_height)
gallons_needed = total_sqft/paint_coverage
result = gallons_needed
return result
|
If Kevin needs 1 3/4 cups of sugar to make 24 cookies, how much sugar does he need to make 36 cookies? | def solve() -> int:
cups_per_cookie = 1.75/24
total_cups = cups_per_cookie * 36
result = total_cups
return result
|
A sports store sells tennis balls in packs of 3 for $2.4 and rackets for $18 each. A tennis club needs 20 packs of balls and 8 rackets. How much does it cost to buy the supplies from the store? | def solve() -> int:
balls_cost = 2.4 * 20
rackets_cost = 18 * 8
total_cost = balls_cost + rackets_cost
result = total_cost
return result
|
There are 54 coins in a jar. 24 of them are quarters, 15 of them are dimes, and the rest are either nickels or pennies. How many nickels are there if there are six times as many pennies as nickels? | def solve() -> int:
other = 54 - 24 - 15
from sympy import Symbol, solve
x = Symbol('x')
equation = 7*x - other
roots = solve(equation)
result = roots[0]
return result
|
Every Saturday, Marco sells 5 bracelets for each of his customers at the market. He sold 45 bracelets last Saturday. This week, he increased the price of his bracelets by 20%. How many bracelets will he sell this week if he expects the same revenue as last week? | def solve() -> int:
customers = 45 / 5
bracelets = 5
price = 10
increase = 0.2
new_price = price * (1 + increase)
revenue = customers * bracelets * price
bracelets_this_week = revenue / new_price
result = bracelets_this_week
return result
|
John sold his guitar at 65% of what he originally paid. He uses the proceeds of that sale and needs only $150 to buy himself a new $500 guitar. How much cheaper is his new guitar versus what he originally paid for his old one? | def solve() -> int:
original_price = 500
sale_price = original_price * 0.65
proceeds = sale_price
needed_money = 150
cheaper_amount = original_price - proceeds - needed_money
result = cheaper_amount
return result
|
A restaurant has 40 tables and each table seats 4 people. If all the tables are full, how many people are in the restaurant? | def solve() -> int:
num_tables = 40
seats_per_table = 4
total_seats = num_tables * seats_per_table
result = total_seats
return result
|
Student: Jack and Jill bought some candies from a store. Jack bought 16 candies and Jill bought 12 candies. The store had a promotion that for every 4 candies that you buy, you get 1 extra candy for free. How many candies did Jack and Jill have in total after the promotion? | def solve() -> int:
jack_candies = 16
jill_candies = 12
jack_free_candies = jack_candies // 4
jill_free_candies = jill_candies // 4
total_candies = jack_candies + jill_candies + jack_free_candies + jill_free_candies
result = total_candies
return result
|
A business trip cost $800 for airfare and $400 for lodging. If the company policy allows $75 per day for meals, and the trip lasted for 5 days, how much money was spent on the trip? | def solve() -> int:
airfare = 800
lodging = 400
meal_allowance_per_day = 75
num_days = 5
total_meal_allowance = meal_allowance_per_day * num_days
total_spent = airfare + lodging + total_meal_allowance
result = total_spent
return result
|
A rectangle has a width of 5 cm and a length of 8 cm. What is the perimeter of the rectangle? | def solve() -> int:
width = 5
length = 8
perimeter = 2 * (width + length)
result = perimeter
return result
|
The price of a toy is $12.50, but it is on sale for 20% off. What is the sale price in dollars? | def solve() -> int:
original_price = 12.50
discount_percent = 20
discount_amount = original_price * (discount_percent/100)
sale_price = original_price - discount_amount
result = sale_price
return result
|
There are 5 pencils in a pack and there are 4 packs in a box. If you have 7 boxes, how many pencils do you have in total? | def solve() -> int:
pencils_per_pack = 5
packs_per_box = 4
boxes_owned = 7
total_pencils = pencils_per_pack * packs_per_box * boxes_owned
result = total_pencils
return result
|
Student: Susie has 8 boxes of chocolate. She wants to put 5 of them into each bag. How many bags does she need? | def solve() -> int:
boxes = 8
bag_capacity = 5
bags = (boxes + bag_capacity - 1) // bag_capacity
result = bags
return result
|
Student: Ella and Frank play a word game, earning 6 points for every vowel and 3 points for every consonant. After making 15 words each, Ella scored 12 points less than 1/2 of the total points scored. How many total points did Frank score? | def solve() -> int:
ella_points = 0
frank_points = 0
total_points = 0
ella_points = 15 * (6 + 3)
total_points = ella_points + frank_points
frank_points = total_points - ella_points + 12
result = frank_points
return result
|
During the summer break, David went backpacking and stayed in different camping sites each night. The first 6 days he stayed in a public campground, where he is charged $5 per night. The seventh and eighth days he stayed in a private campground where he shared expenses with 5 of his friends, and they are charged $80 to... | def solve() -> int:
public_campground_cost = 5 * 6
private_campground_cost = 80 / 6
total_lodging_cost = public_campground_cost + private_campground_cost
result = total_lodging_cost
return result
|
A shirt weighs half as much as a pair of jeans. If one pair of jeans weigh 1.4 kilograms and a shirt weighs 700 grams, what is the weight of a container filled with 50 shirts and 30 pairs of jeans? | def solve() -> int:
jeans_weight = 1.4
shirt_weight = 0.7
container_weight = (50 * shirt_weight) + (30 * jeans_weight)
result = container_weight
return result
|
2. Two houses are 27 m apart. Every day, Aiden walks around the houses twice. If Aiden walks at a speed of 3 m/s, how many minutes does it take for Aiden to completely walk around the houses? | def solve() -> int:
distance = 27
speed = 3
time = distance / speed
minutes = time / 60
result = minutes
return result
|
Student: A clothing store sells 80 shirts every weekday and 120 shirts on the weekend. Each shirt costs $15. How much money does the store make by the end of the week? | def solve() -> int:
shirts_weekday = 80
shirts_weekend = 120
shirt_price = 15
days_weekday = 5
days_weekend = 2
total_shirts = shirts_weekday * days_weekday + shirts_weekend * days_weekend
revenue = total_shirts * shirt_price
result = revenue
return result
|
If there were 500 marbles in a bag and it was divided equally between 4 children, how many marbles did each child get? | def solve() -> int:
marbles = 500
children = 4
marbles_per_child = marbles/children
result = marbles_per_child
return result
|
Kelly's ice cream tub has enough ice cream to make six scoops. If she scoops out three scoops, what percentage of ice cream is remaining in the tub? | def solve() -> int:
total_scoops = 6
taken_scoops = 3
remaining_scoops = total_scoops - taken_scoops
percentage_remaining = (remaining_scoops / total_scoops) * 100
result = percentage_remaining
return result
|
Jenny is making coffee for her friends and wants to know how many liters of water she needs for 10 tablespoons of ground coffee. How much water in liters does she need? | def solve() -> int:
tablespoons = 10
liters = tablespoons/2
result = liters
return result
|
Mike, Nora, and Owen planted flowers in a garden. Mike planted 20 flowers, Nora planted 25% more flowers than Mike, and Owen planted 10 flowers less than Nora. How many flowers did they plant in total? | def solve() -> int:
mike = 20
nora = mike * 1.25
owen = nora - 10
total = mike + nora + owen
result = total
return result
|
Student: A school club held a fundraiser where they sold t-shirts for $15 each. They sold 60 t-shirts and raised a total of $840. If the cost to make each t-shirt is $7, how much profit did they make? | def solve() -> int:
price_per_shirt = 15
number_of_shirts_sold = 60
total_raised = 840
cost_per_shirt = 7
total_cost = cost_per_shirt * number_of_shirts_sold
profit = total_raised - total_cost
result = profit
return result
|
A rectangular room measures 16 meters long, 10 meters wide, and 3 meters high. If you want to paint the walls, how many square meters of surface area do you need to paint altogether? | def solve() -> int:
length = 16
width = 10
height = 3
surface_area = 2*length*height + 2*width*height
result = surface_area
return result
|
A new school is being built and needs 15 square feet of space per student and needs to hold 500 students. The cost of constructing the school is $20 per square foot. If the school district's partner covers 30% of the total cost, how much will the school district need to spend? | def solve() -> int:
students = 500
space_per_student = 15
total_space = students * space_per_student
cost_per_square_foot = 20
total_cost = total_space * cost_per_square_foot
partner_coverage = 0.3
district_cost = total_cost * (1 - partner_coverage)
result = district_cost
... |
If Sally has 3 apples and she gives away 1 apple to her friend, then eats half of the remaining apples, and then gives away another apple, how many apples does she have left? | def solve() -> int:
remaining_apples = 3-1
remaining_apples = remaining_apples/2
remaining_apples = remaining_apples - 1
result = remaining_apples
return result
|
A rectangular box has a length of 15 cm, a width of 10 cm, and a height of 8 cm. What is the volume of the box? | def solve() -> int:
l = 15
w = 10
h = 8
vol = l * w * h
result = vol
return result
|
Student: Zoe is 8 years younger than Amy. Amy is half the age of Max. If Max is 30, how old is Zoe? | def solve() -> int:
max_age = 30
amy_age = max_age / 2
zoe_age = amy_age - 8
result = zoe_age
return result
|
A painter painted two walls with dimensions 10 ft. x 8 ft. and 12 ft. x 8 ft. respectively. What is the total area of both walls in square feet? | def solve() -> int:
wall1_length = 10
wall1_width = 8
wall2_length = 12
wall2_width = 8
area_w1 = wall1_length * wall1_width
area_w2 = wall2_length * wall2_width
total_area = area_w1 + area_w2
result = total_area
return result
|
Student: A rectangular garden has a width of 10 meters and an area of 200 square meters. What is the length of the garden? | def solve() -> int:
width = 10
area = 200
length = area / width
result = length
return result
|
A group of 8 friends went to a restaurant and ordered 5 pizzas. If each pizza has 12 slices, how many slices will each friend get if they split the pizzas equally? | def solve() -> int:
pizzas = 5
slices_per_pizza = 12
friends = 8
slices = pizzas * slices_per_pizza
slices_per_friend = slices/friends
result = slices_per_friend
return result
|
Kyle bought 5 new books for $12 each. He received a 15% discount for the purchase. How much money did he actually pay for the 5 books? | def solve() -> int:
original_price = 12
no_of_books = 5
discount_rate = 0.15
discount = original_price * discount_rate * no_of_books
total_price = no_of_books * original_price
actual_price = total_price - discount
result = actual_price
return result
|
A car drives at a constant speed of 60 miles per hour. If it drives for 3 hours, how far did it travel? | def solve() -> int:
speed = 60
time = 3
distance = speed * time
result = distance
return result
|
A cake recipe calls for 2/3 cups of flour, but you only have 1/4 cups. You decide to make 1/2 of the recipe, how much flour do you need? | def solve() -> int:
recipe = 2/3
available = 1/4
scale = 1/2
needed = recipe*scale
needed -= available
result = needed
return result
|
The sum of the ages of three people is 72. If the second person is 3 years older than the first person and the third person is 4 years younger than the second person, what are their ages? | def solve() -> int:
sum_of_ages = 72
first_person = (sum_of_ages - 7) / 3
second_person = first_person + 3
third_person = second_person - 4
result = first_person, second_person, third_person
return result
|
Possible questions and programs are: Liam has $40 to buy some books. He spends $12 on a novel, $7 on a comic, and $6 on a magazine. He also gets a 10% discount on his total purchase. How much money does Liam have left? | def solve() -> int:
total = 12 + 7 + 6
discount = total * 0.1
final = total - discount
left = 40 - final
result = left
return result
|
- The Local Laundry charges $1 per pound for regular wash, $1.5 per pound for delicate wash, and $2 per pound for dry cleaning. If they wash 100 pounds of regular clothes, 50 pounds of delicate clothes, and 25 pounds of dry cleaning in one day, what was their total revenue for the day? | def solve() -> int:
regular_rate = 1
delicate_rate = 1.5
dry_cleaning_rate = 2
regular_pounds = 100
delicate_pounds = 50
dry_cleaning_pounds = 25
regular_revenue = regular_rate * regular_pounds
delicate_revenue = delicate_rate * delicate_pounds
dry_cleaning_revenue = dry_cleaning_rat... |
An athlete wants to run a marathon in 3 hours. If the marathon is 42 kilometers long, how fast must the athlete run in km/hour? | def solve() -> int:
marathon_distance = 42
time_in_hours = 3
marathon_speed = marathon_distance / time_in_hours
result = marathon_speed
return result
|
Maria owns 12 umbrellas with eight ribs on each umbrella. If 5/6 of them have two broken ribs each, how many ribs are intact? | def solve() -> int:
umbrellas = 12
ribs_per_umbrella = 8
broken_ribs_per_umbrella = 2
total_ribs = umbrellas * ribs_per_umbrella
broken_ribs = (5/6) * umbrellas * broken_ribs_per_umbrella
intact_ribs = total_ribs - broken_ribs
result = intact_ribs
return result
|
A farmer has 100 acres of land. He wants to divide it into two equal parts, one for growing wheat and one for growing corn. How many acres of each crop will he have? | def solve() -> int:
total_acres = 100
wheat_acres = total_acres/2
corn_acres = wheat_acres
result = wheat_acres, corn_acres
return result
|
Isabella is swimming in a lake. She breaststroked for a mile at a slow pace before freestyling for three miles, and then she swam back to the start at a slow pace. If Isabella swam a total of eight miles, how long is the lake in miles? | def solve() -> int:
breaststroke_distance = 1
freestyle_distance = 3
total_distance = 8
slow_pace_distance = total_distance - (breaststroke_distance + freestyle_distance)
lake_distance = slow_pace_distance * 2
result = lake_distance
return result
|
Alex bought a bag of chips for $3.50 and a soda for $1.25. He noticed that he spent 2.5 times as much on chips as soda. How much did he spend on chips? | def solve() -> int:
chips_price = 3.50
soda_price = 1.25
chips_to_soda_ratio = 2.5
chips_price = chips_to_soda_ratio * soda_price
total_spent = chips_price + soda_price
result = chips_price
return result
|
Grace, Joseph, and Olivia are playing a game. Grace has 60 balloons. Joseph has 10 balloons. Olivia has 40 balloons. How many more balloons does Grace have than both Joseph and Olivia combined? Bob can type at a rate of 60 words per minute. Alice can type at a rate of 80 words per minute. In seconds, how much faster wi... | def solve() -> int:
grace_balloons = 60
joseph_balloons = 10
olivia_balloons = 40
total_balloons = joseph_balloons + olivia_balloons
difference = grace_balloons - total_balloons
result = difference
bob_rate = 60 / 60
alice_rate = 80 / 60
bob_time = 480 / bob_rat... |
John has 4 boxes of candies, with each box containing 15 candies. If he gives 3 candies from each box to his friend, how many boxes of candies does he have remaining? | def solve() -> int:
candies_in_box = 15
boxes_of_candies = 4
candies_taken_per_box = 3
total_candies_taken = boxes_of_candies * candies_taken_per_box
candies_left = boxes_of_candies * candies_in_box - total_candies_taken
result = candies_left // candies_in_box
return result
|
Rohan bought 9 cartons of orange juice at $5 each. How much money did he spend? | def solve() -> int:
cost_per_carton = 5
num_of_cartons = 9
total_cost = cost_per_carton * num_of_cartons
result = total_cost
return result
|
John sleeps 9 hours every night from Monday to Friday, and 6 hours a night on Saturday and Sunday. He also takes a 1-hour nap on Sundays. How much sleep does he get in 4 weeks? | def solve() -> int:
mon_fri_sleep = 9 * 5
sat_sun_sleep = 6 * 2
sunday_nap = 1
total_sleep = (mon_fri_sleep + sat_sun_sleep + sunday_nap) * 4
result = total_sleep
return result
|
Miss Jackson has 24 students in her art class. There are 4 times as many paint brushes as there are students in the class. If each student brought 2 colored pencils and the total number of colored pencils is 48, how many paint brushes did each student bring? | def solve() -> int:
students = 24
paint_brushes = 4 * students
colored_pencils = 48
colored_pencils_per_student = 2
total_colored_pencils = colored_pencils_per_student * students
colored_pencils_brought = colored_pencils - total_colored_pencils
paint_brushes_brought = colored_pencils_brought... |
Peter has 30 coins and Emma has 5 coins. If Emma receives 2 coins per day, in how many days will she have the same number of coins as Peter's current collection? | def solve() -> int:
peter_coins = 30
emma_coins = 5
coins_per_day = 2
days = (peter_coins - emma_coins) / coins_per_day
result = days
return result
|
Student: A rectangular field is 48m long and 32m wide. If a farmer wants to put a fence around the entire field, how many meters of fence does he need? | def solve() -> int:
length = 48
width = 32
perimeter = 2 * (length + width)
fence_length = perimeter
result = fence_length
return result
|
A pizza restaurant has a total of 25 seats in its indoor dining area. If there are currently 10 customers seated, how many more customers can be served? | def solve() -> int:
total_seats = 25
customers_seated = 10
remaining_seats = total_seats - customers_seated
result = remaining_seats
return result
|
James likes to garden. He wanted to plant some flowers in his backyard. He bought the following items: 12 packets of seeds, 6 bags of soil, and 3 pots. One packet of seeds costs $1.5, and one bag of soil costs $4. One pot costs half the price of one bag of soil. How much did James spend on the items? | def solve() -> int:
seed_price = 1.5
soil_price = 4
pot_price = soil_price / 2
seed_cost = seed_price * 12
soil_cost = soil_price * 6
pot_cost = pot_price * 3
total_cost = seed_cost + soil_cost + pot_cost
result = total_cost
return result
|
Possible questions and programs: 5 students went to a bookstore. They each bought a novel and a notebook. The novel was 25% off and the notebook was 10% off. The original price of the novel was 15 dollars and the original price of the notebook was 5 dollars. How much money did they spend in total? | def solve() -> int:
novel_price = 15 * (1 - 0.25)
notebook_price = 5 * (1 - 0.1)
total_novel = novel_price * 5
total_notebook = notebook_price * 5
total = total_novel + total_notebook
result = total
return result
|
The bakery sold 100 croissants last week. This week, they sold 4 times as many croissants. If they had 50 croissants before last week sales, how many croissants have they sold this week? | def solve() -> int:
last_week_sales = 100
this_week_sales = last_week_sales * 4
total_croissants = last_week_sales + this_week_sales
result = total_croissants
return result
|
In a fruit basket, the ratio of apples to oranges is 3:2. If there are 21 apples, how many oranges are there? | def solve() -> int:
apple_ratio = 3/2
apple_count = 21
orange_count = apple_count/apple_ratio - apple_count
result = orange_count
return result
|
Mr. Smith has 3 times as much money as Mr. Johnson. Mr. Johnson has $180. How much money does Mr. Smith have? | def solve() -> int:
money_johnson = 180
money_smith = 3 * money_johnson
result = money_smith
return result
|
arah ran 5 kilometers in 30 minutes. If she wants to run 10 kilometers, how long will it take her? Assume that she maintains the same pace throughout the run. | def solve() -> int:
distance = 10
time = 30*(distance/5)
result = time
return result
|
John has 12 apples and he gives away 3 to his friend. Then he buys 5 more. How many apples does he have now? | def solve() -> int:
apples = 12
apples = apples - 3
apples = apples + 5
result = apples
return result
|
``` Mia is 6 years younger than her sister, and her sister is 10 years older than their cousin. If their cousin is 24 years old, what is the age difference between Mia and her sister? | def solve() -> int:
cousin_age = 24
sister_age = cousin_age + 10
mia_age = sister_age - 6
age_difference = sister_age - mia_age
result = age_difference
return result
|
2. Melissa bought 12 bags of apples from the local market. Each bag weighed 2kg. What was the total weight of the apples? | def solve() -> int:
num_bags = 12
weight_per_bag = 2
total_weight = num_bags * weight_per_bag
result = total_weight
return result
|
Sarah works as a cashier and receives a commission of 5% on the total cost of sales she makes. If she makes sales worth $200 in 2 hours, how much commission does she earn? | def solve() -> int:
total_sales = 200
commission_rate = 0.05
commission_earned = total_sales * commission_rate
result = commission_earned
return result
|
A student wants to buy a laptop that costs $1200. He can pay in full or through installment. If he chooses to pay in full, he can get a 10% discount. If he chooses installment, he can pay it in 12 equal monthly payments with a 5% interest rate. How much is the total cost of the laptop if he chooses to pay in installmen... | def solve() -> int:
full_payment_discount_rate = 0.1
full_payment_total_cost = 1200 * (1-full_payment_discount_rate)
instalment_num_months = 12
instalment_interest_rate = 0.05
instalment_monthly_cost = full_payment_total_cost / instalment_num_months
instalment_total_interest = instalme... |
Gina and Harry went to the library to borrow some books. Gina borrowed 10 fiction books and 5 non-fiction books. Harry borrowed 8 fiction books and 7 non-fiction books. If each fiction book weighs 300 grams and each non-fiction book weighs 400 grams, how much weight did they carry in total? | def solve() -> int:
gina_fiction = 10
gina_nonfiction = 5
harry_fiction = 8
harry_nonfiction = 7
fiction_weight = 300
nonfiction_weight = 400
gina_weight = gina_fiction * fiction_weight + gina_nonfiction * nonfiction_weight
harry_weight = harry_fiction * fiction_weight + harry_... |
Student: There are four painters in a studio. Painter A can paint 8 canvases in 2 hours. Painter B can paint 3 more canvases than Painter A in the same time. Painter C can paint half as many canvases as Painter B in 2 hours. Painter D can paint 4 fewer canvases than Painter C in 2 hours. How many canvases can those fou... | def solve() -> int:
a = 8
b = a + 3
c = b / 2
d = c - 4
a6 = a * 3
b6 = b * 3
c6 = c * 3
d6 = d * 3
total = a6 + b6 + c6 + d6
result = total
return result
|
Tom had 24 apples in his basket. He sold half of them and then lost 1/3 of what he had left. How many apples does Tom have now? | def solve() -> int:
apples_in_basket = 24
sold_apples = apples_in_basket / 2
apples_left = apples_in_basket - sold_apples
lost_apples = apples_left / 3
apples_now = apples_left - lost_apples
result = apples_now
return result
|
In a group of 50 people, 20% are older than 50 years old and the rest are under 30 years old. How many people are under 30 years old? | def solve() -> int:
total_people = 50
older_percent = 20
older_people = (older_percent/100)*total_people
under_thirty = total_people - older_people
result = under_thirty
return result
|
Four years ago, Peter was five times as old as Jack. If Jack will be 28 in six years, how old is Peter now? | def solve() -> int:
jack_age_4_years_ago = (28 - 6) - 4
peter_age_4_years_ago = 5 * jack_age_4_years_ago
peter_age_now = peter_age_4_years_ago + 4
result = peter_age_now
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.