question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
A museum had 1000 visitors. One-seventh of the adults and one-fifth of the children left before the museum closed. If there were 300 children at the museum, how many people remained until the end of the exhibit? | def solve() -> int:
adults = 1000 - 300
adults_left = adults / 7
children_left = 300 / 5
people_remaining = adults - adults_left + 300 - children_left
result = people_remaining
return result
|
A garden has a length of 15 meters and a width of 10 meters. If one bag of fertilizer covers 5 square meters of garden, how many bags of fertilizer does the owner need to fertilize his entire garden? | def solve() -> int:
length = 15
width = 10
area = length * width
coverage_per_bag = 5
bags_needed = area // coverage_per_bag
result = bags_needed
return result
|
Student: A jar contains 20 marbles. If 4 marbles are selected at random without replacement, what is the probability that at least one marble is red if the jar contains 8 red, 8 blue, and 4 green marbles? | def solve() -> int:
num_marbles = 20
num_red = 8
num_blue = 8
num_green = 4
num_selected = 4
prob_no_red = (num_blue/num_marbles) * ((num_blue-1)/(num_marbles-1)) * ((num_blue-2)/(num_marbles-2)) * ((num_blue-3)/(num_marbles-3))
prob_at_least_one_red = 1 - prob_no_red
result = prob_at_le... |
Student: A restaurant has 20 tables, and each table has 4 seats. How many total seats are there in the restaurant? | def solve() -> int:
tables = 20
seats_per_table = 4
total_seats = tables * seats_per_table
result = total_seats
return result
|
Lisa is baking cupcakes for a party. She makes 24 cupcakes on Monday, 18 more on Tuesday, and then gives away half of them on Wednesday. How many cupcakes does she have left on Wednesday? | def solve() -> int:
cupcakes_monday = 24
cupcakes_tuesday = cupcakes_monday + 18
cupcakes_wednesday = cupcakes_tuesday - cupcakes_tuesday // 2
result = cupcakes_wednesday
return result
|
A recipe requires 3 cups of sugar for 24 cookies. How much sugar is needed for 48 cookies? | def solve() -> int:
sugar_per_cookie = 3/24
num_cookies = 48
total_sugar = sugar_per_cookie * num_cookies
result = total_sugar
return result
|
A box of chocolates with 36 pieces costs $12. If you want to split the box evenly between 4 people, how much will each person's share cost? | def solve() -> int:
pieces_per_person = 36 // 4
cost_per_person = 12 / 4
result = cost_per_person
return result
|
Susan bought a necklace and a pair of earrings for a total of $80. If the necklace costs $45 more than the earrings, how much did the necklace cost? | def solve() -> int:
necklace_cost = (80 + 45) / 2
earrings_cost = (80 - 45) / 2
result = necklace_cost
return result
|
Student: There are 24 students in a class. If 3/8 of the class are girls, how many girls are in the class? | def solve() -> int:
total_students = 24
fraction_girls = 3/8
num_girls = total_students * fraction_girls
result = round(num_girls)
return result
|
A company sells pencils and erasers. The price of a pencil is $0.50 and the price of an eraser is $0.75. Mark spent a total of $5.25 and bought 8 items in total. How many pencils and erasers did Mark buy? | def solve() -> int:
pencil_price = 0.50
eraser_price = 0.75
total_items = 8
total_price = 5.25
for i in range(total_items+1):
pencils = i
erasers = total_items - pencils
if (pencils * pencil_price + erasers * eraser_price) == total_price:
break
result = (penci... |
A football team scored 28 points in 4 games. If they want to maintain their average score, how many points must they score in their 5th game? | def solve() -> int:
avg_score = 28 / 4
required_score = (avg_score * 5) - 28
result = required_score
return result
|
5. Mark started a movie at 7:15 PM and it lasted for 2 hours and 25 minutes. What time did Mark finish the movie? | def solve() -> int:
start_hr = 19
start_min = 15
mov_hr = 2
mov_min = 25
final_min = start_min + mov_min
final_hr = start_hr + mov_hr
if final_min > 59:
final_hr +=1
end_hr = final_hr % 24
end_mnt = final_min % 60
result = (end_hr, end_mnt)
return result
|
Jack and Jill love to go rafting. Each time they go, Jack paddles 4 km less than 8 km, and Jill paddles 2 km less than Jack. If they go rafting 3 times, how many km do they paddle in total? | def solve() -> int:
jack_paddle = 8
jill_paddle = jack_paddle - 4
total_paddle = (jack_paddle + jill_paddle) * 3
result = total_paddle
return result
|
Mary has 25 red marbles and John has 30 blue marbles. If they exchange marbles so that Mary has twice as many blue marbles as red marbles, how many blue marbles will each have? | def solve() -> int:
mary_red = 25
john_blue = 30
mary_blue = 2 * mary_red
total_blue = mary_blue + john_blue
mary_blue_each = total_blue / 2
john_blue_each = total_blue / 2
result = mary_blue_each, john_blue_each
return result
|
The distance between two cities is 400km. If a car can travel 80km per hour, how long will it take for the car to travel between the two cities? | def solve() -> int:
distance = 400
speed = 80
time = distance / speed
result = time
return result
|
Student: A student spent $48 on notebooks, and each notebook cost $2. How many notebooks did the student buy? | def solve() -> int:
num_notebooks = 48 / 2
result = num_notebooks
return result
|
Laura wants to make 3 sandwiches for her lunch. She needs 2 slices of cheese per sandwich. If she has a pack of cheese with 12 slices and each slice has 3 servings, how many servings of cheese does she have left after making her sandwiches? | def solve() -> int:
pack_of_cheese = 12
slices_per_sandwich = 2
servings_per_slice = 3
total_slices_needed = slices_per_sandwich * 3
total_servings_needed = total_slices_needed * servings_per_slice
servings_left = pack_of_cheese * servings_per_slice - total_servings_needed
res... |
Student: 3. John wants to buy 10 books for his siblings. Each book costs $20. To get a discount of 10%, he spent $200 in total. How much must John pay for the 10 books? | def solve() -> int:
num_books = 10
price_per_book = 20
discount_percentage = 10
total_price = 200
discounted_price = total_price * (1 - discount_percentage/100)
result = num_books * price_per_book - discounted_price
return result
|
ven is trying to swarm up a tree to get away from wolves. The tree is 47.5 feet tall and Steven can climb 10 feet every 6 seconds. If it takes him 25 seconds to reach the branch, how far does he climb? | def solve() -> int:
time = 25
climbing_rate = 10/6
distance = time * climbing_rate
result = distance
return result
|
Anna has 4 tomato plants. One of the plants produces 50 tomatoes while the other plants produce 25 tomatoes each. How many tomatoes does Anna harvest in total? | def solve() -> int:
num_plants = 4
tomatoes_first_plant = 50
tomatoes_other_plants = 25
total_tomatoes_other_plants = (num_plants - 1) * tomatoes_other_plants
total_tomatoes = tomatoes_first_plant + total_tomatoes_other_plants
result = total_tomatoes
return resu... |
A movie theater has 8 rows with 34 seats in each row. If 218 people have already entered the theater, how many more people can still fit in the theater? | def solve() -> int:
total_seats = 8 * 34
occupied_seats = 218
available_seats = total_seats - occupied_seats
result = available_seats
return result
|
Lucas and his 3 friends want to go to a basketball game. Tickets cost $40 each and soda costs $5 per person. What is the total cost for the four of them including soda? | def solve() -> int:
num_friends = 4
ticket_cost = 40
soda_cost = 5
total_ticket_cost = num_friends * ticket_cost
total_soda_cost = num_friends * soda_cost
total_cost = total_ticket_cost + total_soda_cost
result = total_cost
return result
|
Jake has 6 more marbles than Pete. If Jake has 12 marbles, how many marbles does Pete have? | def solve() -> int:
jake = 12
pete = jake - 6
result = pete
return result
|
Possible new questions and programs are: Lena had 36 stickers. She gave 12 stickers to her friend Maya and 8 stickers to her brother Leo. Then she bought 15 more stickers from the store. How many stickers does Lena have now? | def solve() -> int:
stickers = 36
gave_to_maya = 12
gave_to_leo = 8
bought = 15
stickers -= gave_to_maya
stickers -= gave_to_leo
stickers += bought
result = stickers
return result
|
Student: Alex has 36 stickers. If he gives 4 stickers to each of his 5 friends, how many stickers will he have left? | def solve() -> int:
stickers = 36
given = 4
friends = 5
total_given = given * friends
stickers_left = stickers - total_given
result = stickers_left
return result
|
What is the 10% of 65% of 80? | def solve() -> int:
percentage_1 = 0.65
percentage_2 = 0.1
number = 80
result = percentage_1 * number * percentage_2
return result
|
A rectangle has a length of 10 meters and a width of 5 meters. What is the perimeter of the rectangle? | def solve() -> int:
length = 10
width = 5
perimeter = 2*length + 2*width
result = perimeter
return result
|
Possible questions and programs: Carlos is a painter who likes to mix his own colors. He has three primary colors: red, yellow, and blue. To make orange, he needs to mix equal amounts of red and yellow. To make purple, he needs to mix equal amounts of red and blue. To make green, he needs to mix equal amounts of yellow... | def solve() -> int:
red = 300
yellow = 200
blue = 100
orange = min(red, yellow)
purple = min(red, blue)
green = min(yellow, blue)
red = red - (orange + purple)
yellow = yellow - (orange + green)
blue = blue - (purple + green)
result = {"orange": orange, "purple": p... |
A grocery store has a sale where if a customer buys 2 of the same item, the second item is 25% off. If a customer bought 2 boxes of cereal for $4 each, what was the total cost? | def solve() -> int:
item_price = 4
discount = 0.25
num_items = 2
total_cost = num_items * item_price - (discount * item_price)
result = total_cost
return result
|
A cooperative society has 50,000 square meters of land which is divided amongst its 100 members. If each member can make a $1000 profit from every 1000 square meters of land used for commercial farming every 6 months, how much can each member make if they cultivate their share of the land for one year? | def solve() -> int:
land_area = 50000
num_members = 100
profit_per_sqm = 1000
time_period = 6
area_per_member = land_area / num_members
profit_per_member = (area_per_member / 1000) * profit_per_sqm
profit_per_year = profit_per_member * (12 / time_period)
result = prof... |
Ben and his friend were running a race. Ben completed 8 laps, while his friend completed 12 laps. Ben wanted to run at least 7 more laps than his friend. If his friend runs another 4 laps, how many more laps does Ben need to run to reach his goal? | def solve() -> int:
ben_laps = 8
friend_laps = 12
ben_goal = friend_laps + 7
friend_laps += 4
laps_needed = ben_goal - friend_laps
result = laps_needed
return result
|
Mark is a coach for a basketball team with 7 players. Each player needs 2 basketballs for practice. In addition, he needs to buy 24 cones for drills. Unfortunately, he drops half of the basketballs on the way back. How many basketballs does he need to buy in addition to the cones? | def solve() -> int:
players = 7
basketballs_per_player = 2
total_basketballs = players * basketballs_per_player
cones = 24
dropped_basketballs = total_basketballs / 2
remaining_basketballs = total_basketballs - dropped_basketballs
additional_basketballs = remaining_basketballs - (players * b... |
A train traveling at 50 mph arrives at its destination in 4 hours. If it had traveled at 40 mph, how long would the trip have taken? | def solve() -> int:
speed1 = 50
time1 = 4
distance = speed1 * time1
speed2 = 40
time2 = distance / speed2
result = time2
return result
|
Emma purchased one laptop for $1100, two calculators for $35, and three flash drives for $20. Calculate the total cost of her purchase. | def solve() -> int:
cost_laptop = 1 * 1100
cost_calculators = 2 * 35
cost_flash_drives = 3 * 20
total_cost = cost_laptop + cost_calculators + cost_flash_drives
result = total_cost
return result
|
To develop his basketball skills, Noah practiced shooting for 50 times on the first day. He added another 30 shots onto the count on the 2nd day, and then another 20 shots on the 3rd day. How many total shots did Noah practice shooting in three days? | def solve() -> int:
total_shots = 50
total_shots += 30
total_shots += 20
result = total_shots
return result
|
A textbook has 400 pages. If the cost is $0.05 per page and there is a tax of 7%, what is the total cost of the book? | def solve() -> int:
num_pages = 400
cost_per_page = 0.05
tax_percent = 0.07
total_cost = (num_pages * cost_per_page) * (1 + tax_percent)
result = total_cost
return result
|
The farmer harvested 500 apples in the first week and 600 in the second week. If 75% of the apples from the first week were sold and 85% of the apples from the second week were sold, how many apples were sold in total? | def solve() -> int:
apples_week1 = 500
apples_week2 = 600
sold_week1 = apples_week1 * 0.75
sold_week2 = apples_week2 * 0.85
total_sold = sold_week1 + sold_week2
result = total_sold
return result
|
William has a jar of jelly beans but only keeps the ones that are purple and oval-shaped. If he selects a jelly bean at random and replaces it 30 times, how many times should he expect to select a jelly bean that is both orange and has a unique number of stripes? | def solve() -> int:
purple_oval_jelly_beans = 50
total_jelly_beans = 100
probability_purple_oval = purple_oval_jelly_beans / total_jelly_beans
probability_orange_unique_stripes = 0.05
expected_selections = probability_purple_oval ** 30 * probability_orange_unique_stripes * 30
result = expected_s... |
Lily and Jake are collecting stamps. Lily has 120 stamps and Jake has 80 stamps. Jake gives Lily 10 stamps and Lily gives Jake 15 stamps. How many more stamps does Lily have than Jake after the exchange? | def solve() -> int:
lily_stamps = 120
jake_stamps = 80
lily_stamps = lily_stamps + 10 - 15
jake_stamps = jake_stamps - 10 + 15
difference = lily_stamps - jake_stamps
result = difference
return result
|
Samantha has 12 pencils. Her teacher gives her 5 more pencils. After that, if her father gives her 2 times more pencils than she has, how many pencils does Samantha have in total? | def solve() -> int:
pencils = 12
teacher_pencils = 5
pencils += teacher_pencils
father_pencils = 2 * pencils
total_pencils = pencils + father_pencils
result = total_pencils
return result
|
Student: A math teacher gives a test with 20 questions. If a student scores 75%, how many questions did they answer correctly? | def solve() -> int:
total_questions = 20
score_percentage = 75
result = total_questions * (score_percentage / 100)
return result
|
There are 60 students in a class. If 3/5 of the students are girls, how many boys are there in the class? | def solve() -> int:
num_students = 60
num_girls = num_students * 3 / 5
num_boys = num_students - num_girls
result = num_boys
return result
|
David orders 30 pairs of jeans for $50 each and 20 t-shirts for $15 each. In addition, he pays $3 as packaging fee for each item. What is the total cost of his order? | def solve() -> int:
jeans_price = 50
tshirt_price = 15
packaging_fee = 3
jeans_quantity = 30
tshirt_quantity = 20
jeans_cost = jeans_price * jeans_quantity
tshirt_cost = tshirt_price * tshirt_quantity
total_cost = jeans_cost + tshirt_cost + (packaging_fee * (jeans_quantity... |
Student: Jack and Justin are preparing for a trip. If they have a total of $81 and Jack has four times as much money as Justin, how much does each one have? | def solve() -> int:
total_money = 81
jack_money = 0
justin_money = 0
jack_money = total_money * 4 / 5
justin_money = total_money * 1 / 5
result = jack_money + justin_money
return result
|
Samantha bought 2 bags of ice for $3.50 per bag. Each bag contains 12 pounds of ice. How much did she pay per pound of ice? | def solve() -> int:
bags = 2
cost_per_bag = 3.50
pounds_per_bag = 12
total_cost = bags * cost_per_bag
cost_per_pound = total_cost / (bags * pounds_per_bag)
result = cost_per_pound
return result
|
Student: A peaceful space race is sent to explore the outer galaxies. Each spaceship of this race has to travel 12 million kilometers and place 8 temporal capsules in the journey. How many temporal capsules will be placed if the space race sends 40 ships? | def solve() -> int:
distance = 12000000
capsules_per_ship = 8
ships = 40
total_capsules = capsules_per_ship * ships
result = total_capsules
return result
|
amantha had 35 pencils. She gave away 12 and then bought 27 more. How many pencils does she have now? | def solve() -> int:
pencils = 35
pencils -= 12
pencils += 27
result = pencils
return result
|
A construction worker is building a skyscraper. Every time they start a new floor, there is a one-in-ten chance that they forget to put in a crucial support beam and have to start the whole floor over again. However, one-fifth of the time, they realize they made a mistake and fix it before continuing. If the worker bui... | def solve() -> int:
prob_forget = 0.1
prob_fix = 0.2
num_floors = 50
completed_floors = num_floors * (1 - prob_forget)
fixed_floors = num_floors * prob_forget * prob_fix
total_floors = completed_floors + fixed_floors
result = total_floors
return result
|
A baker made 50 apple pies and 40 blueberry pies. He sold 30 apple pies and 25 blueberry pies. Each pie costs 5 dollars. How much money did he make from selling pies? | def solve() -> int:
apple_pies_left = 50 - 30
blueberry_pies_left = 40 - 25
pies_sold = 30 + 25
revenue = pies_sold * 5
result = revenue
return result
|
Last week, Anuj borrowed $200 from his mom. He wants to return the money with a 5% increase. How much money should he return to his mom? | def solve() -> int:
money = 200
increase_percent = 5
increase_amount = money * increase_percent / 100
total = money + increase_amount
result = total
return result
|
A store is having a sale. If an item is under $15, it is 10% off. If it is between $15 and $30, it is 20% off. If it is over $30, it is 30% off. If Lisa buys a shirt for $25, a pair of pants for $35, and a jacket for $45, how much total money will she save? | def solve() -> int:
shirt_discount = 0
pants_discount = 0
jacket_discount = 0
if 15 <= 25 <= 30:
shirt_discount = 0.2
elif 25 > 30:
shirt_discount = 0.3
if 15 <= 35 <= 30:
pants_discount = 0.2
elif 35 > 30:
pants_discount = 0.3
if 45 > 30:
jacket_discount = ... |
Eric bought 10 notebooks, and Erika bought 5 notebooks. If they share them equally amongst their 5 friends, how many notebooks will each person receive? | def solve() -> int:
eric_notebooks = 10
erika_notebooks = 5
total_notebooks = eric_notebooks + erika_notebooks
num_friends = 5
notebooks_per_person = total_notebooks / num_friends
result = notebooks_per_person
return result
|
**** James has three toy soldiers. He buys one more soldier, each from a different store. The first store sells each soldier for 4 dollars, the second sells each soldier for twice as much as the first, and the third sells each soldier for three times as much as the first. If James spent 18 dollars in total, how much di... | def solve() -> int:
total_spent = 18
soldier_1 = 4
soldier_2 = soldier_1 * 2
soldier_3 = soldier_1 * 3
total_without_third = soldier_1 + soldier_2
third_soldier_cost = total_spent - total_without_third
result = third_soldier_cost
return result
|
There are 9 green balls and 11 red balls in a bag. If a ball is randomly picked, what is the probability it will be green? | def solve() -> int:
green_balls = 9
red_balls = 11
total_balls = green_balls + red_balls
probability = green_balls/total_balls
result = probability
return result
|
Grace has six bags of flour. Each bag weighs 4/9 as much as Peter’s bag, which weighs 36kg. What is the total weight of Grace’s bags? | def solve() -> int:
peters_bag_weight = 36
graces_bag_weight = (4/9) * peters_bag_weight
total_weight = graces_bag_weight * 6
result = total_weight
return result
|
Andrew won $150 in a lottery and decided to spend it on a new outfit. He bought a shirt and a pair of pants for $45 each, 2 pairs of socks for $7 each, and a hat for $15. How much change will he receive after the shopping spree? | def solve() -> int:
shirt_price = 45
pants_price = 45
socks_price = 7
hat_price = 15
total_spent = shirt_price + pants_price + (2 * socks_price) + hat_price
change = 150 - total_spent
result = change
return result
|
If a pizza has 8 slices and 3/4 of the pizza is eaten, how many slices are left uneaten? | def solve() -> int:
total_slices = 8
eaten_slices = total_slices * 3/4
uneaten_slices = total_slices - eaten_slices
result = uneaten_slices
return result
|
There are 30 students in a class. 20 of them have brown eyes and the rest have blue eyes. What is the probability of picking a student at random who has brown eyes? | def solve() -> int:
num_brown_eyes = 20
total_students = 30
probability = num_brown_eyes/total_students
result = probability
return result
|
Student: At the start of the week, there were 18 tulips and 24 daisies in a garden. By the end of the week, 12 tulips and 6 daisies were removed. What is the differences in the numbers of tulips and daisies between the start and end of the week? | def solve() -> int:
tulips_start = 18
daisies_start = 24
tulips_removed = 12
daisies_removed = 6
tulips_difference = tulips_start - tulips_removed
daisies_difference = daisies_start - daisies_removed
total_difference = tulips_difference + daisies_difference
result = total_difference
... |
Pete owns a car and a motorbike. The car goes 11 km per litre and the motorbike goes 16 km per litre. Pete has 40 litres of fuel, how far can he travel in total? | def solve() -> int:
Distance_travelled_by_car_per_litre = 11
Distance_travelled_by_motorbike_per_litre = 16
Total_fuel = 40
Distance_travelled_by_car = Distance_travelled_by_car_per_litre * Total_fuel
Distance_travelled_by_motorbike = Distance_travelled_by_motorbike_per_litre * Total_fuel
... |
A recipe requires 1 1/2 tablespoons of vanilla extract. If you have only 1/3 tablespoon measurement scoop, how many scoops will you need for the required amount of extract? | def solve() -> int:
required_amount = 1.5
measurement_scoop = 1/3
scoops_needed = required_amount / measurement_scoop
result = scoops_needed
return result
|
A baker makes 24 loaves of bread every day. He sells each loaf for 2 dollars, and he pays 0.5 dollar for each loaf as the cost of ingredients. How much profit does he make in a week (7 days)? | def solve() -> int:
revenue = 24 * 2 * 7
cost = 24 * 0.5 * 7
profit = revenue - cost
result = profit
return result
|
Student: Ben collected 7 more stamps than Alice in his album. Alice collected twice as many stamps as Emma, who had 12 stamps. How many stamps did Ben collect? | def solve() -> int:
Alice = 0
Emma = 12
Ben = 0
Alice = Emma * 2
Ben = Alice + 7
result = Ben
return result
|
It's Father's day, so fathers get a 15% discount on the hardware store. Fathers who have a membership card can get an additional 10% off the discounted price. If Mr. Smith has a membership card and wants to buy a tool kit that costs $150, how much will he pay? | def solve() -> int:
discount_1 = 0.15 * 150
price_1 = 150 - discount_1
discount_2 = 0.1 * price_1
price_2 = price_1 - discount_2
result = price_2
return result
|
Terry has $400 and he gave 1/5 of it to his nephew and 1/4 of it to his niece. How much money does Terry have left? | def solve() -> int:
money = 400.00
nephew_share = money / 5
niece_share = money / 4
leftover_money = money - nephew_share - niece_share
result = leftover_money
return result
|
Emma painted 4 less than nine times as many pictures as Zoe. Ava painted one-ninth as many as Zoe. Ava painted 3 pictures. How many did Emma paint? | def solve() -> int:
zoe = 3 * 9
emma = 9 * zoe - 4
result = emma
return result
|
A restaurant bill is $45.25. If the tip is 20%, how much should be left for the tip? | def solve() -> int:
bill = 45.25
tip_percent = 20
tip_amount = bill * tip_percent/100
result = tip_amount
return result
|
Possible questions and programs: Alice has 40% more books than Bob. Bob has 10 fewer books than Charlie. Charlie has 60% as many books as Diana. If Diana has 120 books, how many books does Alice have? | def solve() -> int:
diana = 120
charlie = 0.6 * diana
bob = charlie - 10
alice = 1.4 * bob
result = alice
return result
|
A train is traveling 300 miles, and it goes 50 mph for the first 200 miles. How fast does the train need to go for the last 100 miles in order to average 55 mph for the whole trip? | def solve() -> int:
total_distance = 300
first_distance = 200
first_speed = 50
total_average_speed = 55
second_distance = total_distance - first_distance
second_speed = ((total_average_speed * total_distance) - (first_speed * first_distance)) / second_distance
result = second_speed... |
John went to the zoo and paid $10.00 for admission. He also bought a $5.00 snow cone and a $7.00 souvenir. How much did John spend in total? | def solve() -> int:
admission = 10.00
snow_cone = 5.00
souvenir = 7.00
total_spent = admission + snow_cone + souvenir
result = total_spent
return result
|
A group of friends went bowling. They played a total of 6 games, and each game had 10 frames. If the total number of pins knocked down was 1680, how many pins did they knock down in the first frame of the first game? A beach resort serves 800,000 cocktails each day. How many cocktails will the resort serve in 6 weeks? | def solve() -> int:
num_games = 6
frames_per_game = 10
total_pins = 1680
pins_per_frame = total_pins / (num_games * frames_per_game)
cocktails_per_day = 800000
num_weeks = 6
cocktails_in_six_weeks = cocktails_per_day * 7 * num_weeks
result = pins_per_fr... |
The distance between two cities is 165 miles. If Jack drives at a speed of 55 mph, how long will it take him to get there? | def solve() -> int:
distance_to_travel = 165
speed_of_vehicle = 55
time_to_travel = distance_to_travel / speed_of_vehicle
result = time_to_travel
return result
|
Student: A music store bought 50 guitars for $10,000. They sold 18 guitars for $400 each, 20 guitars for $300 each and the rest for $250 each. How much revenue did they make? | def solve() -> int:
guitars_bought = 50
price_bought = 10000
guitars_sold_400 = 18
price_sold_400 = 400
guitars_sold_300 = 20
price_sold_300 = 300
guitars_sold_250 = guitars_bought - guitars_sold_400 - guitars_sold_300
price_sold_250 = 250
revenue = (guitars_sold_400 * price_sold_400... |
An electrician is paid $50 to install a light fixture and $15 more for each additional light fixture they install. If they install 5 light fixtures, how much will they make in total? Tom and Lisa went to a clothing store. They bought a $50 shirt and a $35 dress. The store offered a 10% discount on the total purchase. H... | def solve() -> int:
base_payment = 50
additional_payment = 15
num_fixtures = 5
total_payment = base_payment + additional_payment * (num_fixtures - 1)
shirt_price = 50
dress_price = 35
discount_percentage = 10
total_purchase = shirt_price + dress_price
discount_amount =... |
Karen runs 5 miles in 42 minutes. At that rate, how long will it take to run 8 miles? | def solve() -> int:
time = (8/5) * 42
result = time
return result
|
Ethan has 50 marbles in his collection. If his friend gave him one fifth of his own collection, how many marbles does Ethan have now? | def solve() -> int:
ethan_marbles = 50
friend_marbles = ethan_marbles / 5
ethan_marbles += friend_marbles
result = ethan_marbles
return result
|
Sam Smith releases 6 different singles on YouTube. Then he releases 2 albums that each has 13 songs and 1 album that has 17 songs. How many songs has Sam Smith released in total? | def solve() -> int:
singles = 6
album1 = 13
album2 = 13
album3 = 17
total_songs = singles + (album1 + album2 + album3)
result = total_songs
return result
|
Here are 10 possible math questions and python programs: Lucy wants to buy some stickers and pencils from the school store. Each sticker costs 3 cents and each pencil costs 12 cents. Lucy has 1 dollar and wants to buy at least one of each item. If she spends half of her money on stickers, how many pencils can she buy w... | def solve() -> int:
money = 100
sticker_cost = 3
sticker_amount = money // 2
sticker_spent = sticker_cost * sticker_amount
pencil_cost = 12
pencil_money = money - sticker_spent
pencil_amount = pencil_money // pencil_cost
result = pencil_amount
return result
|
Beth works six hours a day and earns $13.40 per hour. If she works 25 days a month, how much will be her total earnings for eight months of work? | def solve() -> int:
total_hours = 6*25*8
hourly_wage = 13.40
result = total_hours * hourly_wage
return result
|
Mike is building a fence around his garden. Each section of the fence requires 6 wooden slats. If Mike needs to build 4 sections of the fence, how many wooden slats does he need? Tom runs a business selling cupcakes. He baked 20 vanilla cupcakes and 12 chocolate cupcakes. He traded 6 vanilla cupcakes for 2 new baking t... | def solve() -> int:
sections = 4
slats_per_section = 6
total_slats = sections * slats_per_section
vanilla_cupcakes = 20
chocolate_cupcakes = 12
traded_cupcakes = 6
new_trays = 2
remaining_vanilla_cupcakes = vanilla_cupcakes - traded_cupcakes
total_cupcakes = remaining_vanilla_cu... |
A cyclist traveled 40 miles per hour for 2 hours and 60 miles per hour for 1 hour. What was the cyclist's average speed for the entire trip? | def solve() -> int:
distance_first_leg = 40 * 2
distance_second_leg = 60 * 1
total_distance = distance_first_leg + distance_second_leg
total_time = 2 + 1
average_speed = total_distance / total_time
result = average_speed
return result
|
John has two cups, a green one and a blue one. He drinks water from the green cup two times for every one time he drinks water from the blue cup. If he drinks water from the blue cup 9 times, how many times did he drink water from both cups combined? | def solve() -> int:
green_cup = 2
blue_cup = 1
blue_drinks = 9
green_drinks = 2 * blue_drinks
total_drinks = green_drinks + blue_drinks
result = total_drinks
return result
|
How many oranges are in 10 boxes each containing 3 baskets of 5 oranges? | def solve() -> int:
boxes = 10
baskets = 3
oranges = 5
total_oranges = boxes * baskets * oranges
result = total_oranges
return result
|
In a race, John finished 20 seconds ahead of Adam, who finished the race in 100 seconds. If John ran at a uniform speed and completed the race in 80 seconds, at what speed did he run? | def solve() -> int:
adam_time = 100
john_time = 80
time_difference = 20
adam_speed = 100/adam_time
john_speed = (100 + time_difference) / john_time
result = john_speed
return result
|
Jeffrey bought 42 books. He placed 3 books on each of his 7 shelves. How many books remain? | def solve() -> int:
books_left = 0
books_left = books_left + 42
books_left = books_left - 7*3
result = books_left
return result
|
The tornado lifted the Smith's patio furniture and carried it 400 feet in the air before dropping it into the pond. At the same time, a balloon had been blown twice as far as the furniture had flown. How far, in feet, had the balloon been blown? Avery puts five crackers in each lunchbox. If she has 45 crackers, how man... | def solve() -> int:
furniture_distance = 400
balloon_distance = furniture_distance * 2
crackers_per_lunchbox = 5
total_crackers = 45
num_lunchboxes = 60
crackers_needed = crackers_per_lunchbox * num_lunchboxes - total_crackers
result = balloon_distance + cracker... |
Jason drives to the office and back for every weekday. His workplace is 50 miles away. Jason also takes a weekend road trip that covers 500 miles. If Jason can drive at 60 mph, how much time does he spend driving in a week? | def solve() -> int:
weekday_distance = 50
weekend_distance = 500
speed = 60
weekday_time = weekday_distance / speed
weekend_time = weekend_distance / speed
total_time = (weekday_time * 2) + weekend_time
result = total_time
return result
|
A football team won half of their games, lost a quarter of their games, and tied the rest. If they played 16 games in a season, how many games did they win? | def solve() -> int:
total_games = 16
games_won = total_games / 2
games_lost = total_games / 4
games_tied = total_games - games_won - games_lost
result = games_won
return result
|
Tom cooked a meal that serves five people. He added 1/3 cup of butter. Butter has 11 grams of fat per tablespoon. How many grams of fat were added to each serving of the meal? | def solve() -> int:
serving_size = 5
butter_cup = 1/3
fat_per_tbsp = 11
butter_tbsp = butter_cup * 16
total_fat = butter_tbsp * fat_per_tbsp
fat_per_serving = total_fat / serving_size
result = fat_per_serving
return result
|
Lisa sold 500 tickets for a concert and 3 times as many tickets for a play. What is the difference between the number of concert tickets and play tickets? | def solve() -> int:
concert_tickets = 500
play_tickets = 3 * concert_tickets
difference = play_tickets - concert_tickets
result = difference
return result
|
Student: Amanda needs to buy some apples. If an apple costs 0.65, and Amanda has $19 dollars, how many apples can Amanda buy in total? | def solve() -> int:
apple_cost = 0.65
amanda_money = 19
total_apples = amanda_money // apple_cost
result = total_apples
return result
|
You have a rectangular garden that measures 8 feet by 12 feet. If you decide to increase the length of the garden by 25%, by how much will you need to increase the width of the garden to maintain the same area? | def solve() -> int:
length = 8
width = 12
increase_percent = 0.25
area = length * width
new_length = length + length * increase_percent
new_width = area / new_length
increase_width = new_width - width
result = increase_width
return result
|
In a library, 20% of the books are dictionaries. If a dictionary weighs 3 pounds, how much do 25 science books weigh if they make up 40% of the remaining books? | def solve() -> int:
total_books = 100
dictionary_percentage = 0.2
dictionary_weight = 3
science_books_percentage = 0.25
remaining_books_percentage = 1 - dictionary_percentage
remaining_books = total_books * remaining_books_percentage
science_books_weight = remaining_books * science_book... |
Alex went to a convenience store to buy some drinks. He bought six cans of soda for $1 each, four energy drinks for $3 each, and a bottle of juice, which was twice as expensive as one can of soda. What was the total cost of Alex's shopping? | def solve() -> int:
soda_price = 1
energy_drink_price = 3
juice_price = 2 * soda_price
total_soda_cost = 6 * soda_price
total_energy_drink_cost = 4 * energy_drink_price
total_juice_cost = juice_price
total_cost = total_soda_cost + total_energy_drink_cost + total_juice_cost
... |
In a group of 60 students, 25 are freshmen and 35 are sophomores. If two students are chosen at random without replacement, what is the probability that both are freshmen? | def solve() -> int:
freshmen = 25
sophomores = 35
total_students = 60
prob_freshman_first = freshmen/total_students
prob_freshman_second = (freshmen-1)/(total_students-1)
prob_both_freshmen = prob_freshman_first * prob_freshman_second
result = prob_both_freshmen
return result
|
In a pond, 55% of the fish are carp and the rest are trout. Of the trout, 80% have red spots while the others are without spots. If there are 250 fish in the pond, how many carp are there? | def solve() -> int:
total_fish = 250
carp_percentage = 55
trout_percentage = 100 - carp_percentage
carp = (carp_percentage / 100) * total_fish
trout = (trout_percentage / 100) * total_fish
trout_with_spots_percentage = 20
trout_without_spots_percentage = 100 - trout_with_spots_perc... |
Alex and Lisa have a collection of coins. Alex has 80 silver coins and Lisa has 120 gold coins. If the silver coins are sold for $2 each and the gold coins are sold for $5 each, what is the difference in the amount of money they make in dollars? | def solve() -> int:
alex_silver_coins = 80
lisa_gold_coins = 120
silver_coin_value = 2
gold_coin_value = 5
alex_money = alex_silver_coins * silver_coin_value
lisa_money = lisa_gold_coins * gold_coin_value
difference = lisa_money - alex_money
result = difference
... |
Tom bought 5 apples on Monday and 8 apples on Tuesday. On Wednesday, he bought 25% fewer apples than the day before. On Thursday, he bought as many as the sum of the apples bought on Monday and Wednesday. How many apples did Tom buy in total? | def solve() -> int:
apples_on_monday = 5
apples_on_tuesday = 8
apples_on_wednesday = apples_on_tuesday - (apples_on_tuesday * 0.25)
apples_on_thursday = apples_on_monday + apples_on_wednesday
total_apples = apples_on_monday + apples_on_tuesday + apples_on_wednesday + apples_on_thursday
result = ... |
Pete has 20 books that he wants to put away on a shelf that is 4 ft tall. If each book takes up a half a foot of space, how many books can he fit on the shelf? | def solve() -> int:
books = 20
shelf_height = 4
book_height = 0.5
result = shelf_height / book_height
return result
|
A restaurant is offering a discount for takeout meals. The regular price for a meal is $20, but they offer a 15% discount for orders placed online. If Laura orders 3 meals online, how much will she pay in total? | def solve() -> int:
meal_price = 20
discount = 0.15
num_meals = 3
total_price = meal_price * num_meals * (1 - discount)
result = total_price
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.