question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Kayla was hired onto a project to paint a wall which was 16ft wide and 8ft tall. If 1 gallon of paint covers 350sqft of wall, how many gallons of paint will Kayla need to finish the job? | def solve() -> int:
width = 16
height = 8
area_covered_by_1_gallon = 350
total_area = width * height
total_number_of_gallons_needed = total_area / area_covered_by_1_gallon
result = total_number_of_gallons_needed
return result
|
Maria, Jose, and Luis plan to sell homemade tacos at a food festival. They have 20 pounds of beef, 35 pounds of chicken, and 15 pounds of pork. Each taco needs 0.25 pounds of beef, 0.20 pounds of chicken, or 0.30 pounds of pork. If they sell each taco for $3, how much money will they make in total? | def solve() -> int:
beef = 20
chicken = 35
pork = 15
beef_per_taco = 0.25
chicken_per_taco = 0.20
pork_per_taco = 0.30
price_per_taco = 3
beef_tacos = beef // beef_per_taco
chicken_tacos = chicken // chicken_per_taco
pork_tacos = pork // pork_per_taco
tota... |
If a square has a perimeter of 20cm, what is the length of each side? | def solve() -> int:
perimeter = 20
side_length = perimeter / 4
result = side_length
return result
|
Ben has $60. He spent half of his money on a new shirt. Later, he found $20 on the street. How much money does Ben have now? | def solve() -> int:
money = 60.00
money /= 2
money += 20.00
result = money
return result
|
A car travels 30 miles per gallon of gas. If gas costs $3.00 per gallon, how much will it cost a driver to travel 150 miles? | def solve() -> int:
miles_per_gallon = 30
gas_cost = 3.00
distance = 150
gallons_needed = distance / miles_per_gallon
cost = gallons_needed * gas_cost
result = cost
return result
|
Fred is packing boxes with oranges. He has 800 oranges and each box can contain 12 oranges. How many oranges will Fred need to use to make all of his boxes? | def solve() -> int:
oranges = 800
oranges_per_box = 12
total_oranges = oranges / oranges_per_box
result = total_oranges
return result
|
A park has a total of 60 trees. There are 3 times as many oak trees as pine trees in the park. How many oak trees and pine trees are there in the park? | def solve() -> int:
total_trees = 60
ratio_oak_pine = 3
no_of_oak_trees = total_trees // (ratio_oak_pine + 1)
no_of_pine_trees = no_of_oak_trees * ratio_oak_pine
result = [no_of_oak_trees, no_of_pine_trees]
return result
|
A rectangle has length 12 cm and width 6 cm. What is the area of the rectangle in square centimeters? | def solve() -> int:
length = 12
width = 6
area = length*width
result = area
return result
|
Mr. Gutierrez drove 454 miles in a trip. If the total trip took 8 hours and 15 minutes, what was his average speed in miles per hour? | def solve() -> int:
distance = 454
total_time = 8.25
time_in_hours = total_time / 60
average_speed = distance / time_in_hours
result = average_speed
return result
|
3. Sue has a rectangular flower bed that is 7 meters long and 6 meters wide. She wants to put a 0.5 meter wide gravel path around the outside the flower bed. What will be the total length of the gravel path? | def solve() -> int:
total_length = 0
total_length = ((7+0.5)*2) + ((6 + 0.5)*2)
result = total_length
return result
|
Victor likes to collect stamps. He has a total of 200 stamps in his album. 80 of them are from Africa and 40 are from Europe. The rest of the stamps are equally divided between Asia and Oceania. How many stamps does Victor have from Oceania? | def solve() -> int:
total = 200
africa = 80
europe = 40
other = total - africa - europe
asia = other // 2
oceania = other // 2
result = oceania
return result
|
A rope 40 cm long is cut into two pieces. One piece is twice as long as the other. How long is each piece? | def solve() -> int:
total_length = 40
x = total_length / 3
y = 2 * x
pieces_length = f'{x} cm and {y} cm'
result = f'<<<{pieces_length}>>>'
result = pieces_length
return result
|
Student: Jake collected 120 cans for recycling. He got 5 cents for each can. He also found some loose change on the street, which added up to $1.25. He spent $4.50 on snacks and drinks. How much money did he save, in dollars? | def solve() -> int:
cans = 120
cans_value = cans * 0.05
loose_change = 1.25
spent = 4.50
result = cans_value + loose_change - spent
return result
|
Serena Williams has a tennis serve that travels at a speed of 120 miles per hour. If she serves 15 times in a minute, how many miles does her serve travel in an hour? | def solve() -> int:
speed = 120
serves_per_minute = 15
serves_per_hour = serves_per_minute * 60
distance_per_serve = speed / 1
distance_per_hour = distance_per_serve * serves_per_hour
result = distance_per_hour
return result
|
Student: A company had a revenue of $500,000 in the first quarter and $600,000 in the second quarter. What was the average revenue per month over both quarters? | def solve() -> int:
first_quarter_revenue = 500000
second_quarter_revenue = 600000
total_revenue = first_quarter_revenue + second_quarter_revenue
average_revenue_per_month = total_revenue / 8
result = average_revenue_per_month
return result
|
There are 50 apples in a basket. 17 apples are taken out, and 64 more apples are put in. How many apples are in the basket now? | def solve() -> int:
start=50
taken=17
added=64
now=start-taken+added
result=now
return result
|
Q8: Larry and his mom were redecorating their living room. They needed 3 rolls of wallpaper and each roll cost $30. They also needed tools and accessories and each of them cost $20. How much did they spent in total? | def solve() -> int:
no_of_wallpaper = 3
cost_wallpaper = 30
cost_tools = 20
total_cost = 0
total_cost = total_cost + no_of_wallpaper * cost_wallpaper + cost_tools
result = total_cost
return result
|
If 87.6 meters of cloth cost $1314, then what is the cost of 23.5 meters of cloth? | def solve() -> int:
length_of_the_cloth = 23.5
total_cost_of_87_6_meters_cloth = 1314
cost_per_meter = total_cost_of_87_6_meters_cloth / 87.6
cost_of_23_5_meters_cloth = cost_per_meter * length_of_the_cloth
result = cost_of_23_5_meters_cloth
return result
|
Jake spends 2 hours a week on music production, 7 hours a week on football, and 6 hours a week on photography club. If there are 20 weeks in the semester and Jake takes the first three weeks off due to an illness, how many hours of extracurriculars does he do before the final exams? | def solve() -> int:
music_hours = 2
football_hours = 7
photography_hours = 6
total_weeks = 20
sick_weeks = 3
total_hours = (music_hours + football_hours + photography_hours) * (total_weeks - sick_weeks)
result = total_hours
return result
|
In a triangle with angles A, B, and C, A is 75 degrees, B is 15 degrees bigger than A, and C is half the size of B. Calculate the angle of B. | def solve() -> int:
a = 75
b = a + 15
c = b / 2
result = b
return result
|
Kaydence's bicycle travels 20 kilometers in 3 hours. How many kilometers can it travel in 12 hours? | def solve() -> int:
time_1 = 3
distance_1 = 20
time_2 = 12
distance_2 = time_2 * (distance_1 / time_1)
result = distance_2
return result
|
Aaron wants to make a cake. The ratio of flour to sugar to butter is 3:2:1. If he needs 6 cups of flour, how much sugar does he need in cups? | def solve() -> int:
flour_cups = 6
sugar_cups = 2/3 * flour_cups
result = sugar_cups
return result
|
A bakery sells cupcakes for $1.5 each and muffins for $2 each. During a clearance sale, the bakery sells cupcakes for $1 each and muffins for $1.5 each. How much will you save if you buy 12 cupcakes and 8 muffins during the sale? | def solve() -> int:
cupcake_price = 1.5
muffin_price = 2
cupcake_sale_price = 1
muffin_sale_price = 1.5
original_cost = 12 * cupcake_price + 8 * muffin_price
sale_cost = 12 * cupcake_sale_price + 8 * muffin_sale_price
savings = original_cost - sale_cost
result = savings
return result... |
Daisy the duck has 40 feathers. The other duck, Leo has 2 times the amount of feathers as Ollie. The final duck, Ollie has one-fourth the amount of feathers as Daisy. How many feathers are there? | def solve() -> int:
daisy_feathers = 40
ollie_feathers = daisy_feathers / 4
leo_feathers = 2 * ollie_feathers
total_feathers = daisy_feathers + ollie_feathers + leo_feathers
result = total_feathers
return result
|
Maxine plants 90 tomato seeds. 50% of them grow and she gives away 20 of the young tomato plants. How many tomato seedlings does she keep? | def solve() -> int:
seeds_planted = 90
growth_percentage = 50
seedlings_grown = seeds_planted * growth_percentage / 100
seedlings_given_away = 20
seedlings_kept = seedlings_grown - seedlings_given_away
result = seedlings_kept
return result
|
Student: There were 20 chairs in a classroom. After an event, 12 chairs were taken away. How many chairs were left? | def solve() -> int:
initial_chairs = 20
taken_away = 12
chairs_left = initial_chairs - taken_away
result = chairs_left
return result
|
John works at a printing press and every 25 minutes, a machine he oversees prints 100 pages. How many pages can one machine print in 9 hours? | def solve() -> int:
minutes_in_hour = 60
pages_per_25_minutes = 100
hours = 9
total_minutes = hours * minutes_in_hour
total_pages = (total_minutes / 25) * pages_per_25_minutes
result = total_pages
return result
|
Pedro needs supplies for a geography class. He needs to buy 4 packs of maps and 8 textbooks. If each pack of maps contains 3 maps, then how many items does Pedro need to purchase altogether? | def solve() -> int:
num_pkgs = 4
num_books = 8
maps_per_pkg = 3
total_maps = num_pkgs * maps_per_pkg
result = num_books + total_maps
return result
|
Student: Petrina recently bought a new bed. The bed is regularly $199 and Petrina got a 12% off. She also purchases the delivery for $49. How much money does she pay in total? | def solve() -> int:
price_of_bed = 199
discount_percentage = 0.12
price_of_delivery = 49
discount_amount = price_of_bed * discount_percentage
total_price = price_of_bed - discount_amount + price_of_delivery
result = total_price
return result
|
am was making a cake for a birthday party. The recipe calls for 3 cups of sugar. Sam accidentally added 6 cups of sugar instead. How many extra cups of sugar did he use? | def solve() -> int:
needed_sugar = 3
added_sugar = 6
extra_sugar = added_sugar - needed_sugar
result = extra_sugar
return result
|
Student: A car travels at a speed of 60km/h for 3 hours. How far did it travel? | def solve() -> int:
speed = 60
time = 3
distance = speed * time
result = distance
return result
|
Charlie traveled 15 blocks from his home to a museum. From there, he took a train for 4 stops to the zoo. Later, he traveled the same way back home. What was the total distance traveled by Charlie? | def solve() -> int:
blocks_to_museum = 15
stops_to_zoo = 4
distance_to_museum = blocks_to_museum
distance_to_zoo = stops_to_zoo * 0.5
total_distance = 2 * (distance_to_museum + distance_to_zoo)
result = total_distance
return result
|
Zoe and Liam are making fruit salad with apples and bananas. Zoe cuts 20 apples and 12 bananas. Liam cuts 16 apples and 10 bananas. If they throw away one-fourth of the apples and one-fifth of the bananas that have bruises, how many pieces of fruit do they have in the salad? | def solve() -> int:
zoe_apples = 20
zoe_bananas = 12
liam_apples = 16
liam_bananas = 10
zoe_apples_thrown = zoe_apples / 4
zoe_bananas_thrown = zoe_bananas / 5
liam_apples_thrown = liam_apples / 4
liam_bananas_thrown = liam_bananas / 5
zoe_apples_salad = zoe_apples - zoe_ap... |
Ben is buying candy bars for his friends. He has 80 dollars and each candy bar costs 2.5 dollars. He also gets a 10% discount for every 10 candy bars he buys. How many candy bars can he buy with his money? | def solve() -> int:
money = 80
price = 2.5
discount = 0.1
candy_bars = 0
while money > 0:
if money >= price * 10:
candy_bars += 10
money = money - price * 10 * (1 - discount)
else:
candy_bars += int(money // price)
money = 0
result = candy_bars
ret... |
Sam has $1500 in a savings account. If the interest rate is 7.5% per annum, how much (approx) money would he have after 6 years? | def solve() -> int:
savings_amount = 1500
interest_rate_percentage = 7.5
time_period_years = 6
total_amount = savings_amount * ((1 + interest_rate_percentage/100)**time_period_years)
result = total_amount
return result
|
Jordan studied 250 educational institutions. She applied to 1/4 of the schools she researched and got accepted into 9/10 of the schools where she applied. How many schools was Jordan accepted to? | def solve() -> int:
total_studied = 250
fraction_applied = 1/4
fraction_accepted = 9/10
total_applied = total_studied * fraction_applied
total_accepted = total_applied * fraction_accepted
result = total_accepted
return result
|
Caleb stole 385 candy bars from the store. He gave away 45 more than half of the candy bars he stole. How many candy bars did he keep? | def solve() -> int:
caleb = 385
difference = 45
caleb = caleb/2
caleb = caleb - difference
result = caleb
return result
|
Ava is 12 years older than her cousin Hayden. In 2016, Hayden is 9 years old. In 2028, how old would Ava be? | def solve() -> int:
hayden_age_2016 = 9
ava_age_2016 = hayden_age_2016 + 12
years_passed = 2028 - 2016
ava_age_difference = 12
ava_age_2028 = ava_age_2016 + years_passed + ava_age_difference
result = ava_age_2028
return result
|
A basketball team of 10 players played in a weekend tournament. Each player used 3 towels a day. The washing machine can hold up to 30 towels per load. How many loads of laundry will it take to wash all the towels used during the tournament? | def solve() -> int:
num_players = 10
towels_per_player_per_day = 3
total_towels_per_day = num_players * towels_per_player_per_day
towels_per_tournament = total_towels_per_day * 2
towels_per_load = 30
loads_of_laundry = towels_per_tournament // towels_per_load + (towels_per_tournament % towels_p... |
Leo had 36 stickers. He gave 8 stickers to Mia and 6 stickers to Noah. Then he bought a new pack of stickers that had 12 stickers inside. How many stickers does Leo have now? | def solve() -> int:
stickers_now = 36 - 8 - 6 + 12
result = stickers_now
return result
|
A boy wants to buy a video game that costs $60. He has a gift card that covers 40% of the cost of the game. He also has a coupon that gives him $5 off any purchase of $50 or more. How much does he have to pay out of pocket for the game after using both the gift card and the coupon? | def solve() -> int:
gift_card_amount = 0.4 * 60
remaining_balance = 60 - gift_card_amount
if remaining_balance >= 50:
remaining_balance = remaining_balance - 5
result = remaining_balance
return result
|
A bike goes from point A to point B, covering 3/5 of the distance with a speed of 20 kmph and the other 2/5 with a speed of 30 kmph. Find the average speed of the bike for the entire journey. | def solve() -> int:
distance = 1
time1 = (3/5)/20
time2 = (2/5)/30
total_time = time1+time2
total_distance = distance
average_speed = total_distance/total_time
result = average_speed
return result
|
A painter bought some paints and brushes in an art store. He bought 3 tubes of blue paint that cost $5 each, 4 tubes of red paint that cost $6 each, 2 tubes of yellow paint that cost $4 each, and 7 brushes that cost $3 each. How much will he have to pay for everything? | def solve() -> int:
blue_cost = 3 * 5
red_cost = 4 * 6
yellow_cost = 2 * 4
brush_cost = 7 * 3
total_cost = blue_cost + red_cost + yellow_cost + brush_cost
result = total_cost
return result
|
Student: A school has 500 students. 20% of them are in the 9th grade, and 50% are boys. If there are 100 more boys than girls in the 9th grade, then how many girls are in the 9th grade? | def solve() -> int:
total_students = 500
ninth_grade_ratio = 0.2
boy_ratio = 0.5
boy_girl_difference = 100
ninth_grade_students = total_students * ninth_grade_ratio
boys = total_students * boy_ratio
girls = total_students - boys
x = (ninth_grade_students + boy_girl_difference) / 2
... |
Mark is renting a house. The monthly rent is $2,000. The owner will give him a discount depending on Mark's length of stay: 10% if he stays for less than 6 months, 5% if he stays between 6 and 12 months, and 2% if he stays longer than 12 months. Mark plans to stay at the house for 8 months. How much will he pay for ren... | def solve() -> int:
rent = 2000
discount = 0
if 6 > 8:
discount = 0.1
elif 12 >= 8 >= 6:
discount = 0.05
else:
discount = 0.02
total_discount = rent * discount
total_rent = rent - total_discount
total_payment = total_rent * 8
result = total_paym... |
Sarah can finish a book in 10 hours. If she reads for 2 hours every day, how long will it take her to finish the book? | def solve() -> int:
hours_per_book = 10
hours_per_day = 2
days_to_finish = hours_per_book / hours_per_day
result = days_to_finish
return result
|
If a company's profit is $500,000 and its expenses are $350,000, what is the company's net income? | def solve() -> int:
profit = 500000
expenses = 350000
net_income = profit - expenses
result = net_income
return result
|
Ryan and Laura ran a relay race. The race had four legs. Ryan ran 1 second faster than Laura in the first leg. Laura ran 2 seconds slower than Ryan in the second leg. Laura ran 3 seconds faster than Ryan in the third leg. Laura got tired and only ran half the distance that Ryan ran in the last leg. If Ryan ran 15 secon... | def solve() -> int:
ryan_leg1 = 15
laura_leg1 = ryan_leg1 - 1
laura_leg2 = ryan_leg1 + 2
ryan_leg3 = 15
laura_leg3 = ryan_leg3 - 3
ryan_leg4 = 15
laura_leg4 = ryan_leg4 / 2
laura_total_time = laura_leg1 + laura_leg2 + laura_leg3 + laura_leg4
laura_avg_time = laura_total_tim... |
Emma has 42 pieces of candy. She gives away 10 pieces of candy to her friends. How much candy does Emma have left? | def solve() -> int:
num_candy = 42
num_given_away = 10
num_candy_left = num_candy - num_given_away
result = num_candy_left
return result
|
A company made a profit of $600,000 last year. If the profit was a 25% increase from the previous year, what was the profit in the previous year? | def solve() -> int:
previous_year_profit = 600000/1.25
result = previous_year_profit
return result
|
An airline ticket costs $200. If Jessica can save $25 per week, how many weeks does she need to save to buy the ticket? | def solve() -> int:
ticket_price = 200
weekly_savings = 25
weeks = ticket_price/weekly_savings
result = weeks
return result
|
A group of 100 tourists went to a safari. 15 tourists left early. Twice as many tourists left early as did not take a camera with them. All the remaining tourists were taking photographs. How many tourists remained taking photos in the group? | def solve() -> int:
total_tourists = 100
left_early = 15
left_without_camera = left_early / 2
remaining_tourists = total_tourists - left_early - left_without_camera
result = remaining_tourists
return result
|
Thomas, Sophia, and Chloe worked a total of 185 hours in one week. Thomas worked e hours. Sophia worked 16 hours more than twice what Thomas worked, and Chloe worked 10 hours less than Sophia. How many hours did Chloe work? | def solve() -> int:
e = 0
s = 0
c = 0
e = 40
s = 2 * e + 16
c = s - 10
result = c
return result
|
A rectangular garden has a length of 20 feet and a width of 10 feet. If the garden is expanded uniformly to have a length of 24 feet, what will the new width be? | def solve() -> int:
l1 = 20
w1 = 10
l2 = 24
w2 = w1 * (l2 / l1)
result = w2
return result
|
A recipe requires 3 cups of flour to make 12 cookies. If there are 60 cookies that need to be made, how many cups of flour are needed in total? | def solve() -> int:
cups_of_flour_per_cookie = 3/12
total_cookies = 60
total_cups_of_flour = cups_of_flour_per_cookie * total_cookies
result = total_cups_of_flour
return result
|
A room has a perimeter of 42 meters. If the length is 3 meters longer than twice the width, what is the length of the room? | def solve() -> int:
perimeter = 42
width = perimeter/8
length = 2*width + 3
result = length
return result
|
Five-eighths of a pound of oranges costs $0.75. How many pounds of oranges can Tom buy with $15? | def solve() -> int:
cost_of_oranges = 0.75
total_money = 15
cost_of_one_pound = cost_of_oranges / (5/8)
pounds_of_oranges = total_money / cost_of_one_pound
result = pounds_of_oranges
return result
|
A local cafe is known for their lucky scratch cards. One in twelve cards will win the holder a free coffee. One in ten times, the card holder will also win a free muffin. The other times, the card will not have any prizes. If fifty customers each receive a scratch card, how many free coffees and muffins will be given a... | def solve() -> int:
total_customers = 50
winning_cards = total_customers // 12
winning_muffins = total_customers // 10
total_coffees = winning_cards
total_muffins = winning_muffins
result = total_coffees + total_muffins
return result
|
Student: The price of a product was increased by 20% and then decreased by 20%. If the original price was $100, what is the final price? | def solve() -> int:
original_price = 100
increased_price = original_price * 1.2
decreased_price = increased_price * 0.8
result = decreased_price
return result
|
Student: If a pack of 12 pencils cost $1.44, how much will it cost to buy 50 such packs? | def solve() -> int:
cost_per_pack = 1.44
cost = cost_per_pack * 50
result = cost
return result
|
Aaron has five times as many coins as Jacob, but Michael has eight times as many coins as Aaron. If there are 672 coins altogether, how many coins does Michael have? | def solve() -> int:
coins_jacob = 0
coins_aaron = 0
coins_michael = 0
coins_jacob = 672 / (5 + 1 + 8)
coins_aaron = 5 * coins_jacob
coins_michael = 8 * coins_aaron
result = coins_michael
return result
|
Paul decided to purchase some new equipment for his team. He got 5 baseballs at $5 each, 4 baseball gloves for $45 each, and 8 bats for $60 each. How much did he spend in total? | def solve() -> int:
cost_balls = 5
cost_gloves = 45
cost_bats = 60
total_cost = cost_balls * 5 + cost_gloves * 4 + cost_bats * 8
result = total_cost
return result
|
- Lily's hamster, Mimi, was born on the same day that Jack turned 8 years old. Jack is exactly 6 years older than his sister, Rose. On Rose's 11th birthday, how many years old was Lily's hamster, Mimi? | def solve() -> int:
difference = 17 - 8
result = difference
return result
|
A recipe for brownies calls for 3/4 cups of sugar for every 2 cups of flour. If you have 4 cups of flour, how much sugar do you need? | def solve() -> int:
flour = 4
sugar = flour * (3/8)
result = sugar
return result
|
A car needs 3 gallons of gas. There are 8 tanks of gas, each containing 2 gallons. How many tanks does the car need to fill up? | def solve() -> int:
total_tanks = 0
demand_per_tank = 3
supply_per_tank = 2
for i in range(demand_per_tank):
total_tanks += demand_per_tank//supply_per_tank
result = total_tanks
return result
|
Student: If Sandra runs 5.1 miles at a rate of 6.5 minutes per mile and then later runs 9 miles at a rate of 9 minutes per mile, what is the difference in the total running times? | def solve() -> int:
distance_1 = 5.1
time_1 = 6.5
distance_2 = 9
time_2 = 9
total_time_1 = distance_1 * time_1
total_time_2 = distance_2 * time_2
difference = total_time_2 - total_time_1
result = difference
return result
|
A company made a profit of $500,000 last year. They plan to divide the profit into equal bonuses for their 20 employees. How much will each employee receive? | def solve() -> int:
profit = 500000
num_employees = 20
bonus_per_employee = profit / num_employees
result = bonus_per_employee
return result
|
Sophia has 80 stickers. She uses 4 stickers per day. Every 2 days, she gives 6 stickers to her sister. How many days will the stickers last? | def solve() -> int:
stickers = 80
stickers_per_day = 4
stickers_given_to_sister = 6
days = 0
while stickers > 0:
stickers -= stickers_per_day
days += 1
if days % 2 == 0:
stickers -= stickers_given_to_sister
result = days
return result
|
Jane drives 360 miles at a speed of 60 miles per hour. What should be her speed to decrease her travel time by 3 hours? | def solve() -> int:
distance = 360
initial_speed = 60
initial_time = distance / initial_speed
new_time = initial_time - 3
new_speed = distance / new_time
result = new_speed
return result
|
A store advertises a 20% discount on all items. If you buy a shirt for $30 that has 8% tax, how much will you pay in total? | def solve() -> int:
shirt_cost = 30
discount_percent = 20
sales_tax_percent = 8
discount_amount = shirt_cost * (discount_percent / 100)
discounted_shirt_cost = shirt_cost - discount_amount
total_sales_tax = discounted_shirt_cost * (sales_tax_percent / 100)
total_cost = discounted_shirt_cost ... |
A rectangle has a length of 12 cm and a width of 6 cm. What is the perimeter of the rectangle? | def solve() -> int:
length = 12
width = 6
perimeter = 2 * (length + width)
result = perimeter
return result
|
Olivia works part-time at a restaurant for 4 days a week. She earns $28 per day but gets paid $6 extra for every hour of overtime. If she works 3 hours of overtime each day for the whole week, what is her total pay? | def solve() -> int:
days_per_week = 4
pay_per_day = 28
overtime_pay_per_hour = 6
overtime_hours_per_day = 3
regular_pay_per_week = days_per_week * pay_per_day
overtime_pay_per_week = days_per_week * overtime_hours_per_day * overtime_pay_per_hour
total_pay = regular_pay_per_week + o... |
A triangle has a base of 12 units and a height of 6 units. What is the area of the triangle? | def solve() -> int:
base = 12
height = 6
area = 0.5 * base * height
result = area
return result
|
A bicycle shop sells a bike for $300, which is 20% more than its cost. What is the cost of the bike? | def solve() -> int:
selling_price = 300
markup_percent = 20
cost_price = selling_price/((100+markup_percent)/100)
result = cost_price
return result
|
A book club charges a $20 joining fee and $5 for each book you order. If John spent $75 on his latest purchase, how many books did he purchase? | def solve() -> int:
joining_fee = 20
total_spent = 75
cost_per_book = 5
number_of_books = (total_spent - joining_fee) / cost_per_book
result = number_of_books
return result
|
In a book club meeting, each member can bring 1 guest. A total of 15 members and twice as many librarians as there are members will be present. If there are 60 members, how many chairs must be prepared for the meeting? | def solve() -> int:
members = 60
guests = members * 1
librarians = members * 2
total_people = members + guests + librarians
chairs_needed = total_people
result = chairs_needed
return result
|
Here is one possible set of new questions and programs: Hana is a florist who sells roses and lilies. She buys roses for $1 each and sells them for $2.5 each. She buys lilies for $2 each and sells them for $4 each. This week, she sold 120 roses and 80 lilies. She also had to pay a fixed rent of $300 for her shop. How m... | def solve() -> int:
rose_cost = 1
rose_price = 2.5
lily_cost = 2
lily_price = 4
rose_sold = 120
lily_sold = 80
rent = 300
rose_revenue = rose_price * rose_sold
lily_revenue = lily_price * lily_sold
total_revenue = rose_revenue + lily_revenue
rose_expense = rose_cost... |
Student: Sarah had 135 stamps. She gave 25% of her stamps to her brother. How many stamps does Sarah have left? | def solve() -> int:
stamps = 135
percentage = 25
stamps_given = stamps * (percentage/100)
stamps_left = stamps - stamps_given
result = stamps_left
return result
|
Noah bought 100 pencils for his classmates. Each pencil costed $0.50. He paid a total of $7.00 for tax and left with $42.00 in change. How much did Noah start with? If Jackson jogs at a speed that is 60% of Liam's running speed, and they both took a total of 80 minutes to finish a race, how many minutes did Liam take t... | def solve() -> int:
pencil_cost = 0.50
tax = 7.00
change = 42.00
total_cost = pencil_cost * 100 + tax
start_amount = total_cost + change
result = start_amount
return result
|
Susan bought 4 notebooks and 5 pencils. Each notebook cost $1.50, and each pencil cost $0.25. How much did Susan spend in total? | def solve() -> int:
num_of_notebooks = 4
num_of_pencils = 5
cost_of_notebook = 1.50
cost_of_pencil = 0.25
total_cost = (num_of_notebooks * cost_of_notebook) + (num_of_pencils * cost_of_pencil)
result = total_cost
return result
|
A bag contains 8 red marbles, 3 blue marbles, and 5 green marbles. If you draw one marble at random, what is the probability of getting a green marble? | def solve() -> int:
total_marbles = 8 + 3 + 5
green_marbles = 5
probability = green_marbles / total_marbles
result = probability
return result
|
A pet store sold 20 bags of dog food for $35.00 each, 8 bags of cat food for $20.00 each, and 3 bird cages at $75.00 each. How much money did the pet store make? | def solve() -> int:
bags_of_dog_food = 20
price_of_dog_food = 35.00
bags_of_cat_food = 8
price_of_cat_food = 20.00
bird_cages = 3
price_of_bird_cage = 75.00
total_money = (bags_of_dog_food * price_of_dog_food) + (bags_of_cat_food * price_of_cat_food) + (bird_cages * price_of_b... |
Possible questions and programs are: A jar has 72 candies in it. One-third of the candies are red, one-fourth are blue and the rest are yellow. How many more yellow candies are there than blue candies? | def solve() -> int:
total = 72
red = total // 3
blue = total // 4
yellow = total - red - blue
difference = yellow - blue
result = difference
return result
|
Alex had 25 books on his bookshelf. He loaned 7 books to his friend and sold 3 books at the garage sale. If his bookshelf can hold up to 30 books, how many books does Alex need to refill the entire shelf? | def solve() -> int:
books_on_shelf = 25
books_loaned = 7
books_sold = 3
shelf_capacity = 30
books_left_on_shelf = books_on_shelf - books_loaned - books_sold
books_needed_to_refill = shelf_capacity - books_left_on_shelf
result = books_needed_to_refill
return result
|
Student: If a tree grows 3 inches every month for 4 months, how many inches does it grows in total? | def solve() -> int:
growth_per_month = 3
months = 4
total_growth = growth_per_month * months
result = total_growth
return result
|
A bag of pet food is enough to last for 9 days for one cat. Mrs. Smith has two cats. How long will the bag last for both cats if they start eating from the same day? | def solve() -> int:
num_cats = 2
days_per_cat = 9
total_days = days_per_cat / num_cats
result = total_days
return result
|
Mrs. Johnson baked 180 muffins. She gave 8 muffins to her niece, 16 muffins to her nephew, and put the rest in bags that can hold 12 muffins each. How many bags did she use if she gave three times as many muffins to her son as she gave to her niece? | def solve() -> int:
muffins_baked = 180
muffins_niece = 8
muffins_nephew = 16
muffins_son = 3 * muffins_niece
muffins_left = muffins_baked - (muffins_niece + muffins_nephew)
bags_used = muffins_left // 12
result = bags_used
return result
|
John has 20 marbles, and he gives 3 marbles to each of his 4 friends. How many marbles does he have left? | def solve() -> int:
num_marbles = 20
num_friends = 4
marbles_given = num_friends * 3
marbles_left = num_marbles - marbles_given
result = marbles_left
return result
|
Peter saved $9 per month from January to March and saved $18 per month from April to September. How much should he save in October to December so he will have a total savings of $189 in the year? | def solve() -> int:
jan_to_mar_savings = 9 * 3
apr_to_sep_savings = 18 * 6
savings_until_september = jan_to_mar_savings + apr_to_sep_savings
annual_savings_target = 189
last_quarter_savings_required = annual_savings_target - savings_until_september
result = last_quarter_savings_required
resu... |
For an economics test, Erica answered 9 questions wrongly, and Mike got half as many mistakes as her. How many wrongly answered questions did Mike have? | def solve() -> int:
erica_mistakes = 9
mike_mistakes = erica_mistakes / 2
result = mike_mistakes
return result
|
Betty earns $86 per day. Every day she spends 1/4 of her pay and saves the rest. After 18 days of work, she saved $1428. How much does Betty spend per day? | def solve() -> int:
save = 1428
day = 18
earn = 86
spent = (save/day)*(1/4)
result = spent
return result
|
At the beginning of the year, George had 5 toy cars on his shelf. After a year, he counted 2400 times more toy cars. How many toy cars does George have in total? | def solve() -> int:
initial_cars = 5
multiplier = 2400
total_cars = initial_cars * multiplier
result = total_cars
return result
|
A rectangular prism has a length of 6ft, a width of 4ft, and a height of 2ft. What is the volume of the rectangular prism in cubic feet? | def solve() -> int:
length = 6
width = 4
height = 2
volume = length * width * height
result = volume
return result
|
A construction material supplier offers 10% discount on orders above 500€. A customer orders 800 bricks costing 0.60€ each, 20 bags of cement costing 15€ each and 25 sheets of plywood costing 12€ each. Calculate the total cost after the discount. | def solve() -> int:
brick_cost = 0.60
num_bricks = 800
cement_cost = 15
num_cement_bags = 20
plywood_cost = 12
num_plywood_sheets = 25
total_cost = brick_cost*num_bricks + cement_cost*num_cement_bags + plywood_cost*num_plywood_sheets
discount_threshold = 500
if total_cost > discount_... |
Anna and Mia want to make bracelets for their friends. They have 40 beads in total, and each bracelet needs 8 beads. How many bracelets can they make? How many beads will they have left over? | def solve() -> int:
bracelets = 40 // 8
beads_left = 40 % 8
result = (bracelets, beads_left)
return result
|
A company has 253 employees. If one-fourth of the employees work in the IT department, one-fifth work in marketing, and one-third work in management, then what is the total number of employees working in IT and marketing departments combined? | def solve() -> int:
it_employees = 253/4
marketing_employees = 253/5
total_it_marketing_employees = it_employees + marketing_employees
result = total_it_marketing_employees
return result
|
Max and Rachel had a recipe for homemade pizza. They had 3 tomatoes, 7 ounces of cheese, and 8 ounces of flour. They decided to double the recipe to make two pizzas. How many ounces of cheese do they now need? | def solve() -> int:
total_cheese = 0
total_cheese = 7 * 2
result = total_cheese
return result
|
**** An airline company has a total of 120 flights departing from its base each day. Each flight leaves with capacity for an average of 140 passengers. How many passengers depart from the base each day? | def solve() -> int:
num_flight = 120
avg_passengers = 140
total_departures = num_flight * avg_passengers
result = total_departures
return result
|
Runner Alice runs four times as many miles per week as runner Bob, who runs five less than half as many miles as Alice. If Alice runs 40 miles, how many miles does Bob run? | def solve() -> int:
alice_miles = 40
bob_miles = (alice_miles / 4) * 2 - 5
result = bob_miles
return result
|
In a class, 70% of the students passed in the math exam and 80% passed in the science exam. If there are 50 students in the class, how many students passed in both the exams? | def solve() -> int:
s = 50
m = 0.7 * s
sc = 0.8 * s
b = min(m,sc)
result = b
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.