question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Sam scored 74 in his first test, 89 in his second test, and 56 in his third test. If the maximum score in each test is 100, what percentage of total marks did he score? | def solve() -> int:
score = 74
score += 89
score += 56
total = 100 * 3
percentage = (score / total) * 100
result = percentage
return result
|
If a book was initially priced at $60 and had a 30% discount, how much did it cost after the discount? | def solve() -> int:
initial_price = 60
discount = 0.3
discount_amount = initial_price * discount
final_price = initial_price - discount_amount
result = final_price
return result
|
A bakery has 150 cupcakes. If they sell 2/5 of the cupcakes in the morning and 1/3 of the remaining cupcakes in the afternoon, how many cupcakes will be left at the end of the day? | def solve() -> int:
total_cupcakes = 150
morning_cupcakes = (2/5) * total_cupcakes
remaining_cupcakes = total_cupcakes - morning_cupcakes
afternoon_cupcakes = (1/3) * remaining_cupcakes
remaining_cupcakes -= afternoon_cupcakes
result = remaining_cupcakes
return result
|
In a school library, the ratio of mystery novels to adventure novels is 2:3. If there are 90 adventure novels, how many mystery novels are there? | def solve() -> int:
num_adventure = 90
ratio = 2/3
num_mystery = num_adventure * (1/ratio)
result = num_mystery
return result
|
Anthony collects baseball cards. He has one set with 50 cards, another set with 30 cards, and a third set with 20 cards. He also has a small collection that has a third of the total number of cards as the other three sets combined. How many baseball cards does Anthony have in total? | def solve() -> int:
set1 = 50
set2 = 30
set3 = 20
small_collection = (set1 + set2 + set3) / 3
total_cards = set1 + set2 + set3 + small_collection
result = total_cards
return result
|
Mark has five cows, three goats and seven sheeps. In the course of one year, each sheep had three more calves than each goat, and each goat had two more calves than each cow. If each cow had one calf, How many more calves than adult animals are there in total? | def solve() -> int:
calves_cows = 1
calves_goats = 2 + 2 * calves_cows
calves_sheeps = 3 + 2 * calves_goats
total_calves = calves_cows + calves_goats + calves_sheeps
total_adult = 5 + 3 + 7
total_more = total_calves - total_adult
result = total_more
return result
|
What is the slope of a line that passes through the points (2, 3) and (4, 7)? | def solve() -> int:
x1 = 2
y1 = 3
x2 = 4
y2 = 7
slope = (y2 - y1) / (x2 - x1)
result = slope
return result
|
If a pair of shoes is initially priced at $80, but is currently on sale for 20% off, what is the sale price? | def solve() -> int:
initial_price = 80
discount_rate = 0.2
discount_amount = initial_price * discount_rate
sale_price = initial_price - discount_amount
result = sale_price
return result
|
Nora has 500 square feet of fabric that she's using to make clothes. She makes square scarves that are 2 feet by 2 feet, rectangular skirts that are 3 feet by 1.5 feet, and rectangular shirts that are 2 feet by 1.2 feet. She has already made 20 square scarves, 15 rectangular skirts, and 12 rectangular shirts. How many ... | def solve() -> int:
area_of_square_scarf = 2 * 2
area_of_rectangular_skirt = 3 * 1.5
area_of_rectangular_shirt = 2 * 1.2
total_area_used = 20 * area_of_square_scarf + 15 * area_of_rectangular_skirt + 12 * area_of_rectangular_shirt
total_area_left = 500 - total_area_used
result = total_area_left
... |
If a pizza has a diameter of 10 inches, what is the circumference of the pizza? | def solve() -> int:
pi = 3.14
diameter = 10
circumference = pi * diameter
result = circumference
return result
|
A car rental company rents cars for $50 a day. If they rent 10 cars for a week, what is their total revenue? | def solve() -> int:
daily_rental_price = 50
number_of_cars = 10
days_rented = 7
total_revenue = daily_rental_price*number_of_cars*days_rented
result = total_revenue
return result
|
A farmer has 28 chickens and goats in total. The number of chicken is thrice that of the goats. How many chickens does the farmer have? | def solve() -> int:
x = 1
y = 3*x
result = y
return result
|
If it takes a car 2 hours to travel 120 miles, how fast is the car going in miles per hour? | def solve() -> int:
distance = 120
time = 2
speed = distance / time
result = speed
return result
|
9. Jason had 583 books and his friend gave him another 27 books as a gift. How many books does Jason have in total? | def solve() -> int:
books = 583
gift = 27
result = books+gift
return result
|
affron earns $8.50 for each hour that she works. She pays 15% for taxes and fees. After working 32 hours, Saffron receives her paycheck. How much, in dollars, does she have left after paying the taxes and fees? | def solve() -> int:
money_earned = 8.5 * 32
taxes_fees = money_earned * 0.15
money_left = money_earned - taxes_fees
result = money_left
return result
|
Liam walks his dog for 3 miles twice a week. How many miles does he walk in a month? | def solve() -> int:
miles_per_walk = 3
walks_per_week = 2
total_miles_per_week = miles_per_walk * walks_per_week
weeks_per_month = 4
total_miles_per_month = total_miles_per_week * weeks_per_month
result = total_miles_per_month
return result
|
A rectangular field is 30 feet wider than it is long. If the diagonal of the field is 100 feet, find the length and width of the field. | def solve() -> int:
from math import sqrt
diagonal = 100
width_length_diff = 30
width_squared = (diagonal ** 2) / (2 + (2 * sqrt(2)))
width = sqrt(width_squared)
length = width - width_length_diff
result = (length, width)
return result
|
Possible questions and programs are: - Laura has 15 stickers. She gave 25% of them to her friend. Her brother took another 20% of them. How many more of these stickers does Laura have than her brother? | def solve() -> int:
percent_given = 0.25
stickers_given = percent_given * 15
stickers_left = 15 - stickers_given
percent_taken = 0.20
stickers_taken = percent_taken * stickers_left
stickers_brother = stickers_taken
difference = stickers_left - stickers_brother
... |
A basketball team won 75% of their games in a season. If they played a total of 40 games, how many games did they win? | def solve() -> int:
total_games = 40
win_percentage = 0.75
num_wins = total_games*win_percentage
result = num_wins
return result
|
Lawrence is planning on donating a certain portion of his paycheck the upcoming month. He earns $1000. If he plans on donating 20% of his paycheck to charity, how much is he donating in dollars? | def solve() -> int:
salary = 1000
donation_percentage = 20
amount_donated = (donation_percentage / 100) * salary
result = amount_donated
return result
|
Marcus swims 1 mile each day. He swims 800 meters at a leisurely pace and 200 meters at a fast pace. On Wednesdays, he swims 4 times as far as the other days. Assuming a 7-day week, how many meters does Marcus swim per week? | def solve() -> int:
meters_per_mile = 1609.34
leisurely_distance = 800
fast_distance = 200
wednesday_multiplier = 4
daily_distance = leisurely_distance + fast_distance
weekly_distance = daily_distance * 6 + daily_distance * wednesday_multiplier
result = weekly_distance * meters_per... |
On Sunday, Mike bought 10 kilograms of rice. The next day, he bought three times the amount of kilograms he bought on Sunday. On Wednesday, he purchased one-quarter of the amount of kilograms he bought on Tuesday. On Thursday, he had to return one-third of the kilograms he bought on Wednesday because they were bad. How... | def solve() -> int:
sunday = 10
monday = 3 * sunday
wednesday = monday / 4
thursday = wednesday - (wednesday / 3)
result = thursday
return result
|
The total cost of a shirt and a jacket is $80. The jacket costs $30 more than the shirt. How much does the shirt cost? | def solve() -> int:
total_cost = 80
jacket_cost = (total_cost + 30) / 2
shirt_cost = total_cost - jacket_cost
result = shirt_cost
return result
|
9. A school has 36 students in one class and 54 in another. How many students are in total in the two classes? | def solve() -> int:
class_1 = 36
class_2 = 54
total_students = class_1 + class_2
result = total_students
return result
|
Max has 10 marbles. He loses 3 marbles while playing with his friends. Then, he finds 7 more marbles on the street. How many marbles does Max have now? | def solve() -> int:
marbles = 10
marbles -= 3
marbles += 7
result = marbles
return result
|
Student: A train is traveling at a constant speed of 80 miles per hour. If it travels for 2.5 hours, how far will it have traveled? | def solve() -> int:
speed = 80
time = 2.5
distance = speed * time
result = distance
return result
|
There are three books on a shelf. The first book is 350 pages long, the second book is 500 pages long and the third book is 800 pages long. What is the average page length of the three books? | def solve() -> int:
book1 = 350
book2 = 500
book3 = 800
total_pages = book1 + book2 + book3
average_page_length = total_pages / 3
result = average_page_length
return result
|
In a box of 60 pencils, 25 of them are yellow and the rest are blue. What percentage of the pencils are blue? | def solve() -> int:
total_pencils = 60
yellow_pencils = 25
blue_pencils = total_pencils - yellow_pencils
percentage_blue = (blue_pencils / total_pencils) * 100
result = percentage_blue
return result
|
2. Bob earns 2200$ each month working part-time. He has to pay 35 percent on his income taxes and put 10 percent to a saving account. How much money does Bob take home? | def solve() -> int:
salary = 2200
tax = salary * 0.35
savings = salary * 0.10
result = salary - tax - savings
return result
|
Mike has been working as a cook for 22 years. 9 years ago, Jack had three times as much experience as Mike. If Sarah started working as a cook when Jack had 18 years of experience, what is the combined experience of Mike, Jack, and Sarah? | def solve() -> int:
mike_experience = 22
jack_experience_9_years_ago = (3/1)*(mike_experience-9)
jack_experience = jack_experience_9_years_ago + 9
sarah_experience = jack_experience + 18
combined_experience = mike_experience + jack_experience + sarah_experience
result = combined_experi... |
A pool has a volume of 5000 gallons of water. There are 7 buckets that each hold 3 gallons of water. How many buckets are needed to completely empty the pool? | def solve() -> int:
pool_volume = 5000
bucket_size = 3
buckets_needed = pool_volume / bucket_size
result = buckets_needed
return result
|
Jane buys a chocolate bar and breaks it into 16 pieces. She eats 5 of them and her friend takes 3/8 of what's left. How many pieces does Jane's friend take? | def solve() -> int:
total_pieces = 16
jane_eats = 5
pieces_left = total_pieces - jane_eats
friend_fraction = 3/8
friend_takes = friend_fraction * pieces_left
result = friend_takes
return result
|
Student: Noah had 4.75 pints of juice. CJ had 4.25 pints more than 6 pints of juice. How many fewer pints of juice did Noah have than CJ? | def solve() -> int:
noah_juice = 4.75
cj_juice = 6 + 4.25
difference = cj_juice - noah_juice
result = difference
return result
|
Sophie runs every day. On the first day, she runs 2 miles. Every subsequent day, she runs nine times the distance she ran the previous day. On what day does she run more than 36 times further than she did on the first day? | def solve() -> int:
day = 1
distance = 2
while distance <= 36:
distance = distance * 9
day += 1
result = day
return result
|
Student: Alex has three times as much money as Brian. Brian has twice as much money as Cindy. If their total money is $111, how much money does Alex have? | def solve() -> int:
alex = 0
brian = 0
cindy = 0
total = 111
brian = total / (3 + 2 + 1)
alex = 3 * brian
cindy = 2 * brian
result = alex
return result
|
A book has 759 pages. If Amy reads 25 pages a day, how many days will it take for her to finish the book? | def solve() -> int:
num_pages = 759
pages_per_day = 25
num_days = num_pages / pages_per_day
result = num_days
return result
|
Naomi can solve 12 math problems in 8 minutes. If she has to solve 24 problems, how long will it take her to finish? | def solve() -> int:
problems_per_minute = 12/8
time_per_problem = 1/problems_per_minute
time_to_solve_24_problems = time_per_problem * 24
result = time_to_solve_24_problems
return result
|
Sarah had $20 and her friend had $11. They went to a café where they ordered a coffee for $3.50 each and a muffin for $2.75. They also got 2 bottles of water for $1.75 each. The tax came to $2.50. How much change should they have received in total? | def solve() -> int:
sarah_money = 20
friend_money = 11
coffee_price = 3.50
muffin_price = 2.75
water_price = 1.75
num_coffees = 2
num_muffins = 2
num_waters = 2
tax = 2.50
total_cost = (coffee_price * num_coffees) + (muffin_price * num_muffins) + (water_price * num_waters) +... |
A scientist is conducting an experiment and needs to prepare 7 samples. If it takes 8 minutes to prepare one sample, how long does it take to prepare each sample? | def solve() -> int:
samples = 7
time_per_sample = 8
total_time = samples * time_per_sample
result = total_time
return result
|
A jar contains 40 candy pieces. If you want to distribute them evenly between 8 children, how many candies will each child get? | def solve() -> int:
candies = 40
children = 8
candies_per_child = candies / children
result = candies_per_child
return result
|
Anthony got 75% of the questions in a 60-question exam correct. How many questions did he answer correctly? | def solve() -> int:
total_questions = 60
percentage_correct = 0.75
number_correct = total_questions * percentage_correct
result = number_correct
return result
|
Miguel's dad makes him a peanut butter and honey sandwich for lunch on Tuesdays and Thursdays. There are 28 weeks in a school year, and Miguel has missed 3 Tuesdays and 2 Thursdays. How many peanut butter and honey sandwiches did he eat during the school year? | def solve() -> int:
weeks_in_school_year = 28
missed_tuesdays = 3
missed_thursdays = 2
total_tuesdays = weeks_in_school_year * 2
total_thursdays = weeks_in_school_year * 2
sandwiches_eaten = (total_tuesdays - missed_tuesdays) + (total_thursdays - missed_thursdays)
result = san... |
A book contains 344 pages. If John read 123 pages and Daniel read 89 pages, how many pages are left? | def solve() -> int:
total_pages = 344
john_pages = 123
daniel_pages = 89
left_pages = total_pages - john_pages - daniel_pages
result = left_pages
return result
|
Terry wants to spend $45 every day on food. If he wants to spend an amount of money over the course of a week, how much money should he set aside? | def solve() -> int:
daily_amount = 45
number_of_days = 7
total_amount = daily_amount * number_of_days
result = total_amount
return result
|
If Lily has 12 cookies and eats a third of them, how many cookies does she have left? | def solve() -> int:
cookies_lily = 12
result = cookies_lily - (cookies_lily/3)
return result
|
Rachel and Tom went to a gym. Rachel's membership fee is $60 and Tom's membership fee is $75. They were given a discount of 18% on their total bill. Calculate their total bill after the discount. | def solve() -> int:
rachel_membership_fee = 60
tom_membership_fee = 75
total_bill = rachel_membership_fee + tom_membership_fee
discount = total_bill * 0.18
total_bill_after_discount = total_bill - discount
result = total_bill_after_discount
return result
|
A cylindrical container has a radius of 7 cm and height of 14 cm, what is the volume of the container in cm^3? | def solve() -> int:
from math import pi
radius = 7
height = 14
volume = pi * radius**2 * height
result = volume
return result
|
A store has a promotion where you get a $5 gift card for every $50 spent. If you spend $100, how many gift cards do you get and what is the total cost after the gift cards? | def solve() -> int:
total_price = 100
gift_card_value = 5
gift_card_threshold = 50
num_gift_cards = total_price // gift_card_threshold
total_gift_card_value = num_gift_cards * gift_card_value
final_price = total_price - total_gift_card_value
result = final_price, num_gift_cards
return re... |
If Lily worked for 4 hours and earned $48, how much would she have to earn working 10 hours to have $100 in total? | def solve() -> int:
hours_worked = 4
earnings = 48
total_earnings = 100
hourly_rate = earnings / hours_worked
additional_hours = 10 - hours_worked
additional_earnings = additional_hours * hourly_rate
total_earnings_required = total_earnings - earnings
additional_earnings_requir... |
A rectangular prism has dimensions 4 cm by 6 cm by 8 cm. What is the volume of the prism? | def solve() -> int:
length = 4
width = 6
height = 8
volume = length*width*height
result = volume
return result
|
Nick wants to fill up his swimming pool with water. The pool requires 3500 gallons of water to be full. If he has a hose that fills up 50 gallons of water in 1 minute, how long will it take him to fill the pool? | def solve() -> int:
pool_capacity = 3500
fill_rate = 50
fill_time = pool_capacity / fill_rate
result = fill_time
return result
|
Jared made a birdhouse that required 60 screws for every 30 pieces of wood. He used 300 screws and 240 pieces of wood. If a pack of screws has 12 screws and costs $1.50, how much did Jared spend on screws? | def solve() -> int:
screws_per_wood = 60/30
total_screws = 300
total_wood = 240
used_screws = screws_per_wood * total_wood
remaining_screws = total_screws - used_screws
pack_screws = 12
pack_cost = 1.5
total_cost = (remaining_screws/pack_screws) * pack_cost
result = total_cost
re... |
The perimeter of a rectangle is 24 and its length is 8. What is its width? | def solve() -> int:
perimeter = 24
length = 8
width = (perimeter - 2 * length) / 2
result = width
return result
|
-There are 32 flowers in a vase. One-half of them are roses and the rest are tulips. How many tulips are there in the vase? | def solve() -> int:
from fractions import Fraction
total = 32
rose_fraction = Fraction(1, 2)
rose_number = total * rose_fraction
tulip_number = total - rose_number
result = tulip_number
return result
|
Student: There are 19 students in a classroom. Nicky has 4 times as many pencils as Mei. How many pencils do they have in total? | def solve() -> int:
students = 19
nicky_pencils = 4
mei_pencils = 1
total_pencils = nicky_pencils * mei_pencils + mei_pencils
result = total_pencils
return result
|
If a race has two runners, and runner 1 finished the race in 28 minutes and runner 2 finished the race in 32 minutes, what was the difference in their finishing times, in minutes? | def solve() -> int:
time1 = 28
time2 = 32
difference = abs(time1-time2)
result = difference
return result
|
Dave and Gail want to replace a light bulb, but neither has a ladder. Dave can reach a height of 8 ft using a stool while Gail can reach a height of 6 ft with a step stool. What is the maximum height they can reach together? | def solve() -> int:
dave_height = 8
gail_height = 6
result = max(dave_height, gail_height)
return result
|
arah went to the store and bought a dozen cupcakes. She ate 3 cupcakes and gave 2 to her friend. How many cupcakes does she have left? | def solve() -> int:
num_cupcakes = 12
num_cupcakes -= 3
num_cupcakes -= 2
result = num_cupcakes
return result
|
am and Adee have 114 cups together. However, Sam has 30 less cups than Adee. How many cups does Sam have? | def solve() -> int:
a = 114
b = 30
result = a - b
return result
|
Emma, Ethan and Ella all grow flowers. Emma grows 18 flowers. Ethan grows 7 less than four times as many flowers as Emma. Ella grows 9 more than a third of as many flowers as Ethan. How many flowers does Ella grow? | def solve() -> int:
e = 18
et = 4 * e - 7
el = et // 3 + 9
result = el
return result
|
In a group project, four members contributed equally. Susan contributed twice as much as Alex. Alex contributed 10 pages more than Adam, and Adam contributed half as much as Mary. If Mary contributed 80 pages in the project, how many pages were contributed by all four members? | def solve() -> int:
mary = 80
adam = mary / 2
alex = adam + 10
susan = 2 * alex
total = mary + adam + alex + susan
result = total
return result
|
Jack exercises at the gym for 1 hour every day for a month. After two weeks, he decides to add 30 minutes to his exercise routine. How many hours did Jack exercise during the first three weeks? | def solve() -> int:
days_in_three_weeks = 21
hours_per_day = 1
extra_minutes = 30
total_hours_first_two_weeks = 14 * hours_per_day
total_hours_last_week = (days_in_three_weeks - 14) * (hours_per_day + extra_minutes/60)
total_hours_first_three_weeks = total_hours_first_two_weeks + total... |
In a recent survey, 6 out of every 10 participants said they prefer chocolate ice cream. If 35 people participated in the survey, how many people said they prefer chocolate ice cream? | def solve() -> int:
total_participants = 35
percentage_favoring_chocolate = (6/10) * 100
people_favoring_chocolate = total_participants * (percentage_favoring_chocolate/100)
result = people_favoring_chocolate
return result
|
Liam wants to save as much money as possible this year. He saves $190 in the first 4 months of the year. In January, he saves $5 every day. The rest of the money was saved in February. If in February he saved an equal amount of money each week, how much money did Liam save each week in February? | def solve() -> int:
jan_savings = 5 * 31
feb_savings = 190 - jan_savings
num_weeks = (28 - 4) // 7
weekly_savings = feb_savings / num_weeks
result = weekly_savings
return result
|
Student: Miss Johnson teaches math in four levels of classes in her school. The number of students in her first-level math class is double the number of her fourth-level math class, and the number of student in her third-level math class is five times that of her second-level math class. If Miss Johnson's fourth-level ... | def solve() -> int:
fourth_level_class = 25
first_level_class = 2 * fourth_level_class
second_level_class = fourth_level_class / 5
third_level_class = 5 * second_level_class
total_math_students = first_level_class + second_level_class + third_level_class + fourth_level_class
result = total_math_... |
If the price of a shirt is $30 and it is on sale for 10% off, what is the sale price of the shirt? | def solve() -> int:
original_price = 30
sale_percentage = 0.10
sale_price = original_price * (1 - sale_percentage)
result = sale_price
return result
|
Emma is making paper cranes for a project. She has 500 sheets of origami paper, each with a side length of 15 centimeters. Each crane requires one sheet of paper and 12 folds. How many cranes can she make? How much paper will she have left over? How many folds will she have done? | def solve() -> int:
paper = 500
paper_side = 15
crane_paper = 1
crane_folds = 12
cranes = min(paper//crane_paper, paper_side//crane_paper)
paper_left = paper - crane_paper*cranes
folds = cranes * crane_folds
result = (cranes, paper_left, folds)
return result
|
A train leaves the station at 2:00 pm and arrives at its destination at 6:45 pm. How long was the train ride in minutes? | def solve() -> int:
start_time = 2 * 60
end_time = (6 * 60) + 45
ride_length = end_time - start_time
result = ride_length
return result
|
The length of a purple ship is seventeen times the length of a magenta plane. The length of the magenta plane is also 6.5 times longer than the length of an aqua rocket. If the purple ship and aqua rocket are sitting next to each other, what length of the aqua rocket may the purple ship driver see if the purple ship is... | def solve() -> int:
purple_ship_length = 130
magenta_plane_length = purple_ship_length / 17
aqua_rocket_length = magenta_plane_length / 6.5
result = aqua_rocket_length
return result
|
A group of 20 students took a math test and the average score was 75. If the highest score was 95 and the lowest score was 55, what was the range of the scores? | def solve() -> int:
highest = 95
lowest = 55
average = 75
range = highest - lowest
result = range
return result
|
David and Michael start running from the same starting point. David runs at a steady pace of 7 miles per hour, while Michael runs 2 miles every 3 minutes. If the race is 10 miles long, how many seconds later will Michael finish the race? | def solve() -> int:
david_speed = 7
michael_speed = 2 * 60 / 3
race_distance = 10
david_time = race_distance / david_speed
michael_time = race_distance / michael_speed
time_difference = (michael_time - david_time) * 3600
result = time_difference
return result
|
A school is organizing a field trip to the zoo. The zoo charges $7 for each student and $10 for each teacher. The school has 120 students and 8 teachers. The school also has to pay $150 for the bus. How much does the school have to pay in total for the field trip? | def solve() -> int:
tickets = (7 * 120) + (10 * 8)
bus = 150
total = tickets + bus
result = total
return result
|
Student: Mia was planning a birthday party for her sister. She needed to buy 6 balloons that cost $0.50 each, 2 packs of candles that cost $1.25 per pack, and a cake that cost $12. If Mia had a coupon that gave her 10% off the total purchase, how much money did she pay? | def solve() -> int:
balloons = 6
balloon_price = 0.50
candles = 2
candle_price = 1.25
cake = 1
cake_price = 12
discount = 0.1
total_price = balloons * balloon_price + candles * candle_price + cake * cake_price
discounted_price = total_price * (1 - discount)
result = discounted_pr... |
In a class of thirty students, sixty percent are girls. If fifteen boys did not show up to school, what percentage of the students present are girls? | def solve() -> int:
girls_in_class = int(0.6 * 30)
boys_present = 30 - girls_in_class - 15
percentage_girls_present = (girls_in_class / (boys_present + girls_in_class)) * 100
result = percentage_girls_present
return result
|
Jackson, Levi and Liam are sharing a bag of chips. If Levi takes 10%, and Jackson and Liam are going to split the rest in a 1:3 ratio respectively, how many chips will Liam get? | def solve() -> int:
total_chips = 100
levi_share = total_chips * 0.1
remaining_chips = total_chips - levi_share
jackson_share = remaining_chips * 0.25
liam_share = remaining_chips * 0.75
result = liam_share
return result
|
3. There are 12 cats in a household. Five of these cats move away and three new cats move in. How many cats is left in the household? | def solve() -> int:
total_number_of_cats = 12
number_of_cats_moved_away = 5
number_of_new_cats = 3
total_number_of_cats = total_number_of_cats - number_of_cats_moved_away + number_of_new_cats
result = total_number_of_cats
return result
|
asha bought a sweater that cost 30% more than the one that Tara bought. Tara paid $60 for her sweater. How much did Sasha pay for her sweater, if she also had to pay a 10% sales tax on the original price? | def solve() -> int:
sasha_original = 1.3 * 60
sasha_tax = 0.1 * sasha_original
sasha_total = sasha_original + sasha_tax
result = sasha_total
return result
|
Alex wants to buy a baseball glove that costs $12. Along with that, he also wants to buy a ball that costs $5 less than the glove. If his friend asks him to get him 3 of each item he's buying, how much will they be charged in total? | def solve() -> int:
glove_cost = 12
ball_cost = glove_cost - 5
quantity = 3
total_cost = (glove_cost + ball_cost) * quantity
result = total_cost
return result
|
James has $1,230 in his bank account and he wants to withdraw $300. How much money does he have left? | def solve() -> int:
money_left = 1230 - 300
result = money_left
return result
|
8. Tia spent twice as much as Saurel on the same item. If Tia spent $36, how much did Saurel spend? | def solve() -> int:
tia_val = 36
saurel_val = tia_val/2
result = saurel_val
return result
|
A group of 50 people go out to eat at a restaurant. The bill comes to $800. If each person contributes an equal amount towards the bill, how much does each person pay? | def solve() -> int:
num_people = 50
total_cost = 800
cost_per_person = total_cost / num_people
result = cost_per_person
return result
|
A car dealership has 180 vehicles. 40 percent of the vehicles are trucks and 50 percent of the trucks have four-wheel drive. How many trucks have four-wheel drive at the dealership? | def solve() -> int:
total_vehicles = 180
trucks = total_vehicles * 0.4
trucks_with_four_wheel_drive = trucks * 0.5
result = trucks_with_four_wheel_drive
result
return result
|
Oliver buys 2 notebooks, one with 50 pages and the other with 80 pages. He puts smiley face stickers on each page of the 50 pages notebook, and star-shaped stickers on each page of the 80 pages notebook. In the 50 pages notebook, each page gets 2 stickers. In the 80 pages notebook, each page gets 3 stickers. What is th... | def solve() -> int:
notebook1_pages = 50
notebook2_pages = 80
notebook1_stickers = notebook1_pages * 2
notebook2_stickers = notebook2_pages * 3
total_stickers = notebook1_stickers + notebook2_stickers
result = total_stickers
return result
|
A salmon farm produces 10,000 fish by the end of 2017. Every year, 15% of the fish population reproduces. What is the approximate number of fish by the end of 2020? | def solve() -> int:
fish_population = 10000
reproduction_rate = 0.15
fish_reproducing = fish_population * reproduction_rate
fish_added = fish_reproducing * 3
fish_total = fish_population + fish_added
result = fish_total
return result
|
A car travels at a speed of 60 miles per hour for 3 hours. If it then travels at a speed of 40 miles per hour for 4 hours, what is the total distance traveled? | def solve() -> int:
distance1 = 60*3
distance2 = 40*4
total_distance = distance1 + distance2
result = f'<<<{total_distance}>>>'
result = total_distance
return result
|
An online course consists of 12 modules, each with 6 quizzes to complete. If each quiz has an average of 20 questions, how many questions are there in total to complete the course? | def solve() -> int:
number_of_modules = 12
quizzes_per_module = 6
questions_per_quiz = 20
total_questions = number_of_modules * quizzes_per_module * questions_per_quiz
result = total_questions
return result
|
If a bag of candy has 25 pieces and there are 4 children, how many pieces will each child receive? | def solve() -> int:
candy_per_child = 25 // 4
result = candy_per_child
return result
|
If a rectangle has a length of 6cm and a width of 4cm, what is its area in cm squared? | def solve() -> int:
length = 6
width = 4
area = length * width
result = area
return result
|
Student: Rachel needs to buy 48 cookies for her party. If she buy a box that contains 12 cookies in it, how many boxes she needs to buy? | def solve() -> int:
cookies = 48
box = 12
boxes = cookies // box
result = boxes
return result
|
Student: A painting is 20 inches wide and 30 inches tall. The frame adds an additional 4 inches to the height and 4 inches to the width. What is the perimeter of the frame? | def solve() -> int:
width = 20
height = 30
frame_width = 4
frame_height = 4
perimeter = (width + frame_width) * 2 + (height + frame_height) * 2
result = perimeter
return result
|
There are 24 cupcakes and 8 children at a party. If each child gets the same number of cupcakes, how many does each child get? | def solve() -> int:
num_cupcakes = 24
num_children = 8
result = num_cupcakes // num_children
return result
|
Molly wants to buy a new dress that costs $60. She has saved up $25. Her parents will give her an extra $15 if she gets an A on her math test. She receives a weekly allowance of $8. How much more money does Molly need to buy the dress? | def solve() -> int:
total_cost = 60
savings = 25
extra_income = 0
weekly_allowance = 8
remaining_cost = total_cost - savings - extra_income
weeks_needed = remaining_cost // weekly_allowance
remaining_funds = remaining_cost - (weeks_needed * weekly_allowance)
if weeks_needed == ... |
A math test has 30 questions and each correct answer is worth 4 points. Each incorrect answer is worth -1 points, and unanswered questions are worth 0 points. If a student answers 20 questions correctly, 5 questions incorrectly, and leaves 5 unanswered, what is their total score? | def solve() -> int:
num_questions = 30
score_per_correct = 4
score_per_incorrect = -1
num_correct = 20
num_incorrect = 5
num_unanswered = 5
total_score = (num_correct * score_per_correct) + (num_incorrect * score_per_incorrect)
result = total_score
return result
|
Ben planted 12 rows of sunflowers in his garden, with 15 sunflowers in each row. He wants to make bouquets of sunflowers to sell at the farmers market. Each bouquet needs 9 sunflowers. How many bouquets can he make with his harvest? | def solve() -> int:
total_sunflowers = 12 * 15
number_of_bouquets = total_sunflowers // 9
result = number_of_bouquets
return result
|
Tom read for 20 minutes every night for three weeks. Lily read for 15 minutes every night for five weeks. How many minutes did they read in total? | def solve() -> int:
tom_minutes = 20 * 7 * 3
lily_minutes = 15 * 7 * 5
total_minutes = tom_minutes + lily_minutes
result = total_minutes
return result
|
Michelle is twice as old as her sister. Her sister is now 38 years old. How old is Michelle? | def solve() -> int:
SisterAge = 38
MichelleAge = 2*SisterAge
result = MichelleAge
return result
|
If Max has three times more books than Zoe, and Zoe has 4 books, how many books does Max have? | def solve() -> int:
zoe_books = 4
max_books = zoe_books*3
result = max_books
return result
|
-Kim bought four notebooks at $2 each, two pencils at $0.50 each, and one eraser. She paid with a $10 bill and got $1.75 back. How much does an eraser cost? | def solve() -> int:
notebook_price = 2
pencil_price = 0.50
notebook_cost = notebook_price * 4
pencil_cost = pencil_price * 2
total_cost = notebook_cost + pencil_cost
eraser_cost = 10 - 1.75 - total_cost
result = eraser_cost
return result
|
If a bike originally costs $500 and is discounted by 20%, how much is the final cost after tax (10%) is applied? | def solve() -> int:
cost = 500 - (500 * 0.2)
tax = cost * 0.1
final_cost = cost + tax
result = final_cost
return result
|
The sum of three consecutive even numbers is 102. What are the numbers? | def solve() -> int:
total = 102
middle_num = total / 3
first_num = middle_num - 2
third_num = middle_num + 2
result = first_num, middle_num, third_num
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.