question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
There are 25 students in a class and they need to share 10 pencils. How many pencils will each student get? | def solve() -> int:
num_students = 25
num_pencils = 10
pencils_per_student = num_pencils / num_students
result = pencils_per_student
return result
|
Mia is making a necklace with beads. She has 20 blue beads, 15 red beads, and 10 green beads. She wants to arrange the beads in a pattern that repeats every 3 beads. The pattern is blue, red, green. How many times will she repeat the pattern? How many beads will she use in total? How many beads of each color will she h... | def solve() -> int:
repeat = 20
total = 60
blue_left = 0
red_left = -5
green_left = -10
result = (repeat, total, blue_left, red_left, green_left)
return result
|
A company wants to distribute 240 candy bars equally into boxes, with no candy bars left over. If each box can hold 12 candy bars, how many boxes will there be? | def solve() -> int:
candy_bars = 240
bars_per_box = 12
boxes = candy_bars // bars_per_box
result = boxes
return result
|
Ben has 20 marbles. He has twice as many blue marbles as red marbles and 4 more green marbles than red marbles. How many red marbles does Ben have? | def solve() -> int:
result = 4
return result
|
Michael decides to buy some toys. He got 40 dollars from each of his 3 sisters. If each toy costs $5, how many arms did all the toys have? | def solve() -> int:
dollars_per_sister = 40
number_of_sisters = 3
cost_per_toy = 5
total_dollars = dollars_per_sister * number_of_sisters
number_of_toys = total_dollars // cost_per_toy
number_of_arms = number_of_toys * 2
result = number_of_arms
return result
|
A rectangular swimming pool has a length of 10 meters and a width of 5 meters. A deck that surrounds the pool has a width of 2 meters on all sides. What is the total area of the deck? | def solve() -> int:
length = 10
width = 5
deck_width = 2
deck_area = ((2 * deck_width) + length) * ((2 * deck_width) + width) - (length * width)
result = deck_area
return result
|
Student: Nolen bought 4 cups of yogurt which cost him $1.25 each and two magazines for $2.75 each. How much did he spend in total? | def solve() -> int:
yogurt_price = 1.25
magazine_price = 2.75
yogurt_cost = yogurt_price * 4
magazine_cost = magazine_price * 2
total_cost = yogurt_cost + magazine_cost
result = total_cost
return result
|
arah has 5 bags of apples, with each bag having 12 apples. She gives 7 apples to her friend. How many apples does she have left? | def solve() -> int:
num_bags = 5
apples_per_bag = 12
apples_left = num_bags*apples_per_bag - 7
result = apples_left
return result
|
Sarah has 150 pesos from her trip to Mexico. Normally 20 pesos is worth 1 dollar, but the money exchange at the bank will only give Sarah 60% of the official exchange rate. How many dollars does Sarah get? | def solve() -> int:
pesos = 150
exchange_rate = 20
official_exchange_rate = exchange_rate * 0.6
dollars = pesos / official_exchange_rate
result = dollars
return result
|
Mark has a rectangular garden with length 10 meters and width 5 meters. He wants to put a fence around the garden. How many meters of fence does Mark need to enclose the area? | def solve() -> int:
length = 10
width = 5
perimeter = 2 * (length + width)
result = perimeter
return result
|
If Karen bought 3000 books for five times the price that David paid, and David paid $1200 for his books, what was the cost per book for Karen? | def solve() -> int:
david_price = 1200
karen_price = david_price * 5
num_books = 3000
cost_per_book = karen_price / num_books
result = cost_per_book
return result
|
A car consumed 12 liters of gas to travel 120 kilometers. If the car has a 50-liter capacity gas tank, how many kilometers can the car travel with a full tank of gas? | def solve() -> int:
gas_consumed = 12
distance_travelled = 120
full_tank_capacity = 50
kilometers_per_liter = distance_travelled / gas_consumed
total_distance = kilometers_per_liter * full_tank_capacity
result = total_distance
return result
|
John drove 120 miles in 2 hours and then increased his speed to 70 mph. How much time will it take him to cover a total of 440 miles? | def solve() -> int:
speed_one = 120/2
distance_two = 440 - 120
time_at_speed_two = distance_two / 70
total_time = 2 + time_at_speed_two
result = total_time
return result
|
A bag of apples weighs 5 pounds. If each apple weighs 1/4 pound,how many apples are in the bag? | def solve() -> int:
weight_of_bag = 5
weight_of_apple = 1/4
num_apples = weight_of_bag / weight_of_apple
result = num_apples
return result
|
In Henry's class, 80% of the students brought their own laptop, and the rest brought their tablet. If there are 20 students in the class and 14 brought their own laptop, how many brought their tablet? | def solve() -> int:
students_in_class = 20
students_with_laptop = 14
students_with_tablet = students_in_class - students_with_laptop
result = students_with_tablet
return result
|
Student: The area of a rectangle measures 24 cm². If its width is 6 cm, what is the length of the rectangle? | def solve() -> int:
area = 24
width = 6
length = area / width
result = length
return result
|
A farmer has a field that is 60 meters long and 40 meters wide. She wants to fence the field with a fence that costs $5 per meter. How much will it cost her to fence the field? | def solve() -> int:
length = 60
width = 40
perimeter = 2 * length + 2 * width
fence_cost = perimeter * 5
result = fence_cost
return result
|
Mike needs to buy a new guitar that costs $500. He currently has $100 saved. He plans to sell some of his sports equipment to make the rest. If he sells 8 items of sports equipment and still has $50 left, how much money did he get for each item he sold? | def solve() -> int:
guitar_cost = 500
current_savings = 100
remaining_money_needed = guitar_cost - current_savings
items_sold = 8
remaining_money_after_sales = remaining_money_needed - 50
money_per_item = remaining_money_after_sales / items_sold
result = money_per_item
return r... |
Student: Jack leaves his house and drives a constant speed of 45 mph. After two hours, his friend leaves in the same direction at a constant speed of 55 mph. How long will it take Jack's friend to catch up with him? | def solve() -> int:
speed_jack = 45
speed_friend = 55
time_jack = 2
distance_jack = speed_jack * time_jack
time_friend = distance_jack / (speed_friend - speed_jack)
result = time_friend
return result
|
Alice planted 6 rows of carrots and 4 rows of beans in her garden. Each row of carrots has 10 plants and each row of beans has 8 plants. How many total seeds did Alice use to plant her garden? | def solve() -> int:
carrot_plants = 6 * 10
bean_plants = 4 * 8
carrot_seeds = carrot_plants * 3
bean_seeds = bean_plants * 2
total_seeds = carrot_seeds + bean_seeds
result = total_seeds
return result
|
The sum of two consecutive even numbers is 46. What are the two numbers? | def solve() -> int:
sum_even = 46
first_even = (sum_even / 2) - 1
second_even = (sum_even / 2) + 1
result = first_even, second_even
return result
|
Olivia had 18 candies in her bag. Her friend gave her half of his 20 candies. How many candies does Olivia have now? | def solve() -> int:
olivia_candies = 18
friend_candies = 20
olivia_candies += friend_candies / 2
result = olivia_candies
return result
|
Mark is planning a road trip. A tank of gas lasts for 250 miles with regular gas, 275 miles with premium gas, and 300 miles with diesel. Mark needs to travel 1063 miles. If Mark fills up with premium gas, how many times will he need to fill up his tank? | def solve() -> int:
regular_gas = 250
premium_gas = 275
diesel_gas = 300
total_distance = 1063
premium_fill_ups = total_distance // premium_gas
result = premium_fill_ups
return result
|
Emily wants to create a giant bubble bath in her bathtub to impress her toddler. The bathtub holds 50 liters of water. Each bottle of bubble bath holds 500 milliliters of liquid. (There are 1000 milliliters per liter). If each bottle of bubble bath costs $3, but Emily gets a 25% volume discount, how much does she spend... | def solve() -> int:
bathtub_capacity = 50
bottle_capacity = 500
liters_per_milliliter = 1 / 1000
discount = 0.25
price_per_bottle = 3
total_liters_needed = bathtub_capacity * liters_per_milliliter
total_bottles_needed = total_liters_needed / bottle_capacity
total_bottles_needed_with... |
Student: A customer buys 3 gallons of gas for a total cost of 80 dollars, if each gallon of gas costs 2.5 dollars more than the previous one, how much does each gallon of gas cost? | def solve() -> int:
total_cost = 80
price_difference = 2.5
first_gallon_cost = total_cost / 3 - 2 * price_difference
second_gallon_cost = first_gallon_cost + price_difference
third_gallon_cost = second_gallon_cost + price_difference
result = first_gallon_cost + second_gallon_cost + third_gallon_... |
Ben runs around the football field, which is 100 meters long. He runs around the field 30 times in the morning and 20 times in the evening. What is the total distance that Ben runs in meters in a day? | def solve() -> int:
field_length = 100
morning_runs = 30
evening_runs = 20
morning_distance = field_length * morning_runs
evening_distance = field_length * evening_runs
total_distance = morning_distance + evening_distance
result = total_distance
return result
|
A pizza that costs $20 is cut into 6 equal slices. If three people share the pizza and each person eats 2 slices, how much money does each person need to pay? | def solve() -> int:
price_per_slice = 20 / 6
price_per_person = price_per_slice * 2
result = price_per_person
return result
|
A bakery has an oven with a capacity of baking 180 cupcakes. The oven has 6 trays, each of the same size. How many more cupcakes can one tray accommodate if there are already 20 cupcakes on that tray? | def solve() -> int:
oven_capacity = 180
num_trays = 6
cupcakes_on_tray = 20
total_cupcakes_on_trays = num_trays * cupcakes_on_tray
remaining_cupcakes = oven_capacity - total_cupcakes_on_trays
result = remaining_cupcakes
return result
|
The toy store has 120 LEGO sets that they are giving away to 6 different children's hospitals. If they want to give each hospital the same number of LEGO sets, how many will each hospital receive? | def solve() -> int:
num_lego_sets = 120
num_hospitals = 6
lego_sets_per_hospital = num_lego_sets / num_hospitals
result = lego_sets_per_hospital
return result
|
If 1 egg costs $0.2, how much money, in dollars, will 1.5 dozen eggs cost? | def solve() -> int:
egg_cost = 0.2
dozen_eggs = 12
total_eggs = dozen_eggs * 1.5
total_cost = total_eggs * egg_cost
result = total_cost
return result
|
If a store sells 100 shoes per month, and they want to increase sales to 3 times that number, how many shoes do they need to sell in a month? Jane received 3 dozen cupcakes from her aunt and 5 cupcakes from each of her 8 friends. How many cupcakes did Jane receive in total? | def solve() -> int:
shoes_per_month = 100
increase_factor = 3
total_shoes_needed = shoes_per_month * increase_factor
result = total_shoes_needed
cupcakes_from_aunt = 3 * 12
cupcakes_from_friends = 5 * 8
total_cupcakes_received = cupcakes_from_aunt + cupcakes_from_friends
result = to... |
Example: Mary has a jar of coins. The jar contains 300 quarters, 200 dimes, and 100 nickels. How much money does she have in the jar in dollars? | def solve() -> int:
quarters = 300
dimes = 200
nickels = 100
quarter_value = 25
dime_value = 10
nickel_value = 5
total_cents = quarters * quarter_value + dimes * dime_value + nickels * nickel_value
total_dollars = total_cents / 100
result = total_dollars
return result
|
Student: If the temperature increases by 5 degrees Celsius every 30 minutes, how much will the temperature increase in 2 hours? | def solve() -> int:
temp = 0
temp_increase_30min = 5
temp_increase_2hrs = temp_increase_30min * 4
result = temp + temp_increase_2hrs
return result
|
How many times does the digit 4 appear between 2 and 100? | def solve() -> int:
count = 0
for num in range(2, 101):
numString = str(num)
for char in numString:
if char == '4':
count += 1
result = count
return result
|
Student: If a race car drives at a speed of 20 miles per hour for 6 hours on Monday, 15 miles per hour for 5 hours on Tuesday, and 10 miles per hour for 5 hours on Wednesday, how far will the car travel in 4 weeks? | def solve() -> int:
distance_monday = 20 * 6
distance_tuesday = 15 * 5
distance_wednesday = 10 * 5
distance_one_week = distance_monday + distance_tuesday + distance_wednesday
distance_four_weeks = distance_one_week * 4
result = distance_four_weeks
return result
|
One-fourth of the gas from a 8000-liter tank (that was initially full) was pumped into a 24000-liter capacity car that already had 12000 liters of gas. How many more liters of gas would be needed to make the car three-fourths full? | def solve() -> int:
gas_pumped = (1/4) * 8000
gas_in_car = 12000 + gas_pumped
car_capacity_75 = (3/4) * 24000
gas_needed = car_capacity_75 - gas_in_car
result = gas_needed
return result
|
arah went to the store and bought an item for $2.5, another item for $3 and a third item for four times the price of the first item. How much money did Sarah spend? | def solve() -> int:
item1_cost = 2.50
item2_cost = 3
item3_cost = 4 * item1_cost
total_spent = item1_cost + item2_cost + item3_cost
result = total_spent
return result
|
A store is offering a sale of 10% off on all items. If the original price of a shirt is $25, what is the new price of the shirt? | def solve() -> int:
original_price = 25
discount_percentage = 10
discounted_price = original_price - (original_price * discount_percentage / 100)
result = discounted_price
return result
|
Dominique drives at an average rate of 40 mph. If Dominique drives for 9 and a half hours, how many miles will she drive? | def solve() -> int:
speed = 40
hours = 9.5
distance = speed * hours
result = distance
return result
|
The Mount Everest is the highest mountain peak in the world. It is 8,848 meters high and 1,982 meters wider at its base than it is tall. What is the total distance from the base of the mountain to its peak in meters? | def solve() -> int:
height = 8848
width = 1982
hypotenuse = (height**2 + width**2)**0.5
result = height + hypotenuse
return result
|
If the area of a square is 25 square units, what is the length of its sides? | def solve() -> int:
area = 25
sideLength = area ** 0.5
result = sideLength
return result
|
Student: Jordan wants to have a pizza party for his friends and it costs $80 for the pizzas. If there are 6 people sharing the cost equally, how much does each person need to pay? There is a 10% coupon available for the pizzas. | def solve() -> int:
cost = 80
people = 6
coupon = 0.1
discounted_cost = cost * (1 - coupon)
each_pay = discounted_cost / people
result = each_pay
return result
|
Kevin bought some shares of a company that doubled in value every 4 months. If he bought the shares for $100 and sold them after 16 months, how much profit did he make and what was his average monthly return percentage? | def solve() -> int:
x = 1500
r = (2**(1/4) - 1) * 100
result = None
return result
|
A car travels 60 miles in 1 hour. If the driver takes a 30-minute break after 2 hours, how many miles will the car have traveled after 4 hours? | def solve() -> int:
miles_per_hour = 60
hours_driven = 2
miles_driven = miles_per_hour * hours_driven
break_time = 0.5
remaining_time = 4 - (hours_driven + break_time)
total_miles = (remaining_time * miles_per_hour) + miles_driven
result = total_miles
return result
|
A pile of coins contains 40 quarters, 20 dimes, and 36 nickels. How many coins are in the pile? | def solve() -> int:
q = 40
d = 20
n = 36
result = q + d + n
result = 96
return result
|
Ann has twice the number of marbles as Mike who has 20 marbles. How many marbles does Ann have? | def solve() -> int:
mike_marbles = 20
ann_marbles = 2 * mike_marbles
result = ann_marbles
return result
|
The width of a rectangle is 10 meters. The perimeter of the rectangle is 44 meters. What is the length of the rectangle? | def solve() -> int:
width = 10
perimeter = 44
length = (perimeter/2) - width
result = length
return result
|
With 8 friends, how many ways can they be divided into two groups of 4 people? | def solve() -> int:
number_of_people = 8
total_combinations = 1
for i in range(5, number_of_people+1):
total_combinations *= i
for i in range(2,4):
total_combinations //= i
result = total_combinations
return result
|
Pat laundried 8 shirts. Each shirt took 15 minutes to wash. How long did it take to wash all the shirts? | def solve() -> int:
shirts = 8
minutes_for_each_shirt = 15
total_minutes = shirts * minutes_for_each_shirt
result = 120
return result
|
Student: A bag contains 20 blue balls and 10 red balls. If one ball is randomly picked from the bag, what is the probability that it will be blue? | def solve() -> int:
blue_balls = 20
red_balls = 10
total_balls = blue_balls + red_balls
probability = blue_balls / total_balls
result = probability
return result
|
A computer and two printers cost $1100. The cost of a computer and one printer is $850. What is the cost of one printer? | def solve() -> int:
c_plus_2p = 1100
c_plus_p = 850
c_plus_2p = 2*(c_plus_p)+50
p = (c_plus_2p - c_plus_p)/2
result = p
return result
|
Ben has a rectangular garden that is 15 feet long and 9 feet wide. He wants to cover it with tiles that are 1 foot by 1 foot. How many tiles does he need? | def solve() -> int:
garden_length = 15
garden_width = 9
tile_length = 1
tile_width = 1
garden_area = garden_length * garden_width
tile_area = tile_length * tile_width
tiles_needed = garden_area // tile_area
result = tiles_needed
return result
|
A sprinter runs at a speed of 7 meters per second. How long will it take him to run 100 meters? | def solve() -> int:
distance = 100
speed = 7
time = distance / speed
result = round(time, 2)
return result
|
Samantha went out with her family for sushi. Each roll cost $7. They ordered 5 different rolls and a $12 appetizer. If they gave a 15% tip, how much did the meal cost? | def solve() -> int:
roll_cost = 7
num_rolls = 5
appetizer_cost = 12
tip_percent = 0.15
total_roll_cost = roll_cost * num_rolls
subtotal = total_roll_cost + appetizer_cost
tip_amount = subtotal * tip_percent
total_cost = subtotal + tip_amount
result = total_cost
ret... |
A suitcase weighing 60lb had a weight limit of 100lb on a flight. If you remove half of the weight, how close is the suitcase now to the weight limit? | def solve() -> int:
suitcase_weight = 60
weight_limit = 100
half_weight = suitcase_weight / 2
difference = weight_limit - half_weight
result = difference
return result
|
A garden measures 12m by 16m. How many square meters are in the garden? | def solve() -> int:
length = 12
width = 16
area = length * width
result = area
return result
|
Mike has a budget of $1000 a month and has already spent $700. If he makes $2000 a month, how much money does he have left? | def solve() -> int:
budget = 1000
spent = 700
income = 2000
remaining_money = income - budget + spent
result = remaining_money
return result
|
Lily is currently 55 years old. Her grandfather is currently 18 years older than she is. If Lily's grandmother is 1/12th of Lily's current age younger than her grandfather, how old was her mother when she gave birth to her? | def solve() -> int:
lily_age = 55
grandfather_age = lily_age + 18
grandmother_age = grandfather_age - (1/12) * lily_age
mother_age = lily_age - (grandmother_age - lily_age)
result = mother_age
return result
|
A candy company produces 6000 candies per hour. The company runs for 8 hours a day. If there are no machine malfunctions, how many candies will the company produce in total in a week? | def solve() -> int:
production_rate = 6000
hours_per_day = 8
days_per_week = 7
total_production = production_rate * hours_per_day * days_per_week
result = total_production
return result
|
Susan has 50 books. She gave away 30% of them to her friends and 25% of the remaining to her classmates. How many books are left with her classmates? | def solve() -> int:
books = 50
given_away = books * 0.30
remaining = books - given_away
distributed = remaining * 0.25
result = distributed
return result
|
Johnny is a window cleaner. He gets a call from Mr. Brown who needs his 5th floor window cleaned. Last time Johnny cleaned a third floor window which took 7 steps of his ladder. How many steps will it take him this time to clean the window on the 5th floor? | def solve() -> int:
floor_cleaned_last_time = 3
steps_last_time = 7
floor_to_clean = 5
steps_per_floor = steps_last_time / floor_cleaned_last_time
steps_to_clean = steps_per_floor * floor_to_clean
result = steps_to_clean
return result
|
Kimberly had 30 apples at the beginning of the week. After eating 10 apples and giving away 5 to her friend, she had one tenth as many apples as she started with. How many apples does Kimberly have left? | def solve() -> int:
applesStart = 30
applesEat = 10
applesGift = 5
result = applesStart - applesEat - applesGift
result = result / 10
return result
|
Marie runs a successful business selling T-shirts. To make t-shirts, she can buy pre-made blanks for $6 per shirt, and then the cost of printing is an additional $3.50 per shirt. If Marie wants to order 100 T-shirts, how much does the order cost her in total? | def solve() -> int:
num_shirts = 100
blank_cost = 6
print_cost = 3.50
total_blank_cost = num_shirts * blank_cost
total_print_cost = num_shirts * print_cost
total_cost = total_blank_cost + total_print_cost
result = total_cost
return result
|
If a race is 5 kilometers long and the winner finishes in 20 minutes, what is their average speed in kilometers per hour? | def solve() -> int:
race_distance = 5
race_time_minutes = 20
race_time_hours = race_time_minutes / 60
speed_kph = race_distance / race_time_hours
result = speed_kph
return result
|
A TV shop sells a television set for $120. How much will it make from selling 3 sets? | def solve() -> int:
numTVSets = 3
pricePerSet = 120
total = numTVSets * pricePerSet
result = total
return result
|
ome possible new questions and python programs are: On a farm, there are 12 pigs, 18 cows, and 24 chickens. Each pig has 4 legs, each cow has 4 legs, and each chicken has 2 legs. How many legs are there in total on the farm? | def solve() -> int:
legs_pigs = 12 * 4
legs_cows = 18 * 4
legs_chickens = 24 * 2
total_legs = legs_pigs + legs_cows + legs_chickens
result = total_legs
return result
|
Student: Rebecca and her four friends went to the movies. Each adult ticket cost $12.50 and each kid ticket cost $9.00. If Rebecca and her friends paid a total of $57.50 how many people bought tickets at adult price? | def solve() -> int:
adult_price = 12.50
kid_price = 9.00
total_price = 57.50
num_adult_tickets = total_price // adult_price
total_adult_price = num_adult_tickets * adult_price
total_kid_price = total_price - total_adult_price
num_kid_tickets = total_kid_price // kid_price
total_people = ... |
A movie theater charges $8.50 for an adult ticket and $6.50 for a child ticket. Jane and her family went to watch a movie and bought 2 adult tickets and 3 child tickets. If the sales tax is 7%, how much money did they pay in total (including sales tax)? | def solve() -> int:
adult_tickets = 8.5 * 2
child_tickets = 6.5 * 3
subtotal = adult_tickets + child_tickets
tax = subtotal * 0.07
total = subtotal + tax
result = total
return result
|
A charity auction raises $1000 and is distributing it among the top bidders. First place gets $300, second place gets $200, and third place gets $150. How much prize money will each of the remaining bidders receive? | def solve() -> int:
total_money = 1000
first_place = 300
second_place = 200
third_place = 150
remaining_bidders = total_money - first_place - second_place - third_place
prize_money_per_bidder = remaining_bidders / 3
result = prize_money_per_bidder
return result
|
Jane went to the store and bought a shirt for $15.00, a pair of pants for $24.99, and a jacket for $45.49. If she paid with a $100 bill, how much change should she get? | def solve() -> int:
total_cost = 15 + 24.99 + 45.49
paid_amount = 100
change = paid_amount - total_cost
result = round(change, 2)
return result
|
Andy purchases 9 pencils a month with each pencil costing $0.50. How much money does he spend on pencils in a year? | def solve() -> int:
num_pencils_per_month = 9
price_per_pencil = 0.50
total_num_pencils = num_pencils_per_month * 12
total_cost_pencils = total_num_pencils * price_per_pencil
result = total_cost_pencils
return result
|
Student: The average number of pages in 10 books is 300. If the thickest book has 500 pages and the thinnest book has 100 pages, and the total number of pages in the first 5 books is 1200, calculate the total number of pages in the remaining 5 books. | def solve() -> int:
num_books = 10
avg_pages = 300
thickest_book = 500
thinnest_book = 100
total_pages_first_5_books = 1200
total_pages_all_books = num_books * avg_pages
total_pages_last_5_books = total_pages_all_books - total_pages_first_5_books
total_pages_thickest_thinnest = thickest_... |
If a rectangle is 5 feet in length and 6 inches wide, what is its area in inches squared? | def solve() -> int:
lengthInFeet = 5
widthInInches = 6
lengthInInches = lengthInFeet * 12
totalArea = lengthInInches * widthInInches
result = totalArea
return result
|
Sarah likes to hike when it's autumn and can hike 15 miles in 2 hours during this time. However, when it's winter Sarah can only hike 5 miles in 2 hours. If it's autumn 3 times and winter 4 times in one week, how many miles did Sarah reach if she hikes for 3 hours a day? | def solve() -> int:
autumn_hike_distance = 15 * 3
winter_hike_distance = 5 * 4
total_hike_distance = autumn_hike_distance + winter_hike_distance
total_hours = 3 * 7
average_speed = total_hike_distance / total_hours
result = average_speed
return result
|
Kelly has some coins in her piggy bank. She has 18 nickels and 12 dimes. She also has 3 times as many quarters as dimes. How much money does she have in total? | def solve() -> int:
nickels = 18
dimes = 12
quarters = 3*dimes
value_nickel = 5
value_dime = 10
value_quarter = 25
value_nickels = nickels * value_nickel
value_dimes = dimes * value_dime
value_quarters = quarters * value_quarter
total_value = value_nickels + value_dimes... |
A pizza restaurant sells a large cheese pizza for $15 and a small cheese pizza for $10. If the restaurant sold 5 large cheese pizzas and 10 small cheese pizzas in one day, calculate the total amount of money obtained (without tax). | def solve() -> int:
large_pizza = 15
small_pizza = 10
total_sales = (5*large_pizza) + (10*small_pizza)
result = total_sales
return result
|
A rectangular plot of land is 30 meters long and 20 meters wide. If the area needs to be expanded by 6 square meters, what is the minimum amount of additional width required? | def solve() -> int:
length = 30
width = 20
additional_area = 6
new_area = (length * width) + additional_area
new_width = new_area / length
additional_width = new_width - width
result = additional_width
return result
|
A research facility has thousands of ants and beetles. They are counted by heads and antennas and have a total of 168. How many ants and beetles are in the research facility? | def solve() -> int:
ants = 0
beetles = 0
ants = 1
beetles = 167
while ants + beetles!= 168:
ants += 1
beetles -= 1
result = f'<<<There are {ants} ants and {beetles} beetles in the research facility.>>>'
return result
|
A rectangular garden is 15 feet by 25 feet. What is the perimeter in feet? | def solve() -> int:
length = 15
width = 25
perimeter = 2 * (length + width)
result = perimeter
return result
|
Kyra wants to divide 254 sheets of gold foil among 5 trays. If 12 sheets of gold foil are left over, how many sheets of gold foil are in each tray? | def solve() -> int:
total = 254
given = 0
trays = 5
leftover = 12
given = total - leftover
result = given / trays
return result
|
A bag of flour costs $2.50 and has 5 pounds in it. A larger bag of flour costs $4.50 and has 10 pounds in it. Which size bag of flour is the better deal in cents per pound? | def solve() -> int:
flour_small = 2.50
flour_large = 4.50
lb_small = 5
lb_large = 10
price_per_lb_small = flour_small / lb_small
price_per_lb_large = flour_large / lb_large
result = price_per_lb_small <= price_per_lb_large
return result
|
Sarah has a total of 30 gold coins. She spends 10 before finding 15 more on her treasure hunt. She then decides to give away a quarter of her coins before finding 5 more. How many more gold coins does she currently have than she initially spent? | def solve() -> int:
total_coins = 30
spent_coins = 10
found_coins_1 = 15
remaining_coins_1 = total_coins - spent_coins + found_coins_1
given_away_coins = remaining_coins_1 // 4
remaining_coins_2 = remaining_coins_1 - given_away_coins + 5
difference = remaining_coins_2 - spent_coins
resul... |
Richard and Robert raced to see who can swim the fastest. Richard swam the first half of the race in 1 minute and 15 seconds. He finished the race 10 seconds before Robert did. If Robert finished the race in 2 minutes, how long did it take Richard to swim the second half of the race? | def solve() -> int:
total_race_time = 2 * 60
robert_race_time = 2 * 60
richard_first_half_time = 1 * 60 + 15
richard_total_time = richard_first_half_time + (robert_race_time - richard_first_half_time - 10)
richard_second_half_time = richard_total_time - richard_first_half_time
... |
A rectangle has a length of 25cm and a width of 18cm. What is the perimeter of the rectangle? | def solve() -> int:
length = 25
width = 18
perimeter = 2 * (length + width)
result = perimeter
return result
|
Liam is making wooden birdhouses for his 4 friends. Each birdhouse requires 8 planks of wood, 12 nails, and 2 hinges. He has 40 planks of wood, 70 nails, and 15 hinges in his workshop. How many birdhouses can he make with the materials he has? | def solve() -> int:
planks_per_birdhouse = 8
nails_per_birdhouse = 12
hinges_per_birdhouse = 2
planks_available = 40
nails_available = 70
hinges_available = 15
planks_limit = planks_available // planks_per_birdhouse
nails_limit = nails_available // nails_per_birdhouse
hing... |
Ryan and Emily want to buy a new boat and it will take them 3 years to save for the down payment. If the down payment is $45,000 and they want to share their monthly savings equally, what is the amount each person should save per month? | def solve() -> int:
years = 3
down_payment = 45000
monthly_savings = down_payment / (years * 12)
each_person_saves = monthly_savings / 2
result = each_person_saves
return result
|
A recipe calls for 2 1/4 cups of flour to make 24 cookies. If Sally wants to make 36 cookies, how many cups of flour will she need? | def solve() -> int:
cups_of_flour = 2.25
cookies = 24
new_cookies = 36
cups_needed = (cups_of_flour * new_cookies) / cookies
result = cups_needed
return result
|
Grace owns 2 dogs and 4 cats. What is the total number of legs for all her pets? | def solve() -> int:
dogs = 2
cats = 4
dog_legs = dogs * 4
cat_legs = cats * 4
total_legs = dog_legs + cat_legs
result = total_legs
return result
|
Jack and Jill are selling lemonade at a fair. They bought 12 liters of lemonade for $24. They sell each cup of lemonade for $0.5. Each cup has 200 milliliters of lemonade. How many cups do they need to sell to break even? | def solve() -> int:
total_lemonade = 12 * 1000
cost_per_cup = 0.5
total_cost = 24
cups_needed = total_cost / cost_per_cup
result = cups_needed
return result
|
A recipe calls for 2 cups of sugar for every 3 cups of flour. If you have 9 cups of flour, how many cups of sugar do you need? | def solve() -> int:
flour = 9
sugar_per_flour = 2 / 3
sugar = flour * sugar_per_flour
result = sugar
return result
|
Jessica made $480 working for 24 hours during the winter season. But during the spring and summer, she was only able to work 9 hours. She wants to buy a new watch that costs $350 and has already spent $100 on a dress. How many more hours does she need to work to buy the watch? | def solve() -> int:
winter_hours = 24
spring_summer_hours = 9
winter_earnings = 480
watch_cost = 350
dress_cost = 100
total_hours_worked = winter_hours + spring_summer_hours
total_earnings = winter_earnings
remaining_cost = watch_cost - total_earnings - dress_cost
hours_nee... |
Jason has 8 pieces of bread. His father gave him 6 more pieces. How many pieces of bread does Jason have now? | def solve() -> int:
pieces_given = 6
total_pieces = 8 + pieces_given
result = total_pieces
return result
|
If a hotel charges $100 per night and a person stays for 5 nights, but gets a 15% discount, how much does he/she need to pay? | def solve() -> int:
original_price = 100 * 5
discounted_price = original_price * 0.85
result = discounted_price
return result
|
Student: Andy needs to fill a tank with 2000 liters of water in one hour. How many liters of water per minute does he have to fill the tank? | def solve() -> int:
tank_capacity = 2000
time_needed = 1
liters_per_minute = tank_capacity / (time_needed * 60)
result = liters_per_minute
return result
|
A restaurant offers a 15% discount on all meals. If a meal is normally $50, how much will it cost after the discount? | def solve() -> int:
discounted_price = 50 * (1 - 0.15)
result = discounted_price
return result
|
John ran 4 miles less than Kate. Together they ran 12 miles. How many miles did John run? Use K to represent how many miles Kate ran. | def solve() -> int:
K = 12 / 2
J = K - 4
result = J
return result
|
A recipe calls for 2 cups of flour and 1 cup of sugar, to make 6 muffins. If you want to make 24 muffins instead, how much flour and sugar will you need? | def solve() -> int:
flour_per_batch = 2
sugar_per_batch = 1
muffins_per_batch = 6
desired_muffins = 24
flour_needed = (flour_per_batch / muffins_per_batch) * desired_muffins
sugar_needed = (sugar_per_batch / muffins_per_batch) * desired_muffins
result = (flour_needed, sugar_needed)
retu... |
If the product and sum of Rafael's age and Alex's age adds up to 124, and Rafael is 6, what is Alex's age? | def solve() -> int:
rafael_age = 6
product = 124 - rafael_age * rafael_age
alex_age = product / rafael_age
result = alex_age
return result
|
A store has 500 boxes of cereal and each box contains 12 packets of cereal. If each customer buys 3 packets, how many customers can be served with these boxes? | def solve() -> int:
num_boxes = 500
packets_per_box = 12
total_packets = num_boxes * packets_per_box
packets_per_customer = 3
num_customers = total_packets // packets_per_customer
result = num_customers
return result
|
In a basketball game, James scored four times as much as the lowest-scoring player. If the highest score was 88 points and the range of scores was 66, what was James's score? | def solve() -> int:
lowest_score = 88 - 66
james_score = lowest_score * 4
result = james_score
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.