question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Student: Rachel has 50 dollars, she decided to buy a shirt which cost her 30 dollars, a pair of shoes which cost her 60 dollars, and a scarf which cost her 15 dollars. How much money is left with her? | def solve() -> int:
money = 50
shirt = 30
shoes = 60
scarf = 15
total_spent = shirt + shoes + scarf
result = money - total_spent
return result
|
If a book was bought for $20 and sold for 25% profit, what was the selling price? | def solve() -> int:
cost_price = 20
profit_percentage = 25
profit = (cost_price * profit_percentage) / 100
selling_price = cost_price + profit
result = selling_price
return result
|
In a cinema, there are 80 seats. 65% of them are filled by at least one person, while 50% of the seats are filled by at least two people. How many seats are filled by only one person? | def solve() -> int:
total_seats = 80
filled_seats = total_seats * 0.65
filled_seats_by_two = total_seats * 0.50
filled_seats_by_one = filled_seats - filled_seats_by_two
result = filled_seats_by_one
return result
|
Kelly is a photographer. She charges $50 for every session she does. She also sells prints of her photos for $5 each. She did 4 sessions and sold 20 prints last month. How much money did Kelly earn last month? | def solve() -> int:
session_rate = 50
print_rate = 5
sessions_done = 4
prints_sold = 20
session_income = session_rate * sessions_done
print_income = print_rate * prints_sold
total_income = session_income + print_income
result = total_income
return result
|
A company has 3 factories. Each factory has 50 workers and each worker works on 5 different machines. If each machine has 10 spare parts. How many spare parts does the company need for all the machines in its factories? | def solve() -> int:
total_workers = 3*50
total_machines = total_workers*5
total_spare_parts = total_machines*10
result = total_spare_parts
return result
|
Lily is painting a mural on a wall. The wall is 12 feet long and 8 feet high. She paints one third of the wall with blue paint, one fourth of the wall with yellow paint, and the rest with green paint. She uses one gallon of paint for every 100 square feet of wall. How many gallons of paint does she use in total, rounde... | def solve() -> int:
area = 12 * 8
blue_area = area / 3
yellow_area = area / 4
green_area = area - blue_area - yellow_area
blue_paint = blue_area / 100
yellow_paint = yellow_area / 100
green_paint = green_area / 100
total_paint = blue_paint + yellow_paint + green_paint
result = round(... |
A train travels 180 miles in 3 hours. If it continues traveling at this speed, how far will it travel in 5 hours? | def solve() -> int:
distance_per_hour = 180 / 3
distance_in_5_hours = distance_per_hour * 5
result = distance_in_5_hours
return result
|
John and Mark had a painting competition at an art gallery. The competition was split into three rounds. John painted 5 more paintings than Mark in the first round. Mark painted 2 fewer paintings than John in the second round. John painted 3 more paintings than Mark in the third round. If John painted 20 paintings in e... | def solve() -> int:
john_first_round = 0
mark_first_round = 0
john_second_round = 20
mark_second_round = 0
john_third_round = 20
mark_third_round = 0
mark_first_round = john_first_round - 5
mark_second_round = john_second_round - 2
mark_third_round = john_third_round - 3
... |
Two adjoining swimming pools, each of which can hold 45 liters of water, are connected by a pipe. The pipe can empty both pools in 10 hours while a hose at one side can fill both pools in 6 hours. If both pools were empty at the beginning, how much water will be left in the pools after 7 hours? | def solve() -> int:
pool_size = 45
pipe_rate = 2*pool_size/10
hose_rate = 2*pool_size/6
hours_elapsed = 0
amount_filled_by_hose = 0
amount_emptied_by_pipe = 0
while hours_elapsed < 7:
amount_filled_by_hose += hose_rate
amount_emptied_by_pipe += pipe_rate
... |
A train travels at a speed of 60 mph and a bike travels at a speed of 20 mph. If the distance between them is 240 miles, how long will it take for the bike to catch up to the train? | def solve() -> int:
time_taken = 240 / (60 - 20)
result = time_taken
return result
|
Student: How many cupcakes can Betty make in 6 hours if she makes 12 more cupcakes per hour than Dora? | def solve() -> int:
betty_cupcakes = 12
dora_cupcakes = betty_cupcakes - 12
betty_total = betty_cupcakes * 6
result = betty_total
return result
|
Emily is driving a car that has a gas mileage of 35 miles per gallon. If she has 12 gallons of gas in the car, how far can she travel? | def solve() -> int:
gas_mileage = 35
gallons = 12
distance = gas_mileage * gallons
result = distance
return result
|
John runs 4 miles per day for 2 weeks. How many miles did he run in total? | def solve() -> int:
daily_miles = 4
days = 14
total_miles = daily_miles * days
result = f'{total_miles}'
result = total_miles
return result
|
A recipe for chocolate cake requires 2 cups of flour for every 3 cups of sugar. If you have 6 cups of flour available, how many cups of sugar do you need for the cake? | def solve() -> int:
flour = 6
sugar = (3/2) * flour
result = sugar
return result
|
The cost of 4 chocolate bars and 5 pencils is $14.50. If the cost of 2 chocolate bars is $3.00, what is the cost of 3 pencils? | def solve() -> int:
cost_of_choco_bars = 3.00*2
cost_of_choco_pencils = 14.50 - cost_of_choco_bars
cost_of_one_pencil = cost_of_choco_pencils/5
cost_of_three_pencils = cost_of_one_pencil*3
result = cost_of_three_pencils
return result
|
Mary drove her car for 150 miles on a full tank of gas. If her gas tank holds 15 gallons of gas, what is her car's gas mileage? | def solve() -> int:
mileage = 150 / 15
result = mileage
return result
|
A box contained 400 pencils. There were 5 kids who came to take pencils from the box. The first 2 kids took 3 times as many pencils as each of the last 3 kids took. If the last 3 kids took 20 pencils each, how many pencils were left in the box? | def solve() -> int:
pencils_in_box = 400
num_kids = 5
pencils_last_3_kids = 20
pencils_first_2_kids = 3 * pencils_last_3_kids
total_pencils_taken = pencils_first_2_kids + (3 * pencils_last_3_kids)
pencils_left = pencils_in_box - total_pencils_taken
result = penc... |
Max is working at a library. There were some students studying when he started his shift. Then 4 more students came in and checked out books and 6 students left. There are now 12 students in the library. How many students were studying when Max started his shift? | def solve() -> int:
students_started_shift = 12 - 4 + 6
result = students_started_shift
return result
|
Grace, Emily, and Emma are collecting trading cards. Grace has 36 cards, which is 50% of Emily's cards, and Emily has twice as many cards as Emma. How many trading cards do they have altogether? | def solve() -> int:
grace_cards = 36
emily_cards = grace_cards * 2
emma_cards = emily_cards / 2
total_cards = grace_cards + emily_cards + emma_cards
result = total_cards
return result
|
Kyle has 18 stickers in his collection. He gives 3 stickers to his friend, and then he buys 5 more stickers for every 2 dollars he has. He has 10 dollars in total. How many stickers does he have at the end? | def solve() -> int:
stickers = 18
stickers_given = 3
stickers_per_dollar = 5 / 2
money = 10
stickers -= stickers_given
stickers += stickers_per_dollar * money
result = stickers
return result
|
A bakery uses 6 eggs to make a batch of 8 breads. If they want to use 30 eggs to make as many breads as possible, how many batches of breads can they make? | def solve() -> int:
eggs_per_bread = 6
batch_size = 8
total_eggs = 30
num_batches = total_eggs // eggs_per_bread // batch_size
result = num_batches
return result
|
A pizza parlor has 3 types of pizzas: cheese, pepperoni, and vegetarian. If the ratio of cheese pizza sales to pepperoni pizza sales is 4:3 and the ratio of pepperoni pizza sales to vegetarian pizza sales is 3:2, how many cheese pizzas are sold for every 10 vegetarian pizzas sold? | def solve() -> int:
cheese_to_pepperoni = 4/3
pepperoni_to_vegetarian = 3/2
cheese_to_vegetarian = cheese_to_pepperoni * pepperoni_to_vegetarian
result = cheese_to_vegetarian * 10
return result
|
A recipe requires 2/3 cups of sugar to make 12 cookies. How much sugar is required to make 27 cookies? | def solve() -> int:
cups_of_sugar_for_12_cookies = 2/3
number_of_cookies = 27
cups_of_sugar_for_27_cookies = (cups_of_sugar_for_12_cookies / 12) * number_of_cookies
result = cups_of_sugar_for_27_cookies
return result
|
Josh was standing at the origin of the coordinate plane. He moved 5 units to the left and then 7 units up. Later, he moved 3 units to the left and 4 units down. Finally, he moved 2 units to the right and 5 units up. What are the coordinates of his final position? | def solve() -> int:
point1 = (0,0)
point2 = (-5,7)
point3 = (-8,3)
point4 = (-6,-1)
point5 = (-4,4)
result = point5
return result
|
A rectangular room has a width of 10 feet and a length of 15 feet. The floor of the room is covered with tiles that are 2 feet by 2 feet. What is the total number of tiles needed to cover the entire floor of the room? | def solve() -> int:
tile_width = 2
tile_length = 2
room_width = 10
room_length = 15
tiles_across = room_width // tile_width
tiles_down = room_length // tile_length
total_tiles = tiles_across * tiles_down
result = total_tiles
return result
|
Before beginning a project, a company needs to purchase $3,200 worth of materials for the project. The cost of each material is different. Company A paid $300 for steel, $200 for wood, $700 for concrete, and $1,400 for tools. How much of each material was purchased? | def solve() -> int:
steel = 300
wood = 200
concrete = 700
tools = 1400
total = steel + wood + concrete + tools
total_cost = 3200
percent_steel = steel/total_cost
percent_wood = wood/total_cost
percent_concrete = concrete/total_cost
percent_tools = tools/total_cost
... |
Marian has 25 pencils and the teacher gave her 10 more pencils. Then, her friend asks for 3 pencils. How many pencils does Marian have now? | def solve() -> int:
have = 25
gave = 10
need = 3
left = have + gave - need
result = left
return result
|
Liam's contact list includes 25 people, including 15 classmates. He has three more neighbors than he has extended family members on his contact list. How many extended family members does Liam have on his contact list? | def solve() -> int:
total_people = 25
classmates = 15
neighbors = total_people - classmates - 3
extended_family = total_people - classmates - neighbors
result = extended_family
return result
|
Tanya had 24 cookies and baked 18 more. She wanted to put them in bags with six cookies in each bag. How many bags did she need? | def solve() -> int:
total_cookies = 24 + 18
bags_needed = total_cookies / 6
result = bags_needed
return result
|
12 pizzas are cut into slices of 8 each. How many slices of pizza are there in total? | def solve() -> int:
number_of_pizzas = 12
slices_per_pizza = 8
total_slices = number_of_pizzas*slices_per_pizza
result = total_slices
return result
|
Here are some possible new questions: Tom can paint 8 fences in 4 hours. Jerry can paint 7 fences in 4 hours and Brad can paint 6 fences in 4 hours. If they start painting at 9 am, how many fences will they have painted by 1 pm? | def solve() -> int:
tom_rate = 8 / 4
jerry_rate = 7 / 4
brad_rate = 6 / 4
total_rate = tom_rate + jerry_rate + brad_rate
hours = 1 - 9
fences = total_rate * hours
result = fences
return result
|
Maria spent 1/4 of her money on a watch. She then spent 1/6 of the remaining money on a necklace. If she had $300 left in her wallet, how much money did she have at first? | def solve() -> int:
money = 300/(1-1/4-1/6)
watch = money/4
remaining = money - watch
necklace = remaining/6
result = money + watch
return result
|
If Sally baked 3 dozen cookies, and gave away 4 cookies to each of her 6 friends, how many cookies does she have left? | def solve() -> int:
total_cookies = 3 * 12
cookies_given_away = 4 * 6
cookies_left = total_cookies - cookies_given_away
result = cookies_left
return result
|
A bookstore sells books for $15 each or 3 for $40. If Samantha buys 5 books, what is the total cost? | def solve() -> int:
single_price = 15
bulk_price = 40
bulk_quantity = 3
num_books = 5
bulk_sets = num_books // bulk_quantity
single_books = num_books % bulk_quantity
total_cost = (bulk_sets * bulk_price) + (single_books * single_price)
result = total_cost
return result
|
Ethan decided to hike around a rectangular trail. The perimeter of the trail is 24 miles. Ethan can hike at four times the speed he can crawl. It takes him 10 minutes to crawl 50 meters. How long, in hours, does it take to hike around the trail? | def solve() -> int:
perimeter = 24
crawl_speed = 50 / 10
hike_speed = crawl_speed * 4
distance = perimeter * 1609.34
time = distance / hike_speed / 60 / 60
result = time
return result
|
Margaret has 4 rosebushes in her garden with different amounts of flowers on them. Bush A has 8 flowers, Bush B has 6 flowers, Bush C has 4 flowers, and Bush D has twice as many flowers as bush C. How many flowers does bush D have? | def solve() -> int:
BushA = 8
BushB = 6
BushC = 4
result = BushC*2
return result
|
A fishing boat caught 24 trout, but 10 were too small to sell. How many fish could the fisherman sell? | def solve() -> int:
num_trout_caught = 24
num_trout_unsellable = 10
num_trout_sellable = num_trout_caught - num_trout_unsellable
result = num_trout_sellable
return result
|
Student: If Chad wants to sell all of his small apples as soon as possible, what is the minimum number of small apples he needs to sell each day if he has 200 small apples and wants to sell them in 2 weeks? | def solve() -> int:
small_apples = 200
days = 14
min_apples_per_day = small_apples // days
remainder = small_apples % days
extra_days = remainder
result = min_apples_per_day
return result
|
A coffee shop sells three types of coffee: regular, decaf, and espresso. A cup of regular coffee costs $2, a cup of decaf coffee costs $2.50, and a cup of espresso costs $4. If the coffee shop sold 100 cups of regular coffee, five times as many decaf cups as regular cups, and half as many espresso cups as decaf cups, h... | def solve() -> int:
regular_price = 2
decaf_price = 2.5
espresso_price = 4
num_regular_cups = 100
num_decaf_cups = 5 * num_regular_cups
num_espresso_cups = num_decaf_cups // 2
total_revenue = (regular_price * num_regular_cups) + (decaf_price * num_decaf_cups) + (espresso_price * num_espresso... |
William has $80. He needs to buy some mushrooms, which cost $2.75 a pound, and some spinach that costs $1.50 a pound. After buying the veggies, he has $60 left. How many pounds of mushrooms did he buy? Alice works at the Muffin Factory in the packaging department. She puts 4 muffins in each bag, which are 3 inches wide... | def solve() -> int:
mushroom_price = 2.75
spinach_price = 1.50
total_money = 80
remaining_money = 60
total_cost = total_money - remaining_money
mushroom_cost = total_cost / (mushroom_price + spinach_price) * mushroom_price
mushroom_pounds = mushroom_cost / mushroom_price
... |
You're making a sandwich with 2 slices of bread and 3 toppings. If you have 6 different options for toppings, how many possible sandwich combinations can you make? | def solve() -> int:
slices_of_bread = 2
toppings = 3
options = 6
combinations = options**toppings * slices_of_bread
result=combinations
return result
|
Student: A store sells t-shirts for $15 each and hats for $12 each. If a customer buys 2 t-shirts and 1 hat, how much does the customer pay? | def solve() -> int:
t_shirt_price = 15
hat_price = 12
t_shirt_quantity = 2
hat_quantity = 1
t_shirt_cost = t_shirt_price * t_shirt_quantity
hat_cost = hat_price * hat_quantity
total_cost = t_shirt_cost + hat_cost
result = total_cost
return result
|
Lucas has 40 cards and he trades 8 of them with his friend. Mia has 28 cards and she buys 4 more from the store. How many fewer cards does Mia have than Lucas after the trade? | def solve() -> int:
lucas = 40 - 8
mia = 28 + 4
difference = lucas - mia
result = difference
return result
|
A person can row a boat at a speed of 6 miles per hour in still water. It takes him 3 hours to row **upstream** a river to a destination. On the way back **downstream** to his starting point, it only takes him 2 hours. What is the speed of the current in the river? | def solve() -> int:
speed_in_still_water = 6
time_upstream = 3
time_downstream = 2
distance_upstream = speed_in_still_water * time_upstream
distance_downstream = speed_in_still_water * time_downstream
current_speed = (distance_downstream - distance_upstream) / (2 * time_upstream)
result = cu... |
If Emma is 30 and her son is 10, in how many years will Emma be twice her son's age? | def solve() -> int:
emma_age = 30
son_age = 10
years = 0
while emma_age!= 2 * son_age:
emma_age += 1
son_age += 1
years += 1
result = years
return result
|
Student: The total area of a playground was 16000 square feet. If the basketball court took up 33% of the total area, how many square feet did the rest of the playground cover? | def solve() -> int:
total_area = 16000
basketball_percent = 0.33
basketball_area = total_area * basketball_percent
rest_area = total_area - basketball_area
result = rest_area
return result
|
Possible examples of questions and python programs are: Lana has 6 bags of candies. Each bag has 15 candies. She gives 2/5 of the candies to her friends. How many candies does she have left? | def solve() -> int:
total = 6 * 15
given = 2/5 * total
left = total - given
result = left
return result
|
Amy baked 15 cupcakes for her friends. She gave away one third of them and ate two herself. How many cupcakes did Amy have left? | def solve() -> int:
given_away = 15 // 3
eaten = 2
left = 15 - given_away - eaten
result = left
return result
|
Maria is planting a garden. She needs to space each tomato plant 2 feet apart. If she has a 10 foot row, how many tomato plants can she fit in the row? | def solve() -> int:
plants_per_row = 10/2
result = plants_per_row
return result
|
Student: If a basket has 12 apples and 8 are eaten, how many apples are left? | def solve() -> int:
num_apples_in_basket = 12
num_apples_eaten = 8
num_apples_left = num_apples_in_basket - num_apples_eaten
result = num_apples_left
return result
|
The average annual rainfall in a region was 50 inches in 2010, and in 2015 the average annual rainfall increased to 70 inches. Calculate the average annual increase in rainfall over a period of five years. | def solve() -> int:
rainfall_2010 = 50
rainfall_2015 = 70
increase = rainfall_2015 - rainfall_2010
average_increase = increase / 5
result = average_increase
return result
|
**QUESTION 9:** A customer purchases 2 items from the store. The first item costs $9.25 and the second item costs $6.20. What is the total cost of the items? | def solve() -> int:
result = 0
result += 9.25
result += 6.20
return result
|
A classroom has 6 rows of 4 desks each. A teacher assigns 2 students to share each desk. How many students can fit in the classroom? | def solve() -> int:
desks = 6 * 4
students_per_desk = 2
students = desks * students_per_desk
result = students
return result
|
A store received a shipment of 500 apples. If they sell 4 apples in a bag each day, how many days will it take until they sell all the apples? | def solve() -> int:
apples_received = 500
apples_per_bag = 4
bags_per_day = apples_per_bag / 1
days_to_sell_all_apples = apples_received / (bags_per_day * 1)
result = days_to_sell_all_apples
return result
|
A manufacturer sells 1500 widgets for $3.00 each and 2500 widgets for $2.50 each. What is the weighted average price for the widgets? | def solve() -> int:
price1 = 3.00
price2 = 2.50
quantity1 = 1500
quantity2 = 2500
total_quantity = quantity1 + quantity2
weighted_average_price = ((price1 * quantity1) + (price2 * quantity2)) / total_quantity
result = round(weighted_average_price, 2)
return result
|
A bag contains 8 red marbles and 2 blue marbles. If you pick a marble without looking, what is the probability that it will be red? | def solve() -> int:
total_marbles = 10
red_marbles = 8
red_probability = red_marbles / total_marbles
result = red_probability
return result
|
Marybeth drew a picture in 3 hours and Josh drew a picture in 5 hours. If they worked together, how long would it take them to finish both drawings? | def solve() -> int:
time_marybeth = 3
time_josh = 5
total_time = time_marybeth + time_josh
result = total_time
return result
|
A train leaves the station with 200 passengers on board. The number of passengers increases by 15 every 4 minutes. After how many minutes, will there be a total of 400 passengers onboard? | def solve() -> int:
minutes = 0
passengers = 200
while passengers < 400:
minutes += 4
passengers += 15
result = minutes
return result
|
A grocery store is having a sale where you can buy 2 items for the price of 1. If a customer buys 5 items, what is the total cost including sales tax (10%) if each item is originally priced at $10? | def solve() -> int:
num_items = 5
original_price = 10
discounted_price = original_price * (num_items/2)
sales_tax_percent = 0.1
total = discounted_price + (discounted_price * sales_tax_percent)
result = round(total, 2)
return result
|
Jake is tracking his carb intake per week. He eats 2 slices of bread on Monday, 1 cup of pasta on Wednesday, and 3 tortillas on Friday. If a slice of bread has 15 grams of carbs, a cup of pasta has 30 grams of carbs, and a tortilla has 10 grams of carbs, how many grams of carbs does Jake get in a week? | def solve() -> int:
bread_carbs = 2 * 15
pasta_carbs = 1 * 30
tortilla_carbs = 3 * 10
total_carbs = bread_carbs + pasta_carbs + tortilla_carbs
result = total_carbs
return result
|
Ethan is a tutor who charges $30 per hour of lesson. He taught twice as many lessons today as he taught in the past three days. If Ethan taught 15 lessons in the past three days, how much money did he earn in the past three days including today? | def solve() -> int:
past_lessons = 15
today_lessons = past_lessons * 2
total_lessons = past_lessons + today_lessons
hourly_rate = 30
total_earnings = total_lessons * hourly_rate
result = total_earnings
return result
|
A train covers 150 km in 2.5 hours. What is its average speed in meters per second? | def solve() -> int:
distance_km = 150
distance_m = distance_km * 1000
time_hours = 2.5
time_seconds = time_hours * 3600
speed_ms = distance_m / time_seconds
result = speed_ms
return result
|
If Sarah is planning a camping trip with 4 friends and each tent costs $17.99, what is the cost for all of the tents? | def solve() -> int:
no_of_friends = 4
cost_per_tent = 17.99
result = no_of_friends*cost_per_tent
return result
|
John has 40 coins consisting of quarters and dimes. If the total value of his coins is $7.20, how many quarters does John have? | def solve() -> int:
total_number_of_coins = 40
quarters_value = 0.25
dimes_value = 0.10
total_value_of_coins = 7.20
total_dimes = total_number_of_coins - ((total_value_of_coins - (total_number_of_coins * quarters_value))/dimes_value)
total_quarters = total_number_of_coins - total_dimes
resul... |
A company sells 20000 units of a product every week. Each unit costs $5 to produce. The company sells each unit for $15. The company pays 15% of the revenue in taxes, 10% in salaries, and 5% in rent. What is the net profit for the company each week? | def solve() -> int:
units_sold = 20000
production_cost_per_unit = 5
unit_sales_price = 15
total_production_cost = units_sold * production_cost_per_unit
total_sales_income = units_sold * unit_sales_price
taxes = 0.15 * total_sales_income
remaining_amount = total_sales_income - taxes
salar... |
John has 10 books. He gives away 1/5 of his books to his little sister. If he wants to have a total of 7 books remaining, how many books can he give his little sister? | def solve() -> int:
books = 10
remaining_books = 7
books_given_to_sister = books - remaining_books
books_given_to_sister = books_given_to_sister * 5
result = books_given_to_sister
return result
|
Bobby is baking pies for his mother's birthday. On Monday he baked 4 pies, twice as many pies as on Monday on Tuesday and three times less pies than on Tuesday on Wednesday. On Thursday he baked the same number of pies as on Monday and Tuesday combined and on Saturday he made an amount of pies half the number of pies h... | def solve() -> int:
total_pies = 0
total_pies += 4
total_pies += 8
total_pies += 2.67
total_pies += 12
total_pies += 6
result = total_pies
return result
|
Student: A customer has 18 books and 24 items with her for check out. If each item is charged at $2, how much money does the customer have to pay in total? | def solve() -> int:
books = 18
items = 24
item_price = 2
total_price = items * item_price
result = total_price
return result
|
A triangle has a base of 10 cm and a height of 6 cm. What is its area? | def solve() -> int:
base = 10
height = 6
area = 0.5 * base * height
result = area
return result
|
Nicky has 28 marbles and he puts 5 more in his jar. How many marbles does Nicky have in the jar? | def solve() -> int:
original_num_marbles = 28
num_more_marbles = 5
result = original_num_marbles + num_more_marbles
return result
|
There are 5 red balls, 7 blue balls and 3 green balls in a bag. If one ball is chosen at random, what is the probability that it is blue? | def solve() -> int:
total_balls = 5 + 7 + 3
blue_balls = 7
probability_blue = blue_balls / total_balls
result = probability_blue
return result
|
A recipe calls for 2/3 cup of flour to make 12 cookies. How much flour is needed to make 48 cookies? | def solve() -> int:
flour_per_cookie = 2/3 / 12
flour_needed = flour_per_cookie * 48
result = flour_needed
return result
|
In his store, Karl also sells jackets which cost $12. How much is his total income if he sold three jackets, four pairs of shoes, two T-shirts, one pair of pants, and five pairs of socks? | def solve() -> int:
price_shoe = 9
price_pants = 4
price_tshirt = 5
price_jacket = 12
price_socks = 1
num_sales_shoe = 4
num_sales_pant = 1
num_sales_tshirt = 2
num_sales_jacket = 3
num_sales_socks = 5
total_income = (price_shoe * num_sales_shoe) + (price_pants ... |
Ethan used to buy 2 movie tickets a week for $10 each. The cinema raised the price by 40%, so he only goes once a week now. How much money does he save per week compared to what he used to spend? | def solve() -> int:
tickets_per_week = 2
old_ticket_price = 10
new_ticket_price = old_ticket_price * 1.4
new_tickets_per_week = 1
old_spending = tickets_per_week * old_ticket_price
new_spending = new_tickets_per_week * new_ticket_price
money_saved_per_week = old_spending - new_spending
r... |
If a recipe requires 2.5 cups of flour to make 12 muffins, how much flour is needed to make 30 muffins? | def solve() -> int:
flour_per_muffin = 2.5 / 12
flour_for_30_muffins = flour_per_muffin * 30
result = flour_for_30_muffins
return result
|
Thalia walks 2 km every day for a week, except on Friday when she walks 3km. How many kilometers did she walk in total during the week? | def solve() -> int:
distance_weekdays = 2*6
distance_friday = 3
total_distance = distance_weekdays + distance_friday
result = total_distance
return result
|
The sum of three consecutive even numbers is 66. What is the largest of those three numbers? | def solve() -> int:
sum = 66
n1 = (sum/3) - 1
largest = n1 + 4
result = largest
return result
|
Michelle wants to save $1000 in 5 months. She already saved $275. How much money does she need to save each month to reach her goal? | def solve() -> int:
goal = 1000
saved = 275
months_left = 5
to_save = (goal - saved) / months_left
result = to_save
return result
|
Jenny can solve 2 math problems in 10 minutes. How long will it take her to solve 10 math problems? | def solve() -> int:
problems_solved_in_time = 2
total_problems_to_solve = 10
time_to_solve_all = (total_problems_to_solve/problems_solved_in_time) * 10
result = time_to_solve_all
return result
|
A hotel room rents for $120 a night. If three people share a room, how much does each person pay per night? | def solve() -> int:
room_rate = 120
people = 3
per_person_rate = room_rate / people
result = per_person_rate
return result
|
A pizza slice has 250 calories. If Jack eats 3 slices, how many calories did Jack consume? | def solve() -> int:
slices = 3
calories_per_slice = 250
total_calories = slices * calories_per_slice
result = total_calories
return result
|
Two co-workers have a combined age of 52 years. If one of them is twice as old as the other, calculate their ages. Amelia has to walk at least 5 miles or more each day to maintain her physical health. She has walked 2 miles on the first day. If she increases her daily distance by 1 mile each day for the next 7 days, ho... | def solve() -> int:
age1 = 0
age2 = 0
total_age = 52
distance_walked = 2
age1 = total_age / 3
age2 = total_age - age1
for i in range(1, 8):
distance_walked += i
result = distance_walked
return result
|
Jenna runs a small bookstore. She just got a shipment of 40 books, each book costs $11. She has to pay tax of $50. How much does she need to pay in total? | def solve() -> int:
cost_of_books = 40 * 11
cost_of_tax = 50
result = cost_of_books + cost_of_tax
return result
|
Michael has $200 and spends 1/3 of it on food. He saves half of the money he has left and spends the rest on a book. The book cost $15. How much money did he save? | def solve() -> int:
money = 200
money_spent = money/3
money_left = money - money_spent
money_saved = money_left/2
result = money_saved
return result
|
Student: Maya pays $45 per month for her phone plan, which includes unlimited calls and texts. She decides to add 2 GB of data to her plan, which costs $10 per GB. How much is her total monthly phone bill after adding the data? | def solve() -> int:
monthly_phone_plan = 45
data_cost_per_gb = 10
data_gb = 2
data_cost = data_cost_per_gb * data_gb
total_monthly_phone_bill = monthly_phone_plan + data_cost
result = total_monthly_phone_bill
return result
|
Emma has a fish tank that can hold 80 liters of water. She fills the tank with water until it is 90% full. Then she adds some fish and plants to the tank, which displace 6 liters of water. What is the percentage of water in the tank now? | def solve() -> int:
capacity = 80
percent_full = 0.9
water_full = capacity * percent_full
displacement = 6
water_now = water_full - displacement
percent_now = (water_now / capacity) * 100
result = percent_now
return result
|
Student: A café ordered 150 cups of coffee. If each cup holds 8 ounces of coffee, how many total fluid ounces of coffee did the café order? | def solve() -> int:
cups = 150
ounces_per_cup = 8
total_ounces = cups * ounces_per_cup
result = total_ounces
return result
|
Omar and Aliya sold some bracelets at a craft fair. They made a total of 120 bracelets, of which 40 were blue, 50 were red, and 30 were green. They sold the blue bracelets for $3 each, the red bracelets for $4 each, and the green bracelets for $5 each. How much money did they earn in total? | def solve() -> int:
blue_revenue = 40 * 3
red_revenue = 50 * 4
green_revenue = 30 * 5
total_revenue = blue_revenue + red_revenue + green_revenue
result = total_revenue
return result
|
Student: Tom buys 3 packs of candies. The first pack contains 24 candies, the second pack contains 36 candies, and the third pack contains 48 candies. He gives away half of the first pack, a third of the second pack, and a quarter of the third pack to his friends. How many candies does he have left? | def solve() -> int:
pack1 = 24
pack2 = 36
pack3 = 48
pack1_left = pack1 / 2
pack2_left = pack2 / 3
pack3_left = pack3 / 4
result = pack1_left + pack2_left + pack3_left
return result
|
Karen wants to share her candy stash with her 3 siblings. If she has 50 pieces of candy in total and wants to divide it evenly, how many pieces of candy will each person get? | def solve() -> int:
candy_total = 50
num_siblings = 3
candy_per_person = candy_total / num_siblings
result = candy_per_person
return result
|
acy wants to buy 3 packs of gum. Each pack of gum has 15 pieces. She wants to share it equally among her 4 friends. How many pieces of gum does each friend get? | def solve() -> int:
num_packs = 3
pieces_per_pack = 15
total_pieces = num_packs * pieces_per_pack
num_friends = 4
pieces_per_friend = total_pieces // num_friends
result = pieces_per_friend
return result
|
Grace collected 48 shells on the beach. She sorted them into 6 equal piles by shape. How many shells were in each pile? | def solve() -> int:
shells_per_pile = 48 / 6
result = shells_per_pile
return result
|
A company produces 1,000 units of a product per day. The company plans to increase production by 10% per week. How many days will it take for the company to produce 10,000 units per day? | def solve() -> int:
units_per_day = 1000
target_units_per_day = 10000
percent_increase_per_week = 10
days = 0
while units_per_day < target_units_per_day:
units_per_day *= (1 + percent_increase_per_week/100/7)
days += 1
result = days
return result
|
A farmer had 100 chickens and 50 ducks. He sold 20 chickens and 10 ducks at the market. Then he bought 15 more chickens and 5 more ducks from another farmer. He also gave 10 chickens and 5 ducks to his neighbor as a gift. How many chickens and ducks did he have left? | def solve() -> int:
start_chick = 100
start_duck = 50
sell_chick = 20
sell_duck = 10
buy_chick = 15
buy_duck = 5
gift_chick = 10
gift_duck = 5
after_sell_chick = start_chick - sell_chick
after_sell_duck = start_duck - sell_duck
after_buy_chick = after_sell_chick + b... |
Student: Serengeti National Park has 80 elephants, three times as many zebras, and 40 more giraffes than zebras. On the other hand, Kilimanjaro National Park has half as many elephants as Serengeti National Park, one fourth as many zebras as Serengeti National Park, and 30 fewer giraffes than Serengeti National Park. H... | def solve() -> int:
elephants_serengeti = 80
zebras_serengeti = 80 * 3
giraffes_serengeti = zebras_serengeti + 40
elephants_kilimanjaro = elephants_serengeti / 2
zebras_kilimanjaro = zebras_serengeti / 4
giraffes_kilimanjaro = giraffes_serengeti - 30
total_animals_kilimanjaro = elephants_kil... |
Sarah has 20 stickers. She gives 3 to her brother and then gains twice as many. How many stickers does Sarah have now? | def solve() -> int:
stickers = 20
stickers -= 3
stickers *= 2
result = stickers
return result
|
How much would it cost to buy 5 sofa cushions if each cushion cost $50 and had a 14% discount? | def solve() -> int:
total_price = 50 * 5
discount_amt = 0.14 * total_price
final_price = total_price - discount_amt
result = final_price
return result
|
Student: A sum of 10000 dollars was invested at a rate of 4 percent per annum. What will be the value of the investment after 2 years? | def solve() -> int:
principal = 10000
rate = 0.04
time = 2
interest = principal * (1 + rate) ** time - principal
value = principal + interest
result = value
return result
|
A contractor estimated that a building will take 18 months to complete with 20 workers. If he hires 10 more workers, how many months will it take to complete the building? | def solve() -> int:
months_per_worker = 18 / 20
workers = 20 + 10
total_time = months_per_worker * workers
result = total_time
return result
|
Sarah works at a store for 35 hours a week. She is paid $12 an hour for the first 30 hours and $18 an hour for any additional hours worked per week. How much did she earn this week? | def solve() -> int:
wage1 = 12.00
hours1 = 30
wage2 = 18.00
hours_worked = 35
overtime = max(hours_worked - hours1, 0)
regular_pay = wage1 * min(hours_worked, hours1)
overtime_pay = wage2 * overtime
total_pay = regular_pay + overtime_pay
result = total_pay
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.