question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Kelly has 8 less than half the amount of money that Sam has. Sam has 12 more than three times the amount of money that Alex has. If Alex has $20, how much money do they have together? | def solve() -> int:
kelly = 0
sam = 0
alex = 20
kelly = (sam / 2) - 8
sam = 3 * alex + 12
kelly = ((3 * alex + 12) / 2) - 8
kelly = (3 * alex / 2) + 2
kelly = (3 * 20 / 2) + 2
kelly = 32
total = kelly + sam + alex
result = total
return result
|
ophia has 88 dollars and 2 coins. She buys 5 items that cost 40 cents each and then gives her mom 28 dollars. How much money does Sophia have left? | def solve() -> int:
dollars = 88
coins = 2
coinsValue = 0.25
itemPrice = 0.4
itemsBought = 5
givenAway = 28
totalMoney = dollars + coins * coinsValue
amountSpent = itemsBought * itemPrice
moneyLeft = totalMoney - amountSpent - givenAway
result = moneyLeft
retu... |
Lisa is arranging gift baskets for a company. Each basket needs 3 candles, 2 soaps, 5 chocolates, and 7 times as many flowers as candles. If she needs to arrange 30 baskets, how many candles, soaps, chocolates, and flowers will she need in total? | def solve() -> int:
candles_per_basket = 3
soaps_per_basket = 2
chocolates_per_basket = 5
flowers_per_candle = 7
baskets = 30
total_candles = candles_per_basket * baskets
total_soaps = soaps_per_basket * baskets
total_chocolates = chocolates_per_basket * baskets
total_flowe... |
A garden hose fills a pool in 4 hours. If it takes 6 hours to fill the pool with a smaller hose, how many hours would it take for the smaller hose to fill the pool alone? | def solve() -> int:
big_hose_rate = 1/4
small_hose_rate = 1/6
small_hose_time = 1/(small_hose_rate - big_hose_rate)
result = small_hose_time
return result
|
A company makes a profit of $35 for every product they sell. If the company sold 150 products, what is their total profit? | def solve() -> int:
profit_per_product = 35
number_of_products = 150
total_profit = profit_per_product*number_of_products
result = total_profit
return result
|
The sum of two numbers is 25. If one number is 3 more than the other number, what are the two numbers? | def solve() -> int:
sum_of_numbers = 25
difference = 3
first_number = (sum_of_numbers - difference) / 2
second_number = first_number + difference
result = (first_number, second_number)
return result
|
Mary and John buy books. Mary buys 4 books less than John. If John spends $60 on books, how much does Mary spend on books if each book costs $10? | def solve() -> int:
Mary = 0
John = 0
John = 60 / 10
John = 60 / 10
Mary = John - 4
Mary = John - 4
money = Mary * 10
result = money
return result
|
Given 6 green apples and 7 ripe apples, how many apples in total do Carlos have? | def solve() -> int:
green_apples = 6
ripe_apples = 7
total_apples = green_apples + ripe_apples
result = total_apples
return result
|
A group of children went to a shop to buy some candies. They bought an equal number of chocolates and lollipops. After eating some, they were left with only 5 chocolates and 4 lollipops. How many candies did they buy in total? | def solve() -> int:
chocolates = 5
lollipops = 4
total_candies = (chocolates + lollipops) * 2
result = total_candies
return result
|
A bookstore orders 500 books each month. If the bookstore already had 300 books in stock, and the sales rate is 50 books per month, how many months will it take for the bookstore to have 3000 books in stock? | def solve() -> int:
books_ordered = 500
current_stock = 300
sales_per_month = 50
target_stock = 3000
months = 0
while current_stock < target_stock:
current_stock += books_ordered
current_stock -= sales_per_month
months += 1
result = months
... |
A restaurant gives a 10% discount to all senior citizens and an extra 5% discount on weekends. If a meal costs $30 and a senior citizen eats on a Saturday, what is the final price? | def solve() -> int:
original_price = 30
senior_discount = 0.1
weekend_discount = 0.05
discount_amt = original_price * (senior_discount + weekend_discount)
final_price = original_price - discount_amt
result = final_price
return result
|
If Laura reads a novel for 30 minutes every evening, 7 days a week, and studies a textbook for 2 hours every morning, 5 days a week, and doubles her reading time on the weekends, how many minutes does Laura spend reading in 1 week? | def solve() -> int:
novel_reading_time = 30
textbook_studying_time = 2 * 60
weekdays = 5
weekends = 2
total_reading_time = (novel_reading_time * weekdays) + (novel_reading_time * 2 * weekends)
total_reading_time += (textbook_studying_time * weekdays)
result = total_reading_time
... |
A teacher needs to divide 36 pencils evenly among her 9 students. How many pencils will each student get? | def solve() -> int:
pencils = 36
students = 9
pencils_per_student = pencils / students
result = pencils_per_student
return result
|
A painter can paint a fence in 6 hours. If two painters are working together, how much time will they take to paint the fence? | def solve() -> int:
time_per_person = 6
number_of_people = 2
time_required = time_per_person/number_of_people
result = time_required
return result
|
Yesterday, the average temperature was 75 degrees F. Today, the temperature is 10 degrees higher. What is the temperature today? | def solve() -> int:
yesterday_temperature = 75
temperature_today = yesterday_temperature + 10
result = temperature_today * 1
return result
|
Given that f(x) = 2x + 5, what is f(3)? | def solve() -> int:
def f(x):
return 2*x + 5
value_of_x = 3
result = f(value_of_x)
return result
|
Lisa is working out on a treadmill. She runs 1.5 miles for 20 minutes and walks 0.7 miles for 10 minutes. How many miles and for how long in minutes does Lisa cover in total? | def solve() -> int:
running_miles = 1.5
walking_miles = 0.7
total_miles = running_miles + walking_miles
running_time = 20
walking_time = 10
total_time = running_time + walking_time
result = (total_miles, total_time)
return result
|
-Avoid using round numbers in your questions, such as $10, $5, etc. Try to use numbers that are not divisible by 2 or 5. Kim sells 4 bracelets for $18 each. She pays a 10% commission to the store owner. How much money does she keep after paying the commission? | def solve() -> int:
revenue = 4 * 18
commission = 0.1 * revenue
money = revenue - commission
result = money
return result
|
Ryan sold 7 of his books for a total of $45. If each book was sold for the same price, how much did he sell each book for? | def solve() -> int:
total_books = 7
total_price = 45
price_per_book = total_price / total_books
result = price_per_book
return result
|
A triangular garden has a base of 15 meters and a height of 10 meters. What is the area of the garden? | def solve() -> int:
base = 15
height = 10
area = 0.5 * base * height
result = area
return result
|
Tom is driving to a job interview and he needs to travel 80 miles. At first, he drives at 70 miles/hour for 1 hour straight, then he slows down to 50 miles/hour for 1.5 hours. How far is he from the interview location? | def solve() -> int:
distance_1 = 70 * 1
distance_2 = 50 * 1.5
total_distance = distance_1 + distance_2
result = 80 - total_distance
return result
|
If Bob can till 1 foot of ground in 2 seconds, how wide of a swath can he till in 30 seconds? | def solve() -> int:
time = 30
time_per_foot = 2
feet_tilled = time/time_per_foot
swath_width = 2
width_tilled = feet_tilled * swath_width
result = width_tilled
return result
|
Carlos runs a car wash. He earned a total of $150 from washing compact cars and $300 from washing SUVs every week. If washing a compact car costs $10 and washing an SUV costs $25, how many cars did he wash every 3 weeks? | def solve() -> int:
compact_car_cost = 10
suv_cost = 25
compact_car_earnings = 150
suv_earnings = 300
compact_cars_washed = compact_car_earnings / compact_car_cost
suv_cars_washed = suv_earnings / suv_cost
total_cars_washed = compact_cars_washed + suv_cars_washed
cars_wash... |
A car dealer sells 5 cars in the first week. Each week after that, he sells twice the number of cars as the previous week. How many cars does he sell in the fourth week? | def solve() -> int:
week1 = 5
week2 = week1 * 2
week3 = week2 * 2
week4 = week3 * 2
result = week4
return result
|
Farmer John has 20 cows. If he sells 10 cows and buys 5 more, how many cows does he have in total? | def solve() -> int:
cows = 20
cows -= 10
cows += 5
result = cows
return result
|
Student: A math competition has 40 questions. Peter answered 30 questions correctly and 10 questions wrongly. What is his percentage score? | def solve() -> int:
total_questions = 40
correct_answers = 30
wrong_answers = 10
percentage_score = (correct_answers / total_questions) * 100
result = percentage_score
return result
|
In Alex's farm, there are 60 animals in total. He has cows, chickens, and pigs. He knows that each cow has 4 legs, each chicken has 2 legs, and each pig has 4 legs. He also knows that the total number of legs is 200. How many cows, chickens, and pigs does he have? | def solve() -> int:
c = 10
p = 30
h = 60 - c - p
result = c, h, p
return result
|
Sarah needs to buy 12 pens for $1 each, 1 highlighter for $2, and a pack of markers that costs three times as much as the highlighter. What is the total cost of Sarah's purchase? | def solve() -> int:
pens = 12
pen_cost = 1
highlighter_cost = 2
markers_cost = 3 * highlighter_cost
total_cost = (pens * pen_cost) + highlighter_cost + markers_cost
result = total_cost
return result
|
A fruit seller sells oranges for $0.50 each and apples for $0.75 each. If the total revenue from selling 50 pieces of fruit is $30.75 and there are 10 more oranges sold than apples, how many oranges were sold? | def solve() -> int:
num_fruit = 50
total_revenue = 30.75
price_orange = 0.5
price_apple = 0.75
x = ((total_revenue-(10*price_orange))/((price_apple-price_orange)*2))
num_oranges = x + 10
result = f'{num_oranges} oranges were sold.'
result = num_oranges
return result
|
Student: A recipe calls for 2 cups of sugar. If Anna wants to make 3/4 of the recipe, how many cups of sugar will she need? | def solve() -> int:
recipe_cups_sugar = 2
fraction_of_recipe = 3/4
result = recipe_cups_sugar * fraction_of_recipe
return result
|
- Lisa and Lucy are sisters who like to collect stickers. Lisa has 120 stickers, and Lucy has 80 stickers. They agree to exchange some stickers so that they have the same number of stickers. Lisa gives Lucy 2 stickers for every 3 stickers that Lucy gives Lisa. How many stickers do they have after the exchange? | def solve() -> int:
lisa = 120
lucy = 80
x = (lucy - lisa) / 3
lisa_after = lisa + x
lucy_after = lucy - 2 * x
result = (lisa_after, lucy_after)
return result
|
arah has 31 apples. She gives 2/3 of them away and then eats 5/6 of the remaining amount. How many apples does Sarah have now? | def solve() -> int:
number_apples_start = 31
apples_given_away = number_apples_start * 2 / 3
apples_eaten_by_Sarah = (number_apples_start - apples_given_away) * 5 / 6
result = number_apples_start - (apples_eaten_by_Sarah + apples_given_away)
return result
|
If a runner's average speed is 6 miles per hour, how long would it take them to finish a 12-mile race? | def solve() -> int:
total_time = 12/6
result = total_time
return result
|
Julia is learning how to knit and knows how to make 10 different stitches. If she learns 2 new stitches each week, how many weeks will it take her to know how to make 25 different stitches? | def solve() -> int:
stitches_known = 10
stitches_learned_per_week = 2
stitches_goal = 25
stitches_left_to_learn = stitches_goal - stitches_known
weeks_to_learn = stitches_left_to_learn / stitches_learned_per_week
result = weeks_to_learn
return result
|
A company manufactures 400 products per day. If they need to manufacture 2000 products, how many days will it take to manufacture all these products? | def solve() -> int:
daily_rate = 400
amount = 2000
time = amount/daily_rate
result = time
return result
|
A pack of pencils contains 24 pencils. Anna uses 6 pencils, and Bob uses 4 pencils more than Anna. How many pencils are left in the pack? | def solve() -> int:
bob_pencils = 6 + 4
used_pencils = 6 + bob_pencils
left_pencils = 24 - used_pencils
result = left_pencils
return result
|
Emma works part-time at a grocery store. She is scheduled for 25 hours a week, but has decided to take a 4-day vacation. The store pays $12 per hour and offers 3 paid sick days per year. If Emma has not used any sick days yet, how much pay will she forfeit during her vacation? | def solve() -> int:
hours_per_week = 25
hourly_rate = 12
vacation_days = 4
sick_days_used = 0
sick_days_allowed = 3
total_hours_worked = hours_per_week * 52 - sick_days_allowed * hours_per_week
hours_worked_during_vacation = (hours_per_week * 4) - sick_days_used
pay_for_vacatio... |
A plane takes 2.5 hours to fly from New York to Los Angeles. It takes 3 hours to fly from Los Angeles to New York. If the plane leaves New York at noon, what time will it arrive in Los Angeles? | def solve() -> int:
leaving_time = 12
flight1_time = 2.5
flight2_time = 3
arriving_time = leaving_time + flight1_time + flight2_time
result = arriving_time
return result
|
A toy store has 56 red balloons and twice as many blue balloons as red balloons. The store sells 41 red balloons and gives half of the remaining blue balloons to a charity. How many blue balloons does the store have left? | def solve() -> int:
r = 56
b = r*2
r -= 41
b -= r/2
result = f'{b}'
result = b
return result
|
David invested $30,000 in a savings account that pays 9% interest per year. After 2 years, he took out $7,500 and invested it in a mutual fund account that pays 12% interest per year. If he withdraws the money from both accounts after 3 more years, what is the total balance? | def solve() -> int:
P = 30000
R1 = 0.09
t1 = 2
A1 = P*(1 + R1)**t1
P2 = 7500
R2 = 0.12
t2 = 3
A2 = P2*(1 + R2)**t2
A3 = (A1 - P2)*(1 + R1)**t2
A4 = A3 + A2
result = round(A4,2)
return result
|
A zoo has 800 animals. 45% of the animals are birds, 30% are mammals and the rest are reptiles. How many reptiles are there at the zoo? | def solve() -> int:
total_animals = 800
bird_animals = total_animals * 0.45
mammal_animals = total_animals * 0.3
reptile_animals = total_animals - (bird_animals + mammal_animals)
result = reptile_animals
return result
|
Isabella is making bracelets. She has six hours to make 120 bracelets. In the first hour, she makes 16 bracelets, and in the second hour, she makes 20 bracelets. How many bracelets does Isabella need to make per hour to complete the task on time? | def solve() -> int:
total_bracelets = 120
hours_available = 6
bracelets_first_hour = 16
bracelets_second_hour = 20
remaining_bracelets = total_bracelets - (bracelets_first_hour + bracelets_second_hour)
hours_remaining = hours_available - 2
bracelets_per_hour = remaining_bracelets /... |
Julia has 100 dollars. She bought a laptop for $450 and a headphone for $75. How much money is left? | def solve() -> int:
total = 0
total = 100 - 450 - 75
result = total
return result
|
If the population of a town is 20,000 and it increases by 5% every year, what will the population be after 3 years? | def solve() -> int:
initial_pop = 20000
increase = 0.05
years = 3
population = int(initial_pop * (1 + increase)**years)
result = population
return result
|
A store is having a sale where everything is 15% off. If a shirt originally costs $25, how much will it cost during the sale? | def solve() -> int:
original_price = 25
discount_percentage = 0.15
discount_amount = original_price * discount_percentage
sale_price = original_price - discount_amount
result = sale_price
return result
|
Q8: Juan is buying new textbooks for the semester and each book costs $25. He gets a 10% volume discount if he buys more than 20 books. How much money does he save if he buys 25? | def solve() -> int:
price_per_book = 25
discount = 10
number_of_books = 25
saving = 0
if number_of_books > 20:
saving = number_of_books*price_per_book*discount/100
result = saving
return result
|
Student: Simone has a bowl of candy that contains 25 pieces of candy. She eats 40% of the candy. How many pieces of candy does she have left? | def solve() -> int:
candy = 25
eaten = 0.4 * candy
left = candy - eaten
result = left
return result
|
Amy has $2,500 in her checking account. She deposits $200 each month, earning a 5% annual interest rate compounded monthly. How much money will she have after 12 months? | def solve() -> int:
interest = 0.05
principal = 2500
monthly_deposit = 200
months = 12
result = principal
for i in range(months):
result = result * (1 + interest/12) + monthly_deposit
result = 3270.32
return result
|
Emma earns $800 every week as a salesperson. She saves 40% of her earnings every week and uses the rest to pay her bills. If her monthly bills are $1500, how much money will Emma save after working for 4 weeks in July? | def solve() -> int:
earnings_per_week = 800
savings_percentage = 0.4
monthly_bills = 1500
weeks_in_july = 4
savings_per_week = earnings_per_week * savings_percentage
total_savings = savings_per_week * weeks_in_july
total_expenses = monthly_bills * weeks_in_july
money_left = ear... |
Isabel spent 50 dollars on a book and 20 dollars on a shirt. How much more did she spend on the book than the shirt? | def solve() -> int:
book_cost = 50
shirt_cost = 20
difference = book_cost - shirt_cost
result = difference
return result
|
A garden is 12 meters long and 8 meters wide. If Jack wants to plant carrots in 1/4 of the garden and onions in 1/3 of the remaining area, how many square meters of land are left for him to plant potatoes? | def solve() -> int:
length = 12
width = 8
area = length * width
carrot_area = area / 4
remaining_area = area - carrot_area
onion_area = remaining_area / 3
potato_area = remaining_area - onion_area
result = potato_area
return result
|
A recipe needs 3/4 cup of sugar. If you want to cut the recipe in half, how much sugar do you need? | def solve() -> int:
sugar_needed = 3/4
reduced_recipe = 1/2
reduced_sugar = sugar_needed*reduced_recipe
result = reduced_sugar
return result
|
Mary wants to buy a new laptop that costs $800. If she saves $50 per week, how many weeks will it take her to save enough money to buy the laptop? | def solve() -> int:
target_price = 800
savings_per_week = 50
weeks_to_save = target_price / savings_per_week
result = weeks_to_save
return result
|
A photographer charges $100 for a one-hour photo shoot and an additional $50 per hour of work. How much will the photographer charge for a 3-hour photo shoot? | def solve() -> int:
additional_cost = 2 * 50
total_cost = 100 + additional_cost
result = total_cost
return result
|
A rectangular pool has a length of 20 meters and a width of 10 meters. If the depth of the pool is 3 meters, how many liters of water can the pool hold? | def solve() -> int:
length = 20
width = 10
depth = 3
volume = length * width * depth
liters_per_cubic_meter = 1000
total_liters = volume * liters_per_cubic_meter
result = total_liters
return result
|
Mike is hosting a BBQ party for his ten friends. The party will last for 5 hours and each person will need 1/5 of a bottle of water per hour. How many bottles of water will Mike need to provide for the party? Jenna wants to buy some books for her book club. She wants to buy 8 books from each of her 3 favorite authors. ... | def solve() -> int:
num_friends = 10
party_duration = 5
water_per_person_per_hour = 1/5
total_water_needed = num_friends * party_duration * water_per_person_per_hour
num_authors = 3
books_per_author = 8
book_cost = 20
discount = 0.15
tax = 0.07
total_books = num_au... |
A grocery store has a sale where if you buy 3 items, you get the 4th item free. If you buy 7 items, how many items do you have to pay for? | def solve() -> int:
num_items = 7
num_paid_items = (num_items // 4) * 3 + (num_items % 4)
result = num_paid_items
return result
|
Rachel buys notepads costing $0.85 each. She spends $17 in total. Each notepad has 75 pages. How many pages did she purchase altogether? | def solve() -> int:
notepad_cost = 0.85
total_cost = 17
notepad_pages = 75
notepad_quantity = total_cost / notepad_cost
total_pages = notepad_quantity * notepad_pages
result = total_pages
return result
|
If y varies inversely with x, and y = 10 when x = 5, what is y when x = 15? | def solve() -> int:
yx = 10*5
y_new = yx/15
result = y_new
return result
|
Student: A rectangular room has a length of 12 feet and a width of 8 feet. If the room is being tiled with square tiles that measure 1 square foot each, how many tiles are needed to tile the entire room? | def solve() -> int:
length = 12
width = 8
area = length * width
tile_area = 1
tiles = area / tile_area
result = tiles
return result
|
If Susan can complete a task in one-third of the time it takes Jake and Jake takes 12 hours to complete the task, how long does it take Susan to complete the same task? | def solve() -> int:
jake_time = 12
susan_time = jake_time * 3
result = susan_time
return result
|
A rectangular prism has a volume of 160. If the length is 5 and the width is 8, what is the height of the prism? | def solve() -> int:
prism_height = 160 / (5 * 8)
result = prism_height
return result
|
At a bowling alley, 24 people played 2 games each. The first 12 people each scored 100 points in each game. The remaining people each scored an average of 80 points per game. What was the total number of points scored by everyone? | def solve() -> int:
first_twelve = 12*2*100
remaining_twelve = 12*2*80
total_points = first_twelve + remaining_twelve
result = total_points
return result
|
Alex and Sarah are running a race. Alex runs at an average speed of 12 km/h, while Sarah runs at an average speed of 10 km/h. If they run for 1.5 hours, how far apart are they? | def solve() -> int:
time = 1.5
alex_distance = 12*time
sarah_distance = 10*time
distance_apart = abs(alex_distance-sarah_distance)
result = distance_apart
return result
|
A rectangular garden is 12 meters long and 8 meters wide. If a 2-meter wide path is built around the garden, what is the area of the pathway? | def solve() -> int:
pathway_area = ((12+4)*(8+4)) - (12*8)
result = pathway_area
return result
|
Matthew makes $5600 a month. After paying $1800 for rent, $250 for utilities, $300 for groceries, $400 for car payments and $350 for savings, how much money does he have left each month for entertainment and miscellaneous costs? | def solve() -> int:
income = 5600
bills = 1800 + 250 + 300 + 400 + 350
remaining_funds = income - bills
result = remaining_funds
return result
|
Lily is collecting seashells on the beach. She finds 5 seashells every 10 minutes, but she loses 2 seashells every 20 minutes because some of them break or fall out of her bucket. If she starts with 10 seashells in her bucket, how many seashells will she have after 2 hours? | def solve() -> int:
net_gain = 10 - 4
intervals = 2 * 60 / 20
total_gain = net_gain * intervals
final_number = 10 + total_gain
result = round(final_number)
return result
|
Natalie takes a flight from London to Brussels at a speed of 550 miles per hour. Five hours later, Jane takes the same route at a speed of 400 miles per hour. By how many hours does Natalie arrive at Brussels earlier than Jane? | def solve() -> int:
natalie_speed = 550
jane_speed = 400
time_delay = 5
natalie_arrival_time = time_delay
jane_arrival_time = (natalie_speed * time_delay) / jane_speed
time_difference = jane_arrival_time - natalie_arrival_time
result = time_difference
return result
|
Mike has 30 baseball cards. He gave 5 cards to his friend and traded 3 cards with his brother. How many baseball cards does he have left? | def solve() -> int:
cards = 30
cards_given = 5
cards_traded = 3
cards_left = cards - cards_given - cards_traded
result = cards_left
return result
|
Alex is buying 5 chocolate bars for $12.50. What is the cost of 1 chocolate bar? | def solve() -> int:
bars = 5
total_cost = 12.50
cost_per_bar = total_cost / bars
result = cost_per_bar
return result
|
She randomly picks one marble from the jar and then puts it back. She repeats this process 15 times. What is the expected number of times that she picks a red marble? | def solve() -> int:
marbles_red = 20
marbles_blue = 30
marbles_green = 10
marbles_total = marbles_red + marbles_blue + marbles_green
trials = 15
color ='red'
probability = marbles_red / marbles_total
expected = probability * trials
result = expected
return result
|
Some possible questions and programs are: A cake recipe calls for 2 cups of flour, 1 cup of sugar, 3 eggs, and 0.5 cups of oil. How much flour is needed to make 5 cakes? | def solve() -> int:
flour = 2 * 5
result = flour
return result
|
8. Question Eight: If 60% of the members of a certain club are teenagers, how many members should be adults if there are 240 people in the club? | def solve() -> int:
number_of_people = 240
number_of_teenagers = number_of_people * 0.60
number_of_adults = number_of_people - number_of_teenagers
result = number_of_adults
return result
|
There are 560 students in a school and the ratio of boys to girls is 8:5. How many boys are there? | def solve() -> int:
number_of_boys = 8 * (560/13)
result = number_of_boys
return result
|
Brad collects stamps and has 120 stamps in his album. He buys 15 more stamps from a shop and trades 10 stamps with his friend. Then he realizes that he has 5 duplicate stamps and gives them away. How many stamps does he have in his album now? | def solve() -> int:
stamps = 120
stamps = stamps + 15
stamps = stamps - 10
stamps = stamps - 5
result = stamps
return result
|
Ryan reads 10 pages of a book and one fifth as many pages of a magazine as pages of a book every day. In 15 days, how many pages of the book and the magazine, in total, does Ryan read? | def solve() -> int:
B = 10 * 15
G = B / 5
result = B + G
return result
|
A container has 80 marbles. 25% of the marbles are red and 65% of the remaining marbles are blue. How many blue marbles are in the container? | def solve() -> int:
marbles = 80
red_marbles = marbles * 0.25
remaining_marbles = marbles - red_marbles
blue_marbles = remaining_marbles * 0.65
result = blue_marbles
return result
|
A wall is 8 feet tall. If a ladder is leaned against it and the ladder touches the wall 6 feet above the ground, how long is the ladder? | def solve() -> int:
wall_height = 8
wall_touch_height = 6
ladder_length = (wall_height ** 2 + (wall_touch_height ** 2)) ** 0.5
result = ladder_length
return result
|
In a game, Tom starts off with a score of 250. After each round, he doubles his score. If he plays 5 rounds, what will his score be after the fifth round? | def solve() -> int:
score = 250
for i in range(5):
score *= 2
result = score
return result
|
A book store had an inventory of 2000 books at the beginning of the year. They sold 30% of their inventory in the first six months. After a delivery of 400 books, what percentage of the inventory is left? | def solve() -> int:
books_sold = 2000 * 0.3
books_left = 2000 - books_sold + 400
percentage_left = (books_left / 2000) * 100
result = percentage_left
return result
|
The perimeter of a square is 32 cm. What is the area of the square? | def solve() -> int:
p = 32
s = p/4
a = s**2
result = a
return result
|
Maria is having a party, and there are three times as many boys as girls. Each girl pays $30, and each boy pays $60 to attend the party. If there are 24 boys at the party, what is the total amount of money collected? | def solve() -> int:
girls = 24 / 3
boys = 24
girl_payment = 30
boy_payment = 60
total_girl_payment = girls * girl_payment
total_boy_payment = boys * boy_payment
total_amount_collected = total_girl_payment + total_boy_payment
result = total_amount_collected
return resul... |
Emma grows flowers. She has 12 pots of 8 flowers each. 20% of the flowers are wilted, but the rest are fresh. She sells the fresh flowers for $0.8 each and the wilted ones for $0.4 each. How much money does she make? | def solve() -> int:
total_flowers = 12 * 8
wilted = total_flowers * 0.2
wilted = int(wilted + 0.5)
fresh = total_flowers - wilted
revenue = wilted * 0.4 + fresh * 0.8
result = revenue
return result
|
Lisa has a lemonade stand. She sells each cup of lemonade for 25 cents. She spends 15 cents on each lemon and 5 cents on each cup. She also pays 50 cents per hour to rent the stand. She works for 4 hours and sells 60 cups of lemonade. How much profit does she make? | def solve() -> int:
revenue = 60 * 0.25
lemon_cost = 60 * 0.15
cup_cost = 60 * 0.05
rental_cost = 4 * 0.5
total_cost = lemon_cost + cup_cost + rental_cost
profit = revenue - total_cost
result = f'Lisa makes ${profit} of profit.'
result = profit
return result
|
After making the 11 bags and sold 10 of them, what is Evan's net profit if he marks the remaining one down to $4 and then he sells it? | def solve() -> int:
cost = 3
quantity_sold = 11
price_sold_orig = 7
price_sold_discount = 4
result = (quantity_sold - 1) * price_sold_orig + 1 * price_sold_discount - cost
return result
|
**** 15 people attended a wedding. All adults brought a gift. Five children did not bring one. How many gifts were brought? | def solve() -> int:
total_people = 15
adult_people = 15 - 5
total_gifts = adult_people
result = total_gifts
return result
|
Student: On average, Jackie catches 10 fish in an hour when fishing. How many fish can she catch in 6 hours? | def solve() -> int:
hours = 6
fish_per_hour = 10
total_fish = hours * fish_per_hour
result = total_fish
return result
|
Student: Rachelle needs to pay a bill for her utilities for the month. It normally costs her 100 each month, but this month since she did not use all of it, she only has to pay 80. If she had to pay the full amount, how much did she save this month? | def solve() -> int:
bill = 100
discounted_bill = 80
saved_amount = bill - discounted_bill
result = saved_amount
return result
|
A laptop running for 6 hours would consume 0.45 kilowatts. How many kilowatts would the laptop consume if it was used for 8 hours a day for a week? | def solve() -> int:
hours = 8
days = 7
total_hours = hours * days
laptop_hr = 0.45 / 6
laptop_total = (total_hours * laptop_hr)
result = laptop_total
return result
|
If there are 60 students in a class, and 15 of them were absent, how many students were present? | def solve() -> int:
class_size = 60
absent_students = 15
present_students = class_size - absent_students
result = present_students
return result
|
The income tax rate in a certain country is 20%. A person was earning annually $120,000. How much money was the person paying in taxes each year? | def solve() -> int:
income = 120000
total_taxes = income * 0.2
result = total_taxes
return result
|
Jerry bought a car for $15,000 and invested $5000 in repairs. He used the car for six months and then sold it for $20,000. What was his profit from selling the car? | def solve() -> int:
car_cost = 15000
repair_cost = 5000
selling_price = 20000
total_cost = car_cost + repair_cost
profit = selling_price - total_cost
result = profit
return result
|
A tower block has 20 floors. It takes 16 seconds to go up the stairs to the floors that contain digit 7 and 10 seconds to reach the others. What is the total time to get to the 20th floor from the ground, taking the stairs? | def solve() -> int:
floor_with_digit_7 = [7, 17]
total_time = 0
for floor in range(1, 21):
if floor in floor_with_digit_7:
total_time += 16
else:
total_time += 10
result = total_time
return result
|
Lily spends 4 hours shopping. In that time she buys 1000 dollars worth of clothes. She also buys 6 smaller items that cost half as much each. How many dollars worth of clothes does she buy per hour? | def solve() -> int:
hours_shopping = 4
total_spent = 1000
num_smaller_items = 6
cost_per_smaller_item = total_spent / 2 / num_smaller_items
clothes_cost = total_spent - (num_smaller_items * cost_per_smaller_item)
clothes_per_hour = clothes_cost / hours_shopping
result = clothes_per... |
There were 20 cookies and 10 candies. If you add 7 more candies, how many sweets do you have in total? | def solve() -> int:
candies = 10 + 7
total_sweets = 20 + candies
result = total_sweets
return result
|
Max works at a grocery store for 7 hours a day at a rate of $9 per hour. He used 3/10 of his earnings from last week to buy a new phone case. Then he spent 1/2 of his remaining money on groceries. How much money does Max have left from his earnings last week? | def solve() -> int:
hours_per_day = 7
rate_per_hour = 9
earnings_per_day = hours_per_day * rate_per_hour
earnings_last_week = earnings_per_day * 7
money_spent_on_phone_case = earnings_last_week * 3/10
remaining_money = earnings_last_week - money_spent_on_phone_case
money_spent_on_g... |
Olivia wants to increase her daily calisthenics workout from 20 minutes to 30% more than that amount in 120 days. If she plans to increase her workout time by the same amount each week, what is the additional amount of time she needs to add to her workouts each week? | def solve() -> int:
days = 120
increase_percentage = 30
current_workout_time = 20
total_increase = current_workout_time * (increase_percentage / 100)
increase_per_day = total_increase / days
increase_per_week = increase_per_day * 7
result = increase_per_week
return result
|
Alan has twice the number of marbles that Jenny has. If Alan has 60 marbles, how many marbles does Jenny have? | def solve() -> int:
alan_marbles = 60
jenny_marbles = alan_marbles / 2
result = jenny_marbles
return result
|
Student: There are 8 crew members for a sailing expedition and each person has to ration 4 kilograms of apples for their journey. How many total kilograms of apples does the crew need for their journey? | def solve() -> int:
num_crew = 8
apples_per_person = 4
total_apples = num_crew * apples_per_person
result = total_apples
return result
|
Angela got a deal that if she spends $100, she will get a 20% discount. If Angela bought clothes for $80 and shoes for $50, will she get the discount? If yes, what was the total price that she paid? | def solve() -> int:
clothes_price = 80
shoes_price = 50
total_price = clothes_price + shoes_price
if total_price >= 100:
discount = total_price*0.20
total_price = total_price - discount
result = total_price
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.