question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Student: There are 30 students in a class. Every week, the teacher gives a quiz, and 20% of the class fails. If there are 5 quizzes per month, how many students pass all five quizzes in a month? | def solve() -> int:
fail_quiz = 0.2 * 30
pass_quiz = 30 - fail_quiz
pass_all_quizzes = pass_quiz ** 5
result = pass_all_quizzes
return result
|
James, the jeweler, creates 8 bracelets, each weighing 5 grams. He then distributes the bracelets equally among 2 different jewelry boxes. Unfortunately, one of the boxes gets lost and he cannot find it. What is the total weight, in grams, of the bracelets he has left? | def solve() -> int:
bracelet_weight = 5
num_bracelets = 8
num_boxes = 2
total_weight = bracelet_weight * num_bracelets
weight_per_box = total_weight / num_boxes
remaining_weight = total_weight - weight_per_box
result = remaining_weight
return result
|
A new video game console is listed at $399 with a 5% state sales tax. How much will the customer have to pay at checkout? | def solve() -> int:
price = 399
tax = 0.05
total_price = price * (1 + tax)
result = total_price
return result
|
James has 350 lego blocks left from his collection. Twenty friends came over and each built a creation using 25 blocks. How many blocks are left in James' collection? | def solve() -> int:
blocks_left = 350
friends = 20
blocks_used = friends * 25
blocks_left -= blocks_used
result = blocks_left
return result
|
Justin drove 100 miles at a speed of 50 miles per hour. How long did Justin's trip take, in hours? | def solve() -> int:
distance = 100
speed = 50
time = distance / speed
result = time
return result
|
A company has 240 employees. If 25% of the employees are managers, how many managers are there in the company? | def solve() -> int:
total_employees = 240
manager_employees = total_employees * 0.25
result = manager_employees
return result
|
Jack jogs at a speed of 5 miles per hour. His dog runs at a speed of 8 miles per hour. If Jack gives his dog a 0.5 mile head-start, how long will it take before Jack catches up to his dog? | def solve() -> int:
jack_speed = 5
dog_speed = 8
head_start = 0.5
relative_speed = dog_speed - jack_speed
time_to_catch_up = head_start / relative_speed
result = time_to_catch_up
return result
|
A rectangular garden measures 25 meters by 40 meters. What is the perimeter of the garden in meters? | def solve() -> int:
length = 25
width = 40
perimeter = 2 * (length + width)
result = perimeter
return result
|
If 60% of the passengers are traveling in business class, and the remaining passengers are evenly divided into two groups, with only one group traveling at any given time, what percentage of passengers are traveling at any given time? | def solve() -> int:
total_passengers = 100
business_class_passengers = 60
remaining_passengers = total_passengers - business_class_passengers
group_passengers = remaining_passengers / 2
percentage_of_passengers = (business_class_passengers + group_passengers) / total_passengers * 100
... |
Jane needs to buy a new laptop. The cost of the laptop is $1500. If Jane already has 60% of the amount she needs, how much more money does she need? | def solve() -> int:
amount_needed = 1500
current_amount = amount_needed*0.6
money_needed = amount_needed - current_amount
result = money_needed
return result
|
Jack has 5 friends coming over for dinner tonight. He has 17 plates, 23 forks, and 13 knives in his kitchen. Each of Jack's friends needs one plate, one fork, and one knife. Do Jack and his friends have enough plates, forks, and knives? | def solve() -> int:
plates_needed = forks_needed = knives_needed = 5
total_plates = 17
total_forks = 23
total_knives = 13
if total_plates >= plates_needed and total_forks >= forks_needed and total_knives >= knives_needed:
result = "Jack has enough plates, forks, and knives."
else:
... |
If 30% of the students in a class have a pet and 40% of those pet owners have a cat, what percentage of the class has a cat? | def solve() -> int:
total_students = 100
pet_owners = total_students * 0.30
cat_owners = pet_owners * 0.40
percentage_cat_owners = cat_owners / total_students * 100
result = percentage_cat_owners
return result
|
The sum of four consecutive even numbers is 260. What is the first number? | def solve() -> int:
total_sum = 260
even_number = total_sum / 4
first_number = even_number - 3 * 2
result = first_number
return result
|
Emma is making a fruit salad. 30% of the fruits are strawberries, 40% are bananas, and 30% are oranges. If she has 24 strawberries, how many oranges does she have? | def solve() -> int:
strawberries = 24
total_fruits = 100
oranges_percentage = 30
oranges = (oranges_percentage / total_fruits) * strawberries
result = oranges
return result
|
Eric's grocery sells 50 bananas and 75 oranges. Tina's grocery sells 6 less than two times as many fruits as Eric's grocery. How many fruits does Tina's grocery sell? | def solve() -> int:
eric_bananas = 50
eric_oranges = 75
tina_fruits = 2 * (eric_bananas + eric_oranges) - 6
result = tina_fruits
return result
|
A construction company wants to pour a concrete foundation that is 8 feet wide, 12 feet long, and 4 inches thick. If concrete costs $80 per cubic yard, how much will it cost to pour the foundation (round up to the nearest dollar)? | def solve() -> int:
width = 8
length = 12
depth = 4/12
cubic_feet = width * length * depth
cubic_yards = cubic_feet / 27
cost_per_yard = 80
total_cost = round(cubic_yards * cost_per_yard)
result = total_cost
return result
|
Student: There are 150 students in a school, of which 60% are girls. How many girls are in the school? | def solve() -> int:
total_students = 150
percentage_girls = 0.6
number_girls = total_students * percentage_girls
result = number_girls
return result
|
Allison filled a container with stones. She filled up 6 times as many stones as Debbie and Debbie filled one third as many stones as Rodger. If Rodger filled up 96 stones, how many did Allison fill up? | def solve() -> int:
Debbie = 0
Rodger = 96
Allison = (Debbie + Rodger) * 6
result = Allison
return result
|
Mandy received a 66 on her fifth exam, raising her overall average to an 81. What was Mandy's average on her first four exams? | def solve() -> int:
exam_5 = 66
overall_average = 81
total_score = overall_average * 5
score_first_four_exams = total_score - exam_5
average_first_four_exams = score_first_four_exams / 4
result = average_first_four_exams
return result
|
Gabriel will be 30 years old in three years. His nephew, George, is 14 years younger. In how many years will George be 25 years old? | def solve() -> int:
gabriel_age = 30
george_age = gabriel_age - 14
target_age = 25
years_passed = gabriel_age - target_age
george_age_in_years = years_passed + 3
result = george_age_in_years
return result
|
Jane is buying school supplies for the year. She buys a backpack for $30, two binders for $5 each, and a pack of pencils for $2. How much did she spend in total? | def solve() -> int:
backpack_cost = 30
binders_cost = 5*2
pencils_cost = 2
total_cost = backpack_cost + binders_cost + pencils_cost
result = total_cost
return result
|
A mail-order company charges $5.50 for an item plus $1.25 for shipping and handling. If you buy 3 items, what is the total cost? | def solve() -> int:
total_cost = (5.5 + 1.25) * 3
result = total_cost
return result
|
Sarah is currently 15 years old and her twin sister, Samantha, is 5 minutes younger. How old will Samantha be when Sarah turns 16 years old? | def solve() -> int:
sarah_age = 15
samantha_age = sarah_age - 5/60
sarah_turns_16 = sarah_age + 1
samantha_age_when_sarah_turns_16 = samantha_age + 1
result = samantha_age_when_sarah_turns_16
return result
|
Student: A pizza store sells 8 slices of pizza for $10. If I buy 3 pizzas, how much would it cost me? | def solve() -> int:
price_per_pizza = 10
slices_per_pizza = 8
number_of_pizzas = 3
total_cost = price_per_pizza * number_of_pizzas
total_slices = slices_per_pizza * number_of_pizzas
cost_per_slice = total_cost / total_slices
result = cost_per_slice * total_slices
return result
|
Student: The population of Wildmountain was 7000 a decade ago. If the town's population has decreased by 6% each year since then, and the population analysis firm predicts that it will decrease by 45% after four more years, how many people will inhabit Wildmountain in four years? | def solve() -> int:
population = 7000
population = population * 0.94
population = population * 0.94
population = population * 0.94
population = population * 0.55
result = population
return result
|
After nine years, James will be twice as old as his cousin. If James is currently 21 years old, how old is his cousin now? | def solve() -> int:
james_age = 21
years_passed = 9
cousin_age = (james_age * 2) - years_passed
result = cousin_age
return result
|
James needs to bake 75 cupcakes for the school bake sale. A batch of chocolate cupcakes makes 12, vanilla makes 8, and strawberry makes 10. If James bakes 2 batches of chocolate cupcakes, 4 batches of vanilla, and 3 batches of strawberry, how many more cupcakes does he need to bake to reach his goal? | def solve() -> int:
chocolate_batch = 12
vanilla_batch = 8
strawberry_batch = 10
chocolate_batches = 2
vanilla_batches = 4
strawberry_batches = 3
chocolate_cupcakes = chocolate_batch * chocolate_batches
vanilla_cupcakes = vanilla_batch * vanilla_batches
strawberry_cupcakes ... |
A bag contains 80 marbles, red and blue. The ratio of red marbles to blue marbles is 3:2. How many red marbles are in the bag? | def solve() -> int:
total_marbles = 80
red_ratio = 3/5
red_marbles = red_ratio*total_marbles
result = red_marbles
return result
|
The sum of three consecutive even integers is 48. What are the integers? | def solve() -> int:
result = None
x = None
int1 = None
int2 = None
int3 = None
result = (int1, int2, int3)
return result
|
A store owner buys pens for $1 each. He sells each pen for $2. If he sells 50 pens, what is his profit? | def solve() -> int:
buy_price = 1
sell_price = 2
num_pens = 50
revenue = sell_price * num_pens
cost = buy_price * num_pens
profit = revenue - cost
result = profit
return result
|
A toy store has a sale for 20% off all items. If a toy originally costs $50, how much will it cost with the sale? | def solve() -> int:
original_price = 50
discount_percent = 0.2
discount_amount = original_price*discount_percent
price_with_discount = original_price - discount_amount
result = f'<<<{price_with_discount}>>>'
result = price_with_discount
return result
|
A car traveled a total distance of 180 km. If the car covered 60 km in 1 hour, how much time did it take to complete the journey? | def solve() -> int:
total_distance = 180
distance_per_hour = 60
time_in_hours = total_distance / distance_per_hour
result = time_in_hours
return result
|
A tank can hold 500 gallons of water and has a leak that can drain 5 gallons of water per hour. If the tank is currently full, how many hours will it take for the tank to empty completely? | def solve() -> int:
tank_capacity = 500
leak_rate = 5
hours_to_empty = tank_capacity / leak_rate
result = hours_to_empty
return result
|
You have $500 to donate to a charity. If the charity receives $10 per hour of volunteering, how many hours can be volunteered with your donation? | def solve() -> int:
donation_amount = 500
hourly_rate = 10
num_hours = donation_amount // hourly_rate
result = num_hours
return result
|
Liam and Emma are sharing a pizza. Liam has 5 slices and Emma has 4 slices. Each slice weighs 120 grams. If Liam eats 2 slices and Emma eats 3 slices, how much pizza is left in kilograms? | def solve() -> int:
total_slices = 5 + 4
weight_per_slice = 120
total_weight = total_slices * weight_per_slice
liam_eaten = 2 * weight_per_slice
emma_eaten = 3 * weight_per_slice
total_eaten = liam_eaten + emma_eaten
pizza_left = total_weight - total_eaten
pizza_left_kg = pizza_left / 10... |
A painting is on sale for 30% off its original price of $400. What is the new sale price? | def solve() -> int:
original_price = 400
discount_percentage = 30
discount_amount = original_price * (discount_percentage / 100)
sale_price = original_price - discount_amount
result = sale_price
return result
|
There are 30 students in a class and 15 of them are boys. If each student has a desk and a chair, how many chairs are there in the class? | def solve() -> int:
num_students = 30
num_boys = 15
num_girls = num_students - num_boys
num_chairs = num_students * 2
result = num_chairs
return result
|
John has a rectangular garden that is 12 meters long and 8 meters wide. He wants to fence the entire garden with a wire that costs $3 per meter. How much will he spend on the wire? | def solve() -> int:
perimeter = 12 + 12 + 8 + 8
cost = perimeter * 3
result = cost
return result
|
Student: There are 8,400 books in the store. It gives away 2,000 of them and then replenishes the amount with 4 times the amount. Later on, 4,000 people come and take 6 books each. How many more books does the store need to restock? | def solve() -> int:
books_in_store = 8400
books_given_away = 2000
people_coming = 4000
books_taken_by_each_person = 6
books_left_in_store = books_in_store - books_given_away
books_taken_by_people = people_coming * books_taken_by_each_person
books_needed_to_restock = books_taken_by_people - b... |
The History class has twice as many students as the Economics class. If the Geography class has 100 students, and the History class has thrice as many girls as in the Geography class, how many boys are in the History class? | def solve() -> int:
geography_students = 100
history_students = 2 * geography_students
history_girls = 3 * geography_students
history_boys = history_students - history_girls
result = history_boys
return result
|
A train moves at a speed of 60 miles per hour. If it takes 3 hours to reach its destination, how many miles is the destination from where it started? | def solve() -> int:
distance_travelled = 60*3
result = distance_travelled
return result
|
Kelly just got her first job and earns 10 dollars an hour. Calculate the total amount of money Kelly earned for working 6 hours. | def solve() -> int:
hourly_rate = 10
hours_worked = 6
total_earnings = hourly_rate * hours_worked
result = total_earnings
return result
|
A recipe calls for 2 cups of flour for every 3 cups of sugar. If you have 6 cups of sugar, how much flour do you need? | def solve() -> int:
sugar = 6
flour = (sugar / 3) * 2
result = flour
return result
|
A company produces 2000 units of a product each day. If 15% of the units are defective and are discarded, how many units are usable? | def solve() -> int:
units_produced_per_day = 2000
percentage_defective = 0.15
defective_units = units_produced_per_day * percentage_defective
usable_units = units_produced_per_day - defective_units
result = usable_units
return result
|
Student: If the area of a triangle is 12 square cm and the base of the triangle is 4cm, what is the height of the triangle? | def solve() -> int:
base = 4
area = 12
height = area / base
result = height
return result
|
Joseph had 17 stickers. He gave 3 stickers to 5 of his cousins. How many stickers does Joseph have left? | def solve() -> int:
given_to_cousins = 5 * 3
joseph_stickers_left = 17 - given_to_cousins
result = joseph_stickers_left
return result
|
Olivia types twice as fast as Laura. If it takes Laura 10 minutes to type a page, how long, in minutes, will it take Olivia to type 30 pages? | def solve() -> int:
laura_speed = 1/10
olivia_speed = 2*laura_speed
num_pages = 30
time = num_pages/olivia_speed
result = time
return result
|
A shipping company charges $5 per package for up to 10 packages, and $3 per package for any packages above that. If a company ships 14 packages, how much will it cost them? | def solve() -> int:
total_packages = 14
if total_packages <= 10:
total_cost = total_packages * 5
else:
total_cost = (10 * 5) + ((total_packages - 10) * 3)
result = total_cost
return result
|
Isabella goes grocery shopping and buys 4 items every 5 minutes. By the end of 1 hour, she loses 2 items. How many items does she have in total? | def solve() -> int:
items_per_minute = 4/5
items_per_hour = items_per_minute * 60
total_items = items_per_hour * 1
total_items -= 2
result = total_items
return result
|
Student: In a race, it took 45 seconds for the winner to run 150 meters. What was the speed of the winner in meters per second? | def solve() -> int:
time = 45
distance = 150
speed = distance / time
result = speed
return result
|
If a restaurant opens from 11 am to 11 pm every day, how many hours is the restaurant open in a week? | def solve() -> int:
opening_time = 11
closing_time = 23
hours_per_day = closing_time - opening_time
hours_per_week = hours_per_day * 7
result = hours_per_week
return result
|
In a sack, 55% of marbles are green and the rest are red. There are 60 red marbles. How many green marbles are there? | def solve() -> int:
percentRed = 45
numRed = 60
numGreen = (numRed/(1-percentRed)) * percentRed
result = numGreen
return result
|
A squirrel and a chipmunk start gathering nuts for the winter at the same time. The squirrel can gather 20 nuts per hour while the chipmunk can only gather 5. If the squirrel fills their storage unit in 4 hours, how many hours later will the chipmunk fill their storage unit? | def solve() -> int:
squirrel_rate = 20
chipmunk_rate = 5
squirrel_time = 4
squirrel_nuts = squirrel_rate * squirrel_time
chipmunk_nuts = squirrel_nuts
chipmunk_time = chipmunk_nuts / chipmunk_rate
result = chipmunk_time - squirrel_time
return result
|
- A school has 400 students and 20 teachers. Each teacher has a class of 20 students. On Friday, 10% of the students and 25% of the teachers are absent. How many students and teachers are present on Friday? | def solve() -> int:
students = 400
teachers = 20
students_absent = students * 0.1
teachers_absent = teachers * 0.25
students_present = students - students_absent
teachers_present = teachers - teachers_absent
result = (students_present, teachers_present)
return result
|
If it takes Sarah 2 hours to bake a cake, and it takes John 1 hour and 30 minutes to bake a cake, how long would it take for them to bake two cakes together? | def solve() -> int:
sarah_time = 2
john_time = 1.5
total_time = sarah_time + john_time
time_per_cake = total_time / 3
time_for_two_cakes = time_per_cake * 2
result = time_for_two_cakes
return result
|
Building A has 3 windows per each floor, Building B has the same number of windows as Building A. Building C has four times as many windows as Building B. How many windows does Building C have? | def solve() -> int:
windows_A = 3
windows_B = windows_A
windows_C = windows_B * 4
result = windows_C
return result
|
Lisa has some coins in her piggy bank. She has 12 quarters, and there are twice as many dimes as quarters. She also has half as many nickels as dimes. How much money does Lisa have in her piggy bank? | def solve() -> int:
quarter_value = 12 * 25
dime_value = 12 * 2 * 10
nickel_value = 12 / 2 * 5
total = quarter_value + dime_value + nickel_value
result = total
return result
|
Angel has 91 pencils, Brett has 76 pencils and Stacey has no pencils. They decide to divide the pencils between them equally, how many pencils will each one get? | def solve() -> int:
angel = 91
brett = 76
stacey = 0
total = angel + brett + stacey
result = total / 3
return result
|
Sophia's horse jumps over 5 hurdles and runs around 3 barrels. Alex's horse completes 4 fewer obstacles than three times the number of obstacles Sophia's horse completed. How many obstacles does Alex's horse complete? | def solve() -> int:
sophia_hurdles = 5
sophia_barrels = 3
alex_obstacles = 3 * sophia_hurdles + sophia_barrels - 4
result = alex_obstacles
return result
|
In a farm, there are 30 cows and 40 chickens. If each cow gives 2 liters of milk and each chicken gives 1 liter of milk, how much milk (in liters) does the farm produce in one day? | def solve() -> int:
l_cow = 2
l_chicken = 1
total_cows = 30
total_chickens = 40
total_milk = total_cows * l_cow + total_chickens * l_chicken
result = total_milk
return result
|
Student: A recipe calls for 3 cups of flour and makes 8 muffins. How many cups of flour are needed to make 24 muffins? | def solve() -> int:
cups_of_flour = 3
muffins = 8
cups_of_flour_needed = cups_of_flour * (24/muffins)
result = cups_of_flour_needed
return result
|
imon knows that it costs $14 to buy 4 bags of potatoes. He wants to buy 12 bags of potatoes. How much will it cost him in total? | def solve() -> int:
cost_4_bags = 14
cost_1_bag = cost_4_bags/4
total_cost = cost_1_bag*12
result = total_cost
return result
|
**** A furniture shop has a total of 832 chairs available for their customers. They have sold 42 chairs on Friday, 90 on Saturday and 56 on Sunday. In addition, they have received a shipment of 100 chairs. How many chairs do they currently have? | def solve() -> int:
chairs = 832
sold_friday = 42
sold_saturday = 90
sold_sunday = 56
shipped = 100
result = chairs + shipped - (sold_friday + sold_saturday + sold_sunday)
return result
|
If a bus can take 10 people at one time, how many trips does the bus need to make in order to trasport 50 people? | def solve() -> int:
people = 50
trip = 10
result = people // trip
return result
|
A store has a 20% discount on all items. If a shirt costs $25, how much will it cost after the discount? | def solve() -> int:
discounted_price = 25*0.8
result = discounted_price
return result
|
A group of friends shared a pizza. They ate 3/4 of the pizza and had 2 slices left. If there were 8 slices of pizza in total, how many friends shared the pizza? | def solve() -> int:
slices_left = 2
slices_eaten = 8 - slices_left
pizza_share = 3/4
total_slices = slices_eaten / pizza_share
result = total_slices
return result
|
In a pet store with 150 animals, 30% of the animals are cats, and 40% of the cats are neutered. How many of the cats are not neutered? | def solve() -> int:
total_animals = 150
cats = total_animals * 0.3
neutered_cats = cats * 0.4
not_neutered_cats = cats - neutered_cats
result = not_neutered_cats
return result
|
Of the 1656 oranges sold in a grocery store this week, 312 were sold on Monday and 464 were sold on Tuesday. How many oranges still remain to be sold for the rest of the week? | def solve() -> int:
totalOranges = 1656
orangesSoldM = 312
orangesSoldT = 464
orangesRemaining = totalOranges - (orangesSoldM + orangesSoldT)
result = orangesRemaining
return result
|
A music store sold 120 CDs. One third of the CDs were pop, the rest were rock. How many rock CDs were sold? | def solve() -> int:
rock_cds = 80
result = rock_cds
return result
|
Oren had 5 apples that he divided among his 4 friends. How many apples did each of his friends receive? | def solve() -> int:
apples_per_friend = 0
total_apples = 5
num_friends = 4
apples_per_friend = total_apples // num_friends
result = apples_per_friend
return result
|
Student: Jeff works 60 hours per week and gets paid $10 per hour for the first 40 hours, and $15 per hour after that. How much did he earn in one week? | def solve() -> int:
hours = 60
rate1 = 10
rate2 = 15
pay1 = rate1 * 40
pay2 = rate2 * (hours - 40)
pay = pay1 + pay2
result = pay
return result
|
Student: Q8: Elizabeth and Dan went trick-or-treating in two neighborhoods. Elizabeth got 14 pieces of candy from each house in her subdivision, and Dan got 17 pieces of candy from each house in his. If Elizabeth went to 70 houses and Dan went to 80 houses, how many more pieces of candy did Dan get than Elizabeth? | def solve() -> int:
elizabeth_candy_per_house = 14
dan_candy_per_house = 17
elizabeth_houses = 70
dan_houses = 80
elizabeth_total_candy = elizabeth_candy_per_house * elizabeth_houses
dan_total_candy = dan_candy_per_house * dan_houses
candy_difference = dan_total_candy - elizabeth_total_candy... |
One pack of stickers costs $3 and one sheet of construction paper costs $1. If Ella buys three packs of stickers and five sheets of construction paper, how much does she spend altogether? | def solve() -> int:
sticker_cost = 3
paper_cost = 1
num_stickers = 3
num_paper = 5
total_sticker_cost = num_stickers*sticker_cost
total_paper_cost = num_paper*paper_cost
total_spent = total_sticker_cost + total_paper_cost
result = total_spent
return result
|
Alexandra and Ethan decide to make some smoothies. They make a strawberry smoothie with 12 ounces of strawberries and a banana smoothie with 18 ounces of bananas. They have both had 6 ounces already. How many ounces are left per person? | def solve() -> int:
strawberry_smoothie = 12
banana_smoothie = 18
already_consumed = 6
total_ounces = strawberry_smoothie + banana_smoothie - already_consumed
num_people = 2
ounces_per_person = total_ounces / num_people
result = ounces_per_person
return result
|
A painter can paint 4 walls in 3 hours. From Monday to Thursday, the painter works for 7 hours each day, and on Friday, she works for 5 hours. How many walls can the painter paint in a week? | def solve() -> int:
walls_painted_per_hour = 4 / 3
hours_worked_per_week = (7 * 4) + 5
walls_painted_per_week = walls_painted_per_hour * hours_worked_per_week
result = walls_painted_per_week
return result
|
A bag has 350 marbles. If 20 marbles are taken out each day, how many days will it take to have no marbles left in the bag? | def solve() -> int:
marbles = 350
days = marbles // 20
result = days
return result
|
At the ice cream shop, customers can purchase a sundae for $6.50. In addition, there is a $2 fee for a waffle cone. If Tom spends a total of $24.50 on 4 sundaes in waffle cones, how much did each sundae cost? | def solve() -> int:
sundae_cost = 6.50
waffle_cone_fee = 2
total_cost = 24.50
num_sundaes = 4
total_sundae_cost = total_cost - (waffle_cone_fee * num_sundaes)
sundae_cost = total_sundae_cost / num_sundaes
result = sundae_cost
return result
|
A restaurant offers a 15% discount on all meals during their lunch hour. If a pasta originally costs $15, how much does it cost during lunch hour? | def solve() -> int:
original_price = 15
discount = 0.15 * original_price
discounted_price = original_price - discount
result = discounted_price
return result
|
Student: The bookstore buys 15,244 new books in January and sells 45% of the books. How many books are left unsold in January? | def solve() -> int:
books_sold = 15244 * 0.45
books_left = 15244 - books_sold
result = books_left
return result
|
ara has 80 apples that she wants to share with her friends. She gives 12 apples to Tom, 9 apples to Lisa, and 6 apples to Ben. She divides the remaining apples into 5 bags and puts one bag in the fridge. How many apples are in the bag in the fridge? | def solve() -> int:
apples = 80
apples = apples - 12 - 9 - 6
apples_per_bag = apples // 5
result = apples_per_bag
return result
|
David is ordering pizza for his birthday party. He expects 24 guests. Half of them want cheese pizza and the other half want pepperoni pizza. If each cheese pizza costs $12 and each pepperoni pizza costs $14, and he needs to order one pizza for every four guests, how much is the total pizza cost? | def solve() -> int:
guests = 24
cheese_pizza = guests / 2
pepperoni_pizza = guests / 2
cheese_price = 12
pepperoni_price = 14
pizzas = guests / 4
cheese_cost = cheese_pizza / 4 * cheese_price
pepperoni_cost = pepperoni_pizza / 4 * pepperoni_price
total_cost = cheese_cost + ... |
A rectangular room is 12 feet long and 10 feet wide. If the room has a 9-foot ceiling, how many cubic feet of air are in the room? | def solve() -> int:
length = 12
width = 10
height = 9
volume = length * width * height
result = volume
return result
|
A delivery truck travels 80 miles in 2 hours. What is the average speed of the truck in miles per hour? | def solve() -> int:
distance = 80
time = 2
average_speed = distance/time
result = average_speed
return result
|
Students get 8 points for each problem solved correctly in a computer science exam. A student gets an extra 6 point bonus if they are able to solve both the coding and debugging problems. How many points did James get if he scored 90% of the exam? | def solve() -> int:
total_points = 100
correct_problems = total_points * 0.9
coding_problem = True
debugging_problem = True
points_correct = correct_problems * 8
if coding_problem and debugging_problem:
bonus_points = 6
else:
bonus_points = 0
total_points = poi... |
Sarah had 40 pencils. She gave away 20 and received 15 from her friends. A while later, she lost 2 pencils and got 22 more from her teacher. How many pencils does Sarah have now? | def solve() -> int:
pencils = 40
pencils -= 20
pencils += 15
pencils -= 2
pencils += 22
result = pencils
return result
|
Yosef went to the grocery store and bought ten more apples than Zoe. If Zoe bought 8 apples, how many apples did they buy? | def solve() -> int:
zoe_apples = 8
yosef_apples = zoe_apples + 10
total_apples = zoe_apples + yosef_apples
result = total_apples
return result
|
Tony is constructing an apartment building with 8 floors. The 2nd, 4th, and 6th floors have elevators that are being repaired, which takes 45 minutes. To travel from one floor to the next, tenants have to use the stairs and climb 150 steps at a rate of 5 steps/second. How long will it take to go from the top floor to t... | def solve() -> int:
floors = 8
elevator_repair_time = 45
steps_per_floor = 150
steps_per_second = 5
total_steps = (floors - 3) * steps_per_floor
total_time = total_steps / steps_per_second + elevator_repair_time
result = total_time
return result
|
If the perimeter of a square is 20 cm, what is the area of the square? | def solve() -> int:
perimeter = 20
side_length = perimeter / 4
area = side_length ** 2
result = area
return result
|
Student: James purchased 400 clothes hangers to hang in his closet. Each box contains 5 hangers, and each hanger weights 4 ounces. How many boxes does James need to open? | def solve() -> int:
hangers = 400
box_size = 5
hanger_weight = 4
boxes = hangers / box_size
result = boxes
return result
|
Nick walked 4 miles on Saturday and 3 miles on Sunday. How many miles does he need to walk to reach his total goal of 10 miles? | def solve() -> int:
total_miles = 10
saturday_miles = 4
sunday_miles = 3
miles_remaining = total_miles - saturday_miles - sunday_miles
result = miles_remaining
return result
|
Student: You want to purchase a refrigerator and a stove for your house, and you have a budget of $3000. The refrigerator costs $1200 more than the stove, find the price of each appliance. | def solve() -> int:
budget = 3000
difference = 1200
stove_price = budget - difference
refrigerator_price = budget - stove_price
result = (stove_price, refrigerator_price)
return result
|
Student: Matt invested 4000$ in a stock, he got back 4590$ after one year with a gain of 590$. What's the rate of return for Matt? | def solve() -> int:
investment = 4000
final_value = 4590
gain = 590
rate_of_return = (gain / investment) * 100
result = rate_of_return
return result
|
On Monday, Jack drank 4 cups of water. Today, he drank 3 times as much water as Monday. How much water did Jack drink today? | def solve() -> int:
monday_water = 4
today_water = monday_water * 3
result = today_water
return result
|
If 10 people take 15 minutes to complete a task, how many minutes would it take 20 people to complete the same task? | def solve() -> int:
x = 10
y = 15
z = 20
a = y*z/x
result = a
return result
|
If I save $100 every month for a year and put it in a bank account that pays 5% interest per year, how much money will I have in the account at the end of the year? | def solve() -> int:
monthly_saving = 100
months = 12
interest_rate = 0.05
amount_saved = monthly_saving * months
interest_amount = amount_saved * interest_rate
final_amount = amount_saved + interest_amount
result = final_amount
return result
|
am will spend 1/5 of a day exercising. He will do cardio, strength training, and yoga. He burns 600 calories an hour when he does cardio, 500 calories an hour when he does strength training, and 300 calories an hour when he does yoga. If he spends equal time on each activity, how many calories will he burn? | def solve() -> int:
hours_exercising = 24 * 1/5
time_per_activity = hours_exercising / 3
calories_per_hour_cardio = 600
calories_per_hour_strength = 500
calories_per_hour_yoga = 300
calories_cardio = calories_per_hour_cardio * time_per_activity
calories_strength = calories_per_hour... |
Student: A shopkeeper had 450 pens. He sold 3/5 of the pens and then gave 1/3 of the remaining pens to his son. How many pens did he have left? | def solve() -> int:
total_pens = 450
sold_fraction = 3/5
given_fraction = 1/3
sold_pens = total_pens * sold_fraction
remaining_pens = total_pens - sold_pens
given_pens = remaining_pens * given_fraction
left_pens = remaining_pens - given_pens
result = left_pens
return result
|
A bakery sells eight types of pies. It sells twice as many apple pies as cherry pies, half as many lemon pies as apple pies, and four more pumpkin pies than lemon pies. It sells the same number of blueberry, pecan, peach, and chocolate pies. How many pies does it sell in total? | def solve() -> int:
apple = 8
cherry = apple / 2
lemon = apple / 2
pumpkin = lemon + 4
blueberry = 5
pecan = blueberry
peach = blueberry
chocolate = blueberry
total = apple + cherry + lemon + pumpkin + blueberry + pecan + peach + chocolate
result = total
ret... |
John bought 4 packs of gum with 10 pieces in each pack. He gave 7 pieces to his friend and chewed the rest himself. How many pieces of gum does John have left? | def solve() -> int:
pieces = 4*10
given_away = 7
remaining = pieces - given_away
result = remaining
return result
|
Student: A candy store sells lollipops at a discount during the summer. The store originally sold the lollipops for € 1.50 each, but they now sell them for € 1.25 each. If the store sold 45 lollipops, how much money did the store make in total? | def solve() -> int:
original_price = 1.50
discount_price = 1.25
number_of_lollipops = 45
total_original_price = original_price * number_of_lollipops
total_discount_price = discount_price * number_of_lollipops
total_profit = total_discount_price - total_original_price
result = total_profit
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.