question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Jake works in a company that gives 2 vacation days for every 15 days worked. If Jake worked 270 days last year and took 4 days off in February and three times as many days off in December, how many more vacation days can Jake still take? | def solve() -> int:
vacation_allotment = 2/15
jake_worked_days = 270
days_off_feb = 4
days_off_dec = 3*4
vacation_days_earned = vacation_allotment*jake_worked_days
vacation_days_taken = days_off_feb*vacation_allotment + days_off_dec*vacation_allotment
vacation_days_remaining = vacation_days_... |
Lily fell from the top of a building and passed Max after falling 10 meters. If she fell for an additional four more times that depth before hitting the ground, and the floors of the building are evenly spaced out in height, what floor was Max on? | def solve() -> int:
height_of_fall = 10
additional_depth = 4 * height_of_fall
max_floor = additional_depth // height_of_fall
result = max_floor
return result
|
John has an investing account that earns 8% annually. If he invests $10,000 today, how much will he have in his account in 5 years? | def solve() -> int:
initial_investment = 10000
interest_rate = 0.08
years = 5
final_balance = initial_investment * (1 + interest_rate)**years
result = final_balance
return result
|
Yesterday, Tom went to the gym and paid $50 for a one-month membership, $10 for a towel, and $5 for a water bottle. The gym gave him a discount and he only spent $55 in total. How much of a discount did he receive in dollars? | def solve() -> int:
membership = 50
towel = 10
water_bottle = 5
total_cost = membership + towel + water_bottle
discount = total_cost - 55
result = discount
return result
|
If Lisa has a membership and wants to buy 3 copies of the book, how much is the final cost? | def solve() -> int:
discounted_price = 19.99 * 0.9
taxed_price = discounted_price * 1.08
result = taxed_price * 3
return result
|
Curt has 23 strawberries and 30 apples. If he gave away 1/3 of the strawberries and 1/2 of the apples, how many total fruits remained? | def solve() -> int:
strawberries = 23
given_away_strawberries = strawberries * 1/3
left_strawberries = strawberries - given_away_strawberries
apples = 30
given_away_apples = apples * 1/2
left_apples = apples - given_away_apples
result = left_strawberries + left_apples
return r... |
Student: A bakery sells cupcakes for $3 each. If they sell 20 cupcakes, how much money do they make? | def solve() -> int:
cupcake_price = 3
cupcake_sold = 20
total_money = cupcake_price * cupcake_sold
result = total_money
return result
|
A grocery store sells a box of cereal for $2.50. If the store earns a profit of $0.50 for each box sold, how many boxes of cereal must be sold to earn a profit of $100? | def solve() -> int:
cereal_price = 2.5
profit = 0.5
target_profit = 100
num_boxes = target_profit / profit
result = num_boxes
return result
|
A pizza has a diameter of 18 inches. What is its area in square inches if pi is approximately 3.14? | def solve() -> int:
radius = 18 / 2
area = 3.14 * (radius ** 2)
result = area
return result
|
John can run 3 miles in 20 minutes and walk 5 miles in 50 minutes. How long does it take for John to run 10 miles and walk 6 miles? | def solve() -> int:
runTime = 20
walkTime = 50
numRun = 10
numWalk = 6
totTime = numRun * runTime + numWalk * walkTime
result = totTime
return result
|
A tank can hold 90 liters of water. If 30 liters of water is already in the tank, how much more water can be added to fill up the tank? | def solve() -> int:
tank_capacity = 90
current_water = 30
remaining_capacity = tank_capacity - current_water
result = remaining_capacity
return result
|
*** Possible new questions and programs are: A school bus can seat 40 students. If each student pays $5 for a field trip, how much money does the bus driver collect from all the students on a full bus? | def solve() -> int:
students = 40
payment = 5
money = students * payment
result = money
return result
|
A ladder is resting against a wall and the ground. The ladder is 6 meters long and positioned so that it reaches up to a height of 4 meters on the wall. What is the distance between the ladder and the wall? | def solve() -> int:
ladder = 6
height_on_wall = 4
distance_to_wall = ((ladder ** 2) - (height_on_wall ** 2)) ** 0.5
result = distance_to_wall
return result
|
Student: A music store bought 50 CDs for $500. They sold 15 of them for $18 each and the remaining were sold for $13 each. What was the profit of the music store? | def solve() -> int:
total_cds = 50
total_cost = 500
cds_sold_1 = 15
cds_sold_2 = total_cds - cds_sold_1
price_1 = 18
price_2 = 13
revenue_1 = cds_sold_1 * price_1
revenue_2 = cds_sold_2 * price_2
total_revenue = revenue_1 + revenue_2
profit = total_revenue - total_cost
result... |
Michael walks 3 kilometers to the grocery store. After shopping, he walks back home. To get home, he walks for 35 minutes at a speed of 4 kilometers per hour. How far did Michael travel in total? | def solve() -> int:
distance_to_store = 3
time_to_get_home = 35 / 60
speed = 4
distance_home = time_to_get_home * speed
total_distance = distance_to_store + distance_home
result = total_distance
return result
|
A triangle has a base of 10 cm and a height of 8 cm. What is the area of the triangle in square centimeters? | def solve() -> int:
base = 10
height = 8
area = 0.5 * base * height
result = area
return result
|
Tom knows that the distance between his workplace and his home is 6 km, while the distance between his workplace and his friend's house is 2 km. Tom traveled from his workplace to his friend's house and came back to the workplace. While he was there, his boss asked him how many kilometers he has to travel to get to his... | def solve() -> int:
workplace_to_home = 6
workplace_to_friend = 2
total_distance = (workplace_to_friend * 2)
result = total_distance
return result
|
A store offers a 20% discount on all items. If the regular price of a shirt is $25, what is the sale price? | def solve() -> int:
reg_price = 25
discount = 0.2
sale_price = reg_price * (1 - discount)
result = sale_price
return result
|
A grocery store sells apples at $1.50 each. If Mr. Smith bought 20 apples, the store will give him $0.25 discount for every apple that he buys above 15. How much did Mr. Smith pay in all? | def solve() -> int:
count = 20
if count <= 15:
price = count * 1.5
else:
discount = (count-15) * 0.25
price = (15 * 1.5) + discount
result = price
return result
|
A gardener needs to buy 25 lbs of fertilizer for her garden. She can either buy a 25 lb bag of the organic fertilizer for $30 or she can buy five 5 lb packages of fertilizer for $7 each. Which option is more cost-effective for the gardener? | def solve() -> int:
organic_fertilizer_price = 30
organic_fertilizer_weight = 25
package_fertilizer_price = 7
package_fertilizer_weight = 5
organic_fertilizer_cost = organic_fertilizer_price
package_fertilizer_cost = 5 * package_fertilizer_price
if organic_fertilizer_cost < pa... |
Student: Gary earns $5.00 for mowing the lawn every week for eight weeks. Holly earns $6.00 for washing the dishes every day for 20 days. Ian earns $7.00 for babysitting his sister every weekend for four weeks. How much money do the three siblings earn together? | def solve() -> int:
gary_earnings = 5.00
gary_weeks = 8
holly_earnings = 6.00
holly_days = 20
ian_earnings = 7.00
ian_weeks = 4
gary_total = gary_earnings * gary_weeks
holly_total = holly_earnings * holly_days
ian_total = ian_earnings * ian_weeks
total_earnings = gary_total + hol... |
Alice collected 120 stamps in July 2020, which was 20% more than what she collected in June. Bob collected 80% of what Alice collected in July, and Chris collected 60 more stamps than Bob. How many stamps did Alice, Bob, and Chris collect in total in July? | def solve() -> int:
Alice = 120
June = Alice / 1.2
Bob = Alice * 0.8
Chris = Bob + 60
total = Alice + Bob + Chris
result = total
return result
|
In a class, 15% of the students are left-handed. If there are 30 students in the class, how many are left-handed? | def solve() -> int:
total_students = 30
percent_left_handed = 15/100
num_left_handed = total_students * percent_left_handed
result = num_left_handed
return result
|
If a car covers 130 km with 10 litres of fuel, how many litres of fuel will it need to travel 500 km? | def solve() -> int:
distance1 = 130
fuel1 = 10
distance2 = 500
fuel2 = (distance2*fuel1)/distance1
result = fuel2
return result
|
Possible questions and programs are: The ocean liner, Pacifica, is a massive ship that consists of four identical rectangular decks that hold the cabins, restaurants, and entertainment facilities for the passengers. The four decks are stacked on top of each other and connected by elevators and stairs. Each deck has 16 ... | def solve() -> int:
decks = 96 / 16
entertainment_per_deck = 26 - 16 - 6
result = entertainment_per_deck * decks
return result
|
Q5: Harrison had 48 pencils. He gave 22 pencils away to his friends. How many pencils does Harrison have left? | def solve() -> int:
pencils1 = 48
pencils2 = 22
result = pencils1 - pencils2
return result
|
In the morning, Lily has a specific number of books on her shelf. Throughout the day, she reads 2 books and then adds 7 more. Every hour, she reads 1 book. By the evening, she only has 25 books left on her shelf. How many books did she have on the shelf in the morning? | def solve() -> int:
books_on_shelf = 25
books_read_in_morning = 2
books_added_in_day = 7
books_read_per_hour = 1
books_in_morning = books_on_shelf + books_read_in_morning + books_added_in_day
books_read_in_day = books_read_in_morning + books_added_in_day + (books_on_shelf - books_in_morning... |
A sly fashion boutique is adding additional charges to their customer's bills without their knowledge. If Maria spent $150 on a new dress and shoes before tax, and the sales tax in her city is 9%, how much was she unknowingly charged in extra fees? | def solve() -> int:
price_before_tax = 150
sales_tax_rate = 0.09
price_after_tax = price_before_tax * (1 + sales_tax_rate)
extra_fees = price_after_tax - price_before_tax
result = extra_fees
return result
|
Jess has a 25-minute commute to her part-time job and a 35-minute commute to her volunteer work every day. On Sundays, she spends 2 hours driving her neighbors to the farmer's market. How much time does Jess spend driving in a week? | def solve() -> int:
commute_to_job = 25
commute_to_volunteer = 35
sunday_drive = 2 * 60
total_drive_time = (commute_to_job + commute_to_volunteer) * 5 + sunday_drive
result = total_drive_time
return result
|
Bella adopted a puppy and spends $300/month on pet insurance. She also buys $15 of food daily and $100/month on grooming services. How much does Bella spend on her puppy in a year? | def solve() -> int:
insurance_monthly = 300
food_daily = 15
grooming_monthly = 100
food_yearly = food_daily * 365
grooming_yearly = grooming_monthly * 12
insurance_yearly = insurance_monthly * 12
total_spending_yearly = food_yearly + grooming_yearly + insurance_yearly
resu... |
A bat and a ball cost $1.10 together. The bat costs $1 more than the ball. What is the cost of the ball? | def solve() -> int:
total_cost = 1.10
difference = 1
bat_cost = (total_cost + difference) / 2
ball_cost = total_cost - bat_cost
result = ball_cost
return result
|
Student: There are 18 students in a class. If 1/3 of the class is absent, how many students are present? | def solve() -> int:
total_students = 18
absent_students = total_students / 3
present_students = total_students - absent_students
result = present_students
return result
|
Emma, Ethan and Eliza all play soccer. Emma scored 10 goals. Ethan scored 4 more than three times as many goals as Emma. Eliza scored 8 fewer than half as many goals as Ethan. How many goals did Eliza score? | def solve() -> int:
emma = 10
ethan = (emma*3) + 4
eliza = (ethan//2) - 8
result = eliza
return result
|
Nadia, Ben, and Maya shared a pizza. Nadia ate 3 slices, Ben ate 2 slices more than Nadia, and Maya ate half as many slices as Ben. If the pizza had 16 slices, how many slices were left? | def solve() -> int:
ben = 3 + 2
maya = ben / 2
eaten = 3 + ben + maya
left = 16 - eaten
result = left
return result
|
Student: 3. Staci runs a total of 6.2 miles per day. Of that distance, she runs 3.2 miles in the morning and 3 miles in the afternoon. How many miles does Staci run in the morning? | def solve() -> int:
total_miles = 6.2
afternoon_miles = 3
morning_miles = total_miles - afternoon_miles
result = morning_miles
return result
|
Samantha buys a can of energy drink. Each serving is 3 ounces. She consumes 1 serving per day. If the can is 16 ounces smaller than a liter, how many days will it last? | def solve() -> int:
can_size = 3
serving_per_day = 1
can_volume = 16
liter_volume = 1000
can_last = (liter_volume - can_volume) / can_size / serving_per_day
result = int(can_last)
return result
|
A family drove 400 km in 4 days. Day 1, they drove 8 hours at a speed of 50 km/h, Day 2, they drove 10 hours at a speed of 65 km/h, on day 3 they drove 4 hours at a speed of 75 km/h, and on day 4 they drove 6 hours at a speed of 90 km/h. Find the total time they drove in the 4 days. | def solve() -> int:
total_km = 400
time1 = 8
speed1 = 50
time2 = 10
speed2 = 65
time3 = 4
speed3 = 75
time4 = 6
speed4 = 90
total_time = (time1 + time2 + time3 + time4)
result = total_time
return result
|
A water tank can hold 500 gallons of water. 3/4 of the tank is filled. How many gallons of water are in the tank? | def solve() -> int:
tank_capacity = 500
filled_capacity = (3/4)*tank_capacity
water_level = filled_capacity
result = water_level
return result
|
Anna is selling roses for Valentine's day. She buys 5 dozen roses for $30 and sells each rose for $2. She also buys a roll of ribbon for $5 and uses 10 cm of ribbon for each rose. How much profit does she make if she sells all the roses? | def solve() -> int:
roses_per_dozen = 12
total_roses = 5 * roses_per_dozen
buying_price_per_rose = 30 / total_roses
selling_price_per_rose = 2
ribbon_per_rose = 10
ribbon_per_m = 100
ribbon_cost_per_m = 5
ribbon_cost_per_rose = ribbon_cost_per_m * (ribbon_per_rose / ribbon_per_m)
t... |
The chances of getting a job start at 30% if you have 3 years of experience and increases by 8% for every additional year of experience. Maria has 5 years of experience. What are her chances of getting the job? | def solve() -> int:
years_of_experience = 5
initial_chance = 30
additional_chance_per_year = 8
additional_years = years_of_experience - 3
additional_chance = additional_years * additional_chance_per_year
total_chance = initial_chance + additional_chance
result = total_chance
... |
A classroom has 32 students. If the ratio of girls to boys is 3:5, how many girls are in the class? | def solve() -> int:
total_students = 32
girl_boy_ratio = "3:5"
girl_ratio, boy_ratio = [int(x) for x in girl_boy_ratio.split(':')]
total_ratio = girl_ratio + boy_ratio
girls = (girl_ratio/total_ratio)*total_students
result = girls
return result
|
A high school play had 15 student actors and 5 adult actors. If each student earned $100 and each adult earned $250, what was the total cost of actor payments? | def solve() -> int:
num_student_actors = 15
student_actor_pay = 100
num_adult_actors = 5
adult_actor_pay = 250
total_cost = num_student_actors * student_actor_pay + num_adult_actors * adult_actor_pay
result = total_cost
return result
|
Jeff bought 8 markers from the stationery store costing $1.25 each, 5 rulers costing $0.75 each, and 6 erasers costing $0.50 each. How much money did he spent? | def solve() -> int:
number_of_markers = 8
cost_of_markers = 1.25
number_of_rulers = 5
cost_of_rulers = 0.75
number_of_erasers = 6
cost_of_erasers = 0.50
total_markers_cost = number_of_markers * cost_of_markers
total_rulers_cost = number_of_rulers * cost_of_rulers
total... |
Arthur is making cakes and cupcakes for a customer order on Friday. He needs to make 4 8 inch chocolate cakes, 5 6 inch vanilla cakes, and 14 dozen cupcakes. How many cake pans does Arthur need? | def solve() -> int:
number_of_eight_inch_cake_pan = 4
number_of_six_inch_cake_pan = 5
result = number_of_eight_inch_cake_pan + number_of_six_inch_cake_pan
return result
|
Pedro had 100 balloons, but his friend popped 25 of them. How many balloons does Pedro have left? | def solve() -> int:
balloons_original = 100
balloons_popped = 25
balloons_left = balloons_original - balloons_popped
result = print("Pedro has", balloons_left, "balloons left.")
return result
|
Matthew can paint a room in 3 hours, how long would it take him to paint 4 rooms if they are the same size? | def solve() -> int:
rooms = 4
time = 3
time_for_4_rooms = rooms * time
result = time_for_4_rooms
return result
|
Michal bought 3 dozen oranges, which he divided equally among 6 family members. How many oranges did each family member get? | def solve() -> int:
number_oranges = 3
number_family_members = 6
oranges_per_person = number_oranges * 12 // number_family_members
result = oranges_per_person
return result
|
Sarah has 1200 chocolates in her shop. If she sells an average of 50 chocolates per day, how many days will it take for her to run out of stock? | def solve() -> int:
chocolates_in_shop = 1200
chocolates_sold_per_day = 50
days_to_run_out_of_stock = chocolates_in_shop / chocolates_sold_per_day
result = days_to_run_out_of_stock
return result
|
A group of eight friends went on a hike. The first five friends arrived at the destination in 2 hours, while the remaining friends arrived 30 minutes later. What was the total time taken by all eight friends to reach the hiking point? | def solve() -> int:
first_five_friends_time = 2
remaining_friends_time = 2.5
total_friends = 8
total_time = (first_five_friends_time * 5) + (remaining_friends_time * 3)
result = total_time
return result
|
There are 1257 students in a school. If the number of girls is 457 more than the number of boys, what is the total number of boys in the school? | def solve() -> int:
total_students = 1257
girls_more_than_boys = 457
girls = (total_students + girls_more_than_boys) / 2
boys = total_students - girls
result = boys
return result
|
A man bought a car for $8500. He put a down payment of $2000 and made monthly payments of $250 for 24 months. How much did the man pay in total? | def solve() -> int:
total_paid = 2000 + 250 * 24
result = total_paid
return result
|
Sita walks at a speed of 4.5 miles per hour. She walks for 2 hours and 15 minutes. How far does she go? | def solve() -> int:
time = 2 + (15/60)
distance = 4.5 * time
result = distance
return result
|
A car travels at a speed of 70 km/h. How far can it travel in 3 hours? | def solve() -> int:
car_speed = 70
time_travelled = 3
distance_travelled = car_speed * time_travelled
result = distance_travelled
return result
|
If 1 pound of ground beef can make 4 patties for burgers, how many pounds of ground beef will you need to make 12 patties for a family dinner? | def solve() -> int:
patties_per_pound = 4
patties_needed = 12
pounds_needed = patties_needed / patties_per_pound
result = pounds_needed
return result
|
Jake has $18 in his piggy bank. If he added 30 pennies, 20 nickels, and 15 quarters to his piggy bank, how much would he have in total? | def solve() -> int:
pennies = 30
nickels = 20
quarters = 15
total_pennies = pennies * 0.01
total_nickels = nickels * 0.05
total_quarters = quarters * 0.25
total_money = total_pennies + total_nickels + total_quarters + 18
result = total_money
return result
|
Student: Kendra baked 6 dozen cupcakes for her party. All the cupcakes cost $1.40 each. How much money did she spend? | def solve() -> int:
num_cupcakes = 6 * 12
price_per_cupcake = 1.40
total_cost = num_cupcakes * price_per_cupcake
result = total_cost
return result
|
There are 10 cats living in a neighbor's house. Each cat has been given 3 cans of cat food. How many cans of cat food did the neighbor buy? | def solve() -> int:
cans_given = 10 * 3
result = cans_given
return result
|
A triangle has a base of 10 cm and a height of 5 cm. What is the area of the triangle? | def solve() -> int:
base = 10
height = 5
area = (0.5) * base * height
result = area
return result
|
If a car can cover 150 km in 2 hours, how long will it take to cover 600 km at the same speed? | def solve() -> int:
distance_1 = 150
time_1 = 2
speed = distance_1 / time_1
distance_2 = 600
time_2 = distance_2 / speed
result = time_2
return result
|
Student: A group of friends wants to split a pizza evenly. The pizza has 8 slices and there are 4 friends. How many slices will each friend get? | def solve() -> int:
slices = 8
friends = 4
slices_per_friend = slices // friends
result = slices_per_friend
return result
|
Martha has a garden that is 12 feet wide and 16 feet long. She wants to add a border of gravel around the garden that is 2 feet wide. How many square feet of gravel does she need to buy? | def solve() -> int:
gardenWidth = 12
gardenLength = 16
gravelWidth = 2
gravelArea = ((gardenWidth+(2*gravelWidth))*(gardenLength+(2*gravelWidth)))-(gardenWidth*gardenLength)
result = gravelArea
return result
|
A train travels at a speed of 60 mph for the first 6 hours of its journey and at a speed of 40 mph for the remaining 4 hours. What is the average speed of the train for the entire journey? | def solve() -> int:
distance1 = 60 * 6
distance2 = 40 * 4
total_distance = distance1 + distance2
total_time = 6 + 4
average_speed = total_distance / total_time
result = average_speed
return result
|
A baker wants to make 24 cupcakes. If one batch of cupcakes has 12 cupcakes, how many batches will the baker need to make? | def solve() -> int:
num_cupcakes = 24
cupcakes_per_batch = 12
num_batches = num_cupcakes / cupcakes_per_batch
result = num_batches
return result
|
Lisa has $335. She spends 40% of her money on a computer and then 25% of the remaining money on a printer. How much money does Lisa have left? | def solve() -> int:
wallet_money = 335
computer = 0.4 * wallet_money
remaining_money = wallet_money - computer
printer = 0.25 * remaining_money
remaining_money -= printer
result = remaining_money
return result
|
In a research team, there are 100 members. One-sixth are from Europe and 40% are from the USA. How many members are from Canada? | def solve() -> int:
p1 = 100 * 0.16
p2 = 100 * 0.4
result = 100 - p1 - p2
return result
|
Lily has 16 crayons, Luke has 32 crayons, and Landon has 48 crayons. How many times can Lily's number of crayons fit into the average amount of crayons for a person in the group? | def solve() -> int:
lily_crayons = 16
luke_crayons = 32
landon_crayons = 48
total_crayons = lily_crayons + luke_crayons + landon_crayons
average_crayons = total_crayons / 3
times_lily_crayons_fit = average_crayons // lily_crayons
result = times_lily_crayons_fit
return... |
A bottle contains a mixture of milk and water in the ratio of 2:5. If there are 42 ounces of milk in the bottle, how much total liquid is in the bottle? | def solve() -> int:
milk_to_total_ratio = 2/7
milk_quantity = 42
total_quantity = milk_quantity / milk_to_total_ratio
result = total_quantity
return result
|
Sarah walks 2 miles every day before work from Monday to Friday. She walks the same distance home each day. Last Monday her sister asked her to walk another mile to pick up some groceries. How many miles did Sarah walk that week? | def solve() -> int:
monday_to_friday = 5
distance_per_day = 2
extra_distance = 1
total_distance = (monday_to_friday * distance_per_day) + extra_distance
result = total_distance
return result
|
Thomas worked 9 hours a day every day from the 5th to the 10th, including the 5th and not including the 10th. How many hours did he work? | def solve() -> int:
start_day = 5
end_day = 10
days_worked = end_day - start_day
hours_per_day = 9
total_hours_worked = days_worked * hours_per_day
result = total_hours_worked
return result
|
Rita can run 1 mile during weekdays. During Saturdays, she can run twice the distance than on the weekdays, and during Sundays, she can run thrice the distance than on the weekdays. How many miles can she run a week? | def solve() -> int:
days = 5
weekday_distance = 1
saturday_distance = weekday_distance * 2
sunday_distance = weekday_distance * 3
total_weekday_distance = days * weekday_distance
total_saturday_distance = saturday_distance
total_sunday_distance = sunday_distance
total_distance = total_we... |
Possible new questions: The school library has 420 books. They want to arrange them on 6 shelves with the same number of books on each shelf. How many books will be on each shelf? | def solve() -> int:
books_per_shelf = 420 // 6
result = books_per_shelf
return result
|
Calvin had 20 times more ledger books than Will. In total, there were 1600 ledger books. How many ledger books does Calvin have? | def solve() -> int:
a = 1600
b = 20
result = a/b
return result
|
The ratio of cats to dogs in a shelter is 2:5. If the shelter has 42 cats and dogs combined, how many dogs are there? | def solve() -> int:
total = 42
cats_to_dogs = 2/5
dogs = total/(1 + cats_to_dogs)
result = dogs
return result
|
If a basketball team's record is 12 wins and 8 losses, what is their winning percentage? | def solve() -> int:
total_games = 12 + 8
winning_percentage = 12 / total_games
result = winning_percentage
return result
|
Rachel drove 70 miles to a city and 120 miles back home. If she drives at an average speed of 60 mph, how long did she spend driving in hours? | def solve() -> int:
distance_to_city = 70
distance_back_home = 120
average_speed = 60
total_distance = distance_to_city + distance_back_home
total_time = total_distance / average_speed
result = total_time
return result
|
A recipe calls for 2 1/2 cups of flour. If a person wants to make half the recipe, how many cups of flour should he use? | def solve() -> int:
flour = 2.5
recipe = 2
half = 0.5
half_flour = ((flour/recipe)*half)
result = half_flour
return result
|
A rectangle has a perimeter of 40 meters. The length of the rectangle is 3 times its width. What is the area of the rectangle? | def solve() -> int:
rectangle_perimeter = 40
length_ratio = 3
width = rectangle_perimeter / (2*(1+length_ratio))
length = length_ratio*width
rectangle_area = length*width
result = rectangle_area
return result
|
Lila is making lemonade. She needs 6 cups of water, 1 cup of lemon juice, and 3/4 cup of sugar. She only has a 1/2 cup measuring cup. How many times does she fill it to complete the ingredients? | def solve() -> int:
water = 12
lemon = 2
sugar = 1 + 1
total = water + lemon + sugar
result = total
return result
|
Kim pays $300 for a hotel room, $150 for a taxi, and $250 for a restaurant. What percent of the cost is the hotel room and taxi? | def solve() -> int:
total = 300 + 150 + 250
hotel_taxi = 300 + 150
percentage = hotel_taxi / total * 100
percentage = round(percentage, 2)
result = percentage
return result
|
A farmer plowed his field for 4 hours, sowed his seeds for 3 hours, and finally harvested his crop for 7 hours. If he was paid $10 per hour of work, how much money did he earn altogether? | def solve() -> int:
plowing_hours = 4
seeding_hours = 3
harvesting_hours = 7
total_hours = plowing_hours + seeding_hours + harvesting_hours
hourly_rate = 10
total_earnings = total_hours * hourly_rate
result = total_earnings
return result
|
Lisa has a collection of coins. She has 20 quarters, 15 dimes, 10 nickels, and 5 pennies. How much money does she have in total? | def solve() -> int:
quarters = 20
dimes = 15
nickels = 10
pennies = 5
value = quarters*25 + dimes*10 + nickels*5 + pennies
result = value/100
return result
|
Wayne is buying 3 shirts; one is priced at $54, one is priced at $77, and the other is priced at $44. He has a 15% discount coupon and wants to find the total amount he should pay after the discount. | def solve() -> int:
shirt1 = 54
shirt2 = 77
shirt3 = 44
discount_coupon = 0.15
total_price_before_discount = shirt1 + shirt2 + shirt3
total_price_after_discount = total_price_before_discount * (1-discount_coupon)
result = total_price_after_discount
return result
|
Some possible new math questions are: A bakery has a budget of $300 to buy ingredients for making cakes. Each cake requires 2 kg of flour, 1 kg of sugar, and 0.5 kg of butter. The bakery can sell each cake for $15. The price of flour is $1 per kg, sugar is $2 per kg, and butter is $4 per kg. How many cakes can the bake... | def solve() -> int:
budget = 300
cake_price = 15
flour_price = 1
sugar_price = 2
butter_price = 4
cake_cost = 2 * flour_price + 1 * sugar_price + 0.5 * butter_price
max_cakes = budget // cake_cost
profit = max_cakes * (cake_price - cake_cost)
result = max_cakes
return result
|
Mr. Davis's physics class has 45 students. If 50% of them received a final grade of a C or higher, how many of his students received a grade that was lower than a C? | def solve() -> int:
num_students = 45
percent_C_or_higher = 50
num_C_or_higher = num_students * percent_C_or_higher / 100
num_lower_than_C = num_students - num_C_or_higher
result = num_lower_than_C
return result
|
A pizza shop sells a large pizza for $12 and a small pizza for $8. They also charge a delivery fee of $3 per order. Ana wants to order 3 large pizzas and 2 small pizzas for her party. How much does she have to pay in total? | def solve() -> int:
pizza_cost = 12 * 3 + 8 * 2
total_cost = pizza_cost + 3
result = total_cost
return result
|
If a shark has 15 times the number of teeth as a human, and a human has 32 teeth, how many teeth does a shark have? | def solve() -> int:
human_teeth = 32
shark_teeth = 15 * human_teeth
result = shark_teeth
return result
|
Convert 1250 meters to kilometers. | def solve() -> int:
meters = 1250
kilometers = meters/1000
result = kilometers
return result
|
A bookstore ordered 150 more than six times as many novels as it did magazines at $8 each. If the cost of a magazine was $4, and the bookstore ordered 12 boxes, each having 30 magazines, calculate the total amount of money they paid for the books. | def solve() -> int:
magazines = 12 * 30
novels = 150 + 6 * magazines
magazines_cost = 4 * magazines
novels_cost = 8 * novels
total_cost = magazines_cost + novels_cost
result = total_cost
return result
|
Out of 240 students in a school, 45% of them are boys and 60% of the girls wear glasses. How many girls wear glasses? | def solve() -> int:
total_students = 240
boys_percentage = 45
boys_count = total_students * boys_percentage / 100
girls_count = total_students - boys_count
girls_with_glasses_percentage = 60
girls_with_glasses_count = girls_count * girls_with_glasses_percentage / 100
result = girls_with_glas... |
A company manufactures a product and incurs a fixed cost of $3,000 a month. It has a variable cost of $5 per unit. If the selling price of each unit is $15, how many units the company must sell to break-even per month? | def solve() -> int:
fixed_cost = 3000
unit_variable_cost = 5
unit_sale_price = 15
num_units_break_even = fixed_cost / (unit_sale_price - unit_variable_cost)
result = num_units_break_even
return result
|
Hannah has 4 boxes, each with an area of 25 square meters. What is the total area of the 4 boxes? | def solve() -> int:
number_of_boxes = 4
area_per_box = 25
total_area = number_of_boxes * area_per_box
result = total_area
return result
|
Student: Kim has to cook dinner for 12 people. She bakes 8 pies, each serving 4 people. How many pies will Kim have left after dinner? | def solve() -> int:
num_people = 12
num_pies = 8
pie_servings = 4
total_servings = num_pies * pie_servings
leftover_servings = total_servings - num_people
leftover_pies = leftover_servings // pie_servings
result = leftover_pies
return result
|
Student: A toy train set is sold for $144 with 20% discount. What is the original selling price of the toy train set? | def solve() -> int:
original_price = 144 / (1 - 0.2)
result = original_price
return result
|
Lisa ate 3 boxes of apples and each box contains 14 apples. How many apples has Lisa eaten? | def solve() -> int:
box = 3
apples_in_box = 14
total_apples = box * apples_in_box
result = total_apples
return result
|
Julia planted 91 tulips in her garden and it takes 3 tulips to make one bouquet. How many bouquets can get from her garden? | def solve() -> int:
tulips = 91
bouquets = tulips // 3
result = bouquets
return result
|
Student: A store is having a sale. All items are 20% off their original price. If a sweater originally cost $50, what is the sale price of the sweater? | def solve() -> int:
original_price = 50
discount_rate = 0.2
discount_amount = original_price * discount_rate
sale_price = original_price - discount_amount
result = sale_price
return result
|
Sarah wants to save a certain amount of money by putting aside a certain amount of money each day for three months. If she saves 2 dollars on Mondays, Wednesdays, and Fridays, and 3 dollars on Tuesdays, Thursdays, and Saturdays, how much money will she have saved after three months? | def solve() -> int:
savings_per_day = 0
total_savings = 0
savings_per_day = (2 * 3) + (3 * 3)
total_savings = savings_per_day * 30
result = total_savings
return result
|
During a sale, the price of a dress was reduced by 20%, and then by another 15%. If the original price of the dress was $150, what is its sale price? | def solve() -> int:
original_price = 150
discount_1 = 0.20
discount_2 = 0.15
sale_price = original_price * (1 - discount_1) * (1 - discount_2)
result = sale_price
return result
|
To make 7 gallons of lemonade, Luke needs 56 ounces of lemon juice and 14 cups of sugar. What is the amount of sugar in one ounce of lemonade? | def solve() -> int:
lemonade_gallons = 7
lemon_juice_ounces = 56
sugar_cups = 14
total_liquid_cups = lemonade_gallons * 16
total_sugar_cups = sugar_cups
sugar_per_ounce = total_sugar_cups / (lemon_juice_ounces + total_liquid_cups)
result = sugar_per_ounce
return resul... |
Ray gave his sister 2/3 of his stickers. If he gave her 24 stickers, how many stickers did he originally have? | def solve() -> int:
fraction_given = 2/3
stickers_given = 24
total_stickers = stickers_given / fraction_given
result = total_stickers
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.