question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
On a road trip, a car travels 200 miles in 4 hours. If the car continues at this speed, how many hours will it take to travel 600 miles? | def solve() -> int:
speed1 = 200/4
distance2 = 600
time2 = distance2/speed1
result = time2
return result
|
Two friends have collected $480 in donations for a charity. If they want to split the donations evenly, how much money does each get? | def solve() -> int:
total_donations = 480
amount_per_person = total_donations / 2
result = amount_per_person
return result
|
If a car goes from A to B at a speed of 40 km/h and returns back from B to A at a speed of 60 km/h. What is the average speed of the car? | def solve() -> int:
distance_AB = 100
time_AB = distance_AB / 40
time_BA = distance_AB / 60
total_time = time_AB + time_BA
average_speed = 2 * distance_AB / total_time
result = average_speed
return result
|
A marathoner runs for 27 km a day on average for 3 weeks, how many kilometers did he run in total? | def solve() -> int:
daily_distance = 27
number_of_days = 3*7
total_distance = daily_distance * number_of_days
result = total_distance
return result
|
Possible new questions and programs are: A pizza has 8 slices, and each slice costs $3.75. How much money is saved, per slice, in dollars, by buying a whole pizza instead of individual slices? | def solve() -> int:
cost_of_slices = 8 * 3.75
cost_of_pizza = 25
difference_per_slice = (cost_of_slices - cost_of_pizza) / 8
result = difference_per_slice
return result
|
A car uses 8 liters of petrol for every 100 km. If a family goes for a holiday and they use 4 full petrol tanks (each tank can hold 55 liters of petrol), and they travel 2400 km, how much money will they spend on petrol if the petrol price is $1.25 per liter? | def solve() -> int:
petrol_per_100km = 8
distance = 2400
petrol_total = (distance / 100) * petrol_per_100km
petrol_tanks = 4
petrol_total = petrol_total * petrol_tanks
petrol_price = 1.25
petrol_cost = petrol_total * petrol_price
result = petrol_cost
return result
|
Olivia earns $9 per hour for the regular hours she works and $11 per hour for any overtime hours she works. All hours over 55 in a week are considered overtime. If Olivia works 59 hours in the first week and 62 hours in the second week, how much did she make? | def solve() -> int:
regular_rate = 9
overtime_rate = 11
regular_hours = 55
week1_hours = 59
week2_hours = 62
regular_pay = regular_rate * regular_hours
overtime_pay_week1 = (week1_hours - regular_hours) * overtime_rate
overtime_pay_week2 = (week2_hours - regular_hours) * overtime_ra... |
Marcus collected 15 stamps for his collection. He lent 3 to a friend and lost two because they fell off his album. How many stamps are left in Marcus's collection? In a bowl of cereal, there are 200 raisins. If a serving size is 1/3 of a cup and there are 16 tablespoons in a cup, how many raisins are in a tablespoon? | def solve() -> int:
total_stamps = 15
lent_stamps = 3
lost_stamps = 2
remaining_stamps = total_stamps - lent_stamps - lost_stamps
raisins_in_bowl = 200
serving_size_cup = 1/3
tablespoons_in_cup = 16
raisins_in_tablespoon = raisins_in_bowl * serving_size_cup * tablespoons_i... |
There are 75 students in a primary school class. On Monday, 10 students are absent and 20 new students join the class. How many students are in the class now? | def solve() -> int:
students_in_class = 75
absent_students = 10
new_students = 20
students_now = students_in_class - absent_students + new_students
result = students_now
return result
|
A shipping company offers two shipping methods for a package - standard shipping and express shipping. The standard shipping takes 5-7 business days and costs $10. The express shipping takes 2-3 business days and costs $20. If a customer chooses standard shipping, what is the probability that the package will arrive wi... | def solve() -> int:
total_days = 7
min_days = 5
max_days = 7
prob_arrival_within_7days = (max_days - min_days) / total_days
result = prob_arrival_within_7days
return result
|
Student: Ben has $80; Cindy has $60; Dan has $40. Ben buys a book from Cindy for $15. Cindy buys a toy from Dan for $12. Dan buys a hat from Ben for $10. When all transactions are done, how much will Ben and Cindy have together in dollars? | def solve() -> int:
ben = 80
cindy = 60
dan = 40
ben = ben - 15
cindy = cindy + 15
cindy = cindy - 12
dan = dan + 12
dan = dan - 10
ben = ben + 10
result = ben + cindy
return result
|
arah spent 3/5 of her money and an additional $25 on some novels. She then spent 1/4 of the remaining money and an additional $5 on some poetry books. If she was left with $105, how much money did she have at first? | def solve() -> int:
money_left_poetry_books = 105
poetry_books_constant = 5
poetry_books_fraction = 1/4
novels_constant = 25
novels_fraction = 3/5
money_spent_poetry_books = poetry_books_constant / (1 - poetry_books_fraction)
money_before_poetry_books = money_left_poetry_books + money_s... |
A food truck bought 200 hot dogs and sold 145. How many hot dogs are left? | def solve() -> int:
hot_dogs_bought = 200
hot_dogs_sold = 145
hot_dogs_left = hot_dogs_bought - hot_dogs_sold
result = hot_dogs_left
return result
|
At a plant sale, Greg buys 4 bonsai trees at $100 each, and gifts 1 of them to his grandmother. What is the total amount that Greg spent on bonsai trees for himself? | def solve() -> int:
num_bonsai_trees = 4
cost_per_tree = 100
gifted_trees = 1
total_cost = num_bonsai_trees * cost_per_tree
cost_for_self = total_cost - (gifted_trees * cost_per_tree)
result = cost_for_self
return result
|
A store has a sale on all items, giving a 15% discount. If the full price of a shirt is $40 and a pair of pants is $60, how much would a customer pay for 2 shirts and 3 pairs of pants? | def solve() -> int:
shirt_discounted_price = 40 * 0.85
pants_discounted_price = 60 * 0.85
total_price = shirt_discounted_price * 2 + pants_discounted_price * 3
result = total_price
return result
|
A circular flower bed has a diameter of 5 meters. If a gardener walks around the flower bed 8 times but skips 3 rounds, how much total distance did they walk? | def solve() -> int:
circumference = 5 * 3.14
total_distance = circumference * (8-3)
result = total_distance
return result
|
Amy has a jar of 300 marbles. 40% of them are red, 30% are blue, and the rest are green. She picks a marble at random and then puts it back. What is the probability that she picks a green marble? | def solve() -> int:
p = 0.3
result = p
return result
|
Jack has a garden with 90 plants - half tomato, a third pepper, and the rest cucumber. He harvests a third of the tomato plants and a quarter of the pepper plants. How many tomato and pepper plants does Jack have left? | def solve() -> int:
plants = 90
tomato = plants // 2
pepper = plants // 3
cucumber = plants - tomato - pepper
left_tomato = tomato - (tomato // 3)
left_pepper = pepper - (pepper // 4)
result = left_tomato, left_pepper
result
return result
|
Student: Question2: Jody has $56. If she spends 3/4 of her money, how much does she have left? | def solve() -> int:
money = 56
spent = 3/4
left = money * (1 - spent)
result = left
return result
|
Student: Jason is buying 4 markers and 5 rulers. Markers cost $2 each and rulers cost $1.50 each. If he pays with a $20 bill, how much change should he receive? | def solve() -> int:
num_markers = 4
num_rulers = 5
cost_marker = 2
cost_ruler = 1.5
total_cost = num_markers * cost_marker + num_rulers * cost_ruler
amount_paid = 20
change = amount_paid - total_cost
result = change
return result
|
David has $120, he spent $30 at the store and an additional $25 at the bakery. How much money does he have left? | def solve() -> int:
starting_money = 120
spent_store = 30
spent_bakery = 25
money_left = starting_money - spent_store - spent_bakery
result = money_left
return result
|
A car travels 360 miles in 6 hours. What is its average speed? | def solve() -> int:
average_speed = 360 / 6
result = average_speed
return result
|
Carol earns $4950 per month. If she saves 27% of her salary each month, how much does she save in one year? | def solve() -> int:
salary_per_month = 4950
savings_percentage = 0.27
savings_per_month = salary_per_month * savings_percentage
savings_per_year = savings_per_month * 12
result = savings_per_year
return result
|
A store offered a 15% discount on all its items during a clearance sale. Chino bought a $200 backpack. What is the price of the backpack after the discount? | def solve() -> int:
item_price = 200
discount_rate = 0.15
discount_amount = item_price * discount_rate
new_price = item_price - discount_amount
result = new_price
return result
|
A farmer wants to buy a tractor for $5000. He plants 1000 square meters of crops every day, earning $2 per square meter. But he also needs to pay $50 per day for gas and a driver for his truck. How many days will it take for the farmer to save up for the tractor? | def solve() -> int:
days = 0
savings = 0
while savings < 5000:
square_meters_planted_per_day = 1000
price_per_square_meter = 2
earnings_per_day = square_meters_planted_per_day * price_per_square_meter
expenses_per_day = 50
savings_per_day = earnings_per_day - expenses_per_day
... |
Jenny invested $15,000 in a mutual fund that gave her a return of 8% compounded annually for four years. She then invested $10,000 in a new investment that earned her 10% interest for one year. How much money does she have now? | def solve() -> int:
principal_1 = 15000
rate_1 = 0.08
time_1 = 4
principal_2 = 10000
rate_2 = 0.10
time_2 = 1
amount_1 = principal_1 * (1 + rate_1) ** time_1
amount_2 = principal_2 * (1 + rate_2) ** time_2
total_amount = amount_1 + amount_2
result = total_amou... |
A company has a budget of $200,000. If they spend 3/10 of their budget on marketing, 1/4 on advertising, and the remaining on research and development, how much money do they spend on research and development? | def solve() -> int:
budget = 200000
marketing = budget * (3/10)
advertising = budget * (1/4)
research_and_development = budget - marketing - advertising
result = research_and_development
return result
|
Julie walked 4 km in the morning and 6 km in the evening. How many more kilometers did Julie walk in the evening than in the morning? | def solve() -> int:
morning_walk = 4
evening_walk = 6
difference = evening_walk - morning_walk
result = difference
return result
|
Jake bought 12 apples and 6 pears. Each apple cost $1 and each pear cost $2. How much did Jake spend in all? | def solve() -> int:
num_apples = 12
num_pears = 6
cost_apple = 1
cost_pear = 2
total_cost = (num_apples * cost_apple) + (num_pears * cost_pear)
result = total_cost
return result
|
Mario works at a pizza place that sells pizza by the slice. Each pizza has 8 slices and costs $12 to make. Mario sells each slice for $2. He sells 90 slices on Monday, 120 slices on Tuesday, and 75 slices on Wednesday. How much profit does he make in these three days? | def solve() -> int:
slices_per_pizza = 8
slices_sold = 90 + 120 + 75
pizzas_sold = slices_sold / slices_per_pizza
pizza_cost = 12
total_cost = pizza_cost * pizzas_sold
slice_price = 2
total_revenue = slice_price * slices_sold
profit = total_revenue - total_cost
result = profit... |
Student: A group of 8 friends went to a restaurant and received a bill of $160. If they decided to split the bill equally, how much money will each friend pay? | def solve() -> int:
bill = 160
num_friends = 8
amount_each_friend_pays = bill / num_friends
result = amount_each_friend_pays
return result
|
For every 3 packs of markers bought, a customer gets 1 extra pack for free. If a teacher wants to buy 12 packs of markers for their class, how many packs will they have in total? Aiden went to a movie theater and spent $18 on a ticket and popcorn. If the ticket costs $7 more than the popcorn, how much does the ticket c... | def solve() -> int:
packs_bought = 12
free_packs = packs_bought // 3
total_packs = packs_bought + free_packs
total_expenses = 18
ticket_cost = (total_expenses + 7) / 2
result = f'The teacher will have {total_packs} packs in total. The ticket cost is {ticket_cost}.'
return... |
A recipe calls for 2/3 cup of oil and you only have a 1/4 measuring cup. How many times do you need to fill the measuring cup to get the needed oil? | def solve() -> int:
cups_needed = 2/3
measuring_cup = 1/4
times_filled = cups_needed / measuring_cup
result = times_filled
return result
|
Saadia is the head chef at a restaurant hosting a banquet. She has 8 dozen wine glasses on a shelf. During the dinner, 60 guests each drink two glasses of wine, and afterward, they each drink one more glass of wine. How many wine glasses does Saadia have left on the shelf? | def solve() -> int:
glasses_on_shelf = 8 * 12
glasses_per_guest = 2 + 1
total_guests = 60
total_glasses_used = glasses_per_guest * total_guests
glasses_left = glasses_on_shelf - total_glasses_used
result = glasses_left
return result
|
A rectangle has length 5 and its perimeter is 18. What is the width of the rectangle? | def solve() -> int:
perimeter = 18
length = 5
width = perimeter/2 - length
result = width
return result
|
Possible questions and programs are: Hannah collects stickers of different animals. She has 120 stickers in total. 40% of her stickers are cats, 25% of her stickers are dogs, and the rest are birds. How many stickers of birds does she have? | def solve() -> int:
cat_fraction = 0.4
dog_fraction = 0.25
bird_fraction = 1 - cat_fraction - dog_fraction
bird_stickers = 120 * bird_fraction
result = bird_stickers
return result
|
Student: A hotel charges $120 per night for a room. If someone stays for 4 nights, the 5th night is free. How much does someone need to pay if they want to stay for 7 nights? | def solve() -> int:
price = 120
nights = 7
discount = 1
paid_nights = nights - (nights // (5 + discount)) * discount
cost = paid_nights * price
result = cost
return result
|
A construction company needs to pave a road. They need to buy enough cement for the job. There are 12 workers that need to be supplied with cement. Each worker needs 120 pounds of cement. If each bag of cement weighs 2400 pounds, how many bags of cement does the company need to buy, and how many pounds of cement will b... | def solve() -> int:
workers = 12
cement_per_worker = 120
weight_per_bag = 2400
total_cement_needed = workers * cement_per_worker
bags_needed = total_cement_needed // weight_per_bag
leftover_cement = total_cement_needed % weight_per_bag
result = f'{bags_needed} bags of cement are ne... |
John works 10 hour shifts and earns $20 per hour. If he works 3 shifts per week, how much does he make in one week? | def solve() -> int:
hours_per_shift = 10
hourly_wage = 20
total_shifts_worked = 3
total_hours_worked = hours_per_shift * total_shifts_worked
result = total_hours_worked * hourly_wage
return result
|
Sophia decides to earn some money by doing chores for her mom, who promises to pay her $6 per hour. Sophia spends 2 hours washing her mom's car and decides to do this three times. She also spends 1 hour cleaning the living room and three times as long organizing her mom's closet. How much money did Sophia earn? | def solve() -> int:
hourly_rate = 6
car_washing_hours = 2
car_washing_times = 3
living_room_hours = 1
closet_organizing_hours = car_washing_times * 3
car_washing_earnings = car_washing_hours * hourly_rate * car_washing_times
living_room_earnings = living_room_hours * hourly_rate
clo... |
Mariah has 100 marbles. If she gives 1/5 of them to her friend, how many marbles does she have left? | def solve() -> int:
friend_marbles = 100 * (1/5)
remaining_marbles = 100 - friend_marbles
result = remaining_marbles
return result
|
Four couples went to a fancy restaurant and ordered a seafood platter that cost $70, a bottle of white wine that cost $50, two orders of lobster tail that cost $40 each, and six servings of tiramisu that cost $12 each. If they split the bill equally among the eight of them, how much will each couple pay? | def solve() -> int:
seafood_platter = 70
white_wine = 50
lobster_tail = 40
tiramisu = 12
total_cost = seafood_platter + white_wine + (2 * lobster_tail) + (6 * tiramisu)
cost_per_couple = total_cost / 4
result = cost_per_couple
return result
|
A trader has 3 different varieties of fruits. In order to attract buyers, he discounts 10% on the first and 15% on the second variety. On the third variety, he gives a 5% discount and an additional half a kilo for every 2 kilos bought. If the first variety of fruit costs $10 per kilo, the second costs $15 per kilo and ... | def solve() -> int:
price1, price2, price3 = 10, 15, 12
quantity1, quantity2, quantity3 = 5, 8, 7
discount1 = 0.1
discount2 = 0.15
discount3 = 0.05
additional_qty = quantity3 // 2 * 0.5
total_cost = price1*quantity1*(1-discount1) + price2*quantity2*(1-discount2) + (price3*(quantity3+addition... |
Student: For a holiday event, Luis and his friends want to buy 2 dozen bags of popcorn. The bags come in packs of 4, how many packs will they need to buy? | def solve() -> int:
bags = 24
packs = 4
packs_needed = bags // packs
result = packs_needed
return result
|
Tommy has 8 markers and each of his friends has 1 marker. If the total number of markers is 11, how many friends does Tommy have? | def solve() -> int:
total = 11
tommy = 8
friends = total - tommy
result = friends
return result
|
A restaurant has a lunch special for $7.50. If you add on drink and tip, the total comes out to $12.00. How much is the drink and tip combined? | def solve() -> int:
drink_tip = 12.0 - 7.5
result = drink_tip
return result
|
Eric wants to bake a cake that is twice the weight of the cake his sister baked. His sister baked a cake that weighed 1 pound per 2 eggs used. If his sister used 10 eggs to bake her cake, how many eggs will Eric need to bake his cake? | def solve() -> int:
sister_cake_weight = 10 / 2
eric_cake_weight = sister_cake_weight * 2
eric_eggs_needed = eric_cake_weight * 2
result = eric_eggs_needed
return result
|
An apartment is 42 square meters and the living room is twice as large as the bedroom. What is the area of the bedroom and the living room? | def solve() -> int:
total_area = 42
bedroom_area = total_area / 3
living_room_area = 2 * bedroom_area
result = (bedroom_area, living_room_area)
return result
|
If the radius of a circular pizza is 6 inches, what is its diameter? | def solve() -> int:
radius = 6
diameter = radius * 2
result = diameter
return result
|
A grocery store sells apples for $0.50 each and bananas for $0.70 each. If a customer buys 6 apples and 4 bananas, how much do they spend? | def solve() -> int:
apple_quantity = 6
banana_quantity = 4
apple_price = 0.5
banana_price = 0.7
total_cost = (apple_quantity * apple_price) + (banana_quantity * banana_price)
result = total_cost
return result
|
5 students stand in line for roller skating tickets. The first 3 each pay $6, and the last 2 each pay $10. How much money do they pay in total? | def solve() -> int:
num_students1 = 3
num_students2 = 2
price1 = 6
price2 = 10
total_amount1 = num_students1 * price1
total_amount2 = num_students2 * price2
result = total_amount1 + total_amount2
return result
|
A triangle has a base of 6 cm and a height of 8 cm. What is the area of the triangle? | def solve() -> int:
base = 6
height = 8
area = 0.5 * base * height
result = area
return result
|
Possible questions and answers: A pizza is cut into 8 equal slices. Alice ate 2 slices and Bob ate 3 slices. Charlie ate the rest of the pizza and paid 25% more than Alice and Bob combined. If the total cost of the pizza was $16, how much did Charlie pay? | def solve() -> int:
from fractions import Fraction
alice_bob_slices = Fraction(5, 8)
alice_bob_cost = 16 * alice_bob_slices
charlie_slices = Fraction(3, 8)
charlie_cost = alice_bob_cost * Fraction(5, 4)
result = round(float(charlie_cost), 2)
return result
|
Ava is turning 7 today. She will be three times older than she was when she was 2. Her parents gave her $2 for every year old she is. How much money did she receive? | def solve() -> int:
age = 7
previous_age = 2
money_per_year = 2
money_received = (age - previous_age) * money_per_year
result = money_received
return result
|
If a pumpkin patch yields 8 pumpkins for every 9 plants, how many pumpkins will be harvested from a patch that contains 77 plants? | def solve() -> int:
plant_amount = 77
pumpkins_yield = 8/(9 * 1.0)
total_pumpkins = plant_amount * pumpkins_yield
result = total_pumpkins
return result
|
A company has 8 departments. Each department has 10 employees. The company earns a revenue of $50000 per day. The company has to pay 20% of the revenue in taxes, 15% of the remaining amount in employee salaries, and 10% of the remaining amount in departmental bonuses. What is the bonus payment for each department? | def solve() -> int:
departments = 8
employees_per_department = 10
total_employees = departments * employees_per_department
revenue_per_day = 50000
taxes = 0.2 * revenue_per_day
remaining_amount = revenue_per_day - taxes
employee_salary = 0.15 * remaining_amount/total_employees
remaining_... |
John picked 14 flowers but 5 of them were dead. What fraction of the flowers he picked were still alive? | def solve() -> int:
total_flowers = 14
dead = 5
alive = total_flowers - dead
fraction = alive / total_flowers
result = fraction
return result
|
``` There are 24 students in a class. If there are 12 girls, how many boys are there? | def solve() -> int:
total_students = 24
num_girls = 12
num_boys = total_students - num_girls
result = num_boys
return result
|
A candy box contains chocolate and jelly beans. The ratio of chocolate to jelly beans is 7:3. If there are 60 pieces of candies, how many are jelly beans? | def solve() -> int:
total_candies = 60
chocolate_ratio = 7/10
jellybeans_ratio = 3/10
jellybeans_count = int(total_candies*jellybeans_ratio)
result = jellybeans_count
return result
|
Student: A square has sides of length 3 cm. What is the area of the square? | def solve() -> int:
side_length = 3
area = side_length ** 2
result = area
return result
|
Student: Mark had $120 in his bank account. He saved $25 and then used the remaining money to buy food for himself. How much money did Mark spend on the food? | def solve() -> int:
initial_amount = 120
saved_amount = 25
remaining_amount = initial_amount - saved_amount
spent_amount = remaining_amount
result = spent_amount
return result
|
Kevin collects stamps and sells them online. He bought a set of 50 stamps for $100 and sold them individually for $3 each. He also bought another set of 40 stamps for $80 and sold them individually for $2.5 each. How much profit did Kevin make from selling stamps? | def solve() -> int:
first_set_cost = 100
first_set_revenue = 50 * 3
first_set_profit = first_set_revenue - first_set_cost
second_set_cost = 80
second_set_revenue = 40 * 2.5
second_set_profit = second_set_revenue - second_set_cost
total_profit = first_set_profit + second_set_profit
... |
A store sold 25 pens on Monday, 10 more pens than they sold on Tuesday. On Wednesday, they sold half the amount of pens they sold on Tuesday. If on Thursday they sold 20 more pens than they sold on Wednesday, how many pens did they sell in those four days? | def solve() -> int:
pens_monday = 25
pens_tuesday = pens_monday - 10
pens_wednesday = pens_tuesday / 2
pens_thursday = pens_wednesday + 20
result = pens_monday + pens_tuesday + pens_wednesday + pens_thursday
return result
|
There are 5 apples in a basket and each apple has 50 calories. How many calories does the entire basket have? | def solve() -> int:
total_calories = 5 * 50
result = total_calories
return result
|
A recipe calls for 1/4 teaspoon of salt for 1 serving. If you want to make 8 servings, how much salt will you need? | def solve() -> int:
salt_per_serving = 0.25
num_servings = 8
total_salt = salt_per_serving * num_servings
result = total_salt
return result
|
John is trying to complete a marathon race in less than 4 hours. If he runs at an average speed of 12 km/h, how many kilometers will he have covered at the end of the race? | def solve() -> int:
time_taken = 4
average_speed = 12
distance_covered = time_taken * average_speed
result = distance_covered
return result
|
Amy and Ben are running on a track. The track is 400 meters long, and Amy runs 8 laps while Ben runs 10 laps. If Amy's average speed is 6 meters per second and Ben's average speed is 5 meters per second, how long does it take for Ben to catch up with Amy? | def solve() -> int:
amy_dist = 8 * 400
ben_dist = 10 * 400
amy_time = amy_dist / 6
ben_time = ben_dist / 5
time_diff = ben_time - amy_time
result = time_diff
return result
|
Claire can bake 30 cookies in an hour. If she bakes every weekend for 3 hours, how many cookies does she bake in a month? | def solve() -> int:
cookies_per_hour = 30
weekly_baking_time = 3
monthly_cookies = cookies_per_hour * weekly_baking_time * 4
result = monthly_cookies
return result
|
A grocery store sells apples in bags of 10 and oranges in bags of 8. If a customer wants 34 apples and 24 oranges, what is the minimum number of bags the customer must buy? | def solve() -> int:
apples = 34
oranges = 24
apples_per_bag = 10
oranges_per_bag = 8
num_apple_bags = apples // apples_per_bag
if apples % apples_per_bag!= 0:
num_apple_bags += 1
num_orange_bags = oranges // oranges_per_bag
if oranges % oranges_per_bag!= 0:
num_orange_bag... |
Find the solution to 5x + 2 = 22. | def solve() -> int:
x = (22 - 2) / 5
result = x
return result
|
If Robert wants to have a private tutor for his son, which costs $50 per hour, and he wants to hire the tutor for 2 hours a day, 5 days a week, for 2 semesters. How much does it cost in total for one year of tutoring? | def solve() -> int:
hours_per_day = 2
days_per_week = 5
weeks_per_semester = 16
semesters_per_year = 2
cost_per_hour = 50
total_hours = hours_per_day * days_per_week * weeks_per_semester * semesters_per_year
total_cost = total_hours * cost_per_hour
result = total_cost
retur... |
Student: 6. Harry went to the store and bought 4 items totaling to $63.35. He was charged sales tax of 8.00%. How much did he pay in total? | def solve() -> int:
items = 4
total_price = 63.35
tax_rate = 0.08
tax_amount = total_price * tax_rate
total_amount = total_price + tax_amount
result = total_amount
return result
|
An office building on the 6th floor has a total of 52 rooms. If there are 5 more conference rooms than office rooms on this floor, how many conference rooms are there? | def solve() -> int:
total_rooms = 52
office_rooms_ratio = 1/(1+5)
conference_rooms_ratio = 5/(1+5)
conference_rooms = total_rooms * conference_rooms_ratio
result = conference_rooms
return result
|
Student: Susan has $40 and wants to buy a toy for $25 and a book for $12. How much money will she have left? | def solve() -> int:
money = 40
toy_price = 25
book_price = 12
money_spent = toy_price + book_price
money_left = money - money_spent
result = money_left
return result
|
The cost of one apple is 50 cents. If the total cost of the apples is $10, how many apples were bought? | def solve() -> int:
cost_total = 10.00
cost_per_apple = 0.50
number_of_apples = cost_total / cost_per_apple
result = number_of_apples
return result
|
There are 5 apples and 7 bananas in a basket. If two fruits are picked at random from the basket, what is the probability that they are both apples? | def solve() -> int:
num_of_apples = 5
num_of_bananas = 7
total_fruits = num_of_apples + num_of_bananas
prob_of_getting_apple1 = num_of_apples / total_fruits
prob_of_getting_apple2 = (num_of_apples - 1) / (total_fruits - 1)
prob_of_both_apples = prob_of_getting_apple1 * prob_of_getting_apple2
... |
If 40 people can complete a job in 10 days, how many days will it take for 60 people to complete the same job? | def solve() -> int:
people_1 = 40
days_1 = 10
people_2 = 60
days_2 = (people_1 * days_1) / people_2
result = days_2
return result
|
Max bought 90 ice cream cones for his birthday. He gave 5 cones each to his 6 cousins, and shared one-eighth of the remaining cones with the neighborhood kids. If he dropped 8 cones, how many ice cream cones were left for everyone else to enjoy? | def solve() -> int:
cones_bought = 90
cousins = 6
cones_given_to_cousins = 5 * cousins
remaining_cones = cones_bought - cones_given_to_cousins
cones_shared_with_neighborhood = remaining_cones / 8
cones_dropped = 8
cones_left = remaining_cones - cones_shared_with_neighborhood - cones_dropped
... |
A student has 20 pencils and needs to have three times as many for exams next week. How many pencils does the student need in total? | def solve() -> int:
pencils = 20
needed_pencils = pencils * 3
result = needed_pencils
return result
|
A classroom has 20 desks and 10 students. 6 of the students have their own desks. How many desks are available for the other students? | def solve() -> int:
num_desks = 20
num_students = 10
num_students_own_desks = 6
num_desks_available = num_desks - num_students_own_desks
result = num_desks_available
return result
|
John can solve a math problem in 5 minutes and a logic puzzle in 3 minutes. If he has to solve 4 math problems and 6 logic puzzles, how long will it take him to complete the task? | def solve() -> int:
math_problem_time = 5
logic_puzzle_time = 3
num_math_problems = 4
num_logic_puzzles = 6
total_math_time = math_problem_time * num_math_problems
total_logic_time = logic_puzzle_time * num_logic_puzzles
total_time = total_math_time + total_logic_time
resu... |
Alex needs to fill up his bike's tank with gasoline. The tank is empty and can hold 7 liters at most. If gasoline costs $3.25 per liter, how much money will Alex need to pay to fill up his tank? | def solve() -> int:
max_capacity = 7
cost_per_liter = 3.25
total_cost = max_capacity * cost_per_liter
result = total_cost
return result
|
Ms. Jones and her family went camping for 4 days. Every day, they traveled 9km away from the campsite and then 9km back. In total, how many km did they travel? | def solve() -> int:
total_distance = 0
for day in range(4):
distance_away = 9
distance_back = 9
total_distance = total_distance + distance_away + distance_back
result = total_distance
return result
|
Josh just bought 8 pairs of shoes, but he later remembered that he already owns 4 pairs of the same brand and size as the new shoes. If he wears 1 pair of shoes per day, how long can he go without wearing the same pair again? | def solve() -> int:
new_shoes = 8
existing_shoes = 4
total_shoes = new_shoes + existing_shoes
days_without_repeating = total_shoes / 2
result = days_without_repeating
return result
|
A TV costs $500 and a sound system costs $300. The store is giving a 10% discount if you spend over $1000. If I have $1200, how much will I pay? | def solve() -> int:
tv_cost = 500
sound_cost = 300
total_cost = tv_cost + sound_cost
if total_cost >= 1000:
discount = total_cost * 0.10
total_cost = total_cost - discount
money_left = 1200 - total_cost
result = money_left
return result
|
Mary has 36 ice creams in her freezer, of which 13 are vanilla-flavored. If she has nine times as many chocolate-flavored as vanilla-flavored ice creams, how many chocolate-flavored ice creams does Mary have? | def solve() -> int:
ice_total = 36
ice_vanilla = 13
ice_chocolate = ice_vanilla * 9
ice_other = ice_total - ice_vanilla - ice_chocolate
result = ice_chocolate
return result
|
The sum of two numbers is 12 and their product is 16. Find the numbers. | def solve() -> int:
a = 12 - 16 / 12
b = 16/a
result = a, b
return result
|
David paid $6,750 for 150 boxes of printing paper from Julie's Office Supplies. Unfortunately, Julie's accountant discovered that there was an error in the pricing, and David was overcharged. If each box of paper costs $45, how much money should Julie reimburse David? | def solve() -> int:
num_boxes = 150
cost_per_box = 45
total_cost = num_boxes * cost_per_box
overcharge = total_cost - 6750
result = overcharge
return result
|
Carla bought a pack of 24 pencils and divided them equally among her 4 friends. Each friend used some of the pencils to draw pictures and returned the unused ones to Carla. Carla counted that she had 10 pencils left in total. How many pencils did each friend use on average? | def solve() -> int:
pencils_per_friend = 24 // 4
pencils_used = 24 - 10
pencils_used_per_friend = pencils_used / 4
result = f'Each friend used {pencils_used_per_friend} pencils on average.'
result = pencils_used_per_friend
return result
|
A department store is having a sale where everything is 30% off. If the original price of a dress is $50 and the original price of a shirt is $25, how much will it cost to buy one of each with the discount? | def solve() -> int:
dress_price = 50
shirt_price = 25
discount_percent = 0.3
discounted_dress = dress_price * (1 - discount_percent)
discounted_shirt = shirt_price * (1 - discount_percent)
total_price = discounted_dress + discounted_shirt
result = total_price
return result
|
Henry divided his 42 meters string into 7 equal parts. He only used 3 parts of it. How many meters of string did he not use? | def solve() -> int:
string_length = 42
num_parts = 7
used_parts = 3
unused_parts = num_parts - used_parts
unused_length = unused_parts * (string_length / num_parts)
result = unused_length
return result
|
A company has 320 employees and it wants to award bonuses to 60% of them. How many employees will receive bonuses? | def solve() -> int:
employees = 320
percentage = 0.60
employees_with_bonus = employees * percentage
result = f"Employees with bonus: {employees_with_bonus}"
result = employees_with_bonus
return result
|
Peaceful Lake has 36 swans. This means there are 6 less than half as many swans on Peaceful Lake as on Busy Lake. How many swans are there on Busy Lake? | def solve() -> int:
peaceful_swans = 36
busy_swans = None
busy_swans = 84
result = busy_swans
return result
|
A vendor sold 45% of his stock of oranges on Monday. Then, on Tuesday he sold 20% of the remaining oranges. If he now has 624 oranges left, how many did he start with? | def solve() -> int:
oranges_left_after_Monday = 624/(1-0.45)
oranges_left_after_Tuesday = oranges_left_after_Monday/(1-0.2)
total_oranges = oranges_left_after_Tuesday
result = total_oranges
return result
|
Student: In the nut shop, the bulk price of almonds is $6 per pound and the minimum spend is $30 before tax. The almonds are taxed at $0.8 per pound. If Sam has paid $129.6 for almonds, by how many pounds has Sam's purchase exceed the minimum spend? | def solve() -> int:
bulk_price = 6
minimum_spend = 30
tax_rate = 0.8/100
amount_before_tax = (129.6 - minimum_spend) / (1 + tax_rate)
tax_amount = amount_before_tax * tax_rate
total_amount = amount_before_tax + tax_amount
amount_over_minimum = total_amount - minimum_spend
result = amount... |
Ben went to the grocery store and bought 3kg of oranges for $6. If the oranges cost 0.60/kg, how many kilos of oranges did Ben buy? | def solve() -> int:
total_price_of_oranges = 6
price_per_kilo = 0.6
weight_of_oranges = total_price_of_oranges / price_per_kilo
result = weight_of_oranges
return result
|
A survey was taken to find out which type of ice cream people like the most. 25% chose chocolate, 40% chose vanilla and the rest chose strawberry. If 800 people took the survey, how many chose strawberry? | def solve() -> int:
option_a = 800 * 0.25
option_b = 800 * 0.40
rest = 800 - option_a - option_b
result = rest
return result
|
There are 3 times as many pens as pencils in the pencil case. If there are 20 pencils in the pencil case, how many pens are there? | def solve() -> int:
pencils = 20
pens = 3 * pencils
result = pens
return result
|
Mary bought 30 cupcakes for her party. Her friend Alex brought a fifth of his 50 cupcakes. How many cupcakes did Mary have for her party in total afterwards? | def solve() -> int:
mary_cupcakes = 30
alex_cupcakes = 50
alex_cupcakes_brought = alex_cupcakes / 5
total_cupcakes = mary_cupcakes + alex_cupcakes_brought
result = total_cupcakes
return result
|
Claire owns a bakery. Every month she spends 40% of her revenue on ingredients, 30% of her revenue on utilities, and the rest of her revenue on employee wages and profit. If her revenue is $5000 and her profit is $500, how much is she spending on employee wages? | def solve() -> int:
revenue = 5000
profit = 500
ingredient = revenue * 0.4
utility = revenue * 0.3
wage = revenue - ingredient - utility - profit
result = wage
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.