question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Student: Sam has 25 pounds and 40 euros. If each pound is worth 1.2 euros, how much money does he have total in euros? | def solve() -> int:
pounds = 25
euros = 40
exchange_rate = 1.2
total_euros = euros + pounds * exchange_rate
result = total_euros
return result
|
Olivia made 30 cupcakes for the party. She frosted half of them with chocolate frosting and the other half with vanilla frosting. If each cupcake had 2 inches of frosting and the guests ate 60 inches of chocolate and 40 inches of vanilla, how many cupcakes were left? | def solve() -> int:
cupcakes = 30
chocolate_frosting = cupcakes / 2
vanilla_frosting = cupcakes / 2
total_frosting = chocolate_frosting + vanilla_frosting
chocolate_eaten = 60
vanilla_eaten = 40
total_eaten = chocolate_eaten + vanilla_eaten
remaining_frosting = total_frosting -... |
Maya baked 20,000 cookies for a charity event and sold them in packs of different sizes and prices. She sold 100 packs of 10 cookies each for $5 per pack, 200 packs of 20 cookies each for $9 per pack, and 400 packs of 50 cookies each for $20 per pack. How much money, in dollars, did Maya raise for the charity? | def solve() -> int:
cookies_sold = (100 * 10) + (200 * 20) + (400 * 50)
money_earned = (100 * 5) + (200 * 9) + (400 * 20)
if cookies_sold == 20000:
result = "Maya sold all the cookies that she baked and raised $" + str(money_earned) + " for the charity."
else:
result = "Maya did not sell a... |
3. Alina went shopping and bought a laptop and a cellphone. The laptop cost $550 and the cellphone cost $200. How much did Alina spend in total? | def solve() -> int:
laptop_cost = 550
cellphone_cost = 200
total_cost = laptop_cost + cellphone_cost
result = total_cost
return result
|
Sophia needs to run 8 miles for a marathon race. She runs 1 mile every 10 minutes. After how many minutes will she complete the race? | def solve() -> int:
miles_to_run = 8
minutes_per_mile = 10
total_minutes = miles_to_run * minutes_per_mile
result = total_minutes
return result
|
Sarah has 200 dollars and wants to buy 100 apples for 1.5 dollars each. If the tax is 8%, how much does she end up spending? | def solve() -> int:
apples = 100
price = 1.5
tax = 0.08
subtotal = apples * price
total = subtotal + (subtotal * tax)
result = total + 200
return result
|
Emily is trying to build a rectangular garden in her backyard. She wants the garden to be twice as long as it is wide. If the perimeter of the garden is 64 feet, what are the length and width of the garden? | def solve() -> int:
perimeter = 64
width = perimeter/6
length = 2*width
result = (length, width)
return result
|
A square garden bed has a perimeter of 16 feet. If each tile is 2 square feet, how many tiles are needed to cover the entire garden bed? | def solve() -> int:
perimeter = 16
side_length = perimeter/4
area = side_length**2
result = area/2
return result
|
A farmer has 30 cows and 40 chickens. If each cow has 4 legs and each chicken has 2 legs, how many legs are there in total on the farm? | def solve() -> int:
cows = 30
chickens = 40
legs = cows * 4 + chickens * 2
result = legs
return result
|
arah and Sean went to the pantry on Tuesday. If Sarah paid 45% of the total cost and Sean paid five times as much as Sarah, how much did they spend in total? | def solve() -> int:
total_cost = 0
total_cost += 0.45*total_cost
total_cost += 2.25*total_cost
result = total_cost
return result
|
A recipe calls for 3/4 of a cup of flour. If you only have 1/2 cup of flour, what fraction of the recipe can you make? | def solve() -> int:
recipe_flour = 3/4
available_flour = 1/2
portion_of_recipe = available_flour / recipe_flour
result = portion_of_recipe
return result
|
A rectangle has a length of 10cm and a width of 5cm. If the perimeter is increased by 10cm, what will be the length of one of its sides, assuming the length and width are equal? | def solve() -> int:
length = 10
width = 5
perimeter_increase = 10
original_perimeter = 2*length + 2*width
new_perimeter = original_perimeter + perimeter_increase
new_side_length = new_perimeter / 4
result = new_side_length
return result
|
Jack the alligator eats 12 fish in the morning and six times that amount throughout the day. How many fish does Jack eat in total per day? | def solve() -> int:
morning_fish = 12
day_fish = 6 * morning_fish
total_fish = morning_fish + day_fish
result = total_fish
return result
|
Mia and Noah are playing a game where they roll two dice and add up the numbers. If the sum is even, Mia gets a point. If the sum is odd, Noah gets a point. They play 10 rounds and Mia gets 4 points. How many points does Noah have? | def solve() -> int:
odd_rounds = 10 - 4
noah_points = odd_rounds
result = noah_points
return result
|
Possible questions and programs: Josiah is making cookies for his friends. He has a recipe that makes 24 cookies and requires 2 cups of flour, 1 cup of sugar, and 0.5 cup of butter. He wants to make 36 cookies, but he only has 3 cups of flour left. How much sugar and butter does he need to use? | def solve() -> int:
cookies_per_cup = 24 / 2
flour_needed = 36 / cookies_per_cup
fraction = flour_needed / 2
sugar_needed = fraction * 1
butter_needed = fraction * 0.5
result = (sugar_needed, butter_needed)
return result
|
Sarah purchases 20 cupcakes for 3 dollars each and 3 donuts for 1 dollar each. If she offers 5 cupcakes to her colleagues, how much does she spend on desserts for herself? | def solve() -> int:
cupcakes_price = 3
donuts_price = 1
total_cupcakes = 20
total_donuts = 3
cupcakes_offered = 5
total_cupcakes_cost = total_cupcakes * cupcakes_price
total_donuts_cost = total_donuts * donuts_price
total_cost = total_cupcakes_cost + total_donuts_cost
desse... |
Rachel, Sam, Tom, and Victoria each buy a pizza with 10 slices. Rachel and Sam eat 75% of their pizzas while Tom and Victoria eat 40%. How many pizza slices are left uneaten? | def solve() -> int:
rachel_slices = 10 * 0.75 * 10
sam_slices = 10 * 0.75 * 10
tom_slices = 10 * 0.4 * 10
victoria_slices = 10 * 0.4 * 10
total_slices = rachel_slices + sam_slices + tom_slices + victoria_slices
uneaten_slices = 40 - total_slices
result = uneaten_slices
return r... |
In a smoothie recipe, Jana uses a ratio of 1/2 cup of yogurt for every 1 cup of fruit. If she wants to make a total of 4 cups of smoothie, how much yogurt will she need? | def solve() -> int:
fruit_cups = 4
yogurt_cups = (1/2) * fruit_cups
result = yogurt_cups
return result
|
A company paid $10,000 for a new machine in the first quarter of the year, $12,000 for maintenance in the third quarter, and $8,000 for repairs in the fourth quarter. If the machine generated $15,000 of revenue in the second quarter, $20,000 in the third quarter, and $25,000 in the fourth quarter, how much profit, in d... | def solve() -> int:
total_cost = 10000 + 12000 + 8000
total_revenue = 15000 + 20000 + 25000
profit = total_revenue - total_cost
result = profit
return result
|
While bungee jumping, Jenna fell past her friend Olivia after falling 20 meters. If she fell for an additional two times that distance before bouncing back up, and the bungee cords are evenly spaced, what distance was Olivia from the ground? | def solve() -> int:
distance_fallen = 20
additional_distance = 2 * distance_fallen
total_distance_fallen = distance_fallen + additional_distance
distance_from_ground = total_distance_fallen + distance_fallen
result = distance_from_ground
return result
|
Mia baked 24 cupcakes for her class and decorated them with sprinkles. She used 3 tablespoons of sprinkles for every 4 cupcakes. How many tablespoons of sprinkles did she use in total? | def solve() -> int:
cupcakes = 24
sprinkles_per_cupcakes = 3/4
tablespoons_per_teaspoon = 3
total_teaspoons = cupcakes * sprinkles_per_cupcakes
total_tablespoons = total_teaspoons / tablespoons_per_teaspoon
result = "Mia used " + str(total_tablespoons) + " tablespoons of sprinkles... |
The soccer team raised $300 for new uniforms. Each player also contributed $10. There are 15 players on the team, and each uniform costs $25. How much money is left after buying the new uniforms? | def solve() -> int:
team_raised = 300
player_contribution = 10
num_players = 15
uniform_cost = 25
total_uniform_cost = num_players * uniform_cost
total_player_contribution = num_players * player_contribution
total_money_raised = team_raised + total_player_contri... |
Amy and Ben are making rectangular shapes with pencils from a box containing 48 pencils. Amy makes 4-pencil rectangles and Ben makes 6-pencil rectangles. If Amy makes 3 rectangles and Ben makes 5, how many pencils will be left in the box? | def solve() -> int:
box = 48
amy = 3
ben = 5
rectangle_4 = 4
rectangle_6 = 6
amy_used = amy * rectangle_4
ben_used = ben * rectangle_6
total_used = amy_used + ben_used
left = box - total_used
result = left
return result
|
Chris owns a book shop. He buys his books from a publisher and sells them for $7 more in his store. He has to pay 12% tax on all his sales. A customer bought a novel for $15. How much profit did Chris make from that sale? | def solve() -> int:
cost_price = 15
selling_price = cost_price + 7
tax = 0.12 * selling_price
profit = selling_price - cost_price - tax
result = profit
return result
|
After sorting through their jewelry box, the Parkers made $600 from selling their old jewelry on eBay. If their best friends, the Williamsons, also made 40% of what they sold on eBay after selling their old jewelry, calculate the total amount of money the two families made on eBay. | def solve() -> int:
parker_sales = 600
williamson_sales = parker_sales * 0.4
total_sales = parker_sales + williamson_sales
result = total_sales
return result
|
Max paid off some of his mortgage. Seven years ago, he paid $1000 while last month, he paid $250 more. If his mortgage was $5000 in total, how much more does he have to pay? | def solve() -> int:
mortgage = 5000
paid_7_years_ago = 1000
paid_last_month = paid_7_years_ago + 250
total_paid = paid_7_years_ago + paid_last_month
remaining_balance = mortgage - total_paid
result = remaining_balance
return result
|
Student: A jewelry store will give you a 15% discount on your entire purchase. If your purchase totals $200 before tax, how much money will you save? | def solve() -> int:
purchase_price = 200
discount_rate = 0.15
discount_amount = purchase_price * discount_rate
total_amount = purchase_price - discount_amount
amount_saved = purchase_price - total_amount
result = amount_saved
return result
|
Student: On Monday, a grocery store sold 450 apples, on Tuesday they sold twice as much as on Monday, and on Wednesday they sold 300 apples. What was the average number of apples sold per day? | def solve() -> int:
monday_apples = 450
tuesday_apples = 2 * monday_apples
wednesday_apples = 300
total_apples = monday_apples + tuesday_apples + wednesday_apples
result = total_apples / 3
return result
|
A museum has collected twice as many paintings by Van Gogh as by Monet. If they have 50 Monet paintings, how many Van Gogh paintings do they have? | def solve() -> int:
monet_paintings = 50
van_gogh_paintings = monet_paintings * 2
result = van_gogh_paintings
return result
|
A can of juice contains twice as much apple juice as grape juice. If the can contains 480 ml of juice, how much apple juice and how much grape juice does it contain? | def solve() -> int:
total_juice = 480
from sympy import symbols, solve
x, y = symbols('x y')
eq1 = x + y - total_juice
eq2 = y - 2*x
sol = solve((eq1, eq2), (x, y))
result = sol[x], sol[y]
return result
|
What is the total area of a triangle with base 8 and height 10? | def solve() -> int:
base = 8
height = 10
area = 0.5 * base * height
result = area
return result
|
There were 27 mice and 3 times as many pieces of cheese. If one of the mice ate 8 pieces of cheese, how many more pieces of cheese than mice are there now? | def solve() -> int:
mice = 27
cheese = 3 * mice
cheese_eaten = 8
result = (cheese - cheese_eaten) - mice
return result
|
Ethan, Owen, and Liam decided to share a box of 45 chocolates. Ethan took 12, Owen took 16 and Liam took the rest. Their mom then bought them another box of 27 chocolates. Ethan received 5 more chocolates, Owen received 8 more, and the rest went to Liam. How many more chocolates did Liam get than Ethan? | def solve() -> int:
ethan_chocolates = 12
owen_chocolates = 16
total_chocolates = 45
liam_chocolates = total_chocolates - (ethan_chocolates + owen_chocolates)
mom_chocolates = 27
ethan_chocolates += 5
owen_chocolates += 8
liam_chocolates += mom_chocolates - (5 + 8)
mor... |
A bookstore has 450 books. They sell 150 books and then receive 75 more books from their distributor. Later, they sell 200 more books. How many books does the bookstore have now? | def solve() -> int:
num_books = 450
num_books -= 150
num_books += 75
num_books -= 200
result = num_books
return result
|
Lila is buying candy. She sees a stand of candy advertising 4 candies for $1.50 and another one advertising 8 candies for $3. Assuming there's no price discount for buying in bulk, how much would Lila spend in cents if she bought 11 of the cheaper of the two candies? | def solve() -> int:
candies_per_pack1 = 4
price1 = 150
candies_per_pack2 = 8
price2 = 300
cheaper_candies = min(price1 / candies_per_pack1, price2 / candies_per_pack2)
total_cost = cheaper_candies * 11
result = int(total_cost * 100)
return result
|
Mike has 5 marbles. Sam has 3 marbles. How many marbles in total do they have? | def solve() -> int:
marbles_mike = 5
marbles_sam = 3
total_marbles = marbles_mike + marbles_sam
result = total_marbles
return result
|
Abbie and Linda went for a bike ride, Abbie rode three times as far as Linda. If they both rode 28 kilometers, how many kilometers did Abbie ride? | def solve() -> int:
distance_abbie = 0
distance_linda = 0
distance_abbie = distance_linda * 3
distance_linda = (28 - distance_abbie) / 3
result = distance_abbie
return result
|
Student: Alex has 2 times as many books as Bob plus another 105 books. If Alex has 93 fewer books than Bob, how many books does Alex have? | def solve() -> int:
bob_books = 0
alex_books = 0
bob_books = bob_books + 105
alex_books = alex_books + (2 * bob_books)
alex_books = alex_books - 93
result = alex_books
return result
|
The total cost of Diane’s groceries was $88. The beef cost her $28, the chicken cost her $15, and the potatoes cost her $7. The only other groceries she bought were carrots. In dollars, how much money did the carrots cost her? | def solve() -> int:
beef_cost = 28
chicken_cost = 15
potatoes_cost = 7
total_cost = 88
carrots_cost = total_cost - (beef_cost + chicken_cost + potatoes_cost)
result = carrots_cost
return result
|
Student: A rectangle has a length of 10 cm and a width of 5 cm. What is its perimeter? | def solve() -> int:
length = 10
width = 5
perimeter = 2 * (length + width)
result = perimeter
return result
|
A motorist drove a total distance of 180 miles and used 10 gallons of fuel. How many miles per gallon did he average? | def solve() -> int:
total_dist = 180
total_fuel = 10
miles_per_gallon = total_dist / total_fuel
result = miles_per_gallon
return result
|
- Mia is a graphic designer who charges $30 per hour for her services. She also pays a monthly fee of $120 for using a software platform. Ali is another graphic designer who charges $28 per hour, but he pays a commission of 15% to a website that connects him with clients. How much money per month would Mia earn more th... | def solve() -> int:
mia_hourly = 30
mia_fee = 120
ali_hourly = 28
ali_commission = 0.15
mia_income = mia_hourly * 100 - mia_fee
ali_income = ali_hourly * 100 * (1 - ali_commission)
difference = mia_income - ali_income
result = difference
return result
|
Student: A car travels at an average speed of 60km/h for 3 hours. How far does it travel? | def solve() -> int:
speed = 60
time = 3
distance = speed * time
result = distance
return result
|
Student: A classroom has 24 desks, arranged in 6 rows with 4 desks in each row. If 16 students are in the class, how many desks will be unused? | def solve() -> int:
desks = 24
rows = 6
desks_per_row = 4
students = 16
used_desks = students
unused_desks = desks - used_desks
result = unused_desks
return result
|
Mark bought 140 pencils at 1 dollar each. He also bought 28 pens at 2 dollars each. How much did he spend in total? | def solve() -> int:
pencils = 140
pen_price = 2
pencil_price = 1
pens = 28
total_money = (pencils * pencil_price) + (pens * pen_price)
result = total_money
return result
|
The difference between the ages of John and Maria is 16 years. John is twice as old as Maria. If John is 32 years old, what is Maria's age? | def solve() -> int:
age_john = 32
age_maria = age_john/2-8
result = age_maria
return result
|
A car travels at a speed of 60km/h. If the car travels for 4 hours, how far has it travelled? | def solve() -> int:
speed = 60
time = 4
distance = speed * time
result = distance
return result
|
Hank is driving a race car at a speed of 200 kilometers per hour. How far will he go in two hours? | def solve() -> int:
speed = 200
time = 2
distance = speed*time
result = distance
return result
|
A construction company needs to buy 1000 bricks for a project. If one brick costs $0.50, how much will all the bricks cost? | def solve() -> int:
brick_cost = 0.50
num_bricks = 1000
total_cost = brick_cost * num_bricks
result = total_cost
return result
|
Emma receives a 30% discount on a dress that originally costs $150. What is the final cost of the dress? | def solve() -> int:
original_cost = 150
discounted_cost = original_cost*0.7
result = discounted_cost
return result
|
Mark has a rectangular garden with a length of 8 meters and a width of 6 meters. He wants to plant flowers around the perimeter of the garden. If he buys 12 meters of flower border, what is the maximum length of the garden that he can plant the border around? | def solve() -> int:
perimeter = 2 * (8 + 6)
max_length_to_border = (12 - perimeter) / 2 + 8
result = max_length_to_border
return result
|
Some possible new questions and programs are: Ben took 3 books from the library and returned 1 book later that day. He borrowed 2 more books the next day and kept them for a week. How many books did Ben borrow from the library in total? | def solve() -> int:
books_taken = 3
books_returned = 1
books_taken = books_taken + 2
books_returned = books_returned + 0
books_borrowed = books_taken - books_returned
result = books_borrowed
return result
|
A pizza has a diameter of 12 inches. What is the circumference of the pizza? | def solve() -> int:
diameter = 12
radius = diameter / 2
pi = 3.14
circumference = 2 * pi * radius
result = circumference
return result
|
A coin collector has 100 coins in his collection. He has 25 pennies, 15 nickels, 20 dimes, 30 quarters, and 10 half-dollars. What is the total value of his collection in dollars? | def solve() -> int:
coins = 100
pennies = 25
nickels = 15
dimes = 20
quarters = 30
half_dollars = 10
penny_value = 0.01
nickel_value = 0.05
dime_value = 0.1
quarter_value = 0.25
half_dollar_value = 0.5
penny_value = pennies * penny_value
nickel_value = nick... |
Emma did some gardening for 30 minutes, a certain amount of time knitting, read a magazine for 15 minutes, and chatted with her neighbor for 20 minutes. If she spent a total of one hour and 45 minutes on these tasks, how long, in minutes, did she knit? | def solve() -> int:
total_time = 105
remaining_time = total_time - (30 + 15 + 20)
knitting_time = remaining_time
result = knitting_time
return result
|
Mary is buying a laptop for $500 and a printer for $80. She will get a 10% discount on the laptop and a 20% discount on the printer. How much money will she have to pay after the discounts are applied? | def solve() -> int:
laptop_cost = 500
printer_cost = 80
laptop_discount_rate = 0.1
printer_discount_rate = 0.2
discount_laptop = laptop_discount_rate * laptop_cost
discount_printer = printer_discount_rate * printer_cost
discount_total = discount_laptop + discount_printer
total_... |
John has 7 more than double as many shoes as Maria. Maria has one-third as many shoes as Kim. If John has 22 shoes, how many does Kim have? | def solve() -> int:
john_shoes = 22
maria_shoes = john_shoes / 2 - 7
kim_shoes = maria_shoes * 3
result = kim_shoes
return result
|
Jeremy bought a book for $18.95 and paid with a $20 bill. He received some change in coins, consisting of 3 quarters, 2 dimes, and 4 pennies. How much did the book store owe him before giving him the change? | def solve() -> int:
change = 0.25 * 3 + 0.1 * 2 + 0.01 * 4
amount = 20 - 18.95 - change
result = amount
return result
|
Trish has 25 pieces of paperclips in her desk drawer. She needs to give 30 paperclips to her friend. How many will be left in her desk drawer? | def solve() -> int:
num_of_paperclips = 25
for item in range(0,30):
num_of_paperclips = num_of_paperclips - 1
result = num_of_paperclips
return result
|
How much time does Kitty need to complete 2 weeks of tasks if she spends 1 hour each week on cleaning windows and dusting? | def solve() -> int:
num_weeks = 2
time_window = 1
time_dusting = 1
result = num_weeks * (5 + 20 + time_window + time_dusting)
return result
|
A swimming pool has a length of 5 feet and a width of 10 feet. A square has a width of 6 feet. What is the difference in area between the two shapes? | def solve() -> int:
length_pool = 5
width_pool = 10
width_square = 6
area_pool = length_pool * width_pool
area_square = width_square ** 2
difference = area_pool - area_square
result = difference
return result
|
Tyler went to the store and bought a toy truck that cost $18 and some candy that cost $2. If he paid with a $20 bill, what was the amount of change that he received? | def solve() -> int:
price_truck = 18
price_candy = 2
total_paid = 20
total_cost = price_truck + price_candy
change = total_paid - total_cost
result = change
return result
|
Mr. Smith spent 25% of his salary on rent, 15% of his salary on food and saved the rest. If the amount of money saved was $750, what was his salary? | def solve() -> int:
rent_percentage = 25
food_percentage = 15
savings_percentage = 100 - rent_percentage - food_percentage
savings_amount = 750
total_salary = savings_amount*100/savings_percentage
result = total_salary
return result
|
Susan had 25 toy cars in her collection. She gave 3/5 of them to her younger brother and lost 2 of the remaining ones. How many toy cars does Susan have now? | def solve() -> int:
toy_cars = 25
given_to_brother = (3/5) * toy_cars
remaining_cars = toy_cars - given_to_brother
lost_cars = 2
susan_cars = remaining_cars - lost_cars
result = susan_cars
return result
|
If Wendy spends $8 on lunch every day, how much will she spend in 4 weeks? | def solve() -> int:
amount = 0
for i in range(4):
amount = amount + 8 * 7
result = amount
return result
|
A car salesman makes 7 sales in the first day of his new job. On each of the following days, he makes double the number of sales he made the day before. At the end of his first week, how many sales has he made in total? | def solve() -> int:
total_sales = 0
day_1 = 7
total_sales = total_sales + day_1
day_2 = day_1 * 2
total_sales = total_sales + day_2
day_3 = day_2 * 2
total_sales = total_sales + day_3
day_4 = day_3 * 2
total_sales = total_sales + day_4
day_5 = day_4 * 2
total_sales ... |
Ana needs 5 cartons of eggs to make 30 cupcakes. How many cartons of eggs does Ana need to make 75 cupcakes? | def solve() -> int:
cartons_for_30_cupcakes = 5
cupcakes_needed = 75
cartons_needed = (cupcakes_needed / 30) * cartons_for_30_cupcakes
result = cartons_needed
return result
|
A company wants to distribute their 420 employees into teams of equal sizes. What is the maximum number of employees in each team? | def solve() -> int:
num_employees = 420
num_teams = 5
max_employees_per_team = num_employees // num_teams
result = max_employees_per_team
return result
|
Student: A store sells apples for $0.75 each, oranges for $0.90 each, and bananas for $0.50 each. If Sarah buys 2 apples, 3 oranges, and 4 bananas, how much does she have to pay in total? | def solve() -> int:
apples = 2
oranges = 3
bananas = 4
total_cost = apples * 0.75 + oranges * 0.90 + bananas * 0.50
result = total_cost
return result
|
Emily covers a distance of 32 miles at a speed of 4 mph. What should be her speed for next 2 hours to maintain an average speed of 6 mph? | def solve() -> int:
distance = 32
speed1 = 4
time1 = distance / speed1
remaining_distance = distance - (speed1 * time1)
remaining_time = 2
required_speed = (distance + remaining_distance) / (time1 + remaining_time)
result = required_speed
return result
|
In a store, bottles of water cost $3 for 6 bottles. How much money will Brenda need to purchase 24 bottles? | def solve() -> int:
cost_per_6_bottles = 3
num_of_bottles = 24
total_cost = (num_of_bottles // 6) * cost_per_6_bottles + (num_of_bottles % 6) * cost_per_6_bottles
result = total_cost
return result
|
Scarlett and Alexander filled a vase with 50 pencils on Monday. They took 5/6 of the pencils out on Tuesday and split them equally. On Wednesday, Scarlett picked out 1/3 of the remaining pencils. How many pencils did Scarlett have on Wednesday? | def solve() -> int:
pencils_on_monday = 50
pencils_taken_out_on_tuesday = (5/6) * pencils_on_monday
pencils_remaining_on_tuesday = pencils_on_monday - pencils_taken_out_on_tuesday
pencils_picked_out_on_wednesday = (1/3) * pencils_remaining_on_tuesday
pencils_scarlett_had_on_wednesday = pencils_picke... |
Evan scored 18 points in a basketball game and 24 points in another game. Then he scored 30% less than the average of his first two games in the third game. He scored 6 more points than the third game in the fourth game. How many points did Evan score in total in the four games? | def solve() -> int:
game1 = 18
game2 = 24
average = (game1 + game2) / 2
game3 = average * 0.7
game4 = game3 + 6
result = game1 + game2 + game3 + game4
return result
|
Jay charges $20 per hour of tutoring plus a $6 surcharge. If Jay tutored for 2 hours and 40 minutes and charged $90, how much did he charge per hour? | def solve() -> int:
total_time = 160
total_charged = 90
hour_rate = 20
surcharge = 6
total_hour = total_time//60
total_minute = total_time%60
hour_fee = total_hour * hour_rate
surcharge_fee = total_minute * (surcharge/60)
result = (total_charged - hour_fee - surcharge_fee)/... |
Emma started her education when she was 16 years old. After 5 years she was promoted from undergraduate to graduate and it took her 10 years of extra study for her to obtain a doctorate degree. If the time taken for post-graduate study was 30% more than the undergraduate, how many total years of study did Emma complete... | def solve() -> int:
emma_start_age = 16
undergraduate_time = 5
postgraduate_time_ratio = 30
postgraduate_time = undergraduate_time * (1 + postgraduate_time_ratio/100)
result = emma_start_age + undergraduate_time + postgraduate_time
return result
|
Lisa has a rectangular garden that measures 15 feet by 20 feet. She wants to plant roses along the perimeter of the garden. Each rose plant needs 2 feet of space. How many rose plants, in whole numbers, can she plant along the perimeter? | def solve() -> int:
length = 15
width = 20
space = 2
perimeter = 2 * (length + width)
plants = perimeter // space
result = plants
return result
|
David, Jacob, and Joseph have some coins. David has 7 fewer than Jacob, and Jacob has 12 fewer than Joseph. If Joseph has 50 coins, how many coins, in total, do all three of them have? | def solve() -> int:
joseph_coins = 50
jacob_coins = joseph_coins + 12
david_coins = jacob_coins - 7
total_coins = joseph_coins + jacob_coins + david_coins
result = total_coins
return result
|
Claire has $325. She wants to buy a camera that costs $250. How much money will she have left after buying the camera? | def solve() -> int:
money = 325
cost_of_camera = 250
money_left = money - cost_of_camera
result = money_left
return result
|
Student: A project manager who has been working for 5 years and who earns $80,000 a year has obtained a 3% bonus. What is his total earnings after the bonus? | def solve() -> int:
years_worked = 5
annual_salary = 80000
bonus_percentage = 0.03
bonus = annual_salary * bonus_percentage
total_earnings = annual_salary + bonus
result = total_earnings
return result
|
Karen and David are buying a new sofa that costs $1000. They agreed that Karen would pay 80% of the cost. How much does David need to pay to complete the purchase? | def solve() -> int:
cost = 1000
karen_payment = cost * 0.8
david_payment = cost - karen_payment
result = david_payment
return result
|
During a swimming competition, Sarah swims a distance of 300 meters, while her friend Josh swims a third the distance. Another friend swims 9 times as much as Josh. What is the average distance swam per player? | def solve() -> int:
sarah_distance = 300
josh_distance = sarah_distance / 3
friend_distance = josh_distance * 9
total_distance = sarah_distance + josh_distance + friend_distance
average_distance = total_distance / 3
result = average_distance
return result
|
Ann's property tax rate is 3%. Her house is currently worth $250,000. She wants to install a swimming pool that will increase her house's value by 10%. Ann can only afford to spend $5,000/year on property tax. How much can Ann spend on the swimming pool before her property tax bill becomes too high? | def solve() -> int:
tax_rate = 0.03
house_value = 250000
pool_increase = 0.1
max_tax = 5000
new_value = house_value + (pool_increase * house_value)
new_tax = new_value * tax_rate
max_pool_cost = (max_tax / tax_rate) - house_value
result = max_pool_cost
... |
Kim wants to become an engineer. She spent four years in college getting a degree in mechanical engineering. She then went on to pursue a degree in chemical engineering, which took her two more years. She also got a graduate degree in engineering management, which took another 2 years. How many years did Kim spend goin... | def solve() -> int:
mech_eng_years = 4
chem_eng_years = 2
eng_mgmt_years = 2
total_years = mech_eng_years + chem_eng_years + eng_mgmt_years
result = total_years
return result
|
Possible math questions and programs: Rita has a jar of 12 marbles. She gives 4 marbles to her brother and 2 marbles to her sister. Then she receives 3 more marbles from her friend. How many marbles does Rita have now? | def solve() -> int:
marbles = 12
marbles = marbles - 4 - 2
marbles = marbles + 3
result = marbles
return result
|
Luke has 42 boxes of crayons. Two-sevenths of the boxes are blue, four-sevenths are red and the rest are yellow. How many yellow boxes does Luke have? | def solve() -> int:
totalBoxes = 42
blueBoxes = totalBoxes * 2/7
redBoxes = totalBoxes * 4/7
yellowBoxes = totalBoxes - blueBoxes - redBoxes
result = yellowBoxes
return result
|
A parcel delivery service charges a base rate of $5 with an additional $2.50 for each pound of the parcel. If a parcel of 6 pounds was delivered, what was the total cost? | def solve() -> int:
cost_per_pound = 2.50
parcel_weight = 6
total_cost = 5 + cost_per_pound * parcel_weight
result = total_cost
return result
|
Amy is a librarian who earns $25 per hour. She works 8 hours a day from Monday to Friday and 4 hours on Saturday. How much money does she make in a month if there are 4 weeks in a month? | def solve() -> int:
daily_hours = 8
weekly_hours = daily_hours * 5 + 4
weekly_income = weekly_hours * 25
monthly_income = weekly_income * 4
result = monthly_income
return result
|
Result for A circle has a radius of 5 inches. If you double the radius, what is the new area of the circle? | def solve() -> int:
original_radius = 5
new_radius = 2 * original_radius
new_area = 3.14 * new_radius * new_radius
result = new_area
return result
|
A rectangular prism measures 4 m by 5 m by 6 m. How many square meters of wrapping paper are needed to wrap the entire box? | def solve() -> int:
length = 4
width = 5
height = 6
surface_area = 2 * (length * width + length * height + width * height)
result = surface_area
return result
|
What is the value of x if 2x + 5 = 17? | def solve() -> int:
x = (17-5)/2
result = x
return result
|
A teacher prepared 500 question papers for her students. 20% of the questions were multiple choice type. For each multiple choice question, she spent 1.5 minutes setting up the options. How much time did she spend on multiple choice questions in total? | def solve() -> int:
total_questions = 500
multiple_choice_percentage = 20
multiple_choice_questions = (multiple_choice_percentage / 100) * total_questions
time_per_question = 1.5
total_time = multiple_choice_questions * time_per_question
result = total_time
return result
|
Amelia and Jack put 40 pens in a box on a Tuesday. The following day, they took 3/5 of the pens from the box and divided them equally. On the third day, Jack took 1/6 of the pens that were left. How many pens did Jack take on the third day? | def solve() -> int:
pens_in_box = 40
pens_taken_day2 = (3/5) * pens_in_box
pens_left_day2 = pens_in_box - pens_taken_day2
pens_taken_day3 = (1/6) * pens_left_day2
result = pens_taken_day3
return result
|
When Noah turns 24, he will be one-fifth the age of Ethan and five times as old as Olivia. Noah is 11 years old now. What is the sum of the ages of Ethan and Olivia now? | def solve() -> int:
noah_current_age = 11
noah_future_age = 24
ethan_future_age = noah_future_age * 5
ethan_current_age = ethan_future_age - (noah_future_age - noah_current_age)
olivia_future_age = noah_future_age / 5
olivia_current_age = olivia_future_age - (noah_future_age - noah_cur... |
Kevin had some marbles in a jar. He gave away 12 marbles to his friends and then bought 6 more marbles from the store. He noticed that after buying more marbles, the number of marbles in the jar was 4 times the number of marbles he gave away. How many marbles did Kevin have in the jar at first? | def solve() -> int:
marbles_after = 4 * 12
marbles_gave = marbles_after / 4
marbles_first = marbles_gave + marbles_gave + 6
result = marbles_first
return result
|
If a jug can hold 3/4 gallons of liquid, and there are 128 ounces in a gallon, how many fluid ounces can the jug hold? | def solve() -> int:
gallons = 3/4
ounces_per_gallon = 128
total_ounces = gallons * ounces_per_gallon
result = total_ounces
return result
|
Zoe has 800 square feet of wood that she's using to make furniture. She makes square tables that are 5 feet by 5 feet, rectangular chairs that are 4 feet by 2 feet, and triangular stools that are 3 feet wide and 2 feet high. She has already made 6 tables, 12 chairs, and 16 stools. How many square feet of wood does she ... | def solve() -> int:
table_area = 5 * 5
chair_area = 4 * 2
stool_area = 3 * 2 / 2
total_area = 6 * table_area + 12 * chair_area + 16 * stool_area
remaining_area = 800 - total_area
result = remaining_area
return result
|
The sum of the interior angles of a polygon is 900 degrees. How many sides does the polygon have? | def solve() -> int:
sides = (900-360)/180
result = sides
return result
|
- Anna wants to bake a cake for her friend's birthday. She follows a recipe that requires 3 eggs, 2 cups of flour, 1 cup of sugar, and 0.5 cup of oil. She has 12 eggs, 8 cups of flour, 6 cups of sugar, and 3 cups of oil in her pantry. How many cakes can she bake with the ingredients she has? How much of each ingredient... | def solve() -> int:
eggs_cakes = 12 // 3
flour_cakes = 8 // 2
sugar_cakes = 6 // 1
oil_cakes = 3 // 0.5
cakes = min(eggs_cakes, flour_cakes, sugar_cakes, oil_cakes)
eggs_left = 12 - cakes * 3
flour_left = 8 - cakes * 2
sugar_left = 6 - cakes * 1
oil_left = 3 - cakes * ... |
Possible new questions and programs are: Lisa is buying candy bars for her friends. She can get 3 candy bars for $5 or 5 candy bars for $8. If she wants to buy 20 candy bars, how many dollars can she save by choosing the cheaper option? | def solve() -> int:
unit_price_3 = 5 / 3
unit_price_5 = 8 / 5
if unit_price_3 < unit_price_5:
cheaper_option = 3
else:
cheaper_option = 5
num_packs = 20 / cheaper_option
price_per_pack = cheaper_option * eval(f'unit_price_{cheaper_option}')
total_cost_cheaper = num_packs * price_... |
A square has a perimeter of 64 cm. Find the length of the diagonal. | def solve() -> int:
perimeter = 64
side_length = perimeter / 4
diagonal_length = side_length * (2**(1/2))
result = diagonal_length
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.