question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
If seven buses travel 180 miles in total and the fourth bus traveled for 3/4 of this total, how many miles did the fourth bus travel? | def solve() -> int:
total_miles = 180
percentage_fourth_bus = 3/4
fourth_bus_mileage = total_miles * percentage_fourth_bus
result = fourth_bus_mileage
return result
|
A recipe calls for 2.5 cups of flour to make 15 cookies. How much flour would be needed to make 30 cookies? | def solve() -> int:
cookies_15 = 2.5
cookies_30 = cookies_15 * 2
result = cookies_30
return result
|
A recipe calls for 3/4 cup of sugar to make 12 muffins. How much sugar is needed to make 30 muffins? | def solve() -> int:
sugar_for_12_muffins = 3/4
muffins_needed = 30
sugar_for_30_muffins = sugar_for_12_muffins / 12 * muffins_needed
result = sugar_for_30_muffins
return result
|
A shipping company has 50 more cargo ships than tankers in its fleet. If the company has 20 tankers, how many ships are in the fleet? | def solve() -> int:
tankers = 20
cargo_ships = tankers + 50
result = cargo_ships + tankers
return result
|
san can knit a scarf in 5 days. How many scarfs can she knit in 4 weeks if she works 6 days a week? | def solve() -> int:
scarfs_per_day = 1/5
scarfs_per_week = scarfs_per_day * 6
scarfs_in_4_weeks = scarfs_per_week * 4
result = scarfs_in_4_weeks
return result
|
Student: Sam sells lemonade for $0.50 a cup. He spends $10 on lemons, $5 on sugar, and $2 on cups. He sells 100 cups of lemonade in a day. How much profit does he make in a day? | def solve() -> int:
price_per_cup = 0.50
cost_lemons = 10
cost_sugar = 5
cost_cups = 2
num_cups_sold = 100
total_cost = cost_lemons + cost_sugar + cost_cups
total_revenue = num_cups_sold * price_per_cup
profit = total_revenue - total_cost
result = profit
return result
|
A store sells 2 different types of T-shirts. The first type of T-shirt costs $20 and the second type of T-shirt costs twice as much as the first one. If a customer buys 5 T-shirts of the first type and 3 T-shirts of the second type, how much do they need to pay? | def solve() -> int:
tshirt1_cost = 20
tshirt2_cost = tshirt1_cost * 2
quantity_tshirt1 = 5
quantity_tshirt2 = 3
total_cost = (tshirt1_cost*quantity_tshirt1) + (tshirt2_cost*quantity_tshirt2)
result = total_cost
return result
|
A movie theater has a cinema hall with 200 seats which are filled at 80% capacity. How many seats are filled during a showing at the theater? | def solve() -> int:
total_seats = 200
capacity = 0.8
filled_seats = total_seats * capacity
result = filled_seats
return result
|
A ship leaves port at 11:45 PM and arrives at the destination port at 4:15 AM the next day. How long is the voyage in minutes? | def solve() -> int:
start_hour = 23
start_minute = 45
end_hour = 4
end_minute = 15
total_start_minutes = start_hour*60+start_minute
total_end_minutes = end_hour*60+end_minute
if total_start_minutes>total_end_minutes:
total_end_minutes+=24*60
total_voyage_minutes = to... |
Student: A cake recipe calls for 2/3 cups of sugar for every 1 cup of flour. If you want to make a cake with 3 cups of flour, how many cups of sugar do you need? | def solve() -> int:
flour = 3
sugar_per_flour = 2/3
sugar = flour * sugar_per_flour
result = sugar
return result
|
Student: A pizza parlor sells slices of pizza for $2. If Sarah wants to buy 7 slices of pizza as a meal deal that includes a drink, how much more does she need to pay if the drink costs $1.50? | def solve() -> int:
slices_price = 2
slices_number = 7
drink_price = 1.50
total_pizza_cost = slices_price * slices_number
total_meal_deal_cost = total_pizza_cost + drink_price
difference = total_meal_deal_cost - total_pizza_cost
result = difference
return result
|
A pizza place charges $10 for a 12 inch pizza, $16 for a 16 inch pizza, and $20 for a 20 inch pizza. What is the price per square inch for each size? | def solve() -> int:
prices = [10, 16, 20]
sizes = [12, 16, 20]
sq_inches = [(i/2)**2 * 3.14 for i in sizes]
price_per_sq_inch = [prices[i]/sq_inches[i] for i in range(3)]
result = price_per_sq_inch
return result
|
You have 36 cupcakes and want to distribute them to 3 different classrooms, A, B, and C, so that the number of cupcakes each classroom receives is in a 3:5:2 ratio. How many cupcakes will each classroom receive? | def solve() -> int:
num_cupcakes = 36
total_ratio = 3 + 5 + 2
class_a_ratio = 3 / total_ratio
class_b_ratio = 5 / total_ratio
class_c_ratio = 2 / total_ratio
class_a_cupcakes = int(num_cupcakes * class_a_ratio)
class_b_cupcakes = int(num_cupcakes * class_b_ratio)
class_c_cupcakes = int(... |
Bob has four different stacks of coins. The ratio of the number of quarters to the number of dimes in the first stack is 3:2, in the second stack is 1:1, in the third stack is 1:3, and in the fourth stack, there are 18 quarters. How many dimes are in the first stack? | def solve() -> int:
quarters_to_dime_ratio_1 = 3/2
quarters_to_dime_ratio_2 = 1/1
quarters_to_dime_ratio_3 = 1/3
quarters_in_stack_4 = 18
total_quarters = quarters_in_stack_4
total_dimes = (2/5) * total_quarters + (3/5) * total_quarters / quarters_to_dime_ratio_1
dimes_in_stack_1 =... |
A grocery store offers a 20% discount on all items. In total, a customer gets a $50 discount on their bill after the discount. How much did the customer spend on their items? | def solve() -> int:
discount_percentage = 20
discount = 50
original_amount = (100/80) * discount
result = original_amount
return result
|
Mia bought a dozen cupcakes for a party. She ate 2 cupcakes before the party and brought 8 to the party. At the end of the party, there were 3 cupcakes left over. How many cupcakes did Mia initially buy? | def solve() -> int:
dozen_cupcakes = 12
ate_before_party = 2
brought_to_party = 8
left_over = 3
initially_bought = dozen_cupcakes - ate_before_party - brought_to_party + left_over
result = initially_bought
return result
|
The greenhouse at a local nursery is 12 meters long and 9 meters wide. The owner wants to add a border of bricks that is 0.5 meters wide on all sides. How many bricks are needed for this border, if the bricks are each 15 cm long and 10 cm wide? | def solve() -> int:
greenhouse_length = 12
greenhouse_width = 9
brick_width = 0.5
brick_length = 0.5
total_length = (2 * greenhouse_length) + (2 * (greenhouse_width + brick_width))
total_width = (2 * greenhouse_width) + (2 * (greenhouse_length + brick_width))
brick_area = (15 / 100) * (10 / ... |
Student: A cookie jar has chocolate chip, oatmeal raisin, and sugar cookies. There are twice as many oatmeal raisin cookies as chocolate chip cookies. For each sugar cookie, there are 3 times as many oatmeal raisin cookies. If the jar has 24 chocolate chip cookies, how many cookies are in the jar? | def solve() -> int:
chocolate_chip = 24
oatmeal_raisin = 2 * chocolate_chip
sugar = oatmeal_raisin // 3
total = chocolate_chip + oatmeal_raisin + sugar
result = total
return result
|
A class has 25 boys and 35 girls. If 10 boys and 15 girls are absent, how many students are present? | def solve() -> int:
present_students = 25 + 35
present_students -= (10 + 15)
result = present_students
return result
|
Mike had 9 horses and 2 of the horses had twins. He traded 2 horses for a pony. One day, he found an extra 4 horses in the barn. How many horses does Mike have now? | def solve() -> int:
horses = 9
twins = 2
pony = 2
extra_horses = 4
horses += twins
horses -= 2
horses += extra_horses
result = horses
return result
|
A single roll of a dice is performed. What is the probability that the result is even? | def solve() -> int:
total_outcomes = 6
even_outcomes = 3
probability = even_outcomes / total_outcomes
result = probability
return result
|
The distance between a pink door and a purple window is five times the length between a blue mailbox and a green fence. The distance between the blue mailbox and green fence is also 100 feet. If the pink door and purple window are next to each other, what distance between the pink door and purple window may the blue ma... | def solve() -> int:
pink_door_to_purple_window = 5 * 100
blue_mailbox_to_green_fence = 100
total_distance = pink_door_to_purple_window + blue_mailbox_to_green_fence
result = total_distance - 2 * blue_mailbox_to_green_fence
return result
|
A carpenter needs to cut a 9-foot-long board into 3 equal pieces. How long is each piece? | def solve() -> int:
board_length = 9
num_pieces = 3
piece_length = board_length/num_pieces
result = piece_length
return result
|
A bookstore had 102 books on Monday. On Tuesday, 56 books were sold. On Wednesday, twice as many books were sold as on Tuesday. How many books are left in the bookstore on Wednesday? | def solve() -> int:
books_on_monday = 102
books_sold_tuesday = 56
books_sold_wednesday = books_sold_tuesday * 2
books_left = books_on_monday - books_sold_tuesday - books_sold_wednesday
result = books_left
return result
|
Student: A company with 100 employees has 40 male employees. What percentage of the employees are female? | def solve() -> int:
num_employees = 100
num_male_employees = 40
num_female_employees = num_employees - num_male_employees
percentage_female_employees = num_female_employees / num_employees * 100
result = percentage_female_employees
return result
|
A football team won 80% of the games they played this season. If they played 20 games in total, how many games did they win? Emily wants to make fruit smoothies for her friends. She needs to use up all the ingredients in her fridge. One smoothie must contain 4 ounces of yogurt and 6.5 ounces of blended fruits. If she h... | def solve() -> int:
total_games = 20
win_percentage = 80
games_won = (win_percentage / 100) * total_games
yogurt_ounces = 48
fruit_ounces = 78
smoothies = min(yogurt_ounces // 4, fruit_ounces // 6.5)
result = games_won
result = smoothies
return result
|
Student: Monica earned $150 a day. Every day, she saved 35% of her pay and spent the rest. After 18 days of work, she saved $1,620. How much did Monica spend in 18 days? | def solve() -> int:
daily_earning = 150
saving_percentage = 0.35
days = 18
total_saving = 1620
total_spent = (total_saving / saving_percentage) - total_saving
result = total_spent
return result
|
Emma has a job that pays $10 per hour. She works 8 hours a day, 5 days a week. If she gets a 20% raise, how much more will she make per year than she did before receiving the raise? | def solve() -> int:
hourly_pay = 10
hours_per_day = 8
days_per_week = 5
weeks_per_year = 52
weekly_pay_before_raise = hourly_pay * hours_per_day * days_per_week
annual_pay_before_raise = weekly_pay_before_raise * weeks_per_year
raise_percentage = 20
raise_amount = hourly_pay * ... |
A chef used 2 cups of flour to make a cake on Monday. On Tuesday, she used 25% less flour than she did on Monday. On Wednesday, she used 1.5 cups of flour to make another cake. How many cups of flour did the chef use in total over the three days? | def solve() -> int:
flour_monday = 2
flour_tuesday = flour_monday * 0.75
flour_wednesday = 1.5
total_flour = flour_monday + flour_tuesday + flour_wednesday
result = total_flour
return result
|
A retailer ordered a shipment of 500 hats. 10% of the hats arrived damaged and were returned. How many hats were returned? | def solve() -> int:
hats = 500
damaged = hats * 0.1
returned = int(damaged)
result = returned
return result
|
A village has 6 houses and each house has 3 floors. If on each floor there are 2 apartments and each apartment has 2 rooms, how many rooms are there in the village in total? | def solve() -> int:
number_of_houses = 6
floors_per_house = 3
apartments_per_floor = 2
rooms_per_apartment = 2
total_number_of_rooms = number_of_houses * floors_per_house * apartments_per_floor * rooms_per_apartment
result = total_number_of_rooms
return result
|
If a box of cereal costs $5, how much will 8 boxes of cereal cost? | def solve() -> int:
cost_per_box = 5
num_boxes = 8
total_cost = cost_per_box * num_boxes
result = total_cost
return result
|
A company produces 500 units per day. If they increase production by 25% and work for 8 hours instead of 6 hours, how many units do they produce per week? | def solve() -> int:
units_1 = 500
increase = 0.25
hours_1 = 6
hours_2 = 8
days = 7
units_2 = units_1 * (1 + increase) * hours_2 / hours_1
total_units = units_2 * days
result = total_units
return result
|
Student: Emily has 18 books. Her sister has twice as many books as Emily. Their brother has 12 more books than both of them combined. How many books do they have altogether? | def solve() -> int:
emily = 18
sister = 2 * emily
brother = 12 + (emily + sister)
total = emily + sister + brother
result = total
return result
|
Katie has $250 in her bank account. She wants to buy a new laptop that costs $799. If she wants to save up for the laptop, how much money does she need to save? | def solve() -> int:
current_money = 250
laptop_cost = 799
money_needed = laptop_cost - current_money
result = money_needed
return result
|
Mia and Louis are baking a cake. The recipe calls for 12 eggs. If they only have 6 eggs, how many times should they half the other ingredients? | def solve() -> int:
NUMBER_OF_EGGS_REQUIRED = 12
NUMBER_OF_EGGS_AVAILABLE = 6
NUMBER_OF_TIMES_TO_HALF_INGREDIENTS = NUMBER_OF_EGGS_REQUIRED / NUMBER_OF_EGGS_AVAILABLE
result = NUMBER_OF_TIMES_TO_HALF_INGREDIENTS
return result
|
A clothing store sells t-shirts for $12 and hats for $6. If they made $54 in sales and sold 4 hats, how many t-shirts did they sell? | def solve() -> int:
t_shirt_price = 12
hat_price = 6
total_sales = 54
num_hats = 4
total_hat_sales = hat_price * num_hats
total_t_shirt_sales = total_sales - total_hat_sales
num_t_shirts = total_t_shirt_sales // t_shirt_price
result = num_t_shirts
return result
|
Student: A bear needs to eat for 60 days in order to enter hibernation mode. If the bear eats up to 90 pounds of food a day, how much total food does the bear need to eat in order to enter hibernation? | def solve() -> int:
days = 60
food_per_day = 90
total_food = days * food_per_day
result = total_food
return result
|
If the ratio of men to women in a class is 3:5, and there are 30 men, how many women are there? | def solve() -> int:
num_men = 30
num_women = (num_men / 3) * 5
result = num_women
return result
|
Student: 1. Mrs. Rich made 12 boxes of candy to take to the party. Each box contains 3 bags of candy. If each bag has 32 pieces of candy, how many pieces of candy did Mrs. Rich take to the party altogether? | def solve() -> int:
boxes = 12
bags_per_box = 3
pieces_per_bag = 32
total_bags = boxes * bags_per_box
total_pieces = total_bags * pieces_per_bag
result = total_pieces
return result
|
Leila has some coins in her piggy bank. She has 15 quarters, 12 dimes, and 18 nickels. She wants to buy a book that costs $8.75. How much more money does she need to save? | def solve() -> int:
from decimal import Decimal
quarters = 15
dimes = 12
nickels = 18
book_price = Decimal('8.75')
total_cents = quarters * 25 + dimes * 10 + nickels * 5
total_dollars = Decimal(total_cents) / 100
difference = book_price - total_dollars
result = difference
ret... |
A school has a total of 400 students. The ratio of boys to girls is 3:5. How many boys are in the school? | def solve() -> int:
total_students = 400
boys_girls_ratio = 3 / 5
boys = total_students * boys_girls_ratio / (1 + boys_girls_ratio)
result = boys
return result
|
A jar contains 80 candies, if 2 candies are picked at random, what is the probability that both will be green? | def solve() -> int:
total_candies = 80
green_candies = 25
probability = (green_candies/total_candies) * ((green_candies - 1)/(total_candies - 1))
result = probability
return result
|
Marissa wants to buy a new phone that costs $600. She also wants a phone case that costs $30 and a screen protector that costs $10. If the sales tax is 7%, how much will she have to pay? | def solve() -> int:
phone_cost = 600
phone_case_cost = 30
screen_protector_cost = 10
sales_tax_rate = 0.07
subtotal = phone_cost + phone_case_cost + screen_protector_cost
sales_tax = subtotal * sales_tax_rate
total_cost = subtotal + sales_tax
result = total_cost
return resu... |
A baseball team wins 75% of their games. If they played 40 games, how many games did they win? | def solve() -> int:
total_games = 40
win_percentage = 0.75
games_won = total_games * win_percentage
result = games_won
return result
|
A pizza costs $15 and can feed 4 people. If Maria and 7 other people order 3 pizzas for lunch, how much will each person pay? | def solve() -> int:
pizza_cost = 15
people_per_pizza = 4
total_pizzas = 3
total_people = 1 + 7
total_cost = pizza_cost * total_pizzas
cost_per_person = total_cost / total_people
result = cost_per_person
return result
|
John has $800 in his bank account. He deposited $350 and withdrew $150. What is his balance after these transactions? | def solve() -> int:
balance = 800
deposit = 350
withdrawal = 150
currentBalance = balance + deposit - withdrawal
result = currentBalance
return result
|
Kevin has 24 stickers. He gives 5 stickers to his brother and 3 stickers to his friend. He then buys 15 more stickers. How many stickers does he have now? | def solve() -> int:
stickers = 24
stickers -= 5
stickers -= 3
stickers += 15
result = stickers
return result
|
Ryan has 4 more toy cars than twice the number of toy trains he has. If he has 10 toy trains, how many toy cars does he have? | def solve() -> int:
toy_trains = 10
toy_cars = 2*toy_trains + 4
result = toy_cars
return result
|
A student needs exactly 75% in his exam to pass. If he scored 75, 80,67, and 85, what percentage did he get? | def solve() -> int:
total_score = 75+80+67+85
average_score = total_score/4
percentage = (average_score/100)*100
result = f'<<<{percentage}>>>'
result = percentage
return result
|
Mark worked 35 hours during one week and got paid $800. What is Mark's hourly wage? | def solve() -> int:
total_hours_worked = 35
total_pay = 800
result = total_pay / total_hours_worked
return result
|
Jenna purchased a new laptop which was listed for $880 and was offered a 6% discount. How much money did she save and how much did she pay for the laptop? | def solve() -> int:
original_price = 880
discount_percent = 6
discount = original_price * (discount_percent/100)
price_after_discount = original_price - discount
saving = original_price - price_after_discount
result = (price_after_discount, saving)
return result
|
Student: Amy has 12 chocolate bars. She split them into 3 bags with the same number of candy in each bag. She then gave one of the bags of candy away. How many chocolate bars were in the bag she gave away? | def solve() -> int:
total_bars = 12
num_bags = 3
bars_per_bag = total_bars / num_bags
bags_given_away = 1
bars_given_away = bars_per_bag * bags_given_away
result = bars_given_away
return result
|
Alex has 120 stickers. Two-thirds of them are superhero stickers. One-fourth of the remaining stickers are unicorn stickers. How many unicorn stickers does Alex have? | def solve() -> int:
sticker_total = 120
superhero_stickers = sticker_total * 2 / 3
remaining_stickers = sticker_total - superhero_stickers
unicorn_stickers = remaining_stickers / 4
result = unicorn_stickers
return result
|
Emily wants to bake a cake for her friend's birthday. She needs to mix the ingredients first, and then put the cake in the oven. The whole process will take 2 hours. Baking takes twice as long as mixing. How many hours will it take Emily to mix the ingredients? | def solve() -> int:
mixing_time = 2 / (1 + 2)
result = mixing_time
return result
|
An office manager needs to make 10 photocopies of a 50 page document. If each copy costs $0.05 per page, how much will it cost to make all the photocopies? | def solve() -> int:
num_copies = 10
num_pages = 50
cost_per_page = 0.05
total_cost = num_copies * num_pages * cost_per_page
result = total_cost
return result
|
A school has 600 students. If 45% are girls, 30% are boys and the rest are non-binary, how many students are non-binary? | def solve() -> int:
total_students = 600
girls_percent = 45
boys_percent = 30
girls = total_students * girls_percent / 100
boys = total_students * boys_percent / 100
non_binary = total_students - (girls + boys)
result = non_binary
return result
|
Oliver was collecting stuffed animals to donate to a children's hospital. He had 10 stuffed animals already. His best friend brought over 18 stuffed animals to contribute. His uncle showed up with one-fifth the number of stuffed animals as Oliver's best friend. After lunch, Oliver's aunt brought 6 times the number of s... | def solve() -> int:
oliver = 10
friend = 18
uncle = friend / 5
aunt = 6 * oliver
total = oliver + friend + uncle + aunt
result = total
return result
|
A marathon is 26.2 miles long. If a runner can complete 1 mile in 8 minutes, how long will it take for the runner to complete the marathon? | def solve() -> int:
time_in_minutes = 26.2 * 8
result = time_in_minutes
return result
|
A train travels a distance of 600 kilometers in 5 hours. If the train had traveled at an average speed that was 20 kilometers per hour slower, the trip would have taken 1 hour longer. What was the average speed of the train? | def solve() -> int:
distance = 600
time1 = 5
speed1 = distance / time1
time2 = time1 + 1
speed2 = (distance / time2) + 20
average_speed = (speed1 + speed2) / 2
result = round(average_speed, 2)
return result
|
Sarah is trying to decide which streaming service to use. Service A costs $10 per month and has 100 TV shows and 500 movies. Service B costs $20 per month and has 200 TV shows and 1000 movies. Which service is the better value per TV show? | def solve() -> int:
service_a_cost = 10
service_a_tv_shows = 100
service_b_cost = 20
service_b_tv_shows = 200
if service_a_cost / service_a_tv_shows < service_b_cost / service_b_tv_shows:
final_cost = service_a_cost / service_a_tv_shows
else:
final_cost = service_b_cost / service... |
Two roommates need to split a $128 internet bill for the month. The first roommate can only pay $80 while the other roommate can afford to pay the remaining. How much does the second roommate need to pay? | def solve() -> int:
amount_owed1 = 80
amount_owed2 = 128 - amount_owed1
result = amount_owed2
return result
|
Yesterday, David ran for 30 minutes. Today, he ran 10 more than yesterday. Two days ago, he ran half the duration of what he ran yesterday. How long did David run in total? | def solve() -> int:
yesterday = 30
today = yesterday + 10
two_days_ago = yesterday / 2
total_duration = yesterday + today + two_days_ago
result = total_duration
return result
|
Tiffany works part-time as a store clerk and receives different amounts of commission on each sale. Yesterday she earned $20 in commissions and today she earned $35. If she wants to make an average of $30 per day, how much should she receive in commissions tomorrow? | def solve() -> int:
commission_yesterday = 20
commission_today = 35
average_commission = 30
total_commission = commission_yesterday + commission_today
commission_tomorrow = (average_commission * 3) - total_commission
result = commission_tomorrow
return result
|
Carol has 5 boxes of crayons with 18 crayons in each box. She gave Tim 6 more crayons than she gave to Sue. If Carol gave 9 crayons to Sue, how many crayons does she have left? | def solve() -> int:
boxes = 5
crayons_per_box = 18
sue = 9
tim = sue + 6
total_crayons = boxes * crayons_per_box
crayons_given = sue + tim
crayons_left = total_crayons - crayons_given
result = crayons_left
return result
|
If Amanda is 20 years old and her little sister is 10, in how many years will Amanda be four times her sister's age? | def solve() -> int:
age = 20
sistersAge = 10
ageDifference = age - sistersAge
result = ageDifference * 3
return result
|
Sophia read eight chapters of her history book before lunchtime. Upon returning, she finished 15 pages of the ninth chapter. Then, she read another two chapters, each containing 35 pages. How many pages did Sophia read in total? | def solve() -> int:
chapters_before_lunch = 8
pages_ninth_chapter = 15
chapters_after_lunch = 2
pages_per_chapter = 35
total_pages = chapters_before_lunch * pages_per_chapter + pages_ninth_chapter + chapters_after_lunch * pages_per_chapter
result = total_pages
return result
|
Below are some possible questions with their python programs: Ray wants to buy a bicycle that costs $450. He has saved up $150 and decides to borrow the rest from his friend who charges him 10% interest per year. If Ray agrees to pay back $25 every month, how much will he still owe his friend after 6 months? | def solve() -> int:
borrowed = 450 - 150
interest = borrowed * 0.1 * 6 / 12
paid = 25 * 6
balance = borrowed + interest - paid
result = balance
return result
|
Jack can recite the alphabet backward 15 times without making an error. His sister, Jill, can only do half of that and their cousin, John, can only do 6 fewer than Jill. If they recite the alphabet until they make a mistake from a sheet of 18 alphabets, how many alphabets can each of them recite before sharing the rema... | def solve() -> int:
jack = 15
jill = jack / 2
john = jill - 6
total_alphabets = 18
jack_share = (total_alphabets - jack) % 3
jill_share = (total_alphabets - jill) % 3
john_share = (total_alphabets - john) % 3
result = min(jack_share, jill_share, john_share)
return resu... |
A water tank can hold 300 liters of water. It is currently 80% full. Every day, 15 liters of water are used from the tank, and 10 liters of water are added to the tank. How many days will it take for the tank to be 50% full? | def solve() -> int:
water = 300 * 0.8
change = 10 - 15
days = 0
while water > 300 * 0.5:
water = water + change
days = days + 1
result = days
return result
|
Murlux the Wizard needs to transport 900 coins to a vault in the Dungeon of Death. He has 4 teams of 3 wizards each. How many coins does each wizard have to carry? | def solve() -> int:
coins = 900
teams = 4
wizards = 3
each_wizard = coins / teams / wizards
result = each_wizard
return result
|
Peyton is organizing a fundraiser to raise money for a local animal shelter. She estimates that she will need to raise $5,000 to cover all expenses. If she has already raised $3,550, how much more money does she need to reach her goal? | def solve() -> int:
goal = 5000
raised = 3550
money_left = goal - raised
result = money_left
return result
|
Student: Kelly bakes 4 15-minute batches of cookies and 2 20-minute batches of brownies. How long does she spend baking? | def solve() -> int:
cookies_time = 15
brownies_time = 20
cookies_batches = 4
brownies_batches = 2
total_time = (cookies_time * cookies_batches) + (brownies_time * brownies_batches)
result = total_time
return result
|
If a sweater is on sale for 25% off, and its original price was $80, what is the sale price? | def solve() -> int:
original_price = 80
discount = 0.25
sale_price = original_price * (1 - discount)
result = sale_price
return result
|
Sally has 8 dogs. Each dog eats 30 grams of food per day. If a 1kg bag of food costs $8.50, what is the cost per day to feed all the dogs? | def solve() -> int:
dogs = 8
food_per_dog = 30
food_per_day = dogs * food_per_dog
cost_per_gram = 8.5/1000
cost_per_day = food_per_day * cost_per_gram
result = cost_per_day
return result
|
Student: John works at a retail store. He earns $12 per hour. How much money will he earn if he works for 35 hours? | def solve() -> int:
hourly_wage = 12
hours_worked = 35
total_earned = hourly_wage * hours_worked
result = total_earned
return result
|
At a pet store, Matthew bought 6 bags of cat food and 2 bags of dog food. If each bag of cat food costs $7 and a bag of dog food has the same cost as 4 bags of cat food, how much is Matthew's change if he gave the cashier a $50 bill? | def solve() -> int:
cat_food = 6
dog_food = 2
cat_cost = 7
dog_cost = 4 * cat_cost
total_cat_cost = cat_food * cat_cost
total_dog_cost = dog_food * dog_cost
total_cost = total_cat_cost + total_dog_cost
paid = 50
change = paid - total_cost
... |
Marcus has to drive 18 miles east to reach his gym and then another 45 miles west to go to his grandmother's house. If he needs to return back home which is 35 miles north from his grandmother's house, how many gallons of gas does he use, if his car gets 28 miles per gallon? | def solve() -> int:
east = 18
west = 45
north = 35
total_distance = east + west + north
miles_per_gallon = 28
gallons_used = total_distance / miles_per_gallon
result = gallons_used
return result
|
**** Harry is swimming at the beach. He can swim 20 strokes in one minute and he does this for 30 minutes. How many strokes did Harry do in total? | def solve() -> int:
strokes_per_minute = 20
minutes = 30
total_strokes = strokes_per_minute * minutes
result = total_strokes
return result
|
Vincent wants to make a 60% alcohol solution by mixing 30% alcohol solution and pure alcohol. How many liters of pure alcohol must he add to 10 liters of 30% alcohol solution? | def solve() -> int:
initial_mixture = 10
pure_alcohol = (initial_mixture * 0.7) / 0.3 - initial_mixture
result = pure_alcohol
return result
|
A shirt costs $35 and a pair of shorts costs $20. If you have $100, how many shirts and shorts can you buy if you want to spend all your money? | def solve() -> int:
num_of_shirts = 100//35
num_of_shorts = (100 - (35*num_of_shirts))//20
result = num_of_shirts + num_of_shorts
return result
|
Four chocolate companies sponsored a local sweetshop. Cadbury donated 40 boxes of chocolates; Lindt donated twice the number of boxes donate by Cadbury; Hershey's donated three times the number of boxes Cadbury donated. How many boxes of chocolates did the companies donate in total? | def solve() -> int:
cadbury = 40
lindt = 2 * cadbury
hersheys = 3 * cadbury
total_boxes = cadbury + lindt + hersheys
result = total_boxes
return result
|
Student: A pizza parlor charges $10 for each pizza with a regular crust and $12 for each pizza with a deep dish crust. If a customer orders 4 regular crust pizzas and 2 deep dish crust pizzas, how much will they owe? | def solve() -> int:
regular_pizza_price = 10
deep_dish_pizza_price = 12
num_regular_pizzas = 4
num_deep_dish_pizzas = 2
regular_pizzas_cost = regular_pizza_price * num_regular_pizzas
deep_dish_pizzas_cost = deep_dish_pizza_price * num_deep_dish_pizzas
total_cost = regular_pizzas_cost + deep_... |
A pizza restaurant charges $10 for a small pizza and $15 for a large pizza. If 4 people each want 2 slices of pizza, and they order 2 large pizzas and 1 small pizza, what is the cost per person? | def solve() -> int:
small_price = 10
large_price = 15
num_people = 4
slices_per_person = 2
slices_per_small = 8
slices_per_large = 12
num_small = min(1, (num_people * slices_per_person) // slices_per_small)
num_large = max(0, (num_people * slices_per_person - num_small * slices_per_... |
Emily bought 10 shirts, 5 pairs of jeans, and 3 jackets. Her friend, Sarah, bought half the number of shirts and jeans but double the number of jackets. How many clothes were purchased in total? | def solve() -> int:
shirts_emily = 10
jeans_emily = 5
jackets_emily = 3
shirts_sarah = shirts_emily / 2
jeans_sarah = jeans_emily / 2
jackets_sarah = jackets_emily * 2
total_clothes = shirts_emily + jeans_emily + jackets_emily + shirts_sarah + jeans_sarah + jackets_sarah
r... |
Amanda has filled a tank with 500 liters of gasoline, 75% full. The gasoline she's using is 10% lighter than usual gasoline. What is the total weight of the tank? | def solve() -> int:
total_liters = 500
fill_percentage = 0.75
gasoline_density = 0.9
gasoline_liters = total_liters * fill_percentage
gasoline_weight = gasoline_liters * gasoline_density
empty_tank_weight = (total_liters - gasoline_liters) * 1
total_weight = gasoline_weig... |
Jane buys a bag of 64 pieces of candy for her friends, Anna and Brad. Anna takes 1/4 of the candy and Brad takes 3/7 of the candy. How much candy does Jane have left? | def solve() -> int:
total_candy = 64
anna_candy = total_candy * 1/4
brad_candy = total_candy * 3/7
jane_candy = total_candy - anna_candy - brad_candy
result = jane_candy
return result
|
Ben walked for 20 minutes to the museum. He walked around the exhibits for 1 hour. Afterward, he walked back home the same way. How long did Ben travel in total? Karen has a collection of stamps. The total weight of the stamps is 525 grams. One set of stamps weighs 7 times as much as another set. A third set of stamps ... | def solve() -> int:
time_to_museum = 20
time_at_museum = 60
total_time = time_to_museum + time_at_museum + time_to_museum
result = total_time/60
total_weight = 525
second_set_weight = total_weight/8
third_set_weight = 2*second_set_weight + 3
result2 = third_set_weight
... |
A circle has a diameter of 10 inches. What is its circumference? | def solve() -> int:
from math import pi
d = 10
C = pi * d
result = C
return result
|
Liam and Emily are going to a concert. Tickets cost $20 per person and parking is $10. They bring $60 with them. How much money do they have left after buying their tickets and parking? | def solve() -> int:
tickets_cost = 20 * 2
parking_cost = 10
total_cost = tickets_cost + parking_cost
money_left = 60 - total_cost
result = money_left
return result
|
Tim has 6 different toolboxes. Each toolbox has 20 tools. If it takes him 3 minutes to use one tool, how long would it take for Tim to use every tool in all of his toolboxes? Lena can bake 35 cupcakes in 40 minutes. Julie can bake the same 35 cupcakes in 30 minutes. How many minutes would it take Lena and Julie to bake... | def solve() -> int:
num_toolboxes = 6
tools_per_box = 20
total_tools = num_toolboxes * tools_per_box
time_per_tool = 3
total_time = total_tools * time_per_tool
cupcakes = 75
lenas_time = 40 * (cupcakes / 35)
julies_time = 30 * (cupcakes / 35)
total_time_cupcakes = lena... |
A music festival has 6 stages and 25 bands. If each band plays on one stage, how many bands can play on each stage? | def solve() -> int:
num_stages = 6
num_bands = 25
bands_per_stage = num_bands//num_stages
result = bands_per_stage
return result
|
Student: Frank bought 8 packs of green balls, 4 packs of yellow balls, and 3 packs of white balls. There were 12 balls in each package. How many balls did Frank buy in all? | def solve() -> int:
green_packs = 8
yellow_packs = 4
white_packs = 3
balls_per_pack = 12
green_balls = green_packs * balls_per_pack
yellow_balls = yellow_packs * balls_per_pack
white_balls = white_packs * balls_per_pack
total_balls = green_balls + yellow_balls + white_balls
r... |
Alex wanted to buy a new phone that costs $300, but he only has $200. He decides to save $10 every day. How many days does Alex need to wait to buy the phone? | def solve() -> int:
difference = 300 - 200
days = difference/10
result = days
return result
|
A restaurant's waiters each earn $10 in tips per table they serve. If there are 6 waiters and they made $300 in tips, how many tables did they serve? | def solve() -> int:
waiter_count = 6
tip_amount = 300
tip_per_table = 10
tables_served = tip_amount / (waiter_count * tip_per_table)
result = tables_served
return result
|
``` If 5 apples cost $3, how much would 10 apples cost? | def solve() -> int:
num_apples_1 = 5
cost_1 = 3
num_apples_2 = 10
cost_2 = (num_apples_2 / num_apples_1) * cost_1
result = cost_2
return result
|
Karen owns 30 stationary items. She has four times as many pens as pencils. The rest of her stationary items are erasers. If Karen has 5 pencils, how many erasers does she have? | def solve() -> int:
pens = 5 * 4
pencils = 5
erasers = 30 - (pens + pencils)
result = erasers
return result
|
A rectangle shaped table has a width of 120 cm and a perimeter of 900 cm. What is its length? | def solve() -> int:
width = 120
perimeter = 900
length = (perimeter - (2 * width)) / 2
result = length
return result
|
``` A store sold 20 shirts for $500. Each shirt was sold at an equal price that is an integer number. What was the price of each shirt? | def solve() -> int:
num_shirts = 20
total_money = 500
price = total_money // num_shirts
result = price
return result
|
Samantha saved 400 cents from her babysitting job and earned 300 cents from her lemonade stand. She spent 150 cents on a toy and received 200 cents from her dad. How many cents does she have now? | def solve() -> int:
savings = 400
earnings = 300
spending = 150
gift = 200
total = savings + earnings - spending + gift
result = total
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.