question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Daniel is building a bookshelf. He wants each shelf to be 1 foot long and they are 8 inches apart. If he wants the bookshelf to be 6 feet tall, how many feet of wood will he need for the shelves? | def solve() -> int:
shelf_length = 1
distance_between_shelves = 8 / 12
bookshelf_height = 6
total_shelves = bookshelf_height / distance_between_shelves
total_wood_needed = total_shelves * shelf_length
result = total_wood_needed
return result
|
Sam has a bag of 36 candies. He eats 12 of them and then shares the rest equally with his three friends. How many candies does each friend get? | def solve() -> int:
left = 36 - 12
each = left / 3
result = each
return result
|
Student: A physics book costs $60 while a chemistry book costs $50. If a student has $150, how much money will be left after buying both books? | def solve() -> int:
physics_book_cost = 60
chemistry_book_cost = 50
student_money = 150
total_cost = physics_book_cost + chemistry_book_cost
money_left = student_money - total_cost
result = money_left
return result
|
Student: A train travels from station A to station B at a speed of 80 km/h, then returns to A at a speed of 100 km/h. If the distance between A and B is 320 km, what is the average speed of the whole trip? | def solve() -> int:
distance = 320
speed_AB = 80
speed_BA = 100
time_AB = distance / speed_AB
time_BA = distance / speed_BA
total_time = time_AB + time_BA
total_distance = distance * 2
result = total_distance / total_time
return result
|
Barb is a teacher and she wants to make cookies for her students. She has 2 cups of flour and each recipe requires 1/3 of a cup of flour. How many batches of cookies can she make? | def solve() -> int:
flour_per_recipe = 1/3
total_flour = 2
num_of_batches = total_flour/flour_per_recipe
result = num_of_batches
return result
|
Tyler drives to work 5 days a week. He drives 6 miles to his workplace and returns the same distance back home every time. On Saturdays, he drives to his aunt's house which is 8 miles away. What is the total mileage covered by Tyler's car in a week? | def solve() -> int:
days_per_week = 7
work_days = 5
miles_to_work = 6
miles_to_aunts_house = 8
total_miles_work = work_days * (miles_to_work * 2)
total_miles_aunts_house = miles_to_aunts_house
total_miles_week = total_miles_work + total_miles_aunts_house
result = total_mil... |
In a flower shop, there are 70 different types of plants. 24 of them are roses. Half of the remaining plants are lilies. Seven of the remaining plants are bamboo. Half of the rest are lavender. How many types of plants are there that occur only once in the shop? | def solve() -> int:
total_plants = 70
roses = 24
remaining_plants = total_plants - roses
lilies = remaining_plants / 2
remaining_plants -= lilies
remaining_plants -= 7
lavender = remaining_plants / 2
occurs_once = total_plants - roses - lilies - 7 - lavender
result = occurs_once
... |
At Alex's gym, he has dumbbells and kettlebells. The gym is open from 6:00 a.m. to 10:00 p.m. In the first hour, 12 customers use the dumbbells. In the second hour, 15 customers use the kettlebells. In the third hour, 8 customers use the dumbbells. In the last hour, 20 customers use the kettlebells. How many dumbbells ... | def solve() -> int:
dumbbells_first_hour = 12
kettlebells_second_hour = 15
dumbbells_third_hour = 8
kettlebells_last_hour = 20
total_customers = dumbbells_first_hour + kettlebells_second_hour + dumbbells_third_hour + kettlebells_last_hour
average_customers_per_hour = total_customers / ... |
-Make sure you provide **commments** in your code. A farmer has 24 chickens and 12 ducks. Each chicken lays 3 eggs per week, and each duck lays 2 eggs per week. How many eggs does the farmer collect in 4 weeks? | def solve() -> int:
chickens = 24
ducks = 12
chicken_eggs = 3
duck_eggs = 2
weeks = 4
eggs_per_week = chickens * chicken_eggs + ducks * duck_eggs
eggs_in_4_weeks = eggs_per_week * weeks
result = eggs_in_4_weeks
return result
|
A car can travel 212 miles on a gallon of gasoline. If the car travels 1932 miles, how many gallons of gasoline does the car need? | def solve() -> int:
distance = 1932
efficiency = 212
gallons = distance/efficiency
result = gallons
return result
|
Karen invests $15,000 in the stock market that earns a 9% annual interest rate for the first 2 years, and then a 6% annual interest rate for the next 3 years, how much money will she have at the end of 5 years? | def solve() -> int:
principal = 15000
interest_rate_year1_year2 = 0.09
interest_rate_year3_5 = 0.06
time_year1_year2 = 2
time_year3_5 = 3
total_value_year1_year2 = principal * (1 + interest_rate_year1_year2) ** time_year1_year2
total_value = total_value_year1_year2 * (1 + interest_rate_year3... |
A train travels at a speed of 60 km/h for 2 hours. How far does the train travel in those 2 hours? | def solve() -> int:
speed = 60
time = 2
distance = speed * time
result = distance
return result
|
If a ladder is 10 feet long and leaning against a wall, and the distance from the ground to the point where the ladder touches the wall is 8 feet, what is the distance from the top of the ladder to the ground? | def solve() -> int:
ladder = 10
height = 8
distance = (ladder**2 - height**2)**0.5
result = distance
return result
|
During a puzzle-solving competition, there were 2 different types of puzzles: jigsaw and word search. The first team finished the jigsaw puzzle in 45 minutes while the second team finished in 50 minutes. The first team finished the word search puzzle in 35 minutes while the second team finished in 40 minutes. In total,... | def solve() -> int:
jigsaw_team1 = 45
jigsaw_team2 = 50
word_search_team1 = 35
word_search_team2 = 40
total_team1 = jigsaw_team1 + word_search_team1
total_team2 = jigsaw_team2 + word_search_team2
difference = total_team2 - total_team1
result = difference
return re... |
Ava runs 3 miles every day. It takes her 25 minutes to run one mile. If she decides to run an extra mile every week for the next three weeks, how many miles will she run in total? | def solve() -> int:
daily_miles = 3
mile_time = 25
extra_miles = 1 * 3
weekly_miles = daily_miles * 7
total_miles = (weekly_miles + extra_miles) * 3
result = total_miles
return result
|
Emily has twice as many stickers as her friend Bella. If they combine their stickers, they will have 200. How many stickers does Bella have? | def solve() -> int:
bella_stickers = 0
emily_stickers = 0
x = 200 / 3
bella_stickers = x
result = bella_stickers
return result
|
A box contains 60 chocolates, of which 25 are dark chocolate. What percent of the chocolates are not dark chocolates? | def solve() -> int:
total_chocolates = 60
dark_chocolates = 25
non_dark_chocolates = total_chocolates - dark_chocolates
percent_non_dark = (non_dark_chocolates / total_chocolates) * 100
result = percent_non_dark
return result
|
Student: A company has 250 employees and wants to divide them into teams of 5 for a team-building exercise. How many teams will there be? | def solve() -> int:
employees = 250
team_size = 5
teams = employees // team_size
result = teams
return result
|
Possible new questions and programs: The price of a dozen eggs is $3.60. If the price increases by 5% every month, how much will a dozen eggs cost after 8 months? | def solve() -> int:
price = 3.60
increase = 1.05
for i in range(8):
price = price * increase
price = round(price, 2)
result = price
return result
|
In a clothing store, there are 800 clothing items. 75% of these items are dresses, but only 55% of these dresses are made of cotton. How many non-cotton dresses are there? | def solve() -> int:
total_items = 800
dresses_percentage = 75
cotton_dresses_percentage = 55
dresses = total_items * (dresses_percentage / 100)
non_cotton_dresses = dresses * ((100 - cotton_dresses_percentage) / 100)
result = non_cotton_dresses
return result
|
A pizza has 8 slices and costs $12. Lisa and her two friends want to order pizza for lunch. They each want to eat 3 slices and have a $5 coupon to use. How much money do they need to pay for the pizza? | def solve() -> int:
pizza_slices = 8
pizza_cost = 12
total_slices = 3 * 3
pizzas = total_slices / pizza_slices
total_cost = pizzas * pizza_cost
final_cost = total_cost - 5
result = final_cost
return result
|
Susan ate 3 slices of pizza for lunch, and each slice had 6 pepperonis on it. How many pepperonis did Susan eat in total? | def solve() -> int:
num_slices = 3
pepperonis_per_slice = 6
total_pepperonis = num_slices * pepperonis_per_slice
result = total_pepperonis
return result
|
At the start of the school year, Evan's homeroom had 10 new students. But unfortunately, by the end of the year, 15% of the class had to transfer to a different school district. If the original class had 50 students, how many were left at the end of the year? | def solve() -> int:
original_students = 50
new_students = 10
total_students = original_students + new_students
transfer_percentage = 15
transferred_students = int(total_students * transfer_percentage / 100)
remaining_students = total_students - transferred_students
... |
If Jack has twice as many marbles as Jill, and five less than Sophie, who has 18 marbles, how many marbles do Jack, Jill, and Sophie have altogether? | def solve() -> int:
sophie_marbles = 18
jill_marbles = sophie_marbles - 5
jack_marbles = 2 * jill_marbles
total_marbles = sophie_marbles + jill_marbles + jack_marbles
result = total_marbles
return result
|
Mary works 8 hours a day and earns $12 per hour. If she works for 22 days in a month, how much does she earn in total? | def solve() -> int:
num_hours = 8
rate_per_hour = 12
num_days = 22
total_pay = num_hours * rate_per_hour * num_days
result = total_pay
return result
|
Jane had 200 stickers and she wants to put them all in an album. She can fit 8 stickers in each page and the album has 35 pages. How many stickers will be left over if she fills the entire album? | def solve() -> int:
total_stickers = 200
stickers_per_page = 8
pages = 35
total_stickers_used = stickers_per_page * pages
result = total_stickers - total_stickers_used
return result
|
Student: Jenny has a coupon that gives her 20% off on any purchase at a bookstore. She buys a book that costs $18 and a magazine that costs $6. How much does she pay after using the coupon? | def solve() -> int:
book_price = 18
magazine_price = 6
discount_rate = 0.2
total_price_before_discount = book_price + magazine_price
discount = total_price_before_discount * discount_rate
total_price_after_discount = total_price_before_discount - discount
result = total_price_after_discount
... |
A classroom has 20 desks and 30 chairs. If each desk is shared by 2 students and each chair is used by 1 student, what is the maximum number of students that can be in the classroom at the same time? | def solve() -> int:
max_students = 20 * 2 + 30
result = max_students
return result
|
A gym membership normally costs $60 per month. If a member pays for 3 months at once, they receive a 10% discount. If this member also has a coupon for an additional 5% off, how much is the final cost with a 6% sales tax rate? | def solve() -> int:
normal_price = 60
discount_1 = 0.1
discount_2 = 0.05
sales_tax_rate = 0.06
num_months = 3
subtotal = normal_price * num_months * (1 - discount_1)
total_discount = subtotal * discount_2
total_cost = subtotal - total_discount
total_cost_with_tax = total_cost + (tota... |
Nancy gets paid $9 per hour. She worked 11 hours on Monday, 6 hours on Tuesday, and 8 hours on Wednesday. How much did Nancy earn in total? | def solve() -> int:
hourly_rate = 9
monday_hours = 11
tuesday_hours = 6
wednesday_hours = 8
total_hours = monday_hours + tuesday_hours + wednesday_hours
total_pay = total_hours * hourly_rate
result = total_pay
return result
|
Peter has a collection of stickers. He starts with 75 stickers in his album, then adds another 50 stickers he got from a friend. He later buys 2 times as many stickers as were already in his album. However, he doesn't like some of the stickers and he decides to remove 30 of them. How many stickers does Peter have now? | def solve() -> int:
start_stickers = 75
friend_stickers = 50
bought_stickers = 2 * start_stickers
removed_stickers = 30
total_stickers = start_stickers + friend_stickers + bought_stickers - removed_stickers
result = total_stickers
return result
|
-The following are some possible questions and corresponding python programs. You can use them as references, but do not copy them. Alex is baking a cake. He needs to measure 300 grams of flour, but he only has a 100-gram measuring cup. He fills the cup three times and pours the flour into a mixing bowl. Then he realiz... | def solve() -> int:
flour_weight = 300
scale_reading = 345
bowl_weight = scale_reading - flour_weight
result = bowl_weight
return result
|
The sum of two consecutive odd numbers is 48. What are the two numbers? | def solve() -> int:
sum_of_numbers = 48
first_number = (sum_of_numbers - 1) / 2
second_number = first_number + 2
result = first_number, second_number
return result
|
Rachel has 5 more tennis balls than Tom. Rachel gives 3 tennis balls to Tom. If Tom now has 10 tennis balls, how many did Rachel have? | def solve() -> int:
num_tom = 10
num_rachel = num_tom + 5
num_rachel -= 3
result = num_rachel
return result
|
John and his family enjoy making nachos on the weekends. John and his wife each have 5 nachos, and their children share 1 plate of nachos. If they use a package of chips that has 24 chips, how many packages of chips will they need for 20 weekends? | def solve() -> int:
nachos_per_person = 5
nachos_per_child = 1
total_nachos_per_weekend = (2 * nachos_per_person) + nachos_per_child
chips_per_package = 24
packages_per_weekend = total_nachos_per_weekend / chips_per_package
total_weekends = 20
total_packages_needed = pack... |
Jack has a bag of 40 marbles. He wants to divide them in equal portions of 5 each. How many portions can he make? | def solve() -> int:
num_marbles = 40
portion_size = 5
result = num_marbles // portion_size
return result
|
Sarah has $20 and wants to buy 3 books that cost $7 each. How much change will she get back after buying the books? | def solve() -> int:
price_of_one_book = 7
number_of_books = 3
total_price = price_of_one_book * number_of_books
amount_paid = 20
change = amount_paid - total_price
result = change
return result
|
A billboard has 8 tiles running the length and 16 tiles running the height. If there are 3 billboards stacked on top of each other, how many tiles are in the stack? | def solve() -> int:
length = 8
height = 16
num_billboards = 3
tiles_per_billboard = length * height
total_tiles = tiles_per_billboard * num_billboards
result = total_tiles
return result
|
Mike and his friend Max are going car racing. Mike's car can travel twice as fast as Max's car. Max's car has a speed of 60 miles per hour, but his car can go 20 miles per hour faster. What is the speed of Mike's car? | def solve() -> int:
max_speed = 60
max_speed_with_upgrade = max_speed + 20
mike_speed = max_speed_with_upgrade * 2
result = mike_speed
return result
|
Student: There are 60 students in a class. If 15 of them like chocolate, a third of them like vanilla, twice as many like strawberry as chocolate, and the rest like none of them, how many of them like none of these flavors? | def solve() -> int:
students = 60
chocolate = 15
vanilla = students // 3
strawberry = chocolate * 2
none = students - (chocolate + vanilla + strawberry)
result = none
return result
|
Bob used to swim 50 meters in 2 minutes. After practicing more, he doubles his speed. How long will it take him to swim 600 meters? | def solve() -> int:
speed = 50 / 2
new_speed = speed * 2
time = 600 / new_speed
result = time
return result
|
Two bookstores sell the same book, but they offer it at different prices and with different discounts. Bookstore G lists the book at a full price of $15 and offers an additional discount of 3%. Bookstore H lists the same book for $17 and offers an additional discount of 5%. After both bookstores' discounts are applied,... | def solve() -> int:
price_G = 15
discount_G = 0.03
price_H = 17
discount_H = 0.05
discounted_price_G = price_G * (1 - discount_G)
discounted_price_H = price_H * (1 - discount_H)
difference = discounted_price_H - discounted_price_G
result = round(difference, 2)
... |
The length of a rectangle is 12 cm and the width is 5 cm. What is the perimeter of the rectangle? | def solve() -> int:
length = 12
width = 5
perimeter = 2 * (length + width)
result = f'<<<{perimeter}>>>'
result = perimeter
return result
|
Sean made chocolate chip cookies cut into 12 pieces and oatmeal raisin cookies cut into 10 pieces for the bake sale. If 75 people bought a piece of chocolate chip cookie and 90 people bought a piece of oatmeal raisin cookie, how many total cookies did Sean sell? | def solve() -> int:
choc_pieces = 12
oat_pieces = 10
choc_buyers = 75
oat_buyers = 90
choc_cookies = choc_buyers // choc_pieces
oat_cookies = oat_buyers // oat_pieces
total_cookies = choc_cookies + oat_cookies
result = total_cookies
return resu... |
Alex has a collection of coins. He has 25 quarters, 16 dimes, 12 nickels and 8 pennies. How much money does he have in total? | def solve() -> int:
quarters = 25
dimes = 16
nickels = 12
pennies = 8
quarter_value = 0.25
dime_value = 0.1
nickel_value = 0.05
penny_value = 0.01
total = quarters * quarter_value + dimes * dime_value + nickels * nickel_value + pennies * penny_value
result = total
return res... |
Student: Bethany is 6 years older than Alex. If Bethany is 20 years old, how old is Alex? | def solve() -> int:
bethany_age = 20
alex_age = bethany_age - 6
result = alex_age
return result
|
2. Two friends went shopping together. Frank bought a $10 DVD and spent an additional 40% on taxes. Colleen bought a pair of shoes for $35 and paid 8% on taxes. Who paid more in taxes, and by how much? | def solve() -> int:
frank_dvd = 10
frank_tax = 0.4
colleen_shoes = 35
colleen_tax = 0.08
frank_total = frank_dvd + frank_dvd*frank_tax
colleen_total = colleen_shoes + colleen_shoes*colleen_tax
difference = frank_total - colleen_total
result = difference
return result
|
Student: A truck travels 38 miles per hour for 6 hours and 31 miles per hour for 4 hours every day for 7 days. How many miles does the truck travel in a week? | def solve() -> int:
speed_1 = 38
time_1 = 6
speed_2 = 31
time_2 = 4
days = 7
miles_1 = speed_1 * time_1
miles_2 = speed_2 * time_2
total_miles = (miles_1 + miles_2) * days
result = total_miles
return result
|
The length of a swimming pool is 50 meters and is divided into 10 equal sections. If a swimmer is doing laps at a speed of 2 meters per second, how many sections would they have covered after 2.5 minutes? | def solve() -> int:
length_of_pool = 50
number_of_sections = 10
speed_of_swimmer = 2
time_in_minutes = 2.5
total_distance_covered = speed_of_swimmer * time_in_minutes * 60
sections_covered = total_distance_covered / length_of_pool * number_of_sections
result = sections_covered
... |
If a $1500 car depreciates at a rate of 10% each year, what would be its value in 5 years? | def solve() -> int:
value = 1500
for i in range(5):
value = value*(1-0.1)
result = value
return result
|
am rode six times as many kilometers on his bike as on his scooter and 24 more kilometers on his car than on his bike in a week. If the number of kilometers he rode on his scooter is 10, calculate the total number of kilometers he rode in the week. | def solve() -> int:
result = 60 + 84 + 10
return result
|
**** Isaac is a teacher of mathematics. He assigned a complex problem for his students that requires 3 multiplications, 5 divisions, 7 subtractions, and 6 additions. How many operations in total did Isaac assign in the problem? | def solve() -> int:
num_mult = 3
num_div = 5
num_sub = 7
num_add = 6
total_operations = num_mult + num_div + num_sub + num_add
print (total_operations)
result = total_operations
return result
|
If the original price of a shirt is $45 and it is discounted by 15%, what is the discounted price after including a sales tax of 5%? | def solve() -> int:
original_price = 45
discount = 15/100
discounted_price = original_price - (original_price * discount)
tax = 5/100
discounted_price_with_tax = discounted_price + (discounted_price * tax)
result = discounted_price_with_tax
return result
|
Carlos made cards for his family. He made 39 cards on Monday. On Tuesday he ran out of glitter and could only make half the number of cards he made the day before. OnThe Green Dragons soccer team scored a total of 236 goals in 8 games. Some players combined for 110 goals. Mike, Alex, and Jack equally scored the rest. H... | def solve() -> int:
monday_cards = 39
tuesday_cards = monday_cards / 2
total_goals = 236
some_players_goals = 110
mike_alex_jack_goals = total_goals - some_players_goals
each_goals = mike_alex_jack_goals / 3
alex_goals = each_goals
result = alex_goals
... |
am can type 540 words in 9 minutes. How many words can he type in 15 minutes? | def solve() -> int:
rate = 540 / 9
words = rate * 15
result = words
return result
|
Tom has 20 marbles. He gives 1/4 of his marbles to his sister and then 1/5 of his remaining marbles to his brother. How many marbles does Tom have left? | def solve() -> int:
total_marbles = 20
marbles_to_sister = total_marbles/4
marbles_to_brother = (3/4)*total_marbles*(1/5)
remaining_marbles = total_marbles - marbles_to_sister - marbles_to_brother
result = remaining_marbles
return result
|
Caroline is 16 years old and her older brother, Thomas, is 20 years old. How old will Thomas be when Caroline is half his age? | def solve() -> int:
caroline_age = 16
thomas_age = 20
age_difference = thomas_age - caroline_age
half_age = caroline_age + age_difference / 2
thomas_half_age = thomas_age + age_difference / 2
result = thomas_half_age
return result
|
Student: At a wildlife preserve, there are 50 deer, 30 foxes, and 10 bears. There are five times as many raccoons as foxes and half as many bobcats as deer. What is the total number of animals in the wildlife preserve? | def solve() -> int:
deer = 50
foxes = 30
bears = 10
raccoons = foxes * 5
bobcats = deer / 2
result = deer + foxes + bears + raccoons + bobcats
return result
|
Possible new questions and programs are: Monica buys a dozen roses every Valentine's Day for her partner. Two years ago, she paid $18 for a dozen roses. This year, she paid $24. What is the percent increase in the cost of a dozen roses? | def solve() -> int:
old_cost = 18
new_cost = 24
difference = new_cost - old_cost
percent_increase = (difference / old_cost) * 100
result = round(percent_increase, 2)
return result
|
Jill has red, blue and yellow tapes in her drawer. She has twice as many red tapes than blue tapes and four times as many yellow tapes than red tapes. In total, she has 60 tapes. How many blue tapes does she have? | def solve() -> int:
tapes_red = 60 / 6
tapes_blue = tapes_red / 2
result = tapes_blue
return result
|
A math book has 504 pages. If 105 pages were covered in one week, how many pages are left to be covered in the book? | def solve() -> int:
total_pages = 504
pages_covered = 105
pages_left = total_pages - pages_covered
result = pages_left
return result
|
A rectangular prism has a length of 5cm, a width of 3cm and a height of 4cm. Given that the walls have a thickness of 2mm on each side, what is the internal volume of the rectangular prism in cubic centimeters? | def solve() -> int:
length = 5
width = 3
height = 4
wall_thickness = 0.2
internal_length = length - (2 * wall_thickness)
internal_width = width - (2 * wall_thickness)
internal_height = height - (2 * wall_thickness)
volume = internal_length * internal_width * internal_height
result =... |
Mia and her twin brother are both 11 years old now. If the sum of their ages in 6 years time is 34, how old will Mia be in 6 years? | def solve() -> int:
age_mia = 11
age_brother = 11
difference_ages = 0
difference_ages = age_mia - age_brother
age_brother = age_mia - difference_ages
age_mia = age_brother + 34 - 22
result = age_mia
return result
|
Nancy wants to buy a new gaming laptop. She has a budget of $1100 and can afford to pay $100 per month for 10 months. What is the total amount she pays, including interest, by the end of the 10 months? | def solve() -> int:
principal = 1100
months = 10
monthly_payment = 100
interest_rate = 0.05
total_payment = 0
for i in range(months):
interest_incurred = principal * interest_rate
total_payment = total_payment + monthly_payment + interest_incurred
princi... |
-Put separate questions on different lines Possible questions and programs: Samantha bought 3 packs of pencils, each containing 20 pencils. She used 17 pencils on Monday, 14 pencils on Tuesday, and 9 pencils on Wednesday. How many pencils does she have left? | def solve() -> int:
total_pencils = 3 * 20
used_pencils = 17 + 14 + 9
left_pencils = total_pencils - used_pencils
result = left_pencils
return result
|
Jenn cooks lunch everyday and uses 5 ounces of ingredients. How many ounces of ingredients does she use in one week? | def solve() -> int:
total_ounces = 0
total_ounces = 5 * 7
result = total_ounces
return result
|
A toy-company produces 3 kinds of wooden toys: cars, dolls and robots. Each doll takes 10 minutes of work to be produced, while each car and robot takes 15 minutes and 20 minutes respectively to be produced. If the company produced 600 toys in total and the number of cars was twice the number of dolls, calculate the nu... | def solve() -> int:
car = 0
doll = 0
robot = 0
total = 600
doll = total / (2 + 3)
car = doll * 2
robot = total - (car + doll)
result = car, doll, robot
return result
|
How many toys do Jerry and Jaxon have altogether if Jerry got 18 toys? | def solve() -> int:
jerry_toys = 18
jaxon_toys = (jerry_toys - 8) / 2
total_toys = jerry_toys + jaxon_toys
result = total_toys
return result
|
Ben is a musician who plays guitar and piano. He charges $25 for a guitar lesson and $35 for a piano lesson. On the first week, he gave 12 guitar lessons and 8 piano lessons. On the second week, he gave 10 guitar lessons and 10 piano lessons. On the third week, he gave 8 guitar lessons and 12 piano lessons. How much di... | def solve() -> int:
guitar_num = 12
guitar_price = 25
piano_num = 8
piano_price = 35
guitar_num_sec = 10
piano_num_sec = 10
guitar_num_thi = 8
piano_num_thi = 12
first_earn = guitar_num * guitar_price + piano_num * piano_price
second_earn = guitar_num_sec * guitar_price ... |
Student: If Greg bought 30 pizzas for six times the price Helen paid, and Helen paid $12 for each pizza, how much money did Greg save by using a coupon that gave him a 10% discount? | def solve() -> int:
pizzas = 30
price_helen = 12
factor = 6
discount = 0.1
price_greg = price_helen * factor
total_greg = price_greg * pizzas
discounted_greg = total_greg * (1 - discount)
saved_greg = total_greg - discounted_greg
result = saved_greg
return result
|
Rachel wants to save $500 in 6 months. If she can save $10 per day, how many days does she need to save to reach her goal? | def solve() -> int:
total_savings = 500
savings_per_day = 10
days_needed = total_savings / savings_per_day / 6
result = days_needed
return result
|
The ratio of songs played on a radio station to the number of advertisements is 8:3. If the radio station played 64 songs, how many advertisements were aired? | def solve() -> int:
songs_played = 64
ratio = 8/3
advertisements = songs_played / ratio
result = advertisements
return result
|
Keith, Clyde, and Rhonda each have cars. Keith has nine tenths as many cars as Clyde, and Rhonda has six sevenths of the amount of cars that Keith has. If they have a total of 90 cars, how many cars does Clyde have? | def solve() -> int:
total = 90
rhonda_num = total / 6 * 7
keith_num = rhonda_num / 7 * 6
clyde_num = keith_num / 10 * 9
result = clyde_num
return result
|
A class of 27 students had a party and they ate 135 cupcakes. If each student ate the same number of cupcakes, how many cupcakes did each student eat? | def solve() -> int:
num_students = 27
num_cupcakes = 135
num_cupcakes_per_student = num_cupcakes / num_students
result = num_cupcakes_per_student
return result
|
A marathon is 42.195 kilometers long. If a runner completes the marathon in 2 hours and 30 minutes, what is their average speed in kilometers per hour? | def solve() -> int:
distance = 42.195
time_hours = 2.5
speed = distance / time_hours
result = speed
return result
|
Student: Joe bought four shirts that cost $13.49 each. He also bought a hat that cost $22.95. What was the total cost of the items he purchased? | def solve() -> int:
shirts = 4
shirt_price = 13.49
hat_price = 22.95
total_cost = shirts * shirt_price + hat_price
result = total_cost
return result
|
Charlie wants to buy a shirt that is $32 but it is on sale for 20% off. How much will Charlie save on the shirt? | def solve() -> int:
discount = 32 * 0.20
result = discount
return result
|
Tyler and Olivia are reading a novel. If Tyler can read six times as fast as Olivia, and the book takes him 12 days to read, how long before Olivia finishes the book, and what's the average number of days it takes for both of them to read the book? | def solve() -> int:
tyler_speed = 6
olivia_speed = 1
tyler_time = 12
olivia_time = tyler_time * tyler_speed / olivia_speed
average_time = (tyler_time + olivia_time) / 2
result = f'<<<{olivia_time}>>>, <<<{average_time}>>>'
return result
|
A group of friends decide to go to a concert. They buy 5 tickets for $120 each. They sell 3 tickets for $150 each and the rest for $100 each. How much profit or loss did they make? | def solve() -> int:
num_of_tickets = 5
initial_price = 120
selling_price1 = 150
selling_price2 = 100
total_cost = num_of_tickets * initial_price
revenue1 = 3 * selling_price1
revenue2 = 2 * selling_price2
total_revenue = revenue1 + revenue2
profit_loss =... |
Student: 5. John had 128 candies on Monday. On Tuesday, he ate 16 more candies than the day before. How many candies did he have on Thursday? | def solve() -> int:
candies_monday = 128
candies_tuesday = candies_monday + 16
candies_wednesday = candies_tuesday + 16
candies_thursday = candies_wednesday + 16
result = candies_thursday
return result
|
A company has 15 employees. If 20% of the employees will be promoted, how many employees will be promoted? | def solve() -> int:
employees = 15
promotion_percentage = 20
promoted_employees = (promotion_percentage / 100) * employees
result = promoted_employees
return result
|
A company charges $15 per hour for its services, with a minimum charge of 2 hours. What is the total cost, in dollars, for a customer who uses the service for 3 hours and 45 minutes? | def solve() -> int:
num_hours = 3 + 45/60
if num_hours <= 2:
total_cost = 30
else:
total_cost = 15 * num_hours
result = total_cost
return result
|
Tyson was given $30 for doing his chores. He used $12 to buy a toy and donated the rest to his church. How much money did Tyson donate? | def solve() -> int:
spent_on_toy = 12
amount_donated = 30 - spent_on_toy
result = amount_donated
return result
|
Ben walks 15 minutes to the bus stop, waits 5 minutes for the bus, and rides the bus for 25 minutes to school. He arrives at school 10 minutes before the first bell. How long does it take him to get to school from his home? | def solve() -> int:
walk = 15
wait = 5
bus = 25
early = 10
result = walk + wait + bus - early
return result
|
Student: A certain number of students chose to take gymnastics, while twice as many picked swimming. If there were 40 students in total, how many students chose to go swimming? | def solve() -> int:
swimming = 2 * (40/3)
result = swimming
return result
|
Sophie wants to learn a new language. She needs a tutor once a week for 1 hour. The tutor costs $40 per hour. She also needs to buy a textbook that costs $60. How much does she spend on language lessons and materials in a year? | def solve() -> int:
tutor_cost_per_hour = 40
hours_per_week = 1
weeks_per_year = 52
textbook_cost = 60
total_tutor_cost = tutor_cost_per_hour * hours_per_week * weeks_per_year
total_cost = total_tutor_cost + textbook_cost
result = total_cost
return result
|
Sophia can bake 80 cookies with 2 cups of flour. If she wants to bake 240 cookies, how many cups of flour will she need? | def solve() -> int:
cookies_per_flour = 80/2
cookies_needed = 240
flour_needed = cookies_needed/cookies_per_flour
result = flour_needed
return result
|
A hardware store usually sells 50 hammers and 30 wrenches per week. Today, they sold 40 hammers and 35 wrenches. If hammers are sold for $20 and wrenches are sold for $15, what is the difference between the store's weekly average and their total sales for today? | def solve() -> int:
hammers_per_week = 50
wrenches_per_week = 30
hammers_sold_today = 40
wrenches_sold_today = 35
hammer_price = 20
wrench_price = 15
weekly_average = (hammers_per_week * hammer_price + wrenches_per_week * wrench_price) / 7
total_sales_today = hammers_sold_... |
A cake recipe requires 3 cups of flour. If a baker wants to make twice the amount of cake, how many cups of flour does the baker need? | def solve() -> int:
flour_per_cake = 3
num_cakes = 2
total_flour = flour_per_cake * num_cakes
result = total_flour
return result
|
A pizza had 8 slices. If 3 friends had the pizza and each ate 2 slices, how many slices were left over? | def solve() -> int:
total_slices = 8
friends = 3
slices_each = 2
slices_left = total_slices - (friends * slices_each)
result = slices_left
return result
|
Amanda sells 25 cupcakes for $3 each. The ingredients cost $10. How much profit does she make? | def solve() -> int:
num_cupcakes = 25
price_cupcake = 3
cost_ingredients = 10
total_revenue = num_cupcakes * price_cupcake
total_profit = total_revenue - cost_ingredients
result = total_profit
return result
|
David has a stable with 3 horses, 2 ponies, and 4 donkeys. All the horses had 1 foal each, all the ponies had 2 foals each, and all the donkeys had 3 foals each. How many more baby animals than adult animals are there in total? | def solve() -> int:
horses = 3
ponies = 2
donkeys = 4
horse_foals = horses * 1
pony_foals = ponies * 2
donkey_foals = donkeys * 3
total_adult_animals = horses + ponies + donkeys
total_baby_animals = horse_foals + pony_foals + donkey_foals
more_baby_animals = total_baby... |
John sold his guitar at 70% of what he originally paid for it. After the sale, he had $800. If he wants to buy a new guitar for $2,000, how much cheaper is the new guitar than his old one? | def solve() -> int:
original_price = 0
sale_price = 0
new_guitar_price = 2000
sale_price = 800
original_price = sale_price / 0.7
price_difference = original_price - new_guitar_price
result = price_difference
return result
|
Rachel has taken 4 quizzes this semester and has averaged a score of 95%. The final quiz is worth three times as much as each previous quiz. What score does she need on the final quiz to have an overall average of at least 93%? | def solve() -> int:
quizzes_taken = 4
average_score = 95
final_quiz_weight = 3
desired_average = 93
total_weight = quizzes_taken + final_quiz_weight
total_score = quizzes_taken * average_score
final_quiz_score = (desired_average * total_weight - total_score) / final_quiz_weight
... |
A recipe calls for 2 cups of flour and 1 cup of sugar. If the recipe is doubled, how much sugar is needed? | def solve() -> int:
doubled_sugar = 1 * 2
result = doubled_sugar
return result
|
Rachel is planning her wedding decorations. She needs to hang 15 strings of lights and 20 paper lanterns from the ceiling. If it takes her 3 minutes to hang each string of lights and 2 minutes to hang each paper lantern, how long, in minutes, does it take her to decorate the ceiling? | def solve() -> int:
num_strings_of_lights = 15
num_paper_lanterns = 20
time_to_hang_lights = 3
time_to_hang_lanterns = 2
time_to_decorate_ceiling = (num_strings_of_lights * time_to_hang_lights) + (num_paper_lanterns * time_to_hang_lanterns)
result = time_to_decorate_ceiling
... |
A basketball team has 15 players. Two players get injured and then half the remaining players decide to rest. If only 1/6 of the tired players recover, how many players can still play at the end of the game? | def solve() -> int:
players = 15
injured = 2
remaining = players - injured
resting = remaining / 2
tired = remaining - resting
recovered = tired / 6
still_playing = remaining - resting - recovered
result = still_playing
return result
|
9 years ago, a musician was three times as old as his fan. If the musician is now 63 years old, how old will the fan be in 1 year? | def solve() -> int:
musician_age = 63
fan_age = musician_age - 9 * 3
fan_age_in_1_year = fan_age + 1
result = fan_age_in_1_year
return result
|
In a school, there are 600 students. If 20% of the students are in the drama club, how many students are in the drama club? | def solve() -> int:
total_students = 600
club_percentage = 0.2
club_members = total_students * club_percentage
result = club_members
return result
|
Lily is planning to make smoothies for her friends. She needs to make three smoothies one after the other. The first smoothie takes 10 minutes. The second smoothie takes 80% more time than the first one while the third smoothie takes 45% less time than the combined time required for the previous two smoothies. What is ... | def solve() -> int:
first_smoothie_time = 10
second_smoothie_time = first_smoothie_time * 1.8
combined_time = first_smoothie_time + second_smoothie_time
third_smoothie_time = combined_time * 0.55
total_time = first_smoothie_time + second_smoothie_time + third_smoothie_time
result = total_ti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.