question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
At a hardware store, Maria bought 7 screwdrivers and 3 hammers. If each screwdriver costs $4 and a hammer has the same cost as 2 screwdrivers, how much is Maria's change if she paid with a $50 bill? | def solve() -> int:
screwdriver_cost = 4
hammer_cost = screwdriver_cost * 2
num_screwdrivers = 7
num_hammers = 3
total_cost = (num_screwdrivers * screwdriver_cost) + (num_hammers * hammer_cost)
bill = 50
change = bill - total_cost
result = change
return result
|
Mia Thomas has read 80 pages of a book. If there are 200 pages in the book, how many more pages does she need to read to finish the book? | def solve() -> int:
pages_read = 80
total_pages = 200
pages_left = total_pages - pages_read
result = pages_left
return result
|
If 8 cans of soda cost $4.80, how much does one can of soda cost? | def solve() -> int:
cost_per_8_cans = 4.80
cans = 8
cost_per_can = cost_per_8_cans / cans
result = cost_per_can
return result
|
A book has 218 pages. If I read 8 pages per day and start on Monday, what day of the week will I finish the book? | def solve() -> int:
book_pages = 218
pages_per_day = 8
starting_day = 1
days = book_pages//pages_per_day
ending_day = (starting_day+days)%7
result = ending_day
return result
|
Student: Mark currently has a balance of $350 in his checking account. If Mark wants to deposit an additional $318 to reach $500 exactly, how much more money does he need to deposit? | def solve() -> int:
balance = 350
deposit = 318
result = 500 - (balance + deposit)
return result
|
Tanya has $675 to buy sweaters for her family. Sweaters cost $50 each. How many sweaters can she buy? | def solve() -> int:
budget = 675
price = 50
result = budget / price
return result
|
If a dozen eggs cost $2 and a quart of milk costs $1, how much does it cost to buy 3 dozen eggs and 2 quarts of milk? | def solve() -> int:
dozen_eggs_cost = 2
num_dozen_eggs = 3
quart_milk_cost = 1
num_quarts_milk = 2
total_cost = (dozen_eggs_cost * num_dozen_eggs) + (quart_milk_cost * num_quarts_milk)
result = total_cost
return result
|
Leo bought a pack of 24 pencils for $4.80. He used 8 pencils for his math homework and lost 3 pencils on his way to school. He then sold the remaining pencils to his classmates for $0.25 each. How much profit, in dollars, did he make from selling the pencils? | def solve() -> int:
pencil_cost = 4.80 / 24
pencils_sold = 24 - (8 + 3)
pencil_revenue = pencils_sold * 0.25
profit = pencil_revenue - (pencil_cost * pencils_sold)
result = profit
return result
|
If Mia drove with a speed of 100 mph and covered a distance of 500 miles in 5 hours, what was the speed limit? Zoe teaches 30 children a year. If she only taught 20 children in the first year, how many children will Zoe teach in 8 years? | def solve() -> int:
speed_limit = 500 / 5
x = 20 + (8 * 30)
result = speed_limit, x
return result
|
``` Kelly has saved $35. She deposited $12 and then spent $6. How much money does she have now? | def solve() -> int:
money = 35
money += 12
money -= 6
result = money
return result
|
Student: At a grocery store, there are 200 loaves of bread for sale. 30% of them are whole wheat, and half as many are sourdough. If a loaf of bread is chosen at random, what are the odds it's not whole wheat or sourdough (expressed as a percentage)? | def solve() -> int:
total_loaves = 200
whole_wheat = 0.3 * total_loaves
sourdough = 0.5 * whole_wheat
not_whole_wheat_or_sourdough = total_loaves - whole_wheat - sourdough
odds = not_whole_wheat_or_sourdough / total_loaves
percentage = odds * 100
result = percentage
return result
|
A farmer can harvest 10 acres of corn in a day. If he has to harvest 200 acres, how many days will it take him to finish? | def solve() -> int:
acres_per_day = 10
total_acres = 200
days = total_acres / acres_per_day
result = days
return result
|
A group of friends went on a vacation together. They rented a house for $200 per night and stayed for five nights. They also rented a car for $50 per day and used it for four days. If they split the cost equally among five people, how much did each person pay? | def solve() -> int:
house_rental_cost = 200*5
car_rental_cost = 50*4
total_cost = house_rental_cost + car_rental_cost
cost_per_person = total_cost/5
result = cost_per_person
return result
|
Angela has $40 to buy groceries. She bought milk for $3.50, bread for $2.75, eggs for $4.25, and cheese for $5.50. How much money does Angela have left? | def solve() -> int:
groceries = 3.50 + 2.75 + 4.25 + 5.50
remaining_money = 40 - groceries
result = remaining_money
return result
|
A train leaves Delhi for Jaipur at 6 pm travelling at a speed of 50 km/h. Another train leaves Jaipur for Delhi on the same day at 7 pm travelling at a speed of 55 km/h. Knowing that the distance between the cities is 275 km, find the time of their meeting and the distance of the meeting point from Delhi. | def solve() -> int:
delhi_to_jaipur_dist = 275
delhi_to_jaipur_speed = 50
jaipur_to_delhi_speed = 55
total_speed = delhi_to_jaipur_speed + jaipur_to_delhi_speed
time_of_meeting = delhi_to_jaipur_dist / total_speed
distance_from_delhi = delhi_to_jaipur_speed * time_of_meeting
result = (time_o... |
The perimeter of a square is 40 feet. What is the length of one side of the square? | def solve() -> int:
perimeter = 40
one_side = perimeter / 4
result = one_side
return result
|
Jenny bought 6 cupcakes for $2 each, 2 liters of milk for $3 each and a birthday card for $4. She also received a $5 gift card from the store. If she paid with a $20 bill, how much change will she get back? | def solve() -> int:
total_cost = 6 * 2 + 2 * 3 + 4
final_cost = total_cost - 5
change = 20 - final_cost
result = change
return result
|
The library has 500 books in its collection. 100 books were borrowed in the morning, and 75 books were borrowed in the afternoon. How many books will the library lend on average in the evening if they want to lend all their books? | def solve() -> int:
morning_borrowed = 100
afternoon_borrowed = 75
total_books = 500
evening_borrowed = total_books - morning_borrowed - afternoon_borrowed
average_evening_borrowed = evening_borrowed / 1
result = average_evening_borrowed
return result
|
If each book weighs the same, how many pounds does each book weigh? | def solve() -> int:
weight = 28
books = 8
result = weight / books
return result
|
In a math competition, there are a certain number of algebra solvers and 7 more than twice that many geometry solvers. If there are 50 competitors total, how many algebra solvers are there? | def solve() -> int:
algebra_solvers = (50 - 7) / (2 + 1)
result = algebra_solvers
return result
|
A mechanic fixed 22 cars. Four cars were found to have unrepairable damage. Two-thirds of the remaining cars required only minor repairs, one car needed a new engine, and the rest required significant repairs. How many cars required significant repairs? | def solve() -> int:
total_cars = 22
unrepairable_cars = 4
remaining_cars = total_cars - unrepairable_cars
minor_repair_cars = (2/3) * remaining_cars
new_engine_cars = 1
significant_repair_cars = remaining_cars - minor_repair_cars - new_engine_cars
result = significant_repair_cars
return ... |
A student is hired for $20 per hour to tutor Math. After the agency's fee of $4 per hour, what is the effective hourly wage? | def solve() -> int:
hourly_wage = 20
agency_fee = 4
effective_hourly_wage = hourly_wage - agency_fee
result = effective_hourly_wage
return result
|
Student: A gardener planted 18 rows of tomatoes. Each row had 24 plants. How many tomatoes did he harvest if each plant produced 15 tomatoes? | def solve() -> int:
rows = 18
plants_per_row = 24
tomatoes_per_plant = 15
total_tomatoes = rows * plants_per_row * tomatoes_per_plant
result = total_tomatoes
return result
|
Student: After helping his sister with shopping, James has some bills in his wallet which amount to $140. He has four $2 bills and three $25 bills, and the rest are $10 bills. How many $10 bills are in his wallet? | def solve() -> int:
total_amount = 140
num_2_bills = 4
num_25_bills = 3
num_10_bills = total_amount - (num_2_bills * 2 + num_25_bills * 25)
result = num_10_bills
return result
|
ome possible questions and programs are: Kelly has 12 cupcakes and wants to share them with her friends. She gives 2 cupcakes to each friend and keeps 3 for herself. How many friends did she share with? | def solve() -> int:
cupcakes = 12
per_friend = 2
keep = 3
give = cupcakes - keep
friends = give // per_friend
result = friends
return result
|
A football team won 60% of its games last season. If they played 20 games, how many games did they win? | def solve() -> int:
total_games = 20
percent_won = 60
games_won = (percent_won/100) * total_games
result = games_won
return result
|
A chemist has a 15% solution of acid and a 25% solution of acid. If he needs to make 50ml of a 20% acid solution, how many ml of each solution does he need to mix? | def solve() -> int:
percent_of_higher_solution = 25
percent_of_lower_solution = 15
desired_percent = 20
desired_amount = 50
x = (desired_percent - percent_of_lower_solution) / (percent_of_higher_solution - desired_percent)
ml_of_higher_solution = x * desired_amount
ml_of_lower_solution = des... |
Student: Steven wants to buy a tablet with a price tag of $900. He has no money saved up and can get $10 per hour from his part time job. How much total money will he make after working enough to buy the tablet? | def solve() -> int:
price = 900
hourly_wage = 10
total_money = hourly_wage * (price / hourly_wage)
result = total_money
return result
|
A science experiment requires 2 cups of milk, 3 tsp of sugar and 4 oz of flour. If Sarah wants to make the recipe for 12 people, how much of each ingredient does she need to purchase? | def solve() -> int:
people = 12
milk_per_person = 2
sugar_per_person = 3/12
flour_per_person = 4/12
total_milk = milk_per_person * people
total_sugar = sugar_per_person * people
total_flour = flour_per_person * people
result = (total_milk, total_sugar, total_flour)
return result
|
Sarah is shopping for bags of flour. The first bag contains 2 kg of all-purpose flour, the second bag contains 5 kg of bread flour, and the third bag contains 10 kg of cake flour. What is the total weight of the flour bags? | def solve() -> int:
first_bag = 2
second_bag = 5
third_bag = 10
total_weight = first_bag + second_bag + third_bag
result = total_weight
return result
|
Ernie has 50 grams of gold that cost $20 per gram and Klara has 25 grams of gold that cost $15 per gram. If they exchanged gold so that they have equal amount gold in grams, how much gold would each have? | def solve() -> int:
gramsOfGoldByErnie = 50
gramsOfGoldByKlara = 25
totalGramsOfGold = gramsOfGoldByErnie + gramsOfGoldByKlara
totalPrice = gramsOfGoldByErnie * 20
equalNumberOfGrams = totalGramsOfGold/2
result = equalNumberOfGrams
return result
|
Alex had 80 toy cars and split them with his brother. He kept 2/5 of the cars and gave the rest to his brother. His brother sold 1/4 of the cars and gave the remaining cars to his son. His son took 15 and gave the rest to his friends. How many toy cars did Alex's brother originally have? | def solve() -> int:
cars = 80
alex_cars = (2/5) * cars
brother_cars = cars - alex_cars
sold_cars = (1/4) * brother_cars
son_cars = brother_cars - sold_cars
remaining_cars = son_cars - 15
brother_original_cars = remaining_cars
result = brother_original_cars
return result
|
A pool has a capacity of 2,000 gallons of water. If the pool is 3/4 full, how many gallons of water does it currently hold? | def solve() -> int:
capacity_pool = 2000
fraction_full = 3/4
gallons_water = capacity_pool * fraction_full
result = gallons_water
return result
|
Maya made 40 pieces of jewelry. Each piece took her 30 minutes to make. If she continues to make jewelry for the next 9 hours, how many pieces of jewelry will she have made in total? Jenny buys a bag of 20 apples from the farmer's market. If she has three times as many cousins as siblings, and she has 2 siblings, how m... | def solve() -> int:
num_jewelry = 40
time_per_jewelry = 30
total_time = 9 * 60
jewelry_per_minute = 1 / time_per_jewelry
total_jewelry = num_jewelry + jewelry_per_minute * total_time
num_siblings = 2
num_cousins = 3 * num_siblings
num_people = num_cousins + num_siblings
... |
Olivia has $25 in savings. Each month, she saves $15 more than her previous month's savings. How much will she save in September? | def solve() -> int:
savings = 25
increase = 15
months = 8
for month in range(months):
savings += increase
result = savings
return result
|
If Jack has half as many stickers as Jill, and Jill has 40 stickers, how many stickers do they have combined? | def solve() -> int:
jill_stickers = 40
jack_stickers = jill_stickers / 2
combined_stickers = jill_stickers + jack_stickers
result = combined_stickers
return result
|
A factory produces 2000 items in a day. How many items can be produced in a week (7 days)? | def solve() -> int:
items_per_day = 2000
days_per_week = 7
items_per_week = items_per_day * days_per_week
result = items_per_week
return result
|
A theme park charges $20 for child tickets, $35 for adult tickets, and $50 for VIP tickets. A map of the park costs $5. On Tuesday, the park had 100 child visitors, 75 adult visitors, and 25 VIP visitors. If 30% of the visitors bought a park map, how much money did the theme park make on Tuesday? | def solve() -> int:
child_ticket_price = 20
adult_ticket_price = 35
vip_ticket_price = 50
map_price = 5
child_visitors = 100
adult_visitors = 75
vip_visitors = 25
percentage_map_buyers = 0.3
total_money = (child_ticket_price * child_visitors) + (adult_ticket_price * ad... |
Olivia has 10 petals and 3 stems. Olivia has three times as many leaves as Robert. Olivia has 9 less than double as many thorns as Robert. If Robert has 2 leaves and 20 thorns, how many parts of the flower does Olivia have in total? | def solve() -> int:
olivia_petals = 10
olivia_stems = 3
olivia_leaves = 3 * 2
olivia_thorns = 2 * 2 - 9
olivia_parts = olivia_petals + olivia_stems + olivia_leaves + olivia_thorns
result = olivia_parts
return result
|
A store manager purchased 100 light bulbs, each bulb is worth $1. The manager receives a 20% discount after purchasing the light bulbs. How much does the manager need to pay? | def solve() -> int:
price_per_light_bulb = 1
num_light_bulbs = 100
discount = 0.2
cost_before_discount = price_per_light_bulb * num_light_bulbs
cost_after_discount = cost_before_discount * discount
result = cost_before_discount - cost_after_discount
return result
|
A pizza place sells 2 sizes of pizzas, large and small. The ratio of large to small pizzas sold is 3:2. If they sold 75 pizzas in total, how many large pizzas did they sell? | def solve() -> int:
total_pizzas = 75
ratio = 3/2
numerator = 3 / (3+2)
large_pizzas = numerator * total_pizzas
result = large_pizzas
return result
|
Sarah wants to convince her niece and nephew to water her plants in exchange for ice cream. Sarah agrees to give them 2 scoops of ice cream for every plant they water. Each of them normally waters 5 plants per week. Sarah has $30 to buy ice cream. Each tub of ice cream contains 30 scoops and costs $3. How many weeks ca... | def solve() -> int:
plants_watered_per_week = 5
ice_cream_per_plant = 2
total_plants_watered = plants_watered_per_week * 2
total_scoops_per_week = total_plants_watered * ice_cream_per_plant
cost_per_tub = 3
scoops_per_tub = 30
total_scoops_bought = 0
weeks_without_watering = 0
w... |
Dana is trying to knit a scarf for her friend. She can knit 3 inches of scarf every day, but she also needs to unknit 1 inch of scarf every day to fix her mistakes. If the scarf needs to be 36 inches long, how many days will it take Dana to knit the scarf? | def solve() -> int:
length = 36
knitted = 0
days = 0
while knitted < length:
knitted += 3
knitted -= 1
days += 1
result = days
return result
|
Adam collected 80539 baseball cards. If each box contains 5376 cards, how many boxes of cards can he make? | def solve() -> int:
num_cards = 80539
cards_box = 5376
num_boxes = num_cards // cards_box
result = num_boxes
return result
|
Tom and Jerry are running a race. Tom can run 8 miles in an hour and Jerry can run 7 miles in an hour. If they both run for 5 hours, how far did they run in total? | def solve() -> int:
hours = 5
tom_miles_per_hour = 8
jerry_miles_per_hour = 7
total_miles = hours * (tom_miles_per_hour + jerry_miles_per_hour)
result = total_miles
return result
|
There are 4 math textbooks, 5 times as many English books as math book, and 3 more than two times as many social studies books as English books. How many social studies books are there? | def solve() -> int:
math_textbooks = 4
english_books = math_textbooks * 5
social_studies_books = english_books * 2 + 3
result = social_studies_books
return result
|
The weight of an elephant is 4000 kg more than that of a rhinoceros, which weighs 500 kg less than that of a hippopotamus. If the weight of a hippopotamus is 1500 kg, what is the weight of an elephant in kg? | def solve() -> int:
hippopotamus_weight = 1500
rhinoceros_weight = hippopotamus_weight - 500
elephant_weight = rhinoceros_weight + 4000
result = elephant_weight
return result
|
Bob has a rectangular garden that is 12 meters long and 8 meters wide. He wants to build a fence around it with a gate that is 2 meters wide. The fence costs $15 per meter and the gate costs $50. How much does he spend on the fence and the gate? | def solve() -> int:
length = 12
width = 8
gate_width = 2
fence_cost = 15
gate_cost = 50
perimeter = 2 * (length + width)
fence_length = perimeter - gate_width
fence_total = fence_cost * fence_length
gate_total = gate_cost
total_cost = fence_total + gate_total
result = to... |
Two friends start cycling from point A to point B. One of them cycles at an average speed of 16 km/h and the other at an average speed of 12 km/h. If the distance between points A and B is 240 km, how long will it take for them to meet? | def solve() -> int:
distance = 240
speed_1 = 16
speed_2 = 12
time_to_meet = distance / (speed_1 + speed_2)
result = time_to_meet
return result
|
In a box, there are 10 red balls and 5 blue balls. What percentage of balls are blue? | def solve() -> int:
blue_balls = 5
total_balls = 10 + 5
percentage_blue = blue_balls/total_balls * 100
result = percentage_blue
return result
|
Student: A car travels 40 miles in 1 hour. How many miles will it travel in 5 hours? | def solve() -> int:
distance = 40
time = 1
time_total = 5
distance_total = distance * time_total
result = distance_total
return result
|
Sarah can run for 7 miles without stopping. If she runs 2.5 miles each day, how many days can she run before she needs a break? | def solve() -> int:
miles_per_day = 2.5
total_miles = 7
num_of_days = total_miles/miles_per_day
result = num_of_days
return result
|
On Monday Sarah has 80 books. On Tuesday Sarah donates a third of them. On Wednesday Sarah buys 30 new books. On Thursday she buys half of what she had on Tuesday. How many books does she have on Thursday? | def solve() -> int:
monday_books = 80
tuesday_books = monday_books - (monday_books / 3)
wednesday_books = tuesday_books + 30
thursday_books = tuesday_books / 2
total_books = wednesday_books + thursday_books
result = total_books
return result
|
` Some possible questions and programs are: Lila wants to buy a pair of shoes. The store buys the shoes for $40, but charges 25% for profit. However, the shoes are on sale for 40% off the selling price. What is the price now? | def solve() -> int:
cost = 40
profit_rate = 0.25
selling_price = cost * (1 + profit_rate)
discount_rate = 0.4
final_price = selling_price * (1 - discount_rate)
final_price = round(final_price, 2)
result = final_price
return result
|
Jack bought 200 baskets of apples for a fruit stand. Each basket contained 20 apples. How many total apples did Jack buy in all? | def solve() -> int:
num_baskets = 200
apples_in_basket = 20
total_apple = num_baskets * apples_in_basket
result = total_apple
return result
|
Student: An aquarium can hold 100 liters of water. If the aquarium currently has 60 liters of water, how much more water can it hold? | def solve() -> int:
current_water = 60
max_water = 100
result = max_water - current_water
return result
|
In a class of 30 students, 10 are boys and the rest are girls. What percentage of the class are girls? | def solve() -> int:
number_of_girls = 30 - 10
percentage_of_girls = number_of_girls / 30 * 100
result = percentage_of_girls
return result
|
Matthew goes to the grocery store. Counting Matthew, 1/3 of the fruits are apples and 1/4 are oranges. If there are 12 apples, how many oranges are there? | def solve() -> int:
apples = 12
total_fruits = apples / (1/3)
oranges = total_fruits - apples
result = oranges
return result
|
Student: A car can travel 25 miles per gallon of gas. If the car has a 12-gallon gas tank, how far can the car travel on a full tank? | def solve() -> int:
miles_per_gallon = 25
gas_tank = 12
result = miles_per_gallon * gas_tank
return result
|
Julie wants to run a marathon and decides to practice running. On day 1, she runs 5 miles. The next day, she runs twice as much as on Day 1. In the third day, she ran 3 miles less than she did on day 2. How many total miles did she run in these 3 days? | def solve() -> int:
day1 = 5
day2 = 2 * day1
day3 = day2 - 3
total_miles = day1 + day2 + day3
result = total_miles
return result
|
Robert runs a gym. He starts the day with 50 people who need assistance with their exercises. By the afternoon, he had helped 15 of the 50 people and another 25 people arrived at the gym who needed his help. If Robert's assistant offers to help him and assist a quarter of the remaining people, how many people will each... | def solve() -> int:
start_people = 50
morning_helped = 15
afternoon_arrivals = 25
remaining_people = start_people - morning_helped + afternoon_arrivals
assistant_helped = remaining_people / 4
total_helped = morning_helped + afternoon_arrivals + assistant_helped
... |
A class has 5 times as many girls as boys. If the class has 8 boys, how many girls does it have? | def solve() -> int:
boys = 8
girls = boys * 5
result = girls
return result
|
The Canadian beaver can chop and gather a maximum of 20 kilograms of wood per day, while the Russian beaver can chop and gather half the wood as the Canadian beaver. If there were 60 beavers in a lake, with twice as many Canadian as Russian beavers, what is the maximum amount of wood they could gather in one day? | def solve() -> int:
canadian_beaver = 20
russian_beaver = canadian_beaver / 2
total_beavers = 60
canadian_beavers = 2 * (total_beavers / 3)
russian_beavers = total_beavers / 3
total_wood = (canadian_beavers * canadian_beaver) + (russian_beavers * russian_beaver)
result = t... |
A school library has 320 books. If each shelf can hold 16 books, how many shelves will be needed to store all the books? | def solve() -> int:
bookNum = 320
booksPerShelf = 16
totalShelves = bookNum / booksPerShelf
result = totalShelves
return result
|
Jerry buys a box of 24 crayons for $3. How much does each crayon cost? | def solve() -> int:
num_crayons = 24
cost = 3
price_per_crayon = cost/num_crayons
result = price_per_crayon
return result
|
A shirt in a store has a price tag of $45. The store is offering a 20% discount on the shirt. If the store charges a sales tax of 8%, what will be the total amount paid by a customer who buys the shirt? | def solve() -> int:
discounted_price = 45 * 0.8
sales_tax = discounted_price * 0.08
total_amount = discounted_price + sales_tax
result = total_amount
return result
|
Alex is building a pinball machine and he needs a certain number of screws to build it. He needs to buy 400 screws but he already has one third of the total amount of screws he needs. How many screws does he need to buy? | def solve() -> int:
total_screws = 400
excess_screws = 0.33 * total_screws
needed_screws = total_screws - excess_screws
result = needed_screws
return result
|
There are 75 students in a classroom. If there are 8 desks in the classroom, how many students are sitting at each desk? | def solve() -> int:
numstudents = 75
numdesks = 8
students_per_desk = numstudents / numdesks
result = students_per_desk
return result
|
A bakery sells 50 loaves of bread a day. If the bakery raises the price from $3 to $4 per loaf, and daily sales decrease to 40 loaves, what is the net effect on the bakery's daily revenue? | def solve() -> int:
quantity1 = 50
price1 = 3
revenue1 = quantity1 * price1
quantity2 = 40
price2 = 4
revenue2 = quantity2 * price2
revenue_change = revenue2 - revenue1
result = revenue_change
return result
|
In a group, 7 people travel by train. There are 16 seats in the train. How many more people need to board the train so that all the people in the group can take a seat? | def solve() -> int:
no_of_people = 7
seats_available = 16
seats_required = no_of_people - seats_available
result = seats_required
return result
|
In a farm, the number of cows is four times the number of horses, and the number of chickens is three times the number of ducks. If there are 15 horses, how many cows are there in the farm? | def solve() -> int:
horses = 15
cows = 4 * horses
result = cows
return result
|
A group of students took a test with a maximum score of 100. The average score of the group was 85. If a new student joins the group and scores 70 on the test, what is the new average score of the group? | def solve() -> int:
num_students = 10
total_score = 850
new_student_score = 70
new_total_score = total_score + new_student_score
new_num_students = num_students + 1
new_average_score = new_total_score / new_num_students
result = round(new_average_score, 2)
return result
|
Emily's monthly rent increased by 15% to $1150 this year. Alex's monthly rent from last year was equal to half of Emily's rent this year. If Alex's current monthly rent is 10% more than his rent last year, what is his current monthly rent? | def solve() -> int:
emily_rent_last_year = 100 * 1150 / 115
emily_rent_this_year = 1150
alex_rent_last_year = emily_rent_this_year / 2
alex_rent_this_year = alex_rent_last_year * 1.1
result = alex_rent_this_year
return result
|
Jessica has a jar of candy. She takes out 20 pieces of candy to share with her friends, but accidentally drops them and 1/2 of the candy gets ruined. So Jessica takes out 15 more pieces of candy. While she is sharing, her mom gives her another jar of candy, which has 40 pieces of candy in it. If Jessica can't eat the r... | def solve() -> int:
jar_of_candy = 100
ruined_candy = 10
shared_candy = 20
dropped_candy = shared_candy / 2
usable_candy = shared_candy - dropped_candy
more_candy = 15
mom_candy = 40
total_candy = jar_of_candy + more_candy + mom_candy - dropped_candy - ruined_candy + usable_candy + ... |
Student: John and Bob start at the same point and walk in opposite directions. John moves at a speed of 3 km/hr while Bob moves at 4 km/hr. If they start at the same time, how long will it take until they are 15 km apart? | def solve() -> int:
distance = 15
speed_john = 3
speed_bob = 4
time = distance / (speed_john + speed_bob)
result = time
return result
|
It takes 5 years for a pear tree to bear fruit. If Sarah planted a tree when she was 8 years old and is now 14 years old, how old would she be when she gets to taste her first pear? | def solve() -> int:
years_to_bear_fruit = 5
tree_planted_age = 8
current_age = 14
age_when_tree_bears_fruit = tree_planted_age + years_to_bear_fruit
age_when_first_pear_tasted = age_when_tree_bears_fruit + (current_age - tree_planted_age)
result = age_when_first_pear_tasted
return result
|
The sum of three consecutive odd numbers is 69. What are the three numbers? | def solve() -> int:
total = 69
middle = total/3
first = middle - 2
third = middle + 2
result = (first, middle, third)
return result
|
Olivia has 5 sets of 4 cups, each set costs $2. How much does Olivia have to pay for all the cups? | def solve() -> int:
sets = 5
cost = 2
cups_total = sets*4
price_total = cups_total*cost
result = price_total
return result
|
A book is 200 pages long. If a reader can finish 20 pages in 30 minutes, how long will it take to finish the whole book? | def solve() -> int:
book_length = 200
pages_per_half_hour = 20
time_per_half_hour = 30
pages_per_minute = pages_per_half_hour / time_per_half_hour
time_to_finish = book_length / pages_per_minute
result = time_to_finish
return result
|
A bucket can hold 8 liters of water. How many liters of water will be in a full bucket? | def solve() -> int:
capacity_of_one_bucket = 8
no_of_liters_in_full_bucket = capacity_of_one_bucket
result = no_of_liters_in_full_bucket
return result
|
Julia watches 42 hours of TV every week. If she wants to cut down on the amount of time she spends watching TV and reduces her viewing time by 25% each week, how many weeks will it take her to watch only 3 hours of TV per week? | def solve() -> int:
hours_per_week = 42
reduction_rate = 0.25
target_hours = 3
weeks = 0
while hours_per_week > target_hours:
hours_per_week -= hours_per_week * reduction_rate
weeks += 1
result = weeks
return result
|
Student: A train leaves station A at 6:00 AM and arrives at station B at 10:30 AM. The distance between station A and B is 300 km. What is the speed of the train? | def solve() -> int:
distance = 300
time_taken = 4.5
speed = distance / time_taken
result = speed
return result
|
A store is having a sale where everything is 15% off. If a customer wants to purchase a shirt that costs $24, how much will the customer save and what will be the new price of the shirt after the discount? | def solve() -> int:
original_price = 24
discount_percent = 0.15
discount_amount = original_price * discount_percent
new_price = original_price - discount_amount
result = (discount_amount, new_price)
return result
|
Student: In a class, the number of boys is 8 less than twice the number of girls. If there are 14 girls in the class, how many boys are there? | def solve() -> int:
boys = 0
girls = 14
boys = 2 * girls - 8
result = boys
return result
|
Mia threw a javelin and it traveled 120 feet straight ahead. On her second throw, the javelin traveled one-fourth the distance it did on her first throw, but the javelin landed 30 feet beyond the marker. On her third throw, she threw the javelin into the marker correctly. What is the distance, in feet, from where Mia f... | def solve() -> int:
first_throw = 120
second_throw = first_throw / 4 * 5
third_throw = first_throw
distance_to_marker = (first_throw + second_throw + third_throw) / 3
result = distance_to_marker - first_throw
return result
|
Mark and Tom went out for dinner. Upon receiving the bill, Mark added a 18% tip of $24. Tom insisted on leaving a 22% tip instead, citing the excellent service. What is the value of a 22% tip? | def solve() -> int:
bill = 0
mark_tip = 0
tom_tip = 0
mark_tip = 24 * 0.18
bill = 24 + mark_tip
tom_tip = bill * 0.22
result = tom_tip
return result
|
Samantha drinks 2 cups of coffee every day. Each cup of coffee costs $3. She has to buy a new bag of coffee beans every month for $20. How much does she spend on coffee in a year? | def solve() -> int:
cups_per_day = 2
cost_per_cup = 3
days_per_month = 30
bags_per_year = 12
cost_per_bag = 20
cups_per_month = cups_per_day * days_per_month
cost_per_month = cups_per_month * cost_per_cup + cost_per_bag
cost_per_year = cost_per_month * bags_per_year
result ... |
Benjamin has 5 delivery boxes for a special order. Each box weighs 25 lbs. What is the total weight of the 5 boxes? | def solve() -> int:
boxes = 5
weight_of_each_box = 25
total_weight = boxes * weight_of_each_box
result = total_weight
return result
|
Student: A school has 480 students. If 30% of them are boys, how many girls are in the school? | def solve() -> int:
total_students = 480
boys = total_students * 0.3
girls = total_students - boys
result = girls
return result
|
There are 6 people in line to buy tickets. Each person wants 2 tickets. There are 13 tickets left. How many tickets were available in total? | def solve() -> int:
people = 6
tickets_per_person = 2
tickets_left = 13
total_tickets = (people * tickets_per_person) + tickets_left
result = total_tickets
return result
|
A bicycle was originally sold for $600 including 7% tax. If the tax was removed, what was the initial price of the bicycle? | def solve() -> int:
total_amount = 600
initial_price = total_amount/1.07
result = round(initial_price, 2)
return result
|
Lucy has $500 to buy gifts for her family. She spends a fifth of that amount on a gift for her mom, and she spends two thirds of the remaining amount on gifts for her dad and her brother. What is the amount of money Lucy has left? | def solve() -> int:
mom = 500 / 5
remaining = 500 - mom
dad_brother = remaining * 2 / 3
left = remaining - dad_brother
result = left
return result
|
James went to the farmers' market and bought 15 dozens of corn. He carried two identical shopping bags and a small container. He put one-sixth of the corn he bought in the small container, and the same number of corn in each shopping bag. How many corn did he put in the small container? | def solve() -> int:
dozens_of_corn = 15
total_corn = dozens_of_corn * 12
container_corn = total_corn // 6
bag_corn = (total_corn - container_corn) // 2
result = container_corn
return result
|
Alice is a real estate agent and her last sale was for a property that was listed for $250,000. The buyer negotiated a 5% discount and Alice's commission rate was 3%. What was the total amount of commission Alice earned from this sale? Janine and Carlo are both carpenters. Janine earns $20 per hour while Carlo earns $2... | def solve() -> int:
listed_price = 250000
discount = 0.05
sale_price = listed_price * (1 - discount)
commission_rate = 0.03
commission = sale_price * commission_rate
carlo_earnings = 25 * 10 * 4
janine_earnings = 0
hours_worked = 0
while janine_earnings < carlo_earnings:
... |
Emma walks at a pace of 5 kilometers per hour while John runs at 10 kilometers per hour. If their destination is 30 kilometers away, how many hours ahead will John be ahead of Emma? | def solve() -> int:
emma_pace = 5
john_pace = 10
distance = 30
emma_time = distance / emma_pace
john_time = distance / john_pace
time_difference = john_time - emma_time
result = time_difference
return result
|
Student: Four friends, John, Peter, Mary, and Sarah, went to the amusement park. John bought 5 tickets, Peter bought 2/3 times as many tickets as John, Mary bought 1/2 more tickets than Peter, and Sarah bought twice as many tickets as John. If they combined their tickets and decided to share them equally, how many tick... | def solve() -> int:
john_tickets = 5
peter_tickets = (2/3) * john_tickets
mary_tickets = peter_tickets + (1/2)
sarah_tickets = 2 * john_tickets
total_tickets = john_tickets + peter_tickets + mary_tickets + sarah_tickets
result = total_tickets / 4
return result
|
Student: Kim had five fewer books than Lily did. Patrick had four times as many books as Kim did. If Lily has 40 books, how many books does Patrick have? | def solve() -> int:
lily_books = 40
kim_books = lily_books - 5
patrick_books = 4 * kim_books
result = patrick_books
return result
|
Diana is planning to go on a vacation next year. She needs to save $3000 for the trip. If she saves $40 per week, except for the weeks in December, how many weeks will it take for her to reach her goal? | def solve() -> int:
goal = 3000
weekly_savings = 40
weeks_in_year = 52
weeks_in_december = 4
total_savings = (weeks_in_year - weeks_in_december) * weekly_savings
weeks_to_reach_goal = goal / total_savings
result = weeks_to_reach_goal
return result
|
Tony has to clean 10 windows in his house. He can only clean one window at a time because of the limited cleaning equipment. It takes 8 minutes to clean each window. If he has to leave the house by 11 am, what is the latest time he can start cleaning the windows? | def solve() -> int:
windows_to_clean = 10
time_per_window = 8
total_time = windows_to_clean * time_per_window
leave_time = 11 * 60
start_time = leave_time - total_time
result = f'{start_time // 60}:{start_time % 60}'
return result
|
Possible math questions similar to the original one are: Anne wants to buy a pair of shoes that costs $35 and a jacket that costs $10 more than three times the cost of the shoes. What is the total amount she needs to pay? | def solve() -> int:
x = 35
y = 10 + 3 * x
total = x + y
result = total
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.