question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
In a classroom, the total number of students is 50. If the number of girls is half the number of boys, what is the total number of boys in the classroom? | def solve() -> int:
total_students = 50
girls = total_students / 3
boys = girls * 2
result = boys
return result
|
Student: A restaurant has a special offer: 20% off on your entire bill if you order at least 2 items from the menu. If Ross and Rachel order 2 pizzas and 2 glasses of wine, and the pizza costs $10 and the wine costs $8, how much do they have to pay? | def solve() -> int:
pizza_price = 10
wine_price = 8
num_pizzas = 2
num_wines = 2
total_cost = (pizza_price * num_pizzas) + (wine_price * num_wines)
discount = total_cost * 0.2
final_cost = total_cost - discount
result = final_cost
return result
|
A school has 1000 students and 40% of them are girls. Among the girls, 25% play soccer. How many girls play soccer in the school? | def solve() -> int:
students = 1000
girls_percentage = 0.4
girls = students * girls_percentage
soccer_percentage = 0.25
girls_play_soccer = girls * soccer_percentage
result = girls_play_soccer
return result
|
For every 1 page of a novel read, Jane's reading speed is 40 words per minute. How many words will she read if she finishes a 300-page book? | def solve() -> int:
pages = 300
speed = 40
words_per_page = 0
total_words = 0
words_per_page = pages * speed
total_words = words_per_page
result = total_words
return result
|
During a painting exhibition, a total of 200 people attended. Seventy percent were supporters of the first artist while ten percent were supporters of the second artist. How many people attended the exhibition did not support either of the artists? | def solve() -> int:
total_attendees = 200
supporters_first_artist = total_attendees * 0.7
supporters_second_artist = total_attendees * 0.1
not_supporters = total_attendees - supporters_first_artist - supporters_second_artist
result = not_supporters
return result
|
Dakota and Cheyenne go on a picnic every weekend. Dakota brings enough sandwiches for the two of them to eat for the day and they split the sandwiches equally between the two of them. But after they split the sandwiches, Cheyenne saves all of the crusts to feed her pet bird. If there are 12 sandwiches, how many sandwic... | def solve() -> int:
sandwiches = 12
crusts_saved = 2
total_people = 2
total_crusts = total_people * crusts_saved
total_sandwich_pieces = sandwiches * 2
total_sandwich_pieces -= total_crusts
sandwiches_per_person = total_sandwich_pieces / total_people
result = san... |
Sarah needs 1/2 of a teaspoon of salt to season one piece of chicken. If she buys a 1-pound pack of chicken, how many pieces of chicken can she season with it? | def solve() -> int:
salt_per_piece = 1/2
chicken_weight = 1
teaspoons_per_pound = 48
pieces_of_chicken = (chicken_weight * teaspoons_per_pound) / salt_per_piece
result = int(pieces_of_chicken)
return result
|
Hannah was able to solve 20 math problems in an hour. After practicing every day, she increased her solving capacity by 40%. She then gets a magical calculator that increases her solving capacity by an additional 500%. How many problems can she solve now? | def solve() -> int:
problems_per_hour = 20
increase_percentage_1 = 40
increase_percentage_2 = 500
increase_1 = problems_per_hour * increase_percentage_1 / 100
new_capacity_1 = problems_per_hour + increase_1
increase_2 = new_capacity_1 * increase_percentage_2 / 100
new_cap... |
A car can travel 36 miles per gallon of gas. How far can it travel with 2.5 gallons of gas? | def solve() -> int:
miles_per_gallon = 36
gallons = 2.5
miles_travelled = miles_per_gallon * gallons
result = miles_travelled
return result
|
A grocery store sells apples in bags of 8. If the store sells 200 bags of apples, how many apples does the store sell throughout the day? | def solve() -> int:
bags = 200
apples_per_bag = 8
total_apples = bags * apples_per_bag
result = total_apples
return result
|
John's salary increased by 20% from $50,000 to $60,000. What was his salary before the increment? | def solve() -> int:
salary_after_increment = 60000
percent_increase = 20
salary_before_increment = salary_after_increment / (1+(percent_increase/100))
result = salary_before_increment
return result
|
Jeff and Tim are shopping for electronics. Jeff buys two headphones at $20 each and three chargers at $10 each. Tim buys one headphone and an additional five chargers. How much do they spend in all? | def solve() -> int:
jeffs_headphones = 2 * 20
jeffs_chargers = 3 * 10
tims_headphones = 1 * 20
tims_chargers = 5 * 10
result = jeffs_headphones + jeffs_chargers + tims_headphones + tims_chargers
result
return result
|
Leo and Maya are studying for a big exam and need to stay awake. If Leo drinks 4 cups of black tea every hour and Maya drinks 3 cups of green tea every 45 minutes, how many cups of tea will they drink together in 3 hours? | def solve() -> int:
leo_cups_per_hour = 4
maya_cups_per_hour = 3
maya_cups_per_45_minutes = maya_cups_per_hour * (60 / 45)
leo_cups_in_3_hours = leo_cups_per_hour * 3
maya_cups_in_3_hours = maya_cups_per_45_minutes * 3
total_cups_in_3_hours = leo_cups_in_3_hours + maya_cups_in_3_hours
... |
An airplane needs to travel 4000 kilometers with a constant speed of 600 kilometers per hour. How much time will the trip take? | def solve() -> int:
distance = 4000
speed = 600
total_time = distance / speed
result = total_time
return result
|
Some possible similar questions are: Omar bought a box of 24 cupcakes for $36 and decorated them with icing and sprinkles. He then sold them for $3 each at a bake sale. How much is Omar's profit if he sold all the cupcakes? | def solve() -> int:
cost = 36
revenue = 24 * 3
profit = revenue - cost
result = profit
return result
|
A DVD store has 400 DVDs to sell. Each customer can buy a maximum of 5 DVDs. How many customers can the store serve? | def solve() -> int:
num_dvds = 400
dvds_per_customer = 5
num_customers = num_dvds // dvds_per_customer
result = num_customers
return result
|
A recipe calls for 2 cups of flour to make a cake. If you need to make 5 cakes, how many cups of flour will you need? | def solve() -> int:
flour_per_cake = 2
number_of_cakes = 5
total_flour = flour_per_cake * number_of_cakes
result = int(total_flour)
return result
|
A store has a sale with a discount of 20% off all items. Greg buys a shirt for $25. What is the discounted price? | def solve() -> int:
original_price = 25
discount_percent = 20
discount_amount = original_price * discount_percent / 100
discounted_price = original_price - discount_amount
result = discounted_price
return result
|
Student: A hockey team has gone 18-7 in their season. How many total games has the team played? | def solve() -> int:
games_won = 18
games_lost = 7
total_games = games_won + games_lost
result = total_games
return result
|
A party supply store sells bulk balloons in bags of 25. If a customer needs 85 balloons for a party, how many bags should they buy? | def solve() -> int:
total_balloons = 85
balloons_per_bag = 25
bags_needed = total_balloons // balloons_per_bag
result = bags_needed
return result
|
Student: Anna bought 12 pencils and 6 erasers for $18. She gave 4 pencils and 2 erasers to her sister. How much money did Anna spend on the items she kept? | def solve() -> int:
pencils = 12
erasers = 6
total_cost = 18
pencils_given = 4
erasers_given = 2
cost_per_pencil = total_cost / pencils
cost_per_eraser = total_cost / erasers
cost_of_pencils_given = pencils_given * cost_per_pencil
cost_of_erasers_given = erasers_given * cost_... |
Tom had $1,500. His sister, Jill, gave him $50 more. Tom then spent $300 on groceries and kept the rest. What was the value, in dollars, of the rest? | def solve() -> int:
tom_money = 1500
jill_money = 50
groceries_cost = 300
total_money = tom_money + jill_money
remaining_money = total_money - groceries_cost
result = remaining_money
return result
|
- A factory produces 400 widgets per day. Each widget costs $5 to make and sells for $10. However, one-eighth of the widgets are defective and have to be thrown away. How much profit does the factory make per day? | def solve() -> int:
defective = (1/8) * 400
good = 400 - defective
cost = 5 * 400
revenue = 10 * good
profit = revenue - cost
result = profit
return result
|
Ethan saved $10 every week for 15 weeks. How much money did he save in total? | def solve() -> int:
weeks = 15
money_saved_per_week = 10
total_money_saved = weeks * money_saved_per_week
result = total_money_saved
return result
|
A shirt is sold at $40, but is now on sale for 20% off. If John bought two of these shirts at the discount price, how much did he pay in total? | def solve() -> int:
price = 40
discount = 0.2
discounted_price = price - (price * discount)
total_price = discounted_price * 2
result = total_price
return result
|
A recipe calls for 1/4 cup of olive oil, 1/2 cup of vinegar, and 1 teaspoon of salt. If you want to double the recipe, how much vinegar do you need? | def solve() -> int:
oil = 0.25
vinegar = 0.5
salt = 1/6
doubled_vinegar = vinegar * 2
result = doubled_vinegar
return result
|
A customer buys 3 items at a store. The first item costs $5, the second item costs $7, and the third item costs $12. The store is having a sale of 20% off the total price. What is the total cost including the discount? | def solve() -> int:
item1_cost = 5
item2_cost = 7
item3_cost = 12
total_cost = item1_cost + item2_cost + item3_cost
discount = total_cost * 0.20
total_cost = total_cost - discount
result = total_cost
return result
|
Possible questions: Berta has a pet hamster that loves sunflower seeds. Every day the hamster eats 4 sunflower seeds and drinks 10 ml of water. Berta buys a pack of 100 sunflower seeds and a bottle of 500 ml of water for her hamster. How many days will the pack and the bottle last for her hamster? | def solve() -> int:
seeds_per_day = 4
water_per_day = 10
total_seeds = 100
total_water = 500
days_with_seeds = total_seeds // seeds_per_day
days_with_water = total_water // water_per_day
result = min(days_with_seeds, days_with_water)
return result
|
John, Kate, and Mike split a sum of money in the ratio of 2:3:5. If John gets $200, how much money did they split in total? | def solve() -> int:
total_ratio = 2 + 3 + 5
john_ratio = 2
john_share = 200
total_share = (john_share/john_ratio) * total_ratio
result = total_share
return result
|
In a stadium with 50,000 spectators, 40% of them are wearing blue shirts, 25% of the blue shirt wearers are supporting Team A and there are 5,000 supporters of Team A in the stadium. How many people are wearing blue shirts but not supporting Team A? | def solve() -> int:
total_spectators = 50000
blue_shirt_percentage = 0.4
blue_shirt_wearers = total_spectators * blue_shirt_percentage
team_a_supporters_percentage = 0.25
team_a_supporters = 5000
blue_shirt_not_supporting_team_a = blue_shirt_wearers - (team_a_supporters_percentage * bl... |
Andrew and Benjamin went to the music store to buy some guitars and pianos. Benjamin bought 2 times more guitars and pianos than Andrew. If Benjamin bought 10 guitars and 8 pianos, how many guitars and pianos did Andrew buy in total? | def solve() -> int:
andrew_guitars = 10 / (2 * 2)
andrew_pianos = 8 / (2 * 2)
total_guitars_andrew = andrew_guitars
total_pianos_andrew = andrew_pianos
result = total_guitars_andrew + total_pianos_andrew
return result
|
If Ann can collect 12 roses per hour and works for 8 hours a day, how many roses can she collect in one week? | def solve() -> int:
num_roses_per_hour = 12
num_hours = 8
num_days = 7
total_roses = num_roses_per_hour * num_hours * num_days
result = 672
return result
|
Ashley purchases 75 apples. She eats 3 apples a day. Each day she shares 4 apples with her family. How many days until she finishes all the apples? | def solve() -> int:
apples_purchased = 75
apples_eaten_per_day = 3
apples_shared_per_day = 4
total_apples_per_day = apples_eaten_per_day + apples_shared_per_day
days_until_finished = apples_purchased // total_apples_per_day
result = days_until_finished
return re... |
Student: A company's revenue is $100,000 and its expenses are $75,000. What is their profit? | def solve() -> int:
revenue = 100000
expenses = 75000
profit = revenue - expenses
result = profit
return result
|
Possible math questions and programs: Carlos sells lemonade at a stand. He charges $0.75 for a small cup and $1.25 for a large cup. He sold 20 small cups and 15 large cups in one day. How much money did Carlos make in total? | def solve() -> int:
small_price = 0.75
large_price = 1.25
small_sold = 20
large_sold = 15
small_money = small_price * small_sold
large_money = large_price * large_sold
total_money = small_money + large_money
result = total_money
return result
|
Timothy is saving money for a new car. He has saved $1,250 and wants to save a total of $5,750. He will save $400 every month, determine how many months it will take him to reach his goal. | def solve() -> int:
currentsavings = 1250
totalsavings = 5750
monthlysavings = 400
totalmonths = (totalsavings-currentsavings)//monthlysavings
result = totalmonths
return result
|
A recipe for 12 cupcakes requires 1/2 cup of sugar. How many cups of sugar are needed to make 27 cupcakes? | def solve() -> int:
required_cupcakes = 27
sugar_for_12_cupcakes = 0.5
sugar_for_1_cupcake = sugar_for_12_cupcakes / 12
sugar_for_requested_cupcakes = sugar_for_1_cupcake * required_cupcakes
result = sugar_for_requested_cupcakes
return result
|
Student: Sam picks up 8 quarters, 9 dimes, 10 nickels, and 300 pennies. In dollars, how much money did he pick up? | def solve() -> int:
quarters = 8
dimes = 9
nickels = 10
pennies = 300
total_amount = quarters * 0.25 + dimes * 0.1 + nickels * 0.05 + pennies * 0.01
result = total_amount
return result
|
Four writers can write a book in 6 months. If each writer charges $5000 per month, how much would it cost to hire 6 writers to write 3 books in 9 months? | def solve() -> int:
writers = 4
months = 6
cost_per_month = 5000
books = 3
new_writers = 6
new_months = 9
total_cost = (new_writers * cost_per_month * new_months) / (writers * months) * books
result = total_cost
return result
|
Tom bought 5 books for $8 each and a pack of pencils for $2.50. If he paid with a $50 bill, how much change must he get? | def solve() -> int:
book_price = 8
pencil_price = 2.50
total_cost = (5*book_price) + pencil_price
paid = 50
change = paid - total_cost
result = change
return result
|
Sarah has a monthly salary of $8000.00. She spends $2000.00 on rent and $800.00 on groceries. She also spends $800.00 on her utility bill (which is half of her car payment) and $1000.00 on charity donations. If she wants to put half of her remaining money into her global causes fund, what amount of money will that be? | def solve() -> int:
salary = 8000.00
rent = 2000.00
groceries = 800.00
utility_bill = 800.00
charity_donations = 1000.00
remaining_money = salary - rent - groceries - utility_bill - charity_donations
car_payment = utility_bill * 2
remaining_money -= car_payment
global_cause... |
Lisa bought 12 books at $22 each and 9 rulers at $2 each. How much did she spend altogether? | def solve() -> int:
cost = 22 * 12 + 2 * 9
result = 258.0
return result
|
Student: Henry had 40 skittles in a bag. He ate 7 skittles on Monday and 8 skittles on Tuesday. How many skittles does Henry have left? | def solve() -> int:
skittles = 40
skittles = skittles - 7
skittles = skittles - 8
result = skittles
return result
|
A rectangle has a length of 12 cm and a width of 9 cm. How many squares of side 3 cm can fit inside the rectangle without overlapping? | def solve() -> int:
area = 12 * 9
square = 3 * 3
squares = int(area / square)
result = squares
return result
|
An investor invested in 2 separate schemes: A and B. Scheme A yields 10% of the capital within 2 years, and Scheme B yields 25% of the capital within 3 years. If he invested $2000 in Scheme A and $1000 in B, how much more money will he have in Scheme A than in B after 3 years, provided he does not withdraw anything? | def solve() -> int:
capital_A = 2000
capital_B = 1000
total_A = capital_A + capital_A * 0.1**2
total_B = capital_B + capital_B * 0.25**3
result = total_A - total_B
return result
|
Student: Joyce has 20 books on her bookshelf. She bought 4 more books today. How many books does Joyce have now? | def solve() -> int:
num_books_on_shelf = 20
num_books_bought = 4
total_num_books = num_books_on_shelf + num_books_bought
result = total_num_books
return result
|
On Monday, Ella sold 40 cupcakes for $3 each. She spent $25 on ingredients and $10 on packaging. On Tuesday, she sold 30 cupcakes for $4 each. She spent $20 on ingredients and $8 on packaging. On Wednesday, she sold 50 cupcakes for $3.50 each. She spent $30 on ingredients and $12 on packaging. How much profit did Ella ... | def solve() -> int:
profit = 0
revenue_monday = 40 * 3
cost_monday = 25 + 10
profit = profit + revenue_monday - cost_monday
revenue_tuesday = 30 * 4
cost_tuesday = 20 + 8
profit = profit + revenue_tuesday - cost_tuesday
revenue_wednesday = 50 * 3.5
cost_wednesday = 30 + 12
profit... |
Student: Sarah is making cupcakes for her friends. She adds 7 strawberries to the first set, 12 blueberries to the second set, and 5 strawberries and blueberries to both sets. What percentage of the cupcakes have strawberries? | def solve() -> int:
strawberries_first_set = 7
blueberries_second_set = 12
strawberries_and_blueberries_both_sets = 5
total_strawberries = strawberries_first_set + strawberries_and_blueberries_both_sets
total_cupcakes = 2 * (strawberries_first_set + blueberries_second_set + strawberries_and_blueberr... |
Raja is driving a car for 3 hours at a speed of 80 kilometres per hour. How far does he travel? | def solve() -> int:
time = 3
speed = 80
distance = time * speed
result = distance
return result
|
Chantelle sold 18 hats in 3 days, and Marco managed to sell 27 hats in the same time period. How many more hats can Marco sell than Chantelle in 9 days? | def solve() -> int:
chantelle_hats = 18
marco_hats = 27
chantelle_hats_per_day = chantelle_hats / 3
marco_hats_per_day = marco_hats / 3
chantelle_hats_in_9_days = chantelle_hats_per_day * 9
marco_hats_in_9_days = marco_hats_per_day * 9
more_hats = marco_hats_in_9_days - chante... |
An apple tree produces 150 apples. If 30% of them are rotten, how many apples are not rotten? | def solve() -> int:
total_apples = 150
rotten_percent = 30
rotten_apples = (rotten_percent / 100) * total_apples
non_rotten_apples = total_apples - rotten_apples
result = non_rotten_apples
return result
|
``` Question 4 : Ross has 6 packs of chocolates. He gives 1/3 of it to his friend. He shares the remaining equally among 4 of his friends. How many packs of chocolate does each of Ross's friends get? | def solve() -> int:
packs_given_away = 1/3 * 6
remaining_packs = 6 - packs_given_away
number_of_friends = 4
packs_each_get = remaining_packs / number_of_friends
result = packs_each_get
return result
|
If you can walk 3 miles in an hour, how long will it take you to walk 10 miles? | def solve() -> int:
mile = 3
distance = 10
time = distance/mile
result = time
return result
|
A store has 300 bags of flour, with each weighing 2.5 kg. If it takes 0.75 kg of flour to make a cake, how many cakes can be made from these bags of flour? | def solve() -> int:
bags_of_flour = 300
weight_per_bag = 2.5
flour_needed_per_cake = 0.75
total_weight = bags_of_flour*weight_per_bag
cakes_produced = total_weight/flour_needed_per_cake
result = int(cakes_produced)
return result
|
Student: Alex had 24 books and gave away half of them. How many books did he have left? | def solve() -> int:
books_original = 24
books_given_away = books_original / 2
books_left = books_original - books_given_away
result = books_left
return result
|
Student: Thomas wants to buy a new game console. He gets paid $14 per hour of mowing lawns. He mowed his lawn for 2.25 hours and then his neighbor's lawn for 5 hours. If the game console cost $350, how many more hours does he need to mow lawns to earn enough money? | def solve() -> int:
hourly_pay = 14
mowed_own_lawn = 2.25
mowed_neighbor_lawn = 5
game_console_cost = 350
total_earned = (hourly_pay * mowed_own_lawn) + (hourly_pay * mowed_neighbor_lawn)
money_left = game_console_cost - total_earned
hours_needed = money_left / hourly_pay
result = hours_... |
Carol had a graduation party, and her friends gifted her presents. Jack gave her a set of books worth $80. Nancy gave her a watch worth $250, and Cindy gifted her a bicycle worth thrice the value of the watch Nancy bought her. What was the total value of all the treats Carol received on her graduation day? | def solve() -> int:
jack_gift = 80
nancy_gift = 250
cindy_gift = 3 * nancy_gift
total_value = jack_gift + nancy_gift + cindy_gift
result = total_value
return result
|
Rachel travels to a theme park for a day of fun. The drive takes her 3 hours one way. Once she arrives, she spends 3 times as long at the park as she spent driving. How much time does she spend on her trip in total? | def solve() -> int:
drive_time = 3
park_time = drive_time * 3
total_time = drive_time + park_time
result = total_time
return result
|
On Wednesday, Lily had 60 apples and Matt had half as many apples as Lily. On Friday, Lily gave 20 apples to Adam, and Matt gave Adam 10 more apples than Lily gave. How many apples did Adam get? | def solve() -> int:
lily_apples = 60
matt_apples = lily_apples / 2
lily_gave = 20
matt_gave = lily_gave + 10
adam_apples = lily_gave + matt_gave
result = adam_apples
return result
|
A company has 800 employees. 30% of the employees are part-time. How many full-time employees work for the company? | def solve() -> int:
employees = 800
part_time_percentage = 30
part_time_employees = employees * part_time_percentage / 100
full_time_employees = employees - part_time_employees
result = full_time_employees
return result
|
Lucas has a rectangular garden that is 15 meters long and 10 meters wide. He wants to plant some flowers along the perimeter of the garden. He needs one flower for every 50 centimeters of the perimeter. How many flowers does he need in total? | def solve() -> int:
length = 15 * 100
width = 10 * 100
perimeter = 2 * length + 2 * width
total_flowers = perimeter / 50
result = total_flowers
return result
|
A restaurant bill for five people was $75, including a 15% tip. What was the original cost of the meal before the tip? | def solve() -> int:
total_bill = 75
tip_percentage = 15
original_cost = total_bill / (1 + tip_percentage / 100)
result = original_cost
return result
|
Simon borrowed money from his friend and paid back $300 initially. If he still has 60% left to pay back and the total amount with a 5% interest is $1050, what was the principal amount that Simon borrowed? | def solve() -> int:
principal = 1000
result = principal
return result
|
Jenny is baking cookies for a party. She has 24 cups of flour and she uses 3 cups of flour for every batch of cookies. She also has 18 eggs and she uses 2 eggs for every batch of cookies. How many batches of cookies can she make at most? | def solve() -> int:
flour_per_batch = 24 / 3
eggs_per_batch = 18 / 2
min_ratio = min(flour_per_batch, eggs_per_batch)
result = int(min_ratio)
return result
|
Maria has 200 pencils. She gave 70 pencils to her classmates and 30 pencils to her teacher. She lost 1/4 of the remaining pencils. How many pencils does she have left? | def solve() -> int:
pencils = 200
pencils -= 70
pencils -= 30
pencils_left = pencils * 0.75
result = pencils_left
return result
|
Student: Susie baked 4 pies on Monday. From Tuesday to Thursday, she baked 50% more pies than on Monday. On Friday, she baked 8 pies, which is 60% more pies than on Thursday. How many pies did Susie bake on Friday? | def solve() -> int:
monday_pies = 4
tuesday_thursday_pies = monday_pies * 1.5
friday_pies = tuesday_thursday_pies * 1.6
result = friday_pies
return result
|
A baker made 2 dozen cupcakes. She sold 18 of them and then made another 3 dozen. How many cupcakes does the baker have now? | def solve() -> int:
cupcakes_in_2_dozen = 2 * 12
cupcakes_sold = 18
cupcakes_in_3_dozen = 3 * 12
total_cupcakes = cupcakes_in_2_dozen - cupcakes_sold + cupcakes_in_3_dozen
result = total_cupcakes
return result
|
A teacher has 25 students in his class. If 8 students are absent, how many students are present? | def solve() -> int:
total_students = 25
absent_students = 8
present_students = total_students - absent_students
result = present_students
return result
|
A restaurant bought 200 loaves of bread at $1.50 per loaf and sold them at $2.50 each. If 50 loaves of bread went stale and could not be sold, what was the profit made by the restaurant? | def solve() -> int:
loaves_of_bread_bought = 200
cost_per_loaf = 1.50
selling_price_per_loaf = 2.50
loaves_of_bread_unsold = 50
total_cost = loaves_of_bread_bought * cost_per_loaf
total_revenue = (loaves_of_bread_bought - loaves_of_bread_unsold) * selling_price_per_loaf
profit = total_revenu... |
Jane needs to calculate the area of a rectangle. The length of the rectangle is 8 cm and the width is 6 cm. What is the area of the rectangle? | def solve() -> int:
length = 8
width = 6
area = length * width
result = area
return result
|
Student: In a soccer game, the final score was 3-2. If the team scored 4 more goals than their opponent, what was the total number of goals scored in the game? | def solve() -> int:
final_score = 3 - 2
goal_difference = 4
x = (final_score + goal_difference) / 2
total_goals = x + (x - goal_difference)
result = total_goals
return result
|
A basket contains 40 fruits. If 25% of them are apples, how many apples are there? | def solve() -> int:
total_fruits = 40
percentage_apples = 25
apples = (percentage_apples / 100) * total_fruits
result = apples
return result
|
In the beginning, there were 20 apples. 6 were given away on Tuesday, and 10 more were bought on Thursday. How many apples were in total on Thursday? | def solve() -> int:
beginning_apples = 20
given_away = 6
bought_apples = 10
result = beginning_apples - given_away + bought_apples
return result
|
Max needs to repair his bike and replace the tires. If he needs 2 tubes per tire, and he has 6 tubes, how many tires can he replace? | def solve() -> int:
tubes_per_tire = 2
total_tubes = 6
tires_replaced = total_tubes // tubes_per_tire
result = tires_replaced
return result
|
Lisa and Jack each have 23 marbles, if Lisa gives Jack one marble, how many more marbles does Lisa have than Jack? | def solve() -> int:
marbles_lisa = 23
marbles_jack = 23
num_marbles_transfered = 1
result = marbles_lisa - (marbles_jack + num_marbles_transfered)
print (result)
return result
|
Karen opened a fitness center and made $15,000 in the first month without factoring in the rent or utilities. The rent and utilities cost $5,000, and she sold the remaining surplus for $2,000. What was her profit? | def solve() -> int:
income = 15000
expenses = 5000
surplus = income - expenses
profit = surplus - 2000
result = profit
return result
|
David has 14 golf clubs, which is 2 more than three times as many golf clubs as Mark has. If Mark has 4 golf clubs, how many golf clubs does David have? | def solve() -> int:
mark_clubs = 4
david_clubs = 3 * mark_clubs + 2
result = david_clubs
return result
|
If Sally runs 5km every morning and 5km every evening every day, how many kilometers has she ran in 45 days? | def solve() -> int:
km_run_per_day = 10
days_in_45_days = 45
total_km_run = km_run_per_day * days_in_45_days
result = total_km_run
return result
|
A baker makes 24 muffins in a batch. He sells each muffin for $1.50 and spends $0.50 on the ingredients for each muffin. How much profit does he make from selling 3 batches of muffins? | def solve() -> int:
muffins = 24 * 3
revenue = muffins * 1.5
cost = muffins * 0.5
profit = revenue - cost
result = profit
return result
|
2. What is the cost of a pizza that costs $7.50 plus two cans of soda which each cost $0.90? | def solve() -> int:
cost_pizza = 7.50
cost_soda = 0.90 * 2
total = cost_pizza + cost_soda
result = total
return result
|
Student: Chris went to the bank to withdraw $150. She sent $100 of the amount to her parents and spent $50 on a new pair of shoes. How much money did Chris have left after sending the money to her parents and buying the shoes? | def solve() -> int:
amount_withdrawn = 150
amount_sent_to_parents = 100
amount_spent_on_shoes = 50
amount_left = amount_withdrawn - amount_sent_to_parents - amount_spent_on_shoes
result = amount_left
return result
|
A craft store ordered 500 meters of ribbon. They use 3 meters of ribbon for each bow and made 120 bows. How many meters of ribbon do they have left? | def solve() -> int:
num_of_ribbon_ordered=500
num_of_bows_made=120
ribbon_used_per_bow=3
total_ribbon_used=num_of_bows_made*ribbon_used_per_bow
ribbon_left=num_of_ribbon_ordered-total_ribbon_used
result = ribbon_left
return result
|
Kevin had 32 chocolate bars and 20 candy canes in his bag. He gave away 8 chocolate bars and 5 candy canes to his friends. Then he found 6 chocolate bars and 4 candy canes in his locker. How many more chocolate bars than candy canes does Kevin have in his bag now? | def solve() -> int:
chocolate_bars_left = 32 - 8
candy_canes_left = 20 - 5
chocolate_bars_total = chocolate_bars_left + 6
candy_canes_total = candy_canes_left + 4
difference = chocolate_bars_total - candy_canes_total
result = difference
return result
|
Jane's car can go 200 miles with a full tank of gas. If she drives 50 miles per day, how many days until she needs to fill the tank again? | def solve() -> int:
miles_per_tank = 200
daily_miles_driven = 50
days_until_refuel = miles_per_tank/daily_miles_driven
result = days_until_refuel
return result
|
John has baked 3 pizzas. Each pizza has 10 slices. Each person eats 2 slices. If John has 6 guests, how many slices are left? | def solve() -> int:
total_slices = 3 * 10
slices_eaten = 6 * 2
slices_left = total_slices - slices_eaten
result = slices_left
return result
|
There are eight friends who went on a trip with nine dogs. Each friend will pay $12 for their ticket, and the total cost is $120. How much will one dog's ticket cost? | def solve() -> int:
num_friends = 8
num_dogs = 9
friend_ticket_cost = 12
total_cost = 120
friends_total_cost = num_friends * friend_ticket_cost
dog_total_cost = total_cost - friends_total_cost
dog_ticket_cost = dog_total_cost / num_dogs
result = dog_ticket_cost
... |
A clothing store has 3 types of jeans, 5 types of shirts, and 2 types of shoes. If Tim buys 2 types of jeans, 3 types of shirts, and 1 type of shoe, and Rachel buys 1 type of jeans, 2 types of shirts, and 2 types of shoes, how many more types of shirts did Tim buy than Rachel? | def solve() -> int:
num_jeans_Tim = 2
num_jeans_Rachel = 1
num_shirts_Tim = 3
num_shirts_Rachel = 2
num_shoes_Tim = 1
num_shoes_Rachel = 2
total_shirts_Tim = num_shirts_Tim
total_shirts_Rachel = num_shirts_Rachel
diff_shirts = total_shirts_Tim - total_shirts_Rachel
result = diff_... |
Student: Kevin and Ben went to the park to play soccer on a Saturday morning. Kevin scored 6 goals and Ben scored 25% less than Kevin. On the way back home, they met another team and played another match. In this match, they scored one-third of their previous goals. How many goals did they score in total? | def solve() -> int:
kevin_goals = 6
ben_goals = kevin_goals * 0.75
total_goals_first_match = kevin_goals + ben_goals
total_goals_second_match = total_goals_first_match * 0.33
result = total_goals_first_match + total_goals_second_match
return result
|
Student: After completing a jigsaw puzzle, Geena finds out that it contains 225 pieces. If she can complete 10 pieces in 15 minutes, how long will it take her to complete the whole puzzle? | def solve() -> int:
num_pieces = 225
pieces_per_minute = 10/15
time_to_complete = num_pieces/pieces_per_minute
result = time_to_complete
return result
|
If a TV costs $500 and you have a 10% off coupon, what is the new price? | def solve() -> int:
discount_percentage = 10/100
original_price = 500
discounted_price = original_price - (discount_percentage * original_price)
result = discounted_price
return result
|
Ian is collecting coins and wants to know how much money he has. He has 23 quarters, 17 dimes, 12 nickels, and 9 pennies. He knows that a quarter is worth 25 cents, a dime is worth 10 cents, a nickel is worth 5 cents, and a penny is worth 1 cent. How many cents does Ian have in total? | def solve() -> int:
quarters_cents = 23 * 25
dimes_cents = 17 * 10
nickels_cents = 12 * 5
pennies_cents = 9 * 1
total_cents = quarters_cents + dimes_cents + nickels_cents + pennies_cents
result = total_cents
return result
|
Bob goes to the gym every other day for the entire month and does 200 sit-ups each time he goes. How many sit-ups does Bob do in total? | def solve() -> int:
days = 30 // 2
sit_ups = 200
total_sit_ups = days * sit_ups
result = total_sit_ups
return result
|
A store sells 3 types of apples, each type costs $2, $3, and $4 per pound respectively. If a customer buys 2 pounds of the first type of apple, 3 pounds of the second type and 1 pound of the third type, how much do they spend in total? | def solve() -> int:
cost = 2*2 + 3*3 + 1*4
result = cost
return result
|
Peter started with $50. He spent $15 on supplies and earned $20 from selling his handmade crafts. How much money is remaining? | def solve() -> int:
initial = 50
spent = 15
earning = 20
result = initial + earning - spent
return result
|
If Karen baked a cake for 1 hour and 15 minutes, and David baked a cake for 45 minutes, how many minutes more did Karen bake than David? | def solve() -> int:
karen_bake_time = 1 * 60 + 15
david_bake_time = 45
minutes_more = karen_bake_time - david_bake_time
result = minutes_more
return result
|
A sports team won 60% of their games this season. If they played 30 games, how many games did they win? | def solve() -> int:
games_won = 0.6 * 30
result = games_won
return result
|
Three friends went out to eat pizza. The bill came up to $24 and they decided to split it evenly. However, Jane paid $3 extra to cover for the tax. How much did Jane actually pay? | def solve() -> int:
subtotal = 24
tax = 0.18 * subtotal
total = subtotal + tax
num_people = 3
contribution = total / num_people
jane_paid = contribution + 3
result = jane_paid
return result
|
A library has 1,245 books. If 567 books were checked out last month, and 80 books are checked out each week for the next seven weeks, how many books are still left in the library? | def solve() -> int:
books_in_library = 1245
books_checked_out_last_month = 567
books_checked_out_per_week = 80
weeks = 7
total_books_checked_out = books_checked_out_last_month + (books_checked_out_per_week * weeks)
books_remaining = books_in_library - total_books_checked_out
result... |
A recipe requires 2/3 cups of flour to make 12 cookies. If I want to make 24 cookies, how much flour do I need in cups? | def solve() -> int:
cookies_needed = 24
cookies_produced = 12
flour_needed = 2/3
flour_produced = flour_needed / cookies_produced
flour_total = flour_produced * cookies_needed
result = flour_total
return result
|
Student: A group of boys and girls have 60 people in total. If the number of boys is 2 times the number of girls, how many boys are there? | def solve() -> int:
total = 60
boys = 0
girls = 0
boys = 2 * girls
total = boys + girls
girls = total / 3
boys = 2 * girls
boys = 2 * (total / 3)
boys = (2 * total) / 3
result = boys
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.