question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
arah purchased a car for $15,000 initially and sold it for $12,500. If the rate of depreciation is constant, what is the rate of depreciation per year? | def solve() -> int:
rate_of_depreciation = ((15000 - 12500) / 15000) * 100
result = rate_of_depreciation / 1
return result
|
Luna ran on a treadmill at a speed of 8 miles per hour for 45 minutes every day, whereas Leo ran at a speed of 5 miles per hour for 30 minutes. What is the total distance traveled by both runners on the treadmill in feet? John buys 3 turkey and cheese sandwiches for $6.50 each at a deli. He also buys a pound of peppero... | def solve() -> int:
luna_speed = 8
luna_time = 45/60
luna_distance = luna_speed * luna_time
leo_speed = 5
leo_time = 30/60
leo_distance = leo_speed * leo_time
total_distance = luna_distance + leo_distance
total_distance_feet = total_distance * 5280 * 12
re... |
The sum of two numbers is 25 and their difference is 11. What are the two numbers? | def solve() -> int:
sum = 25
difference = 11
larger_num = (sum + difference) / 2
smaller_num = (sum - difference) / 2
result = (smaller_num, larger_num)
return result
|
In a group of 120 people, 40 people like chocolate ice cream, 60 people like vanilla ice cream, and 25 people like strawberry ice cream. How many people like all three flavors? | def solve() -> int:
people_like_two_flavors = 40 + 60 + 25 - 120
people_like_all = 25 - people_like_two_flavors
result = round(people_like_all, 2)
return result
|
Alice's car broke down on the highway. She had to pay $600 for repairs and her warranty covered 70%. She also had to pay $100 for a tow truck, but her roadside assistance covered $50. How much did Alice have to pay? | def solve() -> int:
repairs_cost = 600
warranty_coverage = 0.7
tow_truck_cost = 100
roadside_assistance_coverage = 50
repairs_cost_after_coverage = repairs_cost * (1 - warranty_coverage)
total_cost = repairs_cost_after_coverage + tow_truck_cost - roadside_assistance_coverage
result... |
Student: A swimming pool is 25 meters long. If Charlie practices swimmig 16 hours a week, how many kilometers does he swim in a month with 4 weeks? | def solve() -> int:
pool_length = 25
hours_per_week = 16
weeks_in_month = 4
kilometers_per_meter = 0.001
pool_length_in_kilometers = pool_length * kilometers_per_meter
kilometers_swam_in_month = pool_length_in_kilometers * hours_per_week * weeks_in_month
result = kilometers_swam_in_month
... |
There are 2800 students in a high school. If the ratio of juniors to seniors is 2:3, how many seniors are in the school? | def solve() -> int:
total_ratio = 2 + 3
seniors_ratio = 3 / total_ratio
juniors_ratio = 2 / total_ratio
total_students = 2800
num_seniors = int(seniors_ratio * total_students)
result = num_seniors
return result
|
Lily's mother gave her $80 to buy some clothes and accessories. She bought a dress that cost $25, a pair of shoes that cost $20, a scarf that cost $10, and a necklace that cost $15. She also got a 20% discount on the dress and the shoes. How much money does Lily have left? | def solve() -> int:
mother_money = 80
dress_price = 25
shoes_price = 20
scarf_price = 10
necklace_price = 15
discount_rate = 0.2
original_cost = dress_price + shoes_price
discounted_cost = original_cost * (1 - discount_rate)
total_cost = discounted_cost + scarf_price + necklace_price... |
``` A flower shop sells roses at $2 each and tulips at $3 each. If a customer buys 4 roses and 5 tulips, what is their total cost including tax? Tax is 10%. | def solve() -> int:
num_roses = 4
num_tulips = 5
rose_cost = 2
tulip_cost = 3
tax_rate = 0.1
total_cost = (num_roses * rose_cost) + (num_tulips * tulip_cost)
total_cost_with_tax = total_cost + (total_cost * tax_rate)
result = total_cost_with_tax
return result
|
The price of a bus ticket is $10. If two people buy tickets together, there is a discount of $3. What will be the total cost if four people buy tickets together? | def solve() -> int:
num_people = 4
ticket_price = 10
discount = 3
total_cost = num_people * ticket_price
num_pairs = num_people // 2
total_discount = num_pairs * discount
total_cost_with_discount = total_cost - total_discount
result = total_cost_with_discount
... |
Jane bought a purse for $120. She saved a tenth of the cost and spent the rest on clothes. How much money did Jane spend on clothes? | def solve() -> int:
purse_cost = 120
saved_money = purse_cost * (1/10)
clothes_cost = purse_cost - saved_money
result = clothes_cost
return result
|
Mrs. Garcia ordered 6 pizzas for a party. Each pizza had 8 slices and cost $12. She also ordered 4 bottles of soda, each containing 2 liters and cost $3. She had 24 guests at the party and each guest consumed 2 slices of pizza and 0.5 liters of soda. How much did Mrs. Garcia spend per guest? | def solve() -> int:
total_slices = 6 * 8
total_soda = 4 * 2
total_cost = 6 * 12 + 4 * 3
cost_per_guest = total_cost / 24
result = cost_per_guest
return result
|
A carpenter who has been working for 10 years and who earns €12,000 a month has obtained a bonus of 10% of his annual income. How much is his bonus in euros? | def solve() -> int:
annual_income = 12000 * 12
bonus = 0.1 * annual_income
bonus = round(bonus, 2)
result = bonus
return result
|
A company had revenue of $10,000 in the first quarter, $15,000 in the second quarter, and $20,000 in the third quarter. What is the company's average quarterly revenue? | def solve() -> int:
quarter1 = 10000
quarter2 = 15000
quarter3 = 20000
average_revenue = (quarter1 + quarter2 + quarter3)/3
result = average_revenue
return result
|
Some possible questions and programs are: Leila is making cookies for her friends. She has 500 grams of flour and each cookie requires 25 grams of flour. She can sell each cookie for $0.75. How much money will Leila earn if she uses all the flour to make cookies? | def solve() -> int:
num_cookies = 500 // 25
earnings = num_cookies * 0.75
result = earnings
return result
|
Student: John drove 45 miles and then stopped to take a break. He then drove another 36 miles. How many miles did he drive in total? | def solve() -> int:
miles_driven_1 = 45
miles_driven_2 = 36
total_miles_driven = miles_driven_1 + miles_driven_2
result = total_miles_driven
return result
|
Ben collected 36 cans and 48 bottles to recycle. He got $0.05 for each can and $0.10 for each bottle. He used $3.00 of his earnings to buy a snack. How much money did Ben have left after buying the snack? | def solve() -> int:
earnings = (36 * 0.05) + (48 * 0.10)
money = earnings - 3.00
result = round(money, 2)
return result
|
Sally wants to buy a new computer. The computer costs $1230, but there is a 10% discount if she buys it today. How much will she pay? | def solve() -> int:
discount = 1230 * 0.1
final_cost = 1230 - discount
result = final_cost
return result
|
A toy shop has 100 boxes of Lego, each containing 300 pieces. If the total number of Lego pieces is the same as the distance in miles that Tom cycles to his gym daily, how far does he cycle every day? | def solve() -> int:
boxes_of_lego = 100
pieces_per_box = 300
total_pieces = boxes_of_lego * pieces_per_box
distance_in_miles = total_pieces
result = distance_in_miles
return result
|
Ravi wants to beat Roger Federer's world record of hitting 45 consecutive tennis balls. After hitting 20 tennis balls, Ravi has not missed any. How many tennis balls does he need to hit consecutively to match Roger Federer's record? | def solve() -> int:
balls_hit = 20
record = 45
balls_needed = record - balls_hit
result = balls_needed
return result
|
A tailor has 45 buttons and uses 5 buttons to make one shirt. If he makes 7 shirts with the buttons, how many buttons does he have left? | def solve() -> int:
buttons = 45
shirt = 5
made = 7
buttons = buttons - shirt * made
result = buttons
return result
|
Jane wants to buy a dress which costs $50. If she has two $20 bills, a $10 bill, and three $5 bills, does she have enough money to buy the dress? | def solve() -> int:
cost_of_dress = 50
total_money = (2*20) + 10 + (3*5)
enough_money = total_money >= cost_of_dress
result = enough_money
return result
|
There are 1,200 cookies in a jar. 25% of the cookies have chocolate chips, and a third of those also have nuts. How many chocolate chip and nut cookies are there? | def solve() -> int:
cookies = 1200
chocolate_chip_cookies = cookies * 0.25
chocolate_chip_and_nut_cookies = chocolate_chip_cookies / 3
result = chocolate_chip_and_nut_cookies
return result
|
If a container has a volume of 24 cubic feet and a length of 6 feet, what is its width and height if the height is 2 times the width? | def solve() -> int:
volume = 24
length = 6
width = (volume / length) ** (1./3)
height = 2 * width
result = (width, height)
return result
|
A train runs at a speed of 80 mph. If the distance from the starting point to the final destination is 560 miles, how long will it take for the train to reach the destination? | def solve() -> int:
distance = 560
speed = 80
time = distance / speed
result = time
return result
|
Bill has 6 chips. If he gives away 2 of them, how many chips does he have left? | def solve() -> int:
chips_Bill = 6
chips_given = 2
chips_remaining = chips_Bill - chips_given
result = chips_remaining
return result
|
Student: Amy bought 8 apples at the store for 75 cents each and she wants to calulate the cost per apple. | def solve() -> int:
num_apples = 8
price_per_apple = 0.75
total_cost = num_apples * price_per_apple
cost_per_apple = total_cost / num_apples
result = cost_per_apple
return result
|
A school has 1500 students, and 60% are girls. How many boys are in the school? | def solve() -> int:
students = 1500
girl_percent = 60
boys_percent = 100 - girl_percent
boys = students * (boys_percent / 100)
result = boys
return result
|
A student is trying to choose the best bus route to get to school. The first bus has 5 stops. If the bus does not need to stop at any of them, it will take 15 minutes to reach the school. For each stop, an additional 2 minutes is needed. The second bus takes 20 minutes without any stops. How much additional time will i... | def solve() -> int:
bus1_no_stops = 15
bus1_stops = 5
stop_time = 2
bus1_all_stops = bus1_no_stops + (bus1_stops * stop_time)
bus2_no_stops = 20
additional_time = bus1_all_stops - bus2_no_stops
result = additional_time
return result
|
A car traveled 360 miles in 6 hours. If it traveled twice as fast on the second half of the trip as it did on the first half, what was the speed in miles per hour for the second half? | def solve() -> int:
total_distance = 360
total_time = 6
first_half_distance = total_distance / 2
second_half_distance = first_half_distance
first_half_time = total_time / 2
second_half_time = first_half_time
second_half_speed = 2 * (second_half_distance / second_half_time)
result = secon... |
A bus makes three stops: at 10 am, 12 pm, and 2 pm. If the bus spends 20 minutes at each stop, what time will the bus reach its final destination if it begins its journey at 9 am? | def solve() -> int:
start_time = 9 * 60
stop_time = 20
arrival_time = start_time + (stop_time * 3) + (2 * 60)
hours = arrival_time // 60
minutes = arrival_time % 60
result = f'{hours}:{minutes:02}'
return result
|
Student: A truck can carry 1200 kilograms. How many grams will the truck be able to carry? | def solve() -> int:
kg_to_g = 1000
capacity_in_g = 1200 * kg_to_g
result = capacity_in_g
return result
|
A recipe for a cake calls for 2 cups of sugar, but you only have 1/4 cup. How many more cups of sugar do you need to buy? | def solve() -> int:
sugar_needed = 2
sugar_have = 1/4
sugar_needed_more = sugar_needed - sugar_have
result = sugar_needed_more
return result
|
On Saturday John mowed 7 lawns in a total of 4 hours. How many hours did it take John to mow each lawn? | def solve() -> int:
lawns = 7
time = 4
result = time/lawns
return result
|
A bag of candy weighs 500 g and contains 25 pieces of candy. Lisa eats 7 pieces and shares the rest equally with 3 friends. How much candy does each friend get and what is the weight of one piece of candy? | def solve() -> int:
candy_left = 25 - 7
candy_friend = candy_left / 3
candy_weight = 500 / 25
candy_friend = round(candy_friend, 2)
candy_weight = round(candy_weight, 2)
result = (candy_friend, candy_weight)
return result
|
Let x represent the cost of the necklace. Then we can express the cost of the necklace as (20 * 50) = x. By solving the equation, we can get: x = $1000 Hence the necklace costs $1000. | def solve() -> int:
x = 1000
y = 20
z = 50
result = x/y*z
return result
|
Student: If the speed of light is 3 x 10^8 meters per second, how many meters does light travel in 5 minutes? | def solve() -> int:
speed_of_light = 3 * 10**8
time_in_seconds = 5 * 60
distance = speed_of_light * time_in_seconds
result = distance
return result
|
Student: Philip needs to travel 270 kilometers in 4 hours. What is his average speed in km/h? | def solve() -> int:
distance = 270
time = 4
result = distance / time
return result
|
A pet store starts the week with 3200 bags of dog food. On Monday, 1200 bags were sold, and 70 bags were sold each day from Tuesday to Friday. On Saturday, the supplier delivers 450 bags of dog food. Find the number of bags of dog food remaining in the pet store's inventory at the end of the week. | def solve() -> int:
start_week = 3200
monday_sales = 1200
weekday_sales = 70 * 4
saturday_delivery = 450
total_sales = monday_sales + weekday_sales
end_week = start_week - total_sales + saturday_delivery
result = end_week
return result
|
Leo has a jar of candies that contains 200 pieces. He gives away 10% of the candies to his friends, and then eats 20% of the remaining candies. How many candies does he have left in the jar? | def solve() -> int:
x = 0.1 * 200
y = 0.2 * (200 - x)
z = 200 - x - y
result = z
return result
|
A car travels a distance of 450 kilometers in 6 hours. What is its average speed? | def solve() -> int:
distance = 450
time = 6
speed = distance / time
result = speed
return result
|
To make a salad, Ben needs 300 grams of lettuce, 200 grams of tomatoes, 100 grams of cheese, and 50 milliliters of dressing. The lettuce costs $4 per kilogram, the tomatoes $3 per kilogram, the cheese $12 per kilogram, and the dressing $5 per liter. How much does Ben need to pay for the ingredients? | def solve() -> int:
lettuce_cost = 4 * (300 / 1000)
tomatoes_cost = 3 * (200 / 1000)
cheese_cost = 12 * (100 / 1000)
dressing_cost = 5 * (50 / 1000)
total_cost = lettuce_cost + tomatoes_cost + cheese_cost + dressing_cost
result = total_cost
return result
|
Student: Question 10. George needs to share his sugared almonds among 15 people. He has 50 almonds. How many almonds will each person get? | def solve() -> int:
num_almonds = 50
num_people = 15
result = num_almonds // num_people
return result
|
John ate 4 chocolate bars every hour for 5 hours. How many chocolate bars did John eat in total? | def solve() -> int:
chocolate_bars_per_hour = 4
total_hours = 5
total_chocolate_bars = chocolate_bars_per_hour * total_hours
result = total_chocolate_bars
return result
|
If a person can make 55 candles in 7 days with 5 hives, how many days will it take the same person to make 560 candles with 12 hives? | def solve() -> int:
hives = 12
days = 7
candles_per_hive = 55/5
candles = 560
total_candles = hives*candles_per_hive
days_needed = total_candles/candles
result = days_needed
return result
|
A class has 30 students. They are divided into 3 groups of equal size. In how many ways can the teacher choose 4 students from each group to form a team of 12? | def solve() -> int:
students = 30
group_size = students/3
teams = group_size**3
result = teams
return result
|
A food stall vendor made a profit of $840 after a week of sales. To raise $600 for restocking supplies, he splits the profit in half and receives financial support from his friends. If his friends provided $300 to him, how much money did he make above his goal when the received support is added to half of his profit? | def solve() -> int:
profit = 840
half_profit = profit / 2
support = 300
total = half_profit + support
goal = 600
result = total - goal
result
return result
|
Lisa collected 5 bags of apples from her orchard. Each bag had 9 apples. She gave 1 bag to her teacher and 1 bag to her friend. The remaining bags were each sorted into 3 baskets of 3 apples each. She ate 1/2 apple from each basket. How many apples did she have left? | def solve() -> int:
total_bags = 5
apples_per_bag = 9
given_bags = 1 + 1
baskets_per_bag = 3
apples_per_basket = 3
eaten_apple = 1/2
given_apples = given_bags * apples_per_bag
left_apples = (total_bags - given_bags) * apples_per_bag
left_baskets = left_apples / apples... |
Jacob is putting together gift bags for a party. Each bag contains 3 small toys and 2 pieces of candy. If Jacob needs to make 20 bags, how many small toys and pieces of candy does he need? | def solve() -> int:
small_toys_per_bag = 3
candy_per_bag = 2
total_bags = 20
total_small_toys = small_toys_per_bag * total_bags
total_candy = candy_per_bag * total_bags
result = f'{total_small_toys} small toys and {total_candy} pieces of candy are needed.'
return res... |
A rectangular tank is 2 feet long, 3 feet wide, and 4 feet deep. What is the volume of water in gallons the tank can hold? | def solve() -> int:
length = 2 * 12
width = 3 * 12
depth = 4 * 12
volume = (length * width * depth) / 231
result = volume
return result
|
Cindy bakes 24 muffins and sells them for 2 dollars each. She spends 0.5 dollars on ingredients for each muffin and 3 dollars on a muffin tray. How much profit does she make from selling all the muffins? | def solve() -> int:
revenue = 24 * 2
cost = 24 * 0.5 + 3
profit = revenue - cost
result = profit
return result
|
The sum of two angles in a triangle is 90 degrees. If one angle measures 35 degrees, what is the measure of the other angle? | def solve() -> int:
sum_of_angles = 90
angle1 = 35
angle2 = sum_of_angles - angle1
result = f'The measure of the other angle is {angle2} degrees'
result = angle2
return result
|
Last week, John deposited $5000 into his savings account. The bank pays 2% interest per year. How much interest did John earn after 5 months? | def solve() -> int:
deposit_amount = 5000
interest_rate = 0.02
time_in_years = 5/12
interest_earned = deposit_amount * interest_rate * time_in_years
result = interest_earned
return result
|
Ryan had 3 bags of chips and 4 bottles of soda. He shared them equally with his 2 friends. How many chips and soda did each person get? | def solve() -> int:
total_people = 1 + 2
chips_per_person = 3 / total_people
soda_per_person = 4 / total_people
result = (chips_per_person, soda_per_person)
return result
|
The average monthly salary of 5 employees in a company is $5000. If the first employee earns $6000, the second employee earns $4000 and the third employee earns $4500, what is the average salary of the remaining two employees? | def solve() -> int:
total_salary = 6000 + 4000 + 4500
avg_salary = total_salary / 3
remaining_two_avg_salary = (5000*5 - total_salary - 6000 - 4000 - 4500) / 2
result = remaining_two_avg_salary
return result
|
A printer can print 200 pages with a cartridge that costs $25. If you need to print 600 pages, how much should you spend on cartridges? | def solve() -> int:
pages_per_cartridge = 200
cost_per_cartridge = 25
total_pages = 600
total_cost = cost_per_cartridge*(total_pages/pages_per_cartridge)
result = total_cost
return result
|
Student: A square has a perimeter of 40 cm. What is the area of the square? | def solve() -> int:
perimeter = 40
side_length = perimeter / 4
area = side_length ** 2
result = area
return result
|
John walks 3 miles to school every morning, 2 miles to the store every afternoon and 1 mile when he visits his friends in the evening. How many miles does he walk in a 5 week period? | def solve() -> int:
total_miles = 0
miles_week = 3 + 2 + 1
total_miles = miles_week * 5
result = total_miles
return result
|
Rachel's dog catches 3 squirrels and 8 birds. Thomas's dog catches 4 more than twice as many animals as Rachel's dog. How many animals does Thomas's dog catch? | def solve() -> int:
rachels_squirrels = 3
rachels_birds = 8
rachels_total_animals = rachels_squirrels + rachels_birds
thomas_animals = 2 * rachels_total_animals + 4
result = thomas_animals
return result
|
Mary drove to the store which was 15 miles away. It took her 45 minutes to get there and then she drove back home. On her way back, there was traffic and it took her 1 hour to get home. What was her average speed during her entire journey? | def solve() -> int:
time_in_hours = (45/60) + 1
total_distance = 30
average_speed = total_distance/time_in_hours
result = average_speed
return result
|
Rachel scored 10 fewer points than her teammate. Her teammate scored 25 points, and each basket is worth 2 points. For Rachel's baskets, each basket is worth 3 points. How many points did Rachel and her teammate score in total? | def solve() -> int:
teammate_score = 25
rachel_score = teammate_score - 10
rachel_baskets = rachel_score / 3
teammate_baskets = teammate_score / 2
total_score = rachel_baskets * 3 + teammate_baskets * 2
result = total_score
return result
|
Arun is twice as old as Lisa was 3 years ago. If Arun is 24 years old, how old is Lisa now? | def solve() -> int:
arun_age_now = 24
lisa_age_then = arun_age_now/2
lisa_age_now = lisa_age_then + 3
result = lisa_age_now
return result
|
Dave is making sandwiches for his picnic. He has 15 slices of ham and buys 2 more packages. Each package contains 12 slices of ham. He needs 2 slices of ham for each sandwich. How many sandwiches can he make with the ham he has? | def solve() -> int:
initial_ham = 15
num_packages = 2
ham_per_package = 12
total_ham = initial_ham + num_packages * ham_per_package
ham_per_sandwich = 2
num_sandwiches = total_ham // ham_per_sandwich
result = num_sandwiches
return result
|
Student: Sarah has $2400 to invest. If she invests $1000 in stocks with an annual return of 12%, $600 in bonds with an annual return of 6%, and the rest in a savings account with a 3% annual return, how much money will she have at the end of the year? | def solve() -> int:
stocks = 1000
stocks_return = 0.12
bonds = 600
bonds_return = 0.06
savings = 2400 - stocks - bonds
savings_return = 0.03
stocks_profit = stocks * stocks_return
bonds_profit = bonds * bonds_return
savings_profit = savings * savings_return
total_profit = stocks_... |
The width of a rectangle is 10 cm and the height is 20 cm. What is the area of the rectangle? | def solve() -> int:
width = 10
height = 20
area = width * height
result = area
return result
|
Alex is learning a new language. He used to study 1 hour a day but increased that by 200%. Before he studied 50 words a day. How many words does he study a week now? | def solve() -> int:
hours_studied_per_day = 1
increase_percentage = 200
words_studied_per_day_before = 50
hours_studied_per_day_after = hours_studied_per_day * (1 + increase_percentage/100)
words_studied_per_day_after = words_studied_per_day_before * hours_studied_per_day_after
words_s... |
Emily works at a store for 8 hours a day for 5 days a week. If she makes $10 an hour, how much money does she make in one month? | def solve() -> int:
hours_per_week = 8 * 5
weeks_per_month = 4
hourly_rate = 10
total_earnings = hours_per_week * weeks_per_month * hourly_rate
result = total_earnings
return result
|
A rectangle has a length of 8 inches and a perimeter of 26 inches. What is the width of the rectangle? | def solve() -> int:
perimeter = 26
length = 8
width = (perimeter - 2 * length) / 2
result = width
return result
|
Jack is organizing a campaign to raise funds for a local animal shelter. He kept a record of how much everyone has pledged to donate, but he forgot to write down how much some people had actually paid. All together, everyone pledged to donate $3000, but Jack has received only $2100. Laura, Alex, and Jo all still owe mo... | def solve() -> int:
total_pledged = 3000
total_received = 2100
jo_owe = 250
laura_owe = (total_pledged - total_received - jo_owe) / 2
alex_owe = laura_owe
result = f'<<<Laura owes ${laura_owe} and Alex owes ${alex_owe} each.>>>'
return result
|
Student: A laptop was bought for $1,500, its price fell 10% one month later and another 20% in the second month. What will be the final price in the end? | def solve() -> int:
initial_price = 1500
discount_1 = 0.1
discount_2 = 0.2
final_price = initial_price * (1 - discount_1) * (1 - discount_2)
result = final_price
return result
|
A train travels 300 miles in 5 hours. What is its average speed? | def solve() -> int:
distance = 300
time = 5
speed = distance / time
result = speed
return result
|
Two players from the same team participate in a game. Their team's final result is the total number of correct answers. If one person got 7 corrects answers and the other got three more than the score of the first person, what was their final team score? | def solve() -> int:
total_score = 0
person_1 = 7
person_2 = person_1 + (3 * 1)
total_score = person_1 + person_2
result = total_score
return result
|
Bob has a rectangular garden that measures 20 feet by 15 feet. He wants to fence the garden with a wooden fence that costs 3 dollars per foot. He also wants to plant flowers inside the garden that cost 0.50 dollars per square foot. How much money does he need to spend on the fence and the flowers? | def solve() -> int:
perimeter = 2 * (20 + 15)
area = 20 * 15
fence_cost = 3 * perimeter
flower_cost = 0.5 * area
total_cost = fence_cost + flower_cost
result = total_cost
return result
|
Rachel has 6 books less than Sam does. Tina has half as many books as Rachel has. If Sam has 42 books, how many books does Tina have? | def solve() -> int:
rachel = 42 - 6
tina = rachel / 2
result = tina
return result
|
At the zoo, there were 12 monkeys, 3 lions, and 5 elephants. How many tails were there in total? | def solve() -> int:
monkeys = 12
lions = 3
elephants = 5
total_tails = monkeys + lions + elephants
result = total_tails
return result
|
Marcus was playing Monopoly and landed on the “Luxury Tax” spot and had to pay $75 in taxes. His friend, Michael, also had to pay $50 in taxes for the same spot. Calculate the total amount paid in taxes for the spot? | def solve() -> int:
tax_marcus = 75
tax_michael = 50
total_taxes = tax_marcus + tax_michael
result = total_taxes
return result
|
Student: Matt needs to install a drop ceiling in his living room that is 40 feet by 30 feet. Each ceiling tile covers 2 square feet, how many tiles will Matt need to buy for the project? | def solve() -> int:
length = 40
width = 30
tile_area = 2
room_area = length * width
num_tiles = room_area / tile_area
result = num_tiles
return result
|
A box can hold 20 shirts. If there are 124 shirts to be packed, how many boxes are needed? | def solve() -> int:
num_boxes = 124 // 20
result = num_boxes
return result
|
Student: If 6^70 and 9^30 are multiplied together what will be the last de digit of the result? | def solve() -> int:
a = 6**70
b = 9**30
result = a * b
last_digit = result % 10
return result
|
Jake buys 2 apples, 3 bananas, and 1 watermelon. Each banana cost as much as the 2 combined apples. The watermelon cost 4 times as much as the banana. If the apple cost $0.8 how much did everything cost together? | def solve() -> int:
apple = 0.8
banana = 2 * apple
watermelon = 4 * banana
total = 2 * apple + 3 * banana + watermelon
result = total
return result
|
Student: Mary bought a new sofa for $600, and a chair for $100, she got a 6% discount for buying two items. How much did Mary pay for the sofa and the chair after the discount? | def solve() -> int:
sofa_price = 600
chair_price = 100
total_price = sofa_price + chair_price
discount = 0.06
discount_amount = total_price * discount
final_price = total_price - discount_amount
result = final_price
return result
|
If a customer buys a product that costs $100 and the sales tax is 6%, what is the total cost of the product after tax? | def solve() -> int:
sales_tax = 0.06
product_cost = 100
total_cost = product_cost + (product_cost*sales_tax)
result = total_cost
return result
|
A bag contains 8 red balls and 6 blue balls. If two balls are drawn at random without replacement, what is the probability that both balls are red? | def solve() -> int:
num_red_balls = 8
num_blue_balls = 6
total_balls = num_red_balls + num_blue_balls
prob_red_first_draw = num_red_balls / total_balls
prob_red_second_draw = (num_red_balls - 1) / (total_balls - 1)
prob_both_red = prob_red_first_draw * prob_red_second_draw
result = prob_both... |
Lucas, who weighs 110 pounds, wants to play on the see-saw with his cousin Will, who weighs 60 pounds. How many 9-pound rocks does Lucas need to hold to balance their weights? Samantha is cycling between her home and the gym. The two places are 8 miles apart and she gets there in 20 minutes. The next day, she is cyclin... | def solve() -> int:
lucas_weight = 110
will_weight = 60
total_weight = lucas_weight + will_weight
num_rocks = total_weight / 9
speed = 8 / (20/60)
time_to_work = 14 / speed
result = num_rocks + time_to_work
return result
|
Laura is making muffins for a bake sale. She has enough ingredients to make 24 muffins. She decides to make two different flavors: banana and chocolate. She uses 2/3 of the ingredients to make banana muffins and the rest to make chocolate muffins. How many muffins of each flavor does she make? | def solve() -> int:
banana_ingredients = 24 * 2 / 3
banana_muffins = banana_ingredients
chocolate_ingredients = 24 - banana_ingredients
chocolate_muffins = chocolate_ingredients
result = (banana_muffins, chocolate_muffins)
return result
|
Rachel drives at 50 km/h for 2 hours and then half the time at triple the speed. How far does she travel in total? | def solve() -> int:
speed = 50
time1 = 2
time2 = time1 / 2
speed2 = speed * 3
distance1 = speed * time1
distance2 = speed2 * time2
total_distance = distance1 + distance2
result = total_distance
return result
|
A pizza parlor sells slices of pizza for $2.50 each. If you buy 4 slices, you get a $1 discount. How much would it cost to buy 9 slices of pizza? | def solve() -> int:
n_slices = 9
discount = 1
cost_with_discount = (n_slices//4)*(10-discount) + (n_slices%4)*2.5
result = cost_with_discount
return result
|
Susan sewed nine bags. Each bag was sold for $15 and only 1/3 of them were sold. How much did Susan earn from it? | def solve() -> int:
bags = 9
price_per_bag = 15
sold_bags = bags * (1/3)
earnings = sold_bags * price_per_bag
result = earnings
return result
|
A flower shop is selling roses for $3 each and lilies for $5 each during a Valentine's Day sale. The first customer is a man who buys ten roses and eight lilies. The rest of the customers in the sale only buy four roses each. There were fifteen customers after the man. How much money did the flower shop make? | def solve() -> int:
rose_price = 3
lily_price = 5
man_purchase = (10 * rose_price) + (8 * lily_price)
rest_customers = 15 - 1
rest_purchase = rest_customers * 4 * rose_price
total_purchase = man_purchase + rest_purchase
result = total_purchase
return result
|
Student: At the start of the week, a bakery had 600 breads. During the week they sold 400 breads. On Friday they had 225 breads. How many breads were sold by the bakery on Friday? | def solve() -> int:
start_of_week = 600
sold_during_week = 400
friday_breads = 225
breads_sold_on_friday = sold_during_week - friday_breads
result = breads_sold_on_friday
return result
|
A book was originally $20, but it is now priced 25% lower. What is the new price of the book? | def solve() -> int:
original_price = 20
discount_percentage = 25
discount_amount = original_price * discount_percentage / 100
new_price = original_price - discount_amount
result = new_price
return result
|
Max sells burritos with one chicken filling and one dollop of sour cream for $6. If chicken filling costs $1.50 and a dollop of sour cream costs $0.30, how many cents does Max spend to make one burrito? | def solve() -> int:
chicken_cost = 1.50
sour_cream_cost = 0.30
total_cost = chicken_cost + sour_cream_cost
total_cost_in_cents = total_cost * 100
result = total_cost_in_cents
return result
|
Lucas gets paid $5 for every book he reads. He also earns a 25 dollar bonus for reading more than 10 books. If he reads 15 books, how much will he earn including bonuses? | def solve() -> int:
books_read = 15
book_pay = 5
bonus = 25
if books_read > 10:
total_pay = (books_read * book_pay) + bonus
else:
total_pay = books_read * book_pay
result = total_pay
return result
|
A company produced 2400 pencils a day. They used 3/5 of them for their clients and 20% of the remaining for their own needs. How many pencils remained for them to sell? | def solve() -> int:
pencils_produced = 2400
pencils_for_clients = pencils_produced * 3/5
pencils_for_own_needs = (pencils_produced - pencils_for_clients) * 0.2
pencils_remaining = pencils_produced - pencils_for_clients - pencils_for_own_needs
result = pencils_remaining
return result
|
Janet is baking cookies that require 1 cup of flour per dozen cookies. If she can make 3 dozen cookies in an hour, how many cups of flour will she need to make 6 dozen cookies? | def solve() -> int:
cookies_per_dozen = 12
flour_per_dozen = 1
cookies_per_hour = 3 * cookies_per_dozen
flour_per_hour = cookies_per_hour * flour_per_dozen
cookies_needed = 6 * cookies_per_dozen
flour_needed = cookies_needed * flour_per_dozen
flour_needed = flour_needed / cookies_per_hour
... |
Sarah has 16 nickels and 3 times as many dimes. How much money does Sarah have in all? | def solve() -> int:
nickels = 16 * 0.05
dimes = 3 * 16 * 0.1
total = nickels + dimes
result = total
return result
|
Amy has 15 goldfish that she wants to distribute evenly among two bowls. How many goldfish will go in each bowl and how many will be left over? | def solve() -> int:
num_goldfish = 15
num_bowls = 2
goldfish_per_bowl = num_goldfish // num_bowls
goldfish_leftover = num_goldfish % num_bowls
result = (goldfish_per_bowl, goldfish_leftover)
return result
|
ome possible questions and programs are: Rita volunteers at an animal shelter. She drives 10 miles to the shelter, then 2 miles to pick up a dog, then 4 times the distance from the shelter to the dog's owner's house to drop off the dog. How many miles does Rita drive between picking up the dog and dropping off the dog? | def solve() -> int:
shelter = 10
dog = 2
owner = 4 * (shelter + dog)
result = owner - dog
return result
|
At a hot dog eating competition, Tom can eat 25 hot dogs and his three other friends can each eat 15 hot dogs. If there are 10 hot dogs in each pack, how many packs of hot dogs should Tom buy to feed all of them? | def solve() -> int:
tom = 25
friend = 15
total_people = 4
total_hotdogs = tom + (friend * 3)
hotdogs_per_pack = 10
packs_needed = total_hotdogs // hotdogs_per_pack + (total_hotdogs % hotdogs_per_pack > 0)
result = packs_needed
return result
|
If it takes Michael 15 minutes to solve 5 math problems, how long would it take him to solve 3 problems? | def solve() -> int:
minutes_per_problem = 15 / 5
time_to_solve_3_problems = minutes_per_problem * 3
result = time_to_solve_3_problems
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.