question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A bus with 45 passengers travels a distance of 360 km. If the average distance travelled by each passenger is one third of the total distance travelled by the bus, how many kilometers does each passenger travel? | def solve() -> int:
bus_distance = 360
passenger_distance = bus_distance / (3 * 45)
result = passenger_distance
return result
|
- QuestionSamantha and her friend Sarah are going fishing. Samantha's tackle box can hold three times as much as Sarah's when both are full. Sarah's tackle box is full when it has 24 lures, but currently has space for 8 more. How many times could Sarah's current number of lures fit into Samantha's tackle box? | def solve() -> int:
sarah_lures = 24
samantha_lures = sarah_lures * 3
samantha_box_capacity = samantha_lures
sarah_box_capacity = sarah_lures + 8
times_sarah_fits_in_samantha = samantha_box_capacity // sarah_box_capacity
result = times_sarah_fits_in_samantha
return result
|
Joe uses 25 bricks to build a wall. He uses 3 bricks in each layer. How many layers of bricks does Joe use? | def solve() -> int:
bricks = 25
layer = 3
layers = bricks / layer
result = layers
return result
|
Student: If Tom can mow a lawn in 2 hours and he has to mow 4 lawns in a day, how many hours will he be mowing in a day? | def solve() -> int:
time_per_lawn = 2
lawns_per_day = 4
time_per_day = time_per_lawn * lawns_per_day
result = time_per_day
return result
|
If a cyclist travels 20 miles at 10 miles per hour, how many minutes does it take to travel the distance? | def solve() -> int:
distance = 20
speed = 10
time_hours = distance / speed
time_minutes = time_hours * 60
result = round(time_minutes)
return result
|
A garden is 3 meters longer than it is wide. If the area is 56 square meters, what are the dimensions of the garden? | def solve() -> int:
area = 56
x = (area / (area / 8 + 1))**0.5
result = x, x+3
return result
|
In a museum, they normally have an average of 500 visitors per day. With 10 days left in the exhibition, they've had a total of 8,000 visitors. How many visitors on average do they need to have to reach the normal average for the exhibition? | def solve() -> int:
normal_average = 500
days_left = 10
total_visitors = 8000
current_average = total_visitors / (normal_average - days_left)
required_average = (total_visitors + (normal_average * days_left)) / normal_average
result = required_average - current_average
re... |
A small amusement park had 200 visitors on Monday. If their number of visitors increased by 20% on Tuesday and then decreased by 25% on Wednesday, calculate the total number of visitors for the three days. | def solve() -> int:
visitors_on_Monday = 200
visitors_on_Tuesday = visitors_on_Monday * 1.20
visitors_on_Wednesday = visitors_on_Tuesday * 0.75
total_visitors = visitors_on_Monday + visitors_on_Tuesday + visitors_on_Wednesday
result = total_visitors
return result
|
If it costs $2500 to install solar panels on a house, and the monthly energy savings is $100, how many months will it take to recover the installation cost? | def solve() -> int:
installation_cost = 2500
monthly_savings = 100
months_to_recover_cost = installation_cost / monthly_savings
result = months_to_recover_cost
return result
|
5. Todd has a garden and needs to water 20 plants every day. If he uses 4 liters of water for each plant, how many liters of water does Todd need for the entire week? | def solve() -> int:
number_plants = 20
amount_water = 4
number_days = 7
total_amount = number_plants * amount_water * number_days
result = total_amount
return result
|
Roberto and Tessa are running a marathon. Roberto runs the entire race in 36 minutes while Tessa runs half the race in 27 minutes before quitting. Assuming they both keep the same speed throughout the race, what is the average time in seconds for the players? | def solve() -> int:
total_dist_in_min = 36
roberto_dist_in_min = 36
tessa_dist_in_min = 27
roberto_time_in_s = roberto_dist_in_min * 60
tessa_time_in_s = tessa_dist_in_min * 60
total_time_in_s = roberto_time_in_s + tessa_time_in_s
avg_time_in_s = total_time_in_s/(total_dist_in_min/... |
Student: A school has 500 students. 20% of them are in the 9th grade, and 50% are boys. If there are 100 more boys than girls in the 9th grade, then how many girls are in the 9th grade? | def solve() -> int:
total_students = 500
ninth_grade_students = total_students * 0.2
total_boys = total_students * 0.5
total_girls = total_students - total_boys
ninth_grade_boys = (ninth_grade_students * 0.5) + 100
ninth_grade_girls = ninth_grade_students - ninth_grade_boys
result = ninth_gr... |
An astronomer discovered three celestial objects from different centuries in one universe. The astronomer identified the first object as 185 years more recent than the second object. The third object was observed 2000 years before the first object. The fourth object was six times as old as the third object. The astrono... | def solve() -> int:
first_object = 4000
third_object = first_object - 2000
fourth_object = third_object * 6
second_object = first_object - 185
result = second_object
return result
|
The population of a town is 2,400 people. The population grew by 25% in the first year and dropped by 10% in the second year. What is the population of the town after the second year? | def solve() -> int:
starting_population = 2400
population_first_year = starting_population * 1.25
population_second_year = population_first_year * 0.9
result = population_second_year
return result
|
A pizza costs $12 and can be sliced into 8 pieces. If 4 people each want 2 slices of pizza, how much will each person pay for their share? | def solve() -> int:
cost = 12
slices = 8
people = 4
each = 2
total_slices = people * each
cost_per_slice = cost / slices
cost_per_person = cost_per_slice * total_slices
result = cost_per_person
return result
|
James came back from his vacation in Japan with 1000 yen. The regular exchange rate is 1 yen for every 0.008 dollars, but the cash exchange service at the airport only gives him 2/3rds of the official conversion rate. How much money does James receive in dollars? | def solve() -> int:
yen = 1000
official_rate = 0.008
exchange_rate = 2/3 * official_rate
dollars = yen * exchange_rate
result = dollars
return result
|
A group of friends has 25 cookies. Sarah has 8 cookies. Emily has half as many cookies as Sarah and Hailey has 3 less cookies than Sarah. How many cookies does the remaining group of friends have combined? | def solve() -> int:
total_cookies = 25
sarah_cookies = 8
emily_cookies = sarah_cookies / 2
hailey_cookies = sarah_cookies - 3
remaining_cookies = total_cookies - sarah_cookies - emily_cookies - hailey_cookies
result = remaining_cookies
return result
|
A company sells t-shirts for $10 each and hats for $15 each. If the company sold 15 t-shirts and 10 hats, how much money did the company make? | def solve() -> int:
t_shirts = 15
hats = 10
t_shirts_cost = t_shirts*10
hats_cost = hats*15
total_cost = t_shirts_cost + hats_cost
result = total_cost
return result
|
Samantha is shopping for fruits and vegetables. She needs to buy 3 kilograms of strawberries, 2 kilograms of apples, and 1 kilogram of carrots. One kilogram of strawberries costs $4, and one kilogram of apples is $3. One kilogram of carrots is $1 cheaper than one kilogram of apples. What is the total cost of Samantha's... | def solve() -> int:
strawberries = 3
apples = 2
carrots = 1
strawberry_price = 4
apple_price = 3
carrot_price = apple_price - 1
strawberry_cost = strawberries * strawberry_price
apple_cost = apples * apple_price
carrot_cost = carrots * carrot_price
total_cost = strawber... |
Tom has 100 CDs. 25% of the CDs are rock music and the rest are pop music. If Tom decides to give away 4 pop CDs and 3 rock CDs, what is the percentage of the remaining pop CDs in his collection? | def solve() -> int:
total_cds = 100
rock_cds = total_cds * 0.25
pop_cds = total_cds - rock_cds
pop_cds_after_giving_away = pop_cds - 4
rock_cds_after_giving_away = rock_cds - 3
remaining_pop_cds_percentage = (pop_cds_after_giving_away / total_cds) * 100
result = remaining_pop_... |
If a bike covers a distance of 120km in 4 hours, what is its average speed? | def solve() -> int:
distance = 120
time = 4
average_speed = distance / time
result = average_speed
return result
|
Jane and John are standing at opposite ends of a 20-meter long plank. They start walking towards each other at the same time. Jane walks at the pace of 4m/s and John walks at the pace of 3m/s. How long does it take for them to meet each other? | def solve() -> int:
jane_pace = 4
john_pace = 3
distance = 20
total_pace = jane_pace + john_pace
time_to_meet = distance / total_pace
result = time_to_meet
return result
|
An investor wants to make $8000 in profit from selling stocks. If they buy stocks for $10 and sell them for $16, how many stocks do they need to sell to reach their profit goal? | def solve() -> int:
profit_goal = 8000
buy_price = 10
sell_price = 16
num_stocks_needed = profit_goal / (sell_price - buy_price)
if num_stocks_needed % 1!= 0:
num_stocks_needed = int(num_stocks_needed) + 1
result = num_stocks_needed
return result
|
A recipe calls for 2 cups of flour, 1 cup of sugar, and 1/2 cup of butter to make 12 cookies. How much of each ingredient would you need to make 24 cookies? | def solve() -> int:
cookies_needed = 24
flour = 2/12 * cookies_needed
sugar = 1/12 * cookies_needed
butter = 1/2/12 * cookies_needed
result = (flour, sugar, butter)
return result
|
Amanda needs to walk to a nearby store to buy groceries. The store is 1 kilometer away from Amanda's house. Amanda walks at a speed of 5 kilometers per hour. How long will it take Amanda to reach the store? | def solve() -> int:
distance = 1
speed = 5
time = distance / speed
result = time
return result
|
A toy factory produces 2000 toys per day. They sell each toy for $10. If they sold 4 week's worth of production, how much money will the company earn? | def solve() -> int:
toys_per_day = 2000
price_per_toy = 10
weeks = 4
toys_sold = toys_per_day * 7 * weeks
money_earned = toys_sold * price_per_toy
result = money_earned
return result
|
Max wants to buy a new guitar that costs twice as much as the combined price of his amplifier and pedals. If Max's amplifier and pedals were $400 altogether, how much will he spend in total to buy the guitar? | def solve() -> int:
amplifier_pedals_price = 400
guitar_price = 2 * amplifier_pedals_price
result = guitar_price
return result
|
A pizza shop sells 8 slices of pizza for $12. How much does one slice of pizza cost? How much does it cost to buy 18 slices of pizza? | def solve() -> int:
cost_per_slice = 12 / 8
cost_of_18_slices = cost_per_slice * 18
result = cost_of_18_slices
return result
|
The playground has 21 swings and 28 slides. If 3/4 of the swings and 1/2 of the slides are filled with children, how many children are playing in the playground? | def solve() -> int:
swings = 21
slides = 28
swings_occupied = round(swings * 3/4)
slides_occupied = round(slides * 1/2)
result = swings_occupied + slides_occupied
return result
|
Walter lives in a very small town. All of his neighbors are within one fourth mile of his house. If the circumference of the town is 8 miles, how many neighbors does Walter have? | def solve() -> int:
Circumference_of_town = 8
Distance_between_neighbors = 1/4
Number_of_neighbors = Circumference_of_town/Distance_between_neighbors
result = Number_of_neighbors
return result
|
Lucy runs a clothing store and has 100 dresses. She sells 45% of them during a sale but then decides to keep 5 of the unsold dresses for herself. How many dresses does she have now? | def solve() -> int:
dresses = 100
sold = dresses * 0.45
unsold = dresses - sold
kept = 5
remaining = unsold - kept
result = remaining
return result
|
-Make sure to follow the <start|end> of question and program formats Some possible questions and solutions are: A cake shop sells chocolate, strawberry and vanilla cakes. The ratio of chocolate to strawberry to vanilla cakes is 2:3:5. If the shop sells 60 cakes in a day, how many chocolate cakes does it sell? | def solve() -> int:
from fractions import Fraction
chocolate = Fraction(2, 10)
strawberry = Fraction(3, 10)
vanilla = Fraction(5, 10)
chocolate_cakes = chocolate * 60
strawberry_cakes = strawberry * 60
vanilla_cakes = vanilla * 60
result = chocolate_cakes
return result
|
A car travels at a speed of 60 mph. How long will it take to travel 300 miles? | def solve() -> int:
distance = 300
speed = 60
time = distance / speed
result = time
return result
|
Student: A school delays its start time for 15 minutes each day. If the school has started late every day this week, how many hours has the school started late this school week? | def solve() -> int:
days = 5
delay = 15
total_delay = delay * days
total_delay_hours = total_delay / 60
result = total_delay_hours
return result
|
A greenhouse has an area of 200m^2. If its length is 15m, what is its width (in meters)? | def solve() -> int:
area_greenhouse = 200
length_greenhouse = 15
width_greenhouse = area_greenhouse/length_greenhouse
result = width_greenhouse
return result
|
Mary's final test score was 88, giving her an average of 90 for her four tests. What was her average for the first three tests? | def solve() -> int:
test1 = 90
test2 = 90
test3 = 90
test4 = 88
total_score = test1 + test2 + test3 + test4
average_score = total_score / 4
average_first_three_tests = (average_score * 4) - test4
result = average_first_three_tests
return result
|
A gadget costs $80. It goes on sale for 20% off. How much does it cost during the sale? | def solve() -> int:
discounted_cost = 80 * 0.8
result = discounted_cost
return result
|
Lily and her friends are taking a trip to the beach. 5 of her friends bring 4 towels each, while 3 other friends bring 2 towels each. If Lily brings 3 towels, how many towels do they have in total? | def solve() -> int:
friends_with_4_towels = 5
friends_with_2_towels = 3
lily_towels = 3
total_towels = (friends_with_4_towels * 4) + (friends_with_2_towels * 2) + lily_towels
result = total_towels
return result
|
Student: Tim needs 500 nails for his hobby project. He has already bought 300 nails so far. He needs 200 nails for the frame and 100 nails for the base, how many nails will he need to buy? | def solve() -> int:
nails_needed = 500
nails_bought = 300
nails_frame = 200
nails_base = 100
nails_to_buy = nails_needed - nails_bought - nails_frame - nails_base
result = nails_to_buy
return result
|
Sarah has 46 apples in her basket. If she gives away 1/5 of her apples to her friend, how many apples does she have left? | def solve() -> int:
apples = 46
apples_given = apples / 5
apples_left = apples - apples_given
result = apples_left
return result
|
A tank is filled with 250 gallons of water. If the water evaporates at a rate of 5 gallons per day, how many days will it take for all the water to evaporate? | def solve() -> int:
initial_volume = 250
rate = 5
num_days = initial_volume // rate
result = num_days
return result
|
John orders lunch for his team of 8. He buys 5 burgers, 3 large fries and 8 sodas. Burgers cost 3.50€ each, fries are 2.50€ each, and sodas are 1€ each. What is the total cost of John's order? | def solve() -> int:
num_burgers = 5
num_fries = 3
num_sodas = 8
price_per_burger = 3.5
price_per_fry = 2.5
price_per_soda = 1
total_cost = (num_burgers * price_per_burger) + (num_fries * price_per_fry) + (num_sodas * price_per_soda)
result = total_cost
return result
|
At a restaurant, there were 50 diners. Two-thirds of the diners were eating in the restaurant, while the rest had opted for takeout. Suddenly, a power outage plunged the restaurant into darkness, causing everyone to exit to wait outside for the power to be restored. At the same time, 3 dine-in customers realized that t... | def solve() -> int:
total_diners = 50
diners_in_restaurant = total_diners * (2/3)
diners_takeout = total_diners - diners_in_restaurant
dine_in_takeout = 3
waiting_outside = diners_takeout + dine_in_takeout
result = waiting_outside
return result
|
A recipe calls for 3/4 cups of sugar and makes 18 cookies. How much sugar will you need if you want to make 36 cookies? | def solve() -> int:
sugar_per_cookie_original = 3/4
cookies_original = 18
cookies_needed = 36
sugar_needed = (sugar_per_cookie_original * cookies_needed) / cookies_original
result = sugar_needed
return result
|
Student: The Bagel store manufactures trousers with either 2 or 4 pockets. Orders for 900 trousers with 2 pockets and 600 trousers with 4 pockets have been placed. How many pockets will the Bagel store manufacture altogether? | def solve() -> int:
num_2_pockets = 900
num_4_pockets = 600
total_pockets = num_2_pockets * 2 + num_4_pockets * 4
result = total_pockets
return result
|
Student: Zoe is 18 years old, and she is the youngest person in the family. Her sister is 50 percent older than she is, and her mother is one-sixth her sister's age. How old is the mother? | def solve() -> int:
zoe_age = 18
sister_age = zoe_age * 1.5
mother_age = sister_age / 6
result = mother_age
return result
|
A plumber charges $50 per hour for labor and $20 for materials per job. He works 6 hours per day and 5 days per week. He pays 25% of his revenue on taxes and 10% on insurance and maintenance per month. Calculate his monthly profit (after taxes and expenses) in dollars. | def solve() -> int:
revenue_day = 50 * 6 + 20
revenue_week = revenue_day * 5
revenue_month = revenue_week * 4
taxes = revenue_month * 0.25
insurance_maintenance = revenue_month * 0.1
expenses = taxes + insurance_maintenance
profit = revenue_month - expenses
result = profit
return re... |
A store has a sale where all items are 15% off the original price. If Cindy buys a scarf that originally cost $30, what is the sale price of the scarf? | def solve() -> int:
original_cost = 30
discount_percentage = 15
discount_amount = original_cost * (discount_percentage/100)
sale_price = original_cost - discount_amount
result = sale_price
return result
|
Mr. Brown prepared 400 slices of bread. He gave 30 slices to Emma, 40 slices to Sarah, kept some in the breadbox and gave the rest to Kate. If he gave twice as many slices to Kate as he gave to Emma, how many slices of bread did Mr. Brown give to Kate? | def solve() -> int:
emma_slices = 30
sarah_slices = 40
total_slices = 400
kate_slices = (total_slices - emma_slices - sarah_slices) / 3
result = kate_slices
return result
|
Student: If 4 trucks carrying 18 pallets each can fit into a loading dock, how many of those pallets can be loaded onto a train with 36 train cars, each carrying 6 pallets? | def solve() -> int:
trucks = 4
pallets_per_truck = 18
cars = 36
pallets_per_car = 6
total_pallets = trucks * pallets_per_truck
result = cars * pallets_per_car
return result
|
Lauren has a garden with 5 different types of flowers, the first type needs 3 hours of sunlight per day, the second type needs twice as much as the first one, the third type needs 2 hours less than the second one, the fourth type needs half as much as the third one, and the final type needs 1 hour more than the fourth ... | def solve() -> int:
total_sunlight = 12
flower1 = 3
flower2 = flower1 * 2
flower3 = flower2 - 2
flower4 = flower3 / 2
flower5 = flower4 + 1
result = [flower1, flower2, flower3, flower4, flower5]
return result
|
If a car travels at 50 km/hr for 2 hours, how far it would have traveled? | def solve() -> int:
speed = 50
time = 2
distance = speed * time
result = distance
return result
|
If a recipe calls for 1/2 a cup of flour and you want to make 4 times the recipe, how much flour will you need in total? | def solve() -> int:
needed_cups = 1/2
multiplier = 4
total_cups = needed_cups * multiplier
result = total_cups
return result
|
Julie has a rectangular garden that is 12 meters long and 8 meters wide. She wants to plant flowers along the perimeter of the garden, leaving a gap of 1 meter at each corner. How many meters of flowers does she need to buy? | def solve() -> int:
length = 12
width = 8
perimeter = 2 * (length + width)
gap = 4 * 1
flowers = perimeter - gap
result = flowers
return result
|
A car dealership offers a 5% discount on cars that cost more than $25,000. If a car is priced at $30,000, what is the discount? | def solve() -> int:
price = 30000
if price > 25000:
discount = price * 0.05
else:
discount = 0
result = discount
return result
|
Here are some possible new questions and programs: A father bought a 12-inch pizza for his daughter's birthday. He cut the pizza into 8 equal slices. If his daughter eats one slice every hour, how many inches of pizza will be left after 5 hours? | def solve() -> int:
slice_length = 12 / 8
slices_eaten = 5
pizza_eaten = slice_length * slices_eaten
pizza_left = 12 - pizza_eaten
result = pizza_left
return result
|
A school has 300 students but found out that 50 of them were absent. The school gave 100 students certificates, 50 students medals, and the rest got ribbons. How many students got ribbons? | def solve() -> int:
students_total = 300
students_absent = 50
students_certificates = 100
students_medals = 50
students_ribbons = students_total - students_absent - students_certificates - students_medals
result = students_ribbons
return result
|
Possible questions and programs are: Johnny works for $10 an hour and 25 hours a week at his job. He has been working there for two months and wants to buy a laptop for $600. How much money does he need to earn more to buy the laptop? | def solve() -> int:
hourly_rate = 10
weekly_hours = 25
months = 2
laptop_cost = 600
income = hourly_rate * weekly_hours * 4 * months
difference = laptop_cost - income
result = difference
return result
|
A recipe calls for 2/3 cup of milk for 4 servings. If you wish to make only 1 serving of the recipe, how many cups of milk do you need? | def solve() -> int:
total_milk_needed = 2/3
total_servings = 4
milk_per_serving = total_milk_needed/total_servings
one_serving_milk = milk_per_serving
result = one_serving_milk
return result
|
A class has 25 students. If each student has 3 notebooks, how many notebooks are there in total? | def solve() -> int:
total_number_of_notebooks = 25 * 3
result = total_number_of_notebooks
return result
|
Student: A person invested $5000 into a savings account with an annual interest rate of 3%. How much money will be in the account after 7 years, assuming the interest is compounded annually? | def solve() -> int:
principal = 5000
rate = 0.03
time = 7
amount = principal * (1 + rate) ** time
result = amount
return result
|
A recipe calls for 3 cups of flour, 1 cup of sugar, and 2 eggs. If John wants to double the recipe, how many eggs does he need? | def solve() -> int:
original_eggs = 2
doubled_recipe = original_eggs * 2
result = doubled_recipe
return result
|
Student: In a basket of fruits, there are 6 apples, 8 oranges, and 12 bananas. A boy picks a fruit without looking 5 times in a row and eats them. What is the probability that he eats at least one apple? | def solve() -> int:
apples = 6
oranges = 8
bananas = 12
total_fruits = apples + oranges + bananas
prob_apple = apples / total_fruits
prob_apple_5 = prob_apple ** 5
prob_not_apple_5 = 1 - prob_apple_5
prob_at_least_one_apple = 1 - prob_not_apple_5
result = prob_at_least_one_apple
... |
There are 35 students in a class, and the ratio of boys to girls is 4:3. If the boys' average grade is 85 and the girls' average grade is 90, what is the average grade of the class? | def solve() -> int:
boys = 4
girls = 3
total_students = 35
boys_grade = 85
girls_grade = 90
total_grade = (boys * boys_grade) + (girls * girls_grade)
average_grade = total_grade / total_students
result = average_grade
return result
|
A 500 mL container of milk costs $2.45. If you want to purchase 2 liters, how much would it cost? | def solve() -> int:
volume_per_container = 500/1000
cost_per_container = 2.45
target_volume = 2
total_cost = cost_per_container * (target_volume/volume_per_container)
result = total_cost
return result
|
Possible new questions and python programs are: A movie theater charges $15 for a regular ticket and $20 for a 3D ticket. Lisa bought four regular tickets and two 3D tickets, while Sam bought three regular tickets and three 3D tickets. How much more did Sam spend than Lisa on tickets? | def solve() -> int:
regular = 15
threeD = 20
lisa_cost = 4 * regular + 2 * threeD
sam_cost = 3 * regular + 3 * threeD
difference = sam_cost - lisa_cost
result = difference
return result
|
John and his siblings share 12 ice creams equally among themselves. How many ice creams does each of them get? | def solve() -> int:
numberOfIceCreams = 12
numberOfSiblings = 5
iceCreamsPerSibling = numberOfIceCreams // numberOfSiblings
result = iceCreamsPerSibling
return result
|
Jillian is planning a road trip of 800 miles, and her car needs a refill every 150 miles that costs her $25. She expects to spend 3/4 of what she spends on gas on snacks. How much money will she spend in total? | def solve() -> int:
miles_per_trip = 800
refill_distance = 150
cost_per_refill = 25
total_refills = miles_per_trip // refill_distance
total_gas_cost = total_refills * cost_per_refill
snack_cost = (3/4) * total_gas_cost
total_cost = total_gas_cost + snack_cost
result =... |
Justin is playing video games and each time he presses a button, it clicks 20 times. He wants to make sure he plays at least 30 levels. If he has already pressed buttons 600 times, how many more times does he need to press to reach his goal? | def solve() -> int:
clicks_per_press = 20
num_levels = 30
num_clicks_made = 600
total_clicks_needed = (num_levels * clicks_per_press) - num_clicks_made
result = total_clicks_needed
return result
|
Luke and his brother Liam want to go to the amusement park that charges $15 per person. They have $10 each from their birthday gifts. They decide to sell lemonade in their street, and they make $0.5 for each cup of lemonade. How many cups of lemonade will they need to sell to go to the amusement park together? | def solve() -> int:
total_cost = 15 * 2
money_have = 10 * 2
money_need = total_cost - money_have
cups = money_need / 0.5
result = cups
return result
|
Melissa needs to fill a swimming pool with water. The pool is 25 feet long, 18 feet wide and 10 feet deep. How many gallons of water does she need to fill the pool? | def solve() -> int:
length = 25
width = 18
depth = 10
gallons_cubicft = 7.48
volume = length * width * depth
result = volume * gallons_cubicft
return result
|
Mr. Beasley has a garden that is 20 foot long and 10 foot wide. If he plants tomato plants every 5 feet, how many tomato plants will Mr. Beasley need to plant? | def solve() -> int:
length_of_garden = 20
width_of_garden = 10
length_of_garden_space = 5
area_of_garden = length_of_garden * width_of_garden
number_of_tomato_plots = area_of_garden / length_of_garden_space
result = number_of_tomato_plots
return result
|
A restaurant uses 32 cups of flour to make 48 muffins. How many cups of flour are needed to make 100 muffins? | def solve() -> int:
cups_of_flour_per_muffin = 32/48
number_of_muffins_needed = 100
total_cups_of_flour_needed = cups_of_flour_per_muffin * number_of_muffins_needed
rounded_cups_of_flour_needed = round(total_cups_of_flour_needed + 0.5)
result = rounded_cups_of_flour_needed
return result
|
A farmer grows 36 different kinds of vegetables in his garden. Six of the kinds are root vegetables. A third of the rest are leafy vegetables. Four of the remaining are legumes. A quarter of the rest are fruit vegetables. The rest are all different kinds of vegetables. How many kinds of vegetables are there that the fa... | def solve() -> int:
veggies = 36 - 6
leafy = veggies // 3
veggies = veggies - leafy
veggies = veggies - 4
fruit = veggies // 4
veggies = veggies - fruit
result = veggies
return result
|
Student: Lucy drove 240 miles to her hometown. Her car has a fuel efficiency of 30 miles per gallon. How many gallons of gas did she have to purchase for the whole trip? | def solve() -> int:
miles_driven = 240
fuel_efficiency = 30
gallons_of_gas = miles_driven / fuel_efficiency
result = gallons_of_gas
return result
|
Student: Mark has 2 bags of candy, each bag having 10 candies. He gives the two bags to 7 of his friends, all of them receiving an equal amount. How many candies does each friend get? | def solve() -> int:
bags = 2
candies_per_bag = 10
friends = 7
total_candies = bags * candies_per_bag
candies_per_friend = total_candies // friends
result = candies_per_friend
return result
|
If Tom was born in 2000 and he is currently four years older than his cousin, who was born in 2003, how old is Tom now? | def solve() -> int:
tom_birth_year = 2000
cousin_birth_year = 2003
current_year = 2021
tom_age = current_year - tom_birth_year
cousin_age = current_year - cousin_birth_year
tom_age_difference = tom_age - cousin_age
tom_current_age = tom_age_difference + cousin_age
... |
Student: An artist’s 2 paintings are each 48 inches high and 36 inches wide. The artist displays them next to each other on the wall. What is the combined width of the two paintings? | def solve() -> int:
width_1 = 36
height_1 = 48
combined_width = width_1 * 2
result = combined_width
return result
|
Mia has 7 times as many dolls as Zoe. Zoe has 4 times as many dolls as Lana. If Lana has 3 dolls, how many does Mia have? | def solve() -> int:
lana = 3
zoe = 4 * lana
mia = 7 * zoe
result = mia
return result
|
A train travels 120 miles in 2 hours. What is the speed of the train in miles per hour? | def solve() -> int:
distance = 120
time = 2
speed = distance / time
result = speed
return result
|
John has 10 apples and he gives 5 to Jill. Jill then gives 1 back to John. How many apples does John have now? | def solve() -> int:
apples_jill = 5
apples_john_given_back = 1
new_apples_john = 10 - apples_jill + apples_john_given_back
result = new_apples_john
return result
|
A restaurant has a menu where all items are priced differently. Tom ordered a chicken dish for $15, a pasta dish for $18, and a side salad for $5. The restaurant charges a 20% service fee for parties of 6 or more. If Tom is dining with 5 friends and they all decide to split the bill evenly, how much does each person ha... | def solve() -> int:
subtotal = 15 + 18 + 5
tax = 0.10 * subtotal
subtotal = subtotal + tax
numPeople = 6
if numPeople <= 6:
serviceFee = 0
else:
serviceFee = 0.20 * subtotal
subtotal = subtotal + serviceFee
amountPerPerson = subtotal / numPeople
result = amountPerPers... |
Tom bought 6 cans of soda, where each can cost 75cents. How much did he pay for the sodas? | def solve() -> int:
tom_cans = 6
tom_price = 0.75
total_price = tom_cans * tom_price
result = total_price
return result
|
Student: Keegan’s classes have different lengths. On average, Keegan spends 1.1 hours in one class per day. How many minutes does he spend in one of his classes on average? | def solve() -> int:
average_hours = 1.1
average_minutes = average_hours * 60
result = average_minutes
return result
|
Student: Ryan needs to rent a car for 5 days, the rental company charges him $35/day plus a fixed fee of $50. He also has to pay for the gas he uses, which is $2.5/gallon and he estimates he will use 15 gallons during the trip. How much does he pay in total? | def solve() -> int:
days = 5
rent_rate = 35
fixed_fee = 50
gas_price = 2.5
gas_usage = 15
rental_cost = rent_rate * days + fixed_fee
gas_cost = gas_price * gas_usage
total_cost = rental_cost + gas_cost
result = total_cost
return result
|
A toy store sells board games for $25.00 and puzzles for $10.00. This week it sold 20 board games and 40 puzzles on Monday, 30 board games and 60 puzzles on Wednesday and 40 board games and 80 puzzles on Friday. How much money did the store make overall in a week? | def solve() -> int:
num_board_mon = 20
num_puzzles_mon = 40
num_board_wed = 30
num_puzzles_wed = 60
num_board_fri = 40
num_puzzles_fri = 80
price_board = 25.00
price_puzzles = 10.00
total_sales = (num_board_mon + num_board_wed + num_board_fri) * price_board + (num_puzzles_mon + num_p... |
In a week, John cycles for a maximum of 45 minutes in the morning and 1 hour in the afternoon. If John increases his cycling time by 20%, how many total minutes does he cycle for each day? | def solve() -> int:
morning_cycling_minutes = 45
afternoon_cycling_minutes = 60
total_cycling_minutes = (morning_cycling_minutes + afternoon_cycling_minutes) * 7 * 1.2
result = total_cycling_minutes
return result
|
Jack and Lily run different toy stores. In 2015, Jack made $10,000 less in sales than Lily. However, in 2016, Jack made 40% more money than Lily did in 2015. If Lily earned $55,000 in 2015, what were Jack's total earnings for the two years? | def solve() -> int:
lily_earnings_2015 = 55000
jack_earnings_2015 = lily_earnings_2015 - 10000
jack_earnings_2016 = 1.4 * lily_earnings_2015
total_earnings = jack_earnings_2015 + jack_earnings_2016
result = total_earnings
return result
|
The price of a book is $20. It's on sale for 15% off. How much does the book cost on sale? | def solve() -> int:
original_price = 20
percent_off = 0.15
discount_amount = original_price * percent_off
sale_price = original_price - discount_amount
result = sale_price
return result
|
Student: A gym increased their memberships by 20% this year. If they had 100 members last year, how many do they have this year? | def solve() -> int:
last_year = 100
increase_rate = 0.2
this_year = last_year * (1 + increase_rate)
result = this_year
return result
|
If the radius of a circle is 6 units, what is its circumference? | def solve() -> int:
pi = 3.14159
radius = 6
circumference = 2 * pi * radius
result = circumference
return result
|
Student: Jessica owns a cafe. She can make 25 lattes in 2 hours and 30 cappuccinos every 3 hours. If she works for 11 hours, how many lattes and cappuccinos does she make? | def solve() -> int:
lattes_per_hour = 25 / 2
cappuccinos_per_hour = 30 / 3
total_hours = 11
lattes = lattes_per_hour * total_hours
cappuccinos = cappuccinos_per_hour * total_hours
result = (lattes, cappuccinos)
return result
|
Anthony is building a shed and needs to purchase wood. Each board requires 1 meter of wood. He needs to buy 70 boards. How many meters of wood does he need? | def solve() -> int:
number_of_boards = 70
length_of_each_board = 1
total_length_of_wood = number_of_boards * length_of_each_board
result = total_length_of_wood
return result
|
Max can paint 3 walls in 2 hours. How many walls can he paint in 5 hours? | def solve() -> int:
walls_painted_per_hour = 3 / 2
walls_painted_in_5_hours = walls_painted_per_hour * 5
result = walls_painted_in_5_hours
return result
|
Lola, the rabbit, has 9 carrots. She munches on 4 carrots and then finds 7 more carrots in the garden. However, a greedy crow pecks 5 of Lola's carrots. How many carrots does Lola have left? | def solve() -> int:
carrots = 9
carrots = carrots - 4
carrots = carrots + 7
carrots = carrots - 5
result = carrots
return result
|
Student: A an artist wants to build a rectangular display for her artwork in an art gallery. The measurements of the display are 25ft by 30ft and the walls will be 9ft tall. How many 2 feet wide panels does she need to build the display? | def solve() -> int:
length = 25
width = 30
height = 9
panel_width = 2
area = length * width * height
num_panels = area / panel_width
result = num_panels
return result
|
Jim, a ski instructor, is ordering ski goggles for his group. There are 15 students and Jim himself. He has also ordered 3 extra goggles just in case. Each ski goggle costs $25. How much will Jim spend on ski goggles in total? | def solve() -> int:
students = 15
jim = 1
extra_goggles = 3
cost_per_goggle = 25
total_goggles = students + jim + extra_goggles
total_cost = total_goggles * cost_per_goggle
result = total_cost
return result
|
A cooking class is preparing a five-level cake with each level requiring twice as many eggs as the level above it. The top level requires one egg. How many eggs do they need for the cake? | def solve() -> int:
egg_level_5 = 1
egg_level_4 = 2 * egg_level_5
egg_level_3 = 2 * egg_level_4
egg_level_2 = 2 * egg_level_3
egg_level_1 = 2 * egg_level_2
total_eggs = egg_level_1 + egg_level_2 + egg_level_3 + egg_level_4 + egg_level_5
result = total_eggs
return result
|
A movie theater has 30 rows of seats. Each row can seat 12 people. If there are currently 275 people in the theater, how many more seats are still available? | def solve() -> int:
rows = 30
seats_per_row = 12
total_seats = rows * seats_per_row
current_people = 275
available_seats = total_seats - current_people
result = available_seats
return result
|
A company has 500 employees, and 20% of them are women. How many women does the company have? | def solve() -> int:
total_employees = 500
women_percentage = 0.2
women_count = int(total_employees * women_percentage)
result = women_count
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.