question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Questions 5: Mark and Jennifer ate ice cream. If Mark had half as much as Jennifer, and together they had 28 scoops of ice cream, how much did each have? | def solve() -> int:
jennifer_scoops = 28 / (1/2 + 1)
mark_scoops = 28 / (1/2 + 1) * (1/2)
result = [mark_scoops, jennifer_scoops]
return result
|
Lily buys a shirt that is on sale for 25% off. The original price of the shirt is $40. She also buys a pair of jeans that is not on sale for $50. She gets a 10% off coupon that applies to both items. How much does she save in total? | def solve() -> int:
shirt_sale_price = 40 * (1 - 0.25)
total_price_before_coupon = shirt_sale_price + 50
total_price_after_coupon = total_price_before_coupon * (1 - 0.1)
total_savings = total_price_before_coupon - total_price_after_coupon
result = total_savings
return result... |
In a grocery store, there are a total of 800 fruits. If the number of apples is twice the number of bananas, how many bananas are in the grocery store? | def solve() -> int:
total_fruits = 800
apples = total_fruits / 3
bananas = apples / 2
result = bananas
return result
|
A baseball team won 60% of their games this season. If they played 100 games this season, how many games did they win? | def solve() -> int:
total_games = 100
win_pct = 0.6
wins = total_games * win_pct
result = wins
return result
|
Bill has some apples and oranges. He sells all the apples at $0.60 each and all the oranges at $0.50 each. He earned $20 all together. If he had 12 apples and 8 oranges, how much did he originally have? | def solve() -> int:
apples = 12
oranges = 8
total_earning = 20
price_apples = 0.6
price_oranges = 0.5
total_apples_price = apples * price_apples
total_oranges_price = oranges * price_oranges
result = total_apples_price + total_oranges_price - total_earning
return result
|
Jessica is a teacher and needs to buy pencils for her class. There are 30 students in her class and each student needs 2 pencils. A box of pencils has 24 pencils and costs $2. If Jessica buys 5 boxes of pencils, how much does she spend on pencils? | def solve() -> int:
students = 30
pencils_per_student = 2
pencils_per_box = 24
cost_per_box = 2
boxes = 5
total_pencils_needed = students * pencils_per_student
total_boxes_needed = total_pencils_needed / pencils_per_box
total_cost = total_boxes_needed * cost_per_box
result ... |
John has 3 pizzas and wants to make 6 slices out of each pizza. How many total slices of pizza does he have? | def solve() -> int:
num_pizzas = 3
slices_per_pizza = 6
total_slices = num_pizzas * slices_per_pizza
result = total_slices
return result
|
Jack runs a small print shop. The paper and ink for a brochure cost him $10. He charges 1.4 times the cost of the paper and ink for each brochure. He can make 500 brochures per month. His monthly rent is $3000 and he spends $1000 on other expenses per month. What is his monthly profit? | def solve() -> int:
cost = 10
price = 1.4 * cost
num_brochures = 500
revenue = price * num_brochures
expenses = 3000 + 1000 + cost * num_brochures
profit = revenue - expenses
result = profit
return result
|
John and Sarah decided to run a marathon of 42 km. John completed the marathon in 3 hours and Sarah completed the marathon in 3.5 hours. What is the average speed of both runners in km/hour? | def solve() -> int:
distance = 42
time_John = 3
time_Sarah = 3.5
speed_John = distance / time_John
speed_Sarah = distance / time_Sarah
average_speed = (speed_John + speed_Sarah) / 2
result = average_speed
return result
|
Jenny has 25 marbles. She gives 3 marbles to her sister and then twice the number of marbles she has left to her friend. How many marbles does Jenny have left? | def solve() -> int:
jenny_marbles = 25
sister_marbles = 3
jenny_marbles_left = jenny_marbles - sister_marbles
friend_marbles = jenny_marbles_left * 2
jenny_marbles_left = jenny_marbles_left - friend_marbles
result = jenny_marbles_left
return result
|
At a party, 8 people are sharing a cake. The cake cost $24, and each person received the same amount of cake. How much money did each person pay for the cake? | def solve() -> int:
people_num = 8
cake_cost = 24
cost_each_person = cake_cost / people_num
result = cost_each_person
return result
|
Ava, Lily, and Mia are selling tickets. Ava has $15 more than twice the amount of money that Lily has, and Lily has half the amount of money that Mia has. If the three girls sold a total of $450 worth of tickets, how much money did Ava have? | def solve() -> int:
m = 0
l = 0
a = 0
m = 2 * l
l = m / 2
a = 2 * l + 15
total = a + l + m
total = 450
result = a
return result
|
If Samantha has 72 pencils and she wants to divide them equally to her friends, how many pencils each of her friends get? | def solve() -> int:
number_of_pencils = 72
number_of_friends = 3
pencils_per_friend= number_of_pencils / number_of_friends
result = pencils_per_friend
return result
|
A shopkeeper has 4 crates of chips. Each crate has 10 bags, each bag contains 9 chips. How many chips are there? | def solve() -> int:
crates = 4
bags_per_crate = 10
chips_per_bag = 9
total_bags = crates * bags_per_crate
total_chips = total_bags * chips_per_bag
result = total_chips
return result
|
Student: Dave went to the store and bought a dozen donuts. He ate 3 donuts and shared 5 donuts with his friends. How many donuts does he have left? | def solve() -> int:
donuts_bought = 12
donuts_eaten = 3
donuts_shared = 5
donuts_left = donuts_bought - donuts_eaten - donuts_shared
result = donuts_left
return result
|
Possible questions: 20% of the candies in a jar are chocolate, 40% are caramel, and the rest are vanilla. Jane has a 25% chance of getting a headache if she eats a chocolate candy, a 10% chance if she eats a caramel candy, and no chance if she eats a vanilla candy. If Jane picks a candy at random and eats it, what is t... | def solve() -> int:
chocolate = 0.2
caramel = 0.4
vanilla = 1 - chocolate - caramel
headache_chocolate = 0.25
headache_caramel = 0.1
headache_vanilla = 0
prob_headache = chocolate * headache_chocolate + caramel * headache_caramel + vanilla * headache_vanilla
result = prob_headache * 100
... |
John is organizing a potluck. Each person will bring 1 dish. There are 15 people coming. It costs $4 to make 2 dishes. How much will it cost for John to make enough dishes for the potluck? | def solve() -> int:
num_people = 15
num_dishes = num_people
num_dishes_per_batch = 2
num_batches = num_dishes // num_dishes_per_batch + (num_dishes % num_dishes_per_batch > 0)
cost_per_batch = 4
total_cost = num_batches * cost_per_batch
result = total_cost
return result
|
Sara has 12 apples. She gives her friend 3 apples and eats 2 apples. How many apples does she have now? | def solve() -> int:
apple_count = 12
apple_count = apple_count - 3
apple_count = apple_count - 2
result = apple_count
return result
|
Student: Lee can make 5 bracelets a day. His sister can make 6 bracelets while his cousin can make 7 bracelets a day. How many bracelets will they be able to make in 12 days? | def solve() -> int:
lee = 5
sister = 6
cousin = 7
total_bracelets = lee * 12 + sister * 12 + cousin * 12
result = total_bracelets
return result
|
A box of chocolates contains 24 pieces. If a person wants to have 3 pieces every day, how many days will the box last? | def solve() -> int:
chocolates_per_box = 24
chocolates_per_day = 3
days = chocolates_per_box / chocolates_per_day
result = days
return result
|
A recipe calls for 2 cups of flour and yields 24 cookies. If a baker wants to make 60 cookies, how many cups of flour do they need? | def solve() -> int:
cookies_needed = 60
flour_per_cookie = 2/24
flour_needed = cookies_needed * flour_per_cookie
result = flour_needed
return result
|
A train travels at a constant speed of 60 mph. If the train travels for a total of 4 hours, how far does it travel in total? | def solve() -> int:
speed = 60
time = 4
distance = speed * time
result = f'The train travels {distance} miles in total'
result = distance
return result
|
A school cafeteria sells pizza slices for $2 each. The cafeteria orders 30 pizzas, each with 8 slices, from a local pizzeria. The pizzeria charges $10 for each pizza plus a $20 delivery fee. If the cafeteria sells all the pizza slices, how much money does it earn? | def solve() -> int:
cost = 30 * 10 + 20
revenue = 30 * 8 * 2
result = revenue - cost
return result
|
``` Ivan bought 2 sandwiches for $8 each, 2 bags of chips for $2 each and a soda for $3. How much did he spend in all? | def solve() -> int:
num_sandwiches = 2
sandwich_price = 8
num_chips = 2
chip_price = 2
soda_price = 3
total_spent = (num_sandwiches * sandwich_price) + (num_chips * chip_price) + soda_price
result = total_spent
return result
|
A pizza restaurant serves pizzas with 8 slices each. The restaurant sold 35 pizzas and filled 280 orders in the past week. How many slices did they serve? | def solve() -> int:
slices_per_pizza = 8
total_pizzas_sold = 35
orders_taken = 280
total_slices = total_pizzas_sold * slices_per_pizza + (orders_taken % total_pizzas_sold) * 8
result = total_slices
return result
|
Ethan wants to bake 50 cakes for a bake sale. In the first week, he bakes 5 cakes. He increases the number of cakes he bakes every week by 3. After 7 weeks, how many more cakes does he need to bake to complete the bake sale goal? | def solve() -> int:
cakes_baked_first_week = 5
cakes_baked_per_week_increase = 3
total_weeks = 7
cakes_baked_total = cakes_baked_first_week + cakes_baked_per_week_increase * (total_weeks - 1)
cakes_needed = 50 - cakes_baked_total
result = cakes_needed
return result
|
At the start of the day, Coach Alex instructed his basketball team to make 25 points during practice. Later in the day, Coach Alex instructed the team to do lay-ups for half an hour. After that, Coach Alex passed the ball to his players and told them to make 25 more points. After they completed all of their tasks, how ... | def solve() -> int:
points_start = 25
points_layups = 0.5 * 10
points_end = 25
total_points = points_start + points_layups + points_end
result = total_points
return result
|
Lucas is stacking pancakes in the shape of a pyramid. Each level of the pyramid has 40% as many pancakes as the previous level. If he makes three levels and the top level has 16 pancakes, how many pancakes are in the pyramid in total? | def solve() -> int:
level_1 = 16
level_2 = level_1 / 0.4
level_3 = level_2 / 0.4
total_pancakes = level_1 + level_2 + level_3
result = total_pancakes
return result
|
A park is 28 meters wide and 35 meters long. What is the perimeter of the park in feet if 1 meter is equal to 3.28 feet? | def solve() -> int:
width_in_feet = 28 * 3.28
length_in_feet = 35 * 3.28
perimeter = (width_in_feet + length_in_feet) * 2
result = perimeter
return result
|
Two friends are swimming a distance of 5 kilometers. The first one swims at a speed of 20 kilometers per hour, while the second one swims at a speed of 18 kilometers per hour. If they maintain the same speed, how long combined will it take for them to swim 10 kilometers each? | def solve() -> int:
distance = 5
speed1 = 20
speed2 = 18
time1 = distance / speed1
time2 = distance / speed2
total_time = time1 + time2
time_each = 10 / (speed1 + speed2)
total_time_10km = time_each * 2
result = total_time_10km
return result... |
ophia spends $60 per month on a gym membership. She can burn 500 calories every hour. She has to burn 2000 calories every day to reach her goal. How many hours does she need to spend in the gym every day to reach her goal for the month? | def solve() -> int:
calories_per_month = 60*4*500
calories_per_day = 2000
hours_needed_per_day = calories_per_day/500
hours_needed_per_month = hours_needed_per_day*30
result = hours_needed_per_month
return result
|
A bookstore sells 50 books on weekdays and four times as much on weekends. How many books does it sell in a month? | def solve() -> int:
weekday_books = 50
weekend_books = 4 * weekday_books
days_in_month = 30
total_books_sold = (weekday_books * 5 + weekend_books * 2) * days_in_month
result = total_books_sold
return result
|
- Sam buys a shirt that is 20% off the original price of $25. He also has to pay a 10% sales tax on the discounted price. How much does he pay in total? | def solve() -> int:
discounted_price = 25 * (1 - 0.2)
tax = discounted_price * 0.1
total = discounted_price + tax
result = total
return result
|
Alice had $100 and she spent $65 on groceries. Now Alice has 3 times less money than before. How much money did Alice have before? | def solve() -> int:
alice_money_before = 100
alice_money_after = alice_money_before - 65
alice_money_after_ratio = 1/3
alice_initial_money = (alice_money_after / alice_money_after_ratio)
result = alice_initial_money
return result
|
Ben bought some candies from a store. He gave the cashier a $10 bill and received $1.25 as change. He then realized that he had another $5 bill in his pocket and decided to buy more candies. He spent $3.50 on the second purchase and got $1.50 as change. How many candies did he buy in total if each candy cost $0.25? | def solve() -> int:
candies = 0
candies = candies + (10 - 1.25) // 0.25
candies = candies + (5 - 3.5) // 0.25
result = candies
return result
|
Jackson's ice cream cone can hold five scoops of ice cream. If he eats three scoops that are each 2 inches in diameter and 1 inch in height, what percentage of space is left in the cone? | def solve() -> int:
cone_capacity = 5
scoop_diameter = 2
scoop_height = 1
scoop_radius = scoop_diameter / 2
scoop_volume = 3.14 * scoop_radius ** 2 * scoop_height
three_scoops_volume = 3 * scoop_volume
space_left = cone_capacity * scoop_volume - three_scoops_volume
percent... |
A bookshelf has 5 shelves. Each shelf can hold 15 books. If there are currently 23 books on the bookshelf, how many more books can it hold? | def solve() -> int:
books_capacity = 5*15
books_left = books_capacity - 23
result = books_left
return result
|
A box has 120 pencils of different colors. One third of the pencils are black, one fifth of the remaining pencils are white, and the rest are either red or blue. The number of red pencils is 10 more than the number of blue pencils. How many blue pencils are in the box? | def solve() -> int:
b = 0
w = 0
r = 0
x = 0
b = 40
w = 16
r = x + 10
x = 27
result = x
return result
|
Yesterday, 30 pizzas were ordered. Today, the number of pizzas ordered was half the amount ordered yesterday. How many pizzas have been ordered in total? | def solve() -> int:
yesterday_pizzas = 30
today_pizzas = yesterday_pizzas / 2
total_pizzas = yesterday_pizzas + today_pizzas
result = total_pizzas
return result
|
Ethan is trying to escape from a haunted house before it collapses. Ethan has a 500 foot head start, but the house will collapse if he isn't 250 feet away from it. If Ethan runs at a rate of 20 feet per second and the house collapses at a rate of 10 feet per second, how many seconds does Ethan have to get to safety? | def solve() -> int:
ethan_start = 500
house_collapse = 250
ethan_speed = 20
house_speed = 10
distance_to_safety = ethan_start - house_collapse
time_to_safety = distance_to_safety / (ethan_speed - house_speed)
result = time_to_safety
return result
|
Marnie wants to make a smoothie and has 1 banana, 1 cup of strawberries, and 1/2 cup of milk. If the recipe calls for double the amount of strawberries, how many cups of strawberries should she use? | def solve() -> int:
banana = 1
original_strawberries = 1
double_strawberries = original_strawberries * 2
milk = 1/2
total_strawberries = double_strawberries
result = total_strawberries
return result
|
John wants to renovate his house that will cost $50,000. He has saved $15,000 for the renovations. He will also get a grant that will cover 30% of the total cost. How much will John need to apply for a loan to do the renovation? | def solve() -> int:
total_cost = 50000
savings = 15000
grant_percentage = 0.3
grant_amount = total_cost * grant_percentage
loan_amount = total_cost - savings - grant_amount
result = loan_amount
return result
|
A pizza parlor makes 15 pizzas in an hour. If they are open for 6 hours, how many pizzas do they make? | def solve() -> int:
pizzas_in_hour = 15
hours_open = 6
total_pizzas = pizzas_in_hour * hours_open
result = total_pizzas
return result
|
Mia bought a dress for $60 and a pair of shoes for $45. She had a coupon that gave her 20% off on her total purchase. How much did Mia pay after using the coupon? | def solve() -> int:
dress = 60
shoes = 45
discount = 0.2
total_without_coupon = dress + shoes
amount_saved = total_without_coupon * discount
total_with_coupon = total_without_coupon - amount_saved
result = total_with_coupon
return result
|
Student: At a school fair, Olivia sells bracelets for 5 dollars each and earrings for 3 dollars each. She makes 8 bracelets and 10 earrings, and spends 25 dollars on buying beads and strings. She sells all the bracelets and 7 earrings. How much money does she have left after the fair? | def solve() -> int:
bracelet_price = 5
earring_price = 3
bracelets_made = 8
earrings_made = 10
cost_of_materials = 25
earrings_sold = 7
total_cost_bracelets = bracelet_price * bracelets_made
total_cost_earrings = earring_price * earrings_made
total_money_after_fair = total_cost... |
Student: Mr. Brown owns a grocery store. He purchases 20 apples for $10 and then sells them for $1 each. What is his total profit? | def solve() -> int:
num_apples = 20
cost_per_apple = 10
price_per_apple = 1
total_cost = num_apples * cost_per_apple
total_revenue = num_apples * price_per_apple
total_profit = total_revenue - total_cost
result = total_profit
return result
|
A runner ran for 30 minutes at a speed of 8 mph, then stopped for 10 minutes, then ran for another 20 minutes at a speed of 10 mph. What is the runner's average speed in mph? | def solve() -> int:
total_time = (30 + 10 + 20) / 60
first_distance = 30 / 60 * 8
second_distance = 20 / 60 * 10
total_distance = first_distance + second_distance
average_speed = total_distance / total_time
result = average_speed
return result
|
Student: Dave had some jelly beans which he wanted to share equally with 5 of his friends. He had 420 jelly beans and 92 percent of them were shared among his friends. How many jelly beans did each of his friends get? | def solve() -> int:
jelly_beans = 420
percentage = 0.92
num_friends = 5
total_shared = jelly_beans * percentage
jelly_beans_per_friend = total_shared / num_friends
result = jelly_beans_per_friend
return result
|
Nathan needs to study for 20 hours for the week. He studied for 5 hours on Monday and 2 hours on Tuesday. If he can study an average of 1 hour for every 10 pages, how many pages does he need to read on the remaining days of the week to meet his goal? | def solve() -> int:
hours_studied = 5 + 2
hours_remaining = 20 - hours_studied
pages_per_hour = 10
pages_to_read = hours_remaining * pages_per_hour
result = pages_to_read
return result
|
A cashier gave 5 customers change from a $50 bill. The first customer receives $12, the second customer receives $7, the third customer receives $11, the fourth customer receives $4 and the last customer receives $5. How much change did the cashier give in total? | def solve() -> int:
total_change_given = 12 + 7 + 11 + 4 + 5
result = total_change_given
return result
|
Trevor buys a package of 6 tickets to a local movie theatre. Since he bought a package, he only has to pay 70%. A ticket normally costs 11 dollars. How much did he pay for the package? | def solve() -> int:
price_normal = 11
discount_percent = 0.7
package_size = 6
price_discounted = price_normal * discount_percent * package_size
result = price_discounted
return result
|
Lily bought three bags of candies for Halloween. Each bag had 50 candies and each candy was worth $0.10. If Lily gave away 3/4 of the candies to the trick-or-treaters and kept the rest for herself, how much did Lily spend on the candies and how many candies did she have left? | def solve() -> int:
total_candies = 3 * 50
candies_given = 3/4 * total_candies
candies_left = total_candies - candies_given
money_spent = total_candies * 0.1
result = f"Lily spent ${money_spent} on the candies and she had {candies_left} candies left."
return result
|
John has 10 apples. He gives half of them to his friend, then his friend gives him 3 back. How many apples does John have now? | def solve() -> int:
john_apples = 10
friend_apples = john_apples / 2
john_apples_after = john_apples - friend_apples + 3
result = john_apples_after
return result
|
Student: A gardener charges $30 an hour for his services. He spent 6 hours weeding Vanessa's garden and another 4 hours pruning her trees. If he also charges a flat $20 transportation fee, how much will Vanessa pay in total? | def solve() -> int:
hourly_rate = 30
weeding_time = 6
pruning_time = 4
transportation_fee = 20
total_hours = weeding_time + pruning_time
total_cost = hourly_rate * total_hours + transportation_fee
result = total_cost
return result
|
Jonathan is 40 years old. When he was born, his older sister Jennifer was 25 years old, and their older brother Joseph is 13 years older than Jennifer. How old will Joseph be when Jonathan turns 50? | def solve() -> int:
jonathan_age = 40
jennifer_age = 25
joseph_age = jennifer_age + 13
age_difference = jonathan_age - jennifer_age
joseph_age_in_10_years = joseph_age + age_difference + 10
result = joseph_age_in_10_years
return result
|
If Mitchell has 10 apples, Brenna has 3 times as many apples as Mitchell, and Kate has half as many apples as Brenna, how many apples do all three of them have altogether? | def solve() -> int:
mitchell_apples = 10
brenna_apples = mitchell_apples * 3
kate_apples = brenna_apples / 2
total_apples = mitchell_apples + brenna_apples + kate_apples
result = total_apples
return result
|
Student: - A cake needs 30 minutes to bake in the oven. Monica and Rachel are baking cakes, with Monica baking 8 cakes and Rachel baking twice as many cakes as Monica. Calculate the total time in minutes they took to bake all the cakes. | def solve() -> int:
monica_cakes = 8
rachel_cakes = monica_cakes * 2
baking_time = 30
total_time = baking_time * (monica_cakes + rachel_cakes)
result = total_time
return result
|
If a sheet of paper is 12 cm by 9 cm, and each rabbit needs 3 cm by 3 cm of paper to clean its feet everyday, how many days will it take for Wendi's 100 rabbits to run out of paper? | def solve() -> int:
length = 12
width = 9
feet_length = 3
feet_width = 3
area_of_sheet = length * width
area_for_each_rabbit = feet_length * feet_width
no_of_days = area_of_sheet / (area_for_each_rabbit * 100)
result = round(no_of_days, 2)
return result
|
A teacher gave 5 quizzes per week during the first semester. However, once the teacher increased the level of difficulty, they gave 10 quizzes per week during the second semester. What was the total number of quizzes given during the second semester? | def solve() -> int:
first_semester_quizzes = 5
second_semester_quizzes = 10
total_quizzes = first_semester_quizzes + second_semester_quizzes
result = total_quizzes
return result
|
Possible new questions and programs: Alex has 12 cupcakes and he wants to share them equally with his two friends Ben and Casey. However, Ben has a food allergy and can only eat one third of a cupcake. How many cupcakes can Casey eat? | def solve() -> int:
ben_cupcakes = 1/3
remaining_cupcakes = 12 - ben_cupcakes
casey_cupcakes = remaining_cupcakes / 2
result = casey_cupcakes
return result
|
Sarah needs to buy pencils for her art class. There are 15 students in the class and she wants to buy pencils for 75% of them. Each pack of pencils costs $5. If she has $60, what percentage of her money will she spend on pencils? | def solve() -> int:
students = 15
percent = 75
pencils_needed = students * percent / 100
pack_cost = 5
total_cost = pencils_needed * pack_cost
percent_spent = total_cost / 60 * 100
result = percent_spent
return result
|
Student: A book cost $60. It's on sale for 25% off. What is the sale price? | def solve() -> int:
original_price = 60
discount_percentage = 0.25
discount_amount = original_price * discount_percentage
sale_price = original_price - discount_amount
result = sale_price
return result
|
John sells 200 TVs. He buys them at half the cost he sells them for. He sells them all and makes an additional 15% on each one. How much profit does he make? | def solve() -> int:
part_1 = 200 * (1.15 * (15*200))
part_2 = part_1 *.5
profit = part_1 - part_2
result = profit
return result
|
In a game, 24 players are divided into 6 teams with each team having an equal number of players. How many players are in each team? | def solve() -> int:
players_in_team = 24 // 6
result = players_in_team
return result
|
A baker made 36 cupcakes and sold 3/4 of them in the morning. How many cupcakes did he have left in the afternoon? | def solve() -> int:
sold = 36 * 3/4
left = 36 - sold
result = left
return result
|
Student: The perimeter of a rectangle is 72cm. If the width of the rectangle is 24cm, what is the length of the rectangle? | def solve() -> int:
width = 24
perimeter = 72
length = (perimeter - 2*width)/2
result = length
return result
|
There are 12 pencils in a box, and 8 boxes on a shelf. How many pencils are on the shelf? | def solve() -> int:
num_pencils = 12
num_boxes = 8
total_pencils = num_pencils*num_boxes
result = f'{total_pencils}'
result = total_pencils
return result
|
A runner ran 5 miles in 35 minutes. What was the runner's average speed in miles per hour? | def solve() -> int:
distance = 5
time_in_hours = 35 / 60
speed = distance / time_in_hours
result = speed
return result
|
A snack machine contains 15 bars of chocolate, 18 bags of chips, and 12 packs of gum. If you choose a snack at random, what is the probability of getting a bag of chips? | def solve() -> int:
total_snacks = 15 + 18 + 12
chips = 18
probability_of_chips = chips / total_snacks
result = probability_of_chips
return result
|
A TV originally costs $1200 with 8% discount, what is the final price of the TV? | def solve() -> int:
original_price = 1200
discount = 0.08
discount_amount = original_price * discount
final_price = original_price - discount_amount
result = final_price
return result
|
Student: There are 98 giraffes in the zoo. If the zoo has twice as many lions as giraffes, how many lions are there in the zoo? | def solve() -> int:
giraffes = 98
lions = giraffes * 2
result = lions
return result
|
The length of a rectangular pool is 80 feet, and its width is 32 feet. If 2 feet of water is added, how much additional water is needed to cover the entire pool? | def solve() -> int:
length = 80
width = 32
initial_water = 2
pool_area = length * width
total_water = pool_area - initial_water
result = total_water
return result
|
A store sells a product with a cost of $60. If the store increases its price by 25%, what is the new price? | def solve() -> int:
product_cost = 60
price_increase_percentage = 25
new_price = product_cost + (product_cost*price_increase_percentage/100)
result = new_price
return result
|
amantha has 10 fewer textbooks than double what Mark has. If Mark has 5 textbooks, how many textbooks does Samantha have? | def solve() -> int:
num_textbooks_samantha = 0
num_textbooks_mark = 5
num_textbooks_samantha = (num_textbooks_mark * 2) - 10
result = num_textbooks_samantha
return result
|
Tyler has a water bottle that can hold 750 milliliters of water. He filled his bottle before leaving home and drank 150 milliliters every hour. He was out for 5 hours and then refilled his bottle at a fountain. How much water did he drink in total? | def solve() -> int:
water = 750
counter = 0
while counter < 5:
water = water - 150
counter = counter + 1
water = 750
result = 750 - water
return result
|
ome possible new questions and programs are: Mary had 240 stickers in her album. She gave away 15% of them to her friends, then bought 36 more stickers at the store. How many stickers does she have now? | def solve() -> int:
given_away = 240 * 0.15
left = 240 - given_away
total = left + 36
result = total
return result
|
If Ben spent 4/9 of his salary of $1000 on rent and 1/3 on bills, how much money does he have left? | def solve() -> int:
salary = 1000
rent = salary * 4/9
bills = salary * 1/3
leftover = salary - rent - bills
result = leftover
return result
|
Giya purchased a dining table for $600, even though it was originally priced at $800. What percentage of the original price did she pay? | def solve() -> int:
original_price = 800
final_price = 600
discount_ratio = final_price/original_price
discount_percent = 1 - discount_ratio
percent_discount = discount_percent * 100
result = percent_discount
return result
|
- Cara has 48 pencils. She uses 6 pencils every week for her homework. If she wants to have enough pencils for 8 weeks, how many more pencils does she need to buy? | def solve() -> int:
pencils_used = 6 * 8
pencils_left = 48 - pencils_used
pencils_needed = -pencils_left
result = pencils_needed
return result
|
There are 1000 employees in a company. If the salary of each employee increases by $500 per month, what is the total increase in monthly salary of the employees? | def solve() -> int:
employee_count = 1000
salary_increase = 500
total_salary_increase = employee_count * salary_increase
result = total_salary_increase
return result
|
Possible questions and programs: Anna has 30 cookies. She gives 15% of them to her friend Bob. She then eats 25% of the remaining cookies. How many cookies does Anna have left? | def solve() -> int:
cookies_given = 0.15 * 30
cookies_after_giving = 30 - cookies_given
cookies_eaten = 0.25 * cookies_after_giving
cookies_left = cookies_after_giving - cookies_eaten
result = cookies_left
return result
|
A grocery bag contains four types of vegetables. The first type of vegetable weighs 3 pounds. The second type of vegetable weighs 1 pound less than the first. The third type of vegetable weighs twice the weight of the first. The fourth type of vegetable weighs half the weight of the third. What is the total weight of a... | def solve() -> int:
veggie1 = 3
veggie2 = veggie1 - 1
veggie3 = veggie1 * 2
veggie4 = veggie3 / 2
total_weight = (veggie1 + veggie2 + veggie3 + veggie4) * 4
result = total_weight
return result
|
A bag of apples weighs 4 pounds. Sue buys 3 bags of apples and then gives 1 bag to her neighbor. How many pounds of apples does Sue have left? | def solve() -> int:
weight_of_apples = 4
num_bags = 3
num_bags -= 1
total_weight = weight_of_apples * num_bags
result = total_weight
return result
|
Eva is a painter and completes one painting every week at the same rate. If she paints 2 paintings on the first day and doubles it on the second day, then triples the amount on the third day, how many paintings will she have completed in 6 days? | def solve() -> int:
day1 = 2
day2 = day1 * 2
day3 = day2 * 3
day4 = day3 * 2
day5 = day4 * 3
day6 = day5 * 2
total_paintings = day1 + day2 + day3 + day4 + day5 + day6
result = total_paintings
return result
|
Mary has two credit cards with balances of $500 and $800, respectively. If she pays $400 towards her credit cards, what will be the combined remaining balance on her cards? | def solve() -> int:
balance1 = 500
balance2 = 800
payment = 400
remaining_balance = balance1 + balance2 - payment
result = remaining_balance
return result
|
Student: Max and Paul are sharing 42 donuts. The ratio of Paul's donuts to Max's donuts is 5:7. How much more donuts does Max have than Paul? | def solve() -> int:
max_donuts = 0
paul_donuts = 0
max_donuts = 42 * (7/12)
paul_donuts = 42 * (5/12)
difference = max_donuts - paul_donuts
result = difference
return result
|
Emma cycles 3.5 miles every day to her office. In the evening she cycles 2.5 miles back home. If she cycles for 5 days a week, how many miles does Emma cycle in 4 weeks? | def solve() -> int:
distance_to_office = 3.5
distance_back_home = 2.5
total_distance_per_day = distance_to_office + distance_back_home
total_distance_per_week = total_distance_per_day * 5
total_distance_in_4_weeks = total_distance_per_week * 4
result = total_distance_in_... |
Student: Tom is twice as old as Jerry. Jerry is 10 years old. How old is Tom? | def solve() -> int:
jerry_age = 10
tom_age = jerry_age * 2
result = tom_age
return result
|
Alena is a swimmer trying to beat her personal best time. The pool is 800 meters in length, and Alena can swim 100 meters in 1.5 minutes. Alena has 9 minutes left to swim the final 200 meters, and she has spent 13.5 minutes swimming. How many minutes will Alena have left to beat her best time when she reaches the end o... | def solve() -> int:
pool_length = 800
swim_speed = 100/1.5
time_left = 9
time_spent = 13.5
distance_left = pool_length - 200
time_to_swim_distance_left = distance_left / swim_speed
total_time_left = time_left + time_to_swim_distance_left
time_left_to_beat_best_time = total_time_lef... |
Eleven coworkers went to a sporting event with nine supervisors. Coworker tickets cost $25 each and the total bill was $400. How much does a supervisor's ticket cost? | def solve() -> int:
num_coworkers = 11
num_supervisors = 9
coworker_ticket_cost = 25
total_bill = 400
coworker_total_cost = num_coworkers * coworker_ticket_cost
supervisor_total_cost = total_bill - coworker_total_cost
supervisor_ticket_cost = supervisor_total_cost / num_superv... |
Marcus paid $120 for a dozen roses and sold them individually at $10 each. If he sold 60 roses, how much profit did he make? | def solve() -> int:
cost_dozen = 120
num_dozen = 12
cost_one = cost_dozen / num_dozen
num_sold = 60
revenue = num_sold * 10
total_cost = num_sold * cost_one
profit = revenue - total_cost
result = profit
return result
|
A recipe for chocolate cake requires 2 cups of flour, 1 cup of sugar, 1 cup of milk and 4 eggs. If you want to make half the recipe, how much of each ingredient would you need? | def solve() -> int:
flour = 2/2
sugar = 1/2
milk = 1/2
eggs = 4/2
result = (flour, sugar, milk, eggs)
return result
|
A ball is thrown upward from the top of a 50-foot building with an initial velocity of 200feet/second. If the gravity acceleration is -32 ft/s^2, how long will the ball be in the air? | def solve() -> int:
initial_height = 50
initial_velocity = 200
acceleration = -32
time = (-initial_velocity - ((initial_velocity ** 2 - 4 * acceleration * initial_height) ** 0.5)) / (2 * acceleration)
result = time
return result
|
Tom bought candies for his nine friends. Each friend received 14 chocolate candies and 21 gummy candies. They pooled their candies together and took them from the pool whenever they needed them. After the first day, they had taken a total of 8 candies from the pool. After the second day, they had taken another 12 candi... | def solve() -> int:
num_friends = 9
choco_candies_per_friend = 14
gummy_candies_per_friend = 21
total_choco_candies = num_friends * choco_candies_per_friend
total_gummy_candies = num_friends * gummy_candies_per_friend
total_candies = total_choco_candies + total_gummy_candies
t... |
Gia is going to a restaurant with her friends. She orders 3 pizzas for $15 each and 5 drinks for $3 each. How much money does Gia spend in total? | def solve() -> int:
pizza_cost = 15*3
drink_cost = 3*5
total_cost = pizza_cost + drink_cost
result = total_cost
return result
|
Student: Kevin works as a tutor and charges $25 per hour. He tutored 15 hours in January, 12 hours in February, and 18 hours in March. He also received a $50 bonus in March for his excellent performance. How much did Kevin earn from tutoring in the first three months of the year? | def solve() -> int:
jan_hours = 15
feb_hours = 12
mar_hours = 18
bonus = 50
jan_earnings = jan_hours * 25
feb_earnings = feb_hours * 25
mar_earnings = mar_hours * 25 + bonus
total_earnings = jan_earnings + feb_earnings + mar_earnings
result = total_earnings
return result
|
John can bake 30 cupcakes with every bag of flour. If he wants to bake 450 cupcakes, how many bags of flour will he need? | def solve() -> int:
cupcakes_per_bag = 30
total_cupcakes = 450
bags_of_flour = total_cupcakes / cupcakes_per_bag
result = bags_of_flour
return result
|
A rectangle has a length of 10 cm and a width of 5 cm. What is the perimeter of the rectangle? | def solve() -> int:
length = 10
width = 5
perimeter = 2 * (length + width)
result = perimeter
return result
|
John has 50 pieces of candy. He wants to divide them equally between himself and his two friends. How many pieces of candy will each person receive? | def solve() -> int:
candy = 50
people = 3
candies_per_person = candy // people
result = candies_per_person
return result
|
Student: Sam is a dog walker and has a budget of $500 for buying treats for his clients' dogs. He buys different types of treats depending on the dog breed. He buys $1 treats for poodles, $0.5 treats for Chihuahuas, $1.5 treats for Labradors, $2 treats for Beagles, and $2.5 treats for Huskies. He walks each dog separat... | def solve() -> int:
budget = 500
treat_poodle = 1
treat_chihuahua = 0.5
treat_labrador = 1.5
treat_beagle = 2
treat_husky = 2.5
num_poodle = 4
num_chihuahua = 6
num_labrador = 3
num_beagle = 2
num_husky = 1
cost_poodle = num_poodle * treat_poodle
cost_chihuahua = num_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.