Datasets:
question stringlengths 11 2.89k | code stringlengths 20 7.71k |
|---|---|
Mark has 10 crayons. He gives 2 crayons to his younger sister and loses another 4 while he was playing. How many crayons does Mark have left? | def solve() -> int:
crayonsTotal = 10
crayonsGiven = 2
crayonsLost = 4
crayonsLeft = crayonsTotal - crayonsGiven - crayonsLost
result = crayonsLeft
return result
|
A group of tourists went on a hike. They hiked for 5 hours and took a 30 minute break. If they hiked in total for 10 miles, what was their average speed in miles/hour? | def solve() -> int:
total_time = 5.5 #hours
total_distance_travelled = 10 #miles
average_speed = total_distance_travelled / total_time
result = average_speed
return result
|
A ball is kicked and its height above the ground is given by the equation h(t) = -16t^2 + 32t + 15. What is the maximum height of the ball above the ground? | def solve() -> int:
a = -16
b = 32
c = 15
t_max = -b / (2 * a)
h_max = -a * (t_max**2) + b * t_max + c
result = h_max
return result
|
Kim has 4 times the number of crayons than 8 less than the number of markers she has. If she has 60 crayons, how many markers does she have? | def solve() -> int:
number_crayons = 60
number_markers = number_crayons // 4 + 8
result = number_markers
return result
|
Student: In preparation for her party, Sarah buys 10 trays of food and 8 cases of beverages. Each tray costs $50 and each case of beverages costs $20. What is the total cost of the trays and beverages? | def solve() -> int:
trays = 10
tray_cost = 50
cases = 8
case_cost = 20
tray_total = trays * tray_cost
case_total = cases * case_cost
total_cost = tray_total + case_total
result = total_cost
return result
|
Student: Allen's father can mow the lawn in 2 hours. Allen's mother can mow the lawn in 4 hours. If they both work together to mow the lawn, how much time will it take? | def solve() -> int:
father_time = 2
mother_time = 4
total_time = father_time + mother_time
result = total_time
return result
|
Kyle bought a block of chocolate that was divided into 5 equal pieces. He gave each friend a piece of chocolate. How much chocolate did each friend get? | def solve() -> int:
total_chocolate = 5
chocolate_per_friend = total_chocolate // 5
result = chocolate_per_friend
return result
|
Julie bought a dress that cost $50, but there was a 25% discount. How much did Julie pay? | def solve() -> int:
original_price = 50
discount_percent = 25
discount_amount = original_price * (discount_percent/100)
final_price = original_price - discount_amount
result = final_price
return result
|
Michael reads 25 pages of a novel on weekdays and 35 pages on weekends. If it takes him 5 weeks to finish the novel, how many pages does it have? | def solve() -> int:
weekdays_pages = 25
weekends_pages = 35
weeks = 5
total_weekdays_pages = weekdays_pages * 5
total_weekends_pages = weekends_pages * 2
total_pages = total_weekdays_pages + total_weekends_pages
result = total_pages
return result
|
Possible answer: There are eight fairies in the Magic Meadow. Each fairy has a wand that can create three rainbows with one wave. The eight fairies are going to fly in a circle around the meadow, a distance of 12 kilometers. If each fairy waves their wand once every 4 meters, how many rainbows appear because of this fl... | def solve() -> int:
waves = 12 * 1000 / 4 #12 kilometers = 12000 meters, divide by 4 meters per wave
rainbows = waves * 3 #3 rainbows per wave
result = rainbows * 8 #8 fairies
return result
|
Student: A car travels at a speed of 60 mph for 2 hours, then at 40 mph for the next 4 hours. What would the average speed of the car be for the entire journey? | def solve() -> int:
speed1 = 60 # mph
time1 = 2 # hours
speed2 = 40 # mph
time2 = 4 # hours
distance1 = speed1 * time1 # miles
distance2 = speed2 * time2 # miles
total_distance = distance1 + distance2 # miles
total_time = time1 + time2 # hours
average_speed = total_distance / total_t... |
A toy store has 150 stuffed animals. If 40 of them are pandas, 30 of them are lions, 20 of them are giraffes, and 10 of them are unicorns, how many stuffed animals are left in the store? | def solve() -> int:
total_animals = 150
pandas = 40
lions = 30
giraffes = 20
unicorns = 10
other_animals = total_animals - pandas - lions - giraffes - unicorns
animals_left = other_animals
result = animals_left
return result
|
Nicole needs to earn $900 in 3 weeks for a trip. If she earns $10 per hour at her job, how many hours will she need to work to save the $900? | def solve() -> int:
income_goal = 900
wage_per_hour = 10
result = income_goal / wage_per_hour
return result
|
A farmer planted vegetable seeds in three fields. In the first, he planted 25 rows of carrots with 10 carrot seeds each row. In the second, he planted 30 rows of cucumbers with 7 cucumber seeds each row. In the third, he planted 15 rows of peppers with 12 pepper seeds each row. What is the total number of seeds he plan... | def solve() -> int:
carrots = 25 * 10
cucumbers = 30 * 7
peppers = 15 * 12
total = carrots + cucumbers + peppers
result = total
return result
|
Student: A store has 120 neckties. If they sell half of them, how many neckties do they have left? | def solve() -> int:
initial_neckties = 120
sold_neckties = initial_neckties / 2
remaining_neckties = initial_neckties - sold_neckties
result = remaining_neckties
return result
|
A man takes a loan of $5000 with a 2% annual interest rate. If he repays $2000 after two years, how much does he still owe? | def solve() -> int:
loan_amount = 5000
interest_rate = 0.02
time_period = 2
interest_amount = loan_amount * interest_rate * time_period
amount_paid = 2000
amount_owed = loan_amount + interest_amount - amount_paid
result = amount_owed
return result
|
Linda and Maria went to the gym to take classes. They both spent $30. Linda took two yoga classes for $12 each and a meditation class for $6. Maria took a pilates class for $15 and a dance class for $10. How much did Maria's dance class cost? | def solve() -> int:
linda_yoga_classes = 2
linda_yoga_class_cost = 12
linda_meditation_class_cost = 6
maria_pilates_class_cost = 15
maria_dance_class_cost = 10
linda_total_cost = (linda_yoga_classes * linda_yoga_class_cost) + linda_meditation_class_cost
maria_total_cost = maria_pilates_... |
At the Red Barn Bakery, they bake 3468 loaves of bread, 2124 muffins, and 1786 cookies. How many more muffins and cookies are baked than loaves of bread? | def solve() -> int:
muffins_and_cookies = 2124 + 1786 # add the number of muffins and cookies
bread = 3468 # assign the number of loaves of bread to a variable
difference = muffins_and_cookies - bread # subtract the number of loaves of bread from the number of muffins and cookies
result = difference # a... |
Jacob takes 4 meals per day. His breakfast consists of 200 calories, while his lunch is 40% more calories than that. His dinner has 2.5 times more calories than lunch. He also drinks 6 glasses of water, each containing 10 calories. How many calories does he consume in one day? | def solve() -> int:
breakfast_calories = 200
lunch_calories = breakfast_calories * 1.4
dinner_calories = lunch_calories * 2.5
water_calories = 6 * 10
total_calories = (breakfast_calories + lunch_calories + dinner_calories + water_calories) * 4
result = total_calories
return result
|
If Chloe can knit a scarf in 2 hours and a hat in 3 hours, how long will it take her to knit 5 scarves and 4 hats? | def solve() -> int:
scarf_time = 2
hat_time = 3
num_scarves = 5
num_hats = 4
total_time = (scarf_time * num_scarves) + (hat_time * num_hats)
result = total_time
return result
|
Every morning, Sarah jogs around a circular track that is 0.4 miles long, while her sister, Liz, runs at three times her speed. During their workout, how many times does Liz circle the track? | def solve() -> int:
track_length = 0.4 # miles
sarah_speed = 1 # unit: times the track length per hour
liz_speed = 3 * sarah_speed # unit: times the track length per hour
liz_circles = liz_speed / sarah_speed
result = liz_circles
return result
|
Student: A 500-sheet pack of printer paper costs $8. A 1000-sheet pack costs $15. What's the minimum number of sheets of paper you will need to use each month so that the 1000-sheet pack is strictly cheaper per sheet of paper? | def solve() -> int:
pack_500 = 500
cost_500 = 8
pack_1000 = 1000
cost_1000 = 15
cost_per_sheet_500 = cost_500 / pack_500
cost_per_sheet_1000 = cost_1000 / pack_1000
min_sheets = int((cost_500 - cost_1000) / (cost_per_sheet_1000 - cost_per_sheet_500))
result = min_sheets
return resul... |
A yardstick is 36 inches long. How many centimeters long is it? | def solve() -> int:
inches_in_yardstick = 36
cm_in_inch = 2.54
yardsick_in_cm = inches_in_yardstick * cm_in_inch
result = yardsick_in_cm
return result
|
A delivery man wants to divide his route equally between the two assistants, Bob and Jane. Driving to a location takes Bob 8 minutes, carrying heavy loads takes Jane 12 minutes. If Bob drives to 15 locations, and Jane carries 10 heavy loads, how many loads should Bob carry to divide the workload? | def solve() -> int:
bob_drive_time = 8
jane_carry_time = 12
bob_locations = 15
jane_loads = 10
total_bob_time = bob_drive_time * bob_locations
total_jane_time = jane_carry_time * jane_loads
bob_loads = total_bob_time / jane_carry_time
result = bob_loads
return result
|
In four years, Emma will be 21 years old. Emma's grandmother is currently six times as old as Emma is today. In one year, Emma's mother will be the same age as Emma's grandmother is today. Currently, how many years old is Emma's mother? | def solve() -> int:
emma_age_in_4_years = 21
emma_age_today = emma_age_in_4_years - 4
grandmother_age_today = 6 * emma_age_today
mother_age_in_1_year = grandmother_age_today - 1
mother_age_today = mother_age_in_1_year - 1
result = mother_age_today
return result
|
Benjamin picked some oranges at the fruit stand that cost $0.75 each. When Benjamin reached the cash register, he realized he was $9 short of the total price, so his friend Mason funded the rest. If Benjamin had $18 on him, how many oranges did he buy? | def solve() -> int:
cost_per_orange = 0.75
amount_short = 9
benjamin_money = 18
total_cost = benjamin_money + amount_short
number_of_oranges = total_cost / cost_per_orange
result = number_of_oranges
return result
|
A square garden has an area of 64 square feet. What is the length of one of its sides? | def solve() -> int:
area = 64
side_length = area ** 0.5
result = side_length
return result
|
A store has 500 pens and pencils combined. If the number of pens is twice the number of pencils, how many pens are there? | def solve() -> int:
total = 500
pens = (2/3) * total
result = pens
return result
|
Rachel and her friends are going to a concert. The tickets cost $25 each. She is buying 5 tickets. Her friend will pay her back for 2 tickets. How much money does Rachel need to bring with her to the concert? | def solve() -> int:
ticket_cost = 25
number_of_tickets = 5
total_cost = ticket_cost * number_of_tickets
amount_due = total_cost - (ticket_cost * 2)
result = amount_due
return result
|
Sophia is baking cupcakes for a fundraiser. Each batch makes twice as many cupcakes as a regular recipe. She needs to make 24 cupcakes, how many batches does she need to make? | def solve() -> int:
regular_recipe = 12
desired_cupcakes = 24
batch_size = regular_recipe * 2
batches_needed = desired_cupcakes // batch_size
result = batches_needed
return result
|
A wildlife team is monitoring the number of fish in a pond. There are 6 turtles, 11 frogs, and 14 salamanders in the pond. How many animals are in the pond in total? | def solve() -> int:
number_turtle = 6
number_frog = 11
number_salamander = 14
result = number_turtle + number_frog + number_salamander
return result
|
Janine went to the movies and paid $9 for each ticket. She bought 4 tickets and paid with a $50 bill. How much change did she get? | def solve() -> int:
ticket_cost = 9
num_tickets = 4
bill = 50
total_cost = ticket_cost * num_tickets
change = bill - total_cost
result = change
return result
|
At a party, there are 530 balloons. Two-thirds are red and the rest are blue. How many blue balloons are there? | def solve() -> int:
red = 530 * 2/3 # calculate two-thirds in total balloons
blue = 530 - red # calculate total blue balloons
result = blue # assign result
return result
|
If the cost of taking a cab is $1.5 per mile, and Jamila needs to travel 100 miles every week, how much will she spend on cabs every month? | def solve() -> int:
cost_per_mile = 1.5
miles_per_week = 100
weeks_per_month = 4
total_cost = cost_per_mile * miles_per_week * weeks_per_month
result = total_cost
return result
|
Andrew is trying to buy a new car for $18,000 with a 5% interest rate for a 5 year loan. How much will Andrew pay in total? | def solve() -> int:
loan_years = 5
car_price = 18000
interest_rate = 5
total_interest = car_price * interest_rate / 100 * loan_years
total_amount = car_price + total_interest
result = total_amount
return result
|
Possible questions and programs are: In a class of 40 students, 25% are boys and the rest are girls. How many girls are there in the class? | def solve() -> int:
total = 40
boy_p = 0.25
boys = total * boy_p
girls = total - boys
result = girls
return result
|
Lisa baked 24 cookies and shared them equally with her 4 friends. She ate 2 cookies herself and gave 4 cookies to her neighbor. How many cookies does Lisa have left? | def solve() -> int:
cookies_per_friend = 24 / 4
cookies_given = cookies_per_friend * 4 + 4
lisa_cookies = 24 - 2 - cookies_given
result = lisa_cookies
return result
|
Sam is a cyclist. He can ride his bike for 7 hours a day. Over 4 days, he only used the maximum riding time once. On two days he rode his bike for only 2 hours a day and half the maximum time for the remaining two days. How many hours did Sam ride his bike during those 4 days? | def solve() -> int:
max_time = 7
min_time = 2
half_max_time = max_time / 2
total_time = max_time + (2 * min_time) + (2 * half_max_time)
result = total_time
return result
|
Jake is saving up money to buy a new laptop which costs $1500. He has already saved $500 and wants to save another 2/5th of that amount. If he earns $10 per hour, how many hours does he need to work to save up enough for the laptop? | def solve() -> int:
total_cost = 1500
saved_amount = 500
additional_saved_amount = 2/5 * saved_amount
hourly_wage = 10
total_saved = saved_amount + additional_saved_amount
remaining_amount = total_cost - total_saved
hours_needed = remaining_amount / hourly_wage
result... |
Alex has $80 in his bank account. He deposited $25 and then withdrew $10. How much money does Alex have now in his account? | def solve() -> int:
money = 80
money += 25
money -= 10
result = money
return result
|
Leon and Lisa went to the bakery and bought some muffins and cupcakes. Leon bought 3 muffins and 5 cupcakes, and Lisa bought 6 muffins and 3 cupcakes. If each muffin costs $1.25 and each cupcake costs $0.75, how much more did Leon spend than Lisa? | def solve() -> int:
leon_spent = 3*1.25 + 5*0.75
lisa_spent = 6*1.25 + 3*0.75
difference = leon_spent - lisa_spent
result = difference
return result
|
Student: A library lent twice as many DVDs as it did CDs at $3 each. If the cost of a CD was $2, and the library lent 120 CDs, calculate the total amount of money the library received from the DVDs and CDs. | def solve() -> int:
cd_cost = 2
dvd_cost = 3
cd_num = 120
dvd_num = cd_num * 2
cd_total = cd_cost * cd_num
dvd_total = dvd_cost * dvd_num
result = cd_total + dvd_total
return result
|
It takes 1 year for a rose bush to produce flowers. If Emily planted a bush when she was 15 years old and is now 18 years old, how old would she be when she picks a rose from her bush for the first time? | def solve() -> int:
years_to_flower = 1
age_planted = 15
current_age = 18
age_at_flower = age_planted + years_to_flower
age_when_picks = current_age - age_at_flower
result = age_when_picks
return result
|
David is starting a pizza delivery business. He plans to deliver 25 pizzas each day. Each pizza costs $15 to make. He needs to buy 100 pounds of cheese for $200. How much will he spend to make pizzas in a week? | def solve() -> int:
pizzas_per_day = 25
cost_per_pizza = 15
cheese_pounds = 100
cheese_cost = 200
pizzas_per_week = pizzas_per_day * 7
total_pizza_cost = pizzas_per_week * cost_per_pizza
total_cheese_cost = cheese_cost
total_cost = total_pizza_cost + total_cheese_cost
... |
Student: Mark baked a cake for his mom. He cut the cake into 16 pieces, but his mom only wanted to take 5 slices home. How many pieces of cake did Mark have left? | def solve() -> int:
pieces_of_cake = 16
slices_taken = 5
pieces_left = pieces_of_cake - slices_taken
result = pieces_left
return result
|
Ella goes to the movies with her friends. She pays $8 for a ticket, $4 for popcorn and $3 for a drink. She also gets a $2 off coupon that she can use on any item. She decides to use it on the popcorn. She pays with a $20 bill. How much change does she receive? | def solve() -> int:
popcorn_price = 4 - 2
total_cost = 8 + popcorn_price + 3
change = 20 - total_cost
result = change
return result
|
A train travels at a speed of 40 kilometers per hour, and a car travels at 60 kilometers per hour. If they start at the same time from two cities that are 300 kilometers apart, how far from the first city will they meet each other? | def solve() -> int:
train_speed = 40
car_speed = 60
total_distance = 300
time = total_distance / (train_speed + car_speed)
distance_from_first_city = train_speed * time
result = f'Distance from first city: {distance_from_first_city} km'
result = distance_from_first_city
return result
|
David purchased 10 tubs of yogurt. Each tub contains 25 yogurts and 1/5 of the yogurts are honey flavored. How many honey flavored yogurts did David purchase in total? | def solve() -> int:
num_tubs = 10
num_in_each_tub = 25
proportion_honey = 1/5
result = num_tubs * num_in_each_tub * proportion_honey
return result
|
How many degrees Celsius is 32 degrees Kelvin? | def solve() -> int:
kelvin = 32
celsius = kelvin - 273.15
result = celsius
return result
|
William is driving from Los Angeles to San Francisco, a distance of 400 miles. If he drives at an average speed of 60 miles per hour, how long will the trip take him? | def solve() -> int:
distance = 400
speed = 60
time = distance/speed
result = time
return result
|
A jar contains 25 red balls and 35 green balls. What is the probability of selecting a green ball randomly from the jar? | def solve() -> int:
total_balls = 60
green_balls = 35
probability = green_balls/total_balls
result = probability
return result
|
Student: The perimeter of a rectangle is 50 cm and its length is twice its width. What are the dimensions of the rectangle? | def solve() -> int:
perimeter = 50
ratio = 2
width = perimeter / 2 / (ratio + 1)
length = width * ratio
result = (length, width)
return result
|
arah can bake 2 cakes in 30 minutes. If she wants to bake 6 cakes, how long will it take her assuming she has enough ingredients to make all 6 cakes at once? | def solve() -> int:
cakes_baked_in_time = 2
minutes_to_bake = 30
cakes_to_bake = 6
time_to_bake = (cakes_to_bake/cakes_baked_in_time) * minutes_to_bake
result = time_to_bake
return result
|
A survey of 250 people showed that 80 liked chocolate ice-cream and 140 liked strawberry ice-cream. What percentage of people liked either chocolate or strawberry ice-cream or both? | def solve() -> int:
total_people = 250
choco = 80
straw = 140
both = choco+straw-total_people
percent = (both/total_people)*100
result = percent
return result
|
Mia and Zoe baked 3 dozen cupcakes. They gave away 2/3 of the cupcakes to their friends and family. Then they divided the remaining cupcakes equally among themselves. How many cupcakes did each of them get? | def solve() -> int:
dozen = 12
baked = 3
given_away_ratio = 2/3
total_cupcakes = baked * dozen
given_away = total_cupcakes * given_away_ratio
left = total_cupcakes - given_away
each_got = left / 2
result = each_got
return result
|
If the cost of a book is $45 and the sales tax is 8%, how much will the buyer end up paying? | def solve() -> int:
total_cost = 45 + (0.08*45)
result = total_cost
return result
|
There are 25 students in a classroom and the teacher wants to divide them into groups of 5. How many groups can the teacher make? | def solve() -> int:
num_students = 25
group_size = 5
num_groups = num_students // group_size
result = num_groups
return result
|
A triangle has sides of length 5cm, 6cm and 7cm. Is the triangle a right-angled triangle? | def solve() -> int:
side1 = 5
side2 = 6
side3 = 7
if side1**2 + side2**2 == side3**2 or side1**2 + side3**2 == side2**2 or side2**2 + side3**2 == side1**2:
result = "Yes"
else:
result = "No"
return result
|
A bookshop buys 24 books from a publisher on every visit. After 5 visits, the bookshop has 99 books in total. How many books did they have initially? | def solve() -> int:
books_bought = 24 * 5
initial_books = 99 - books_bought
result = initial_books
return result
|
A store is having a sale where all items are 25% off. If a shirt normally costs $30, what is the sale price of the shirt? | def solve() -> int:
sale_percent = 0.25
discount = 30 * sale_percent
sale_price = 30 - discount
result = sale_price
return result
|
There are 5 red tulips and 2 yellow tulips in a vase. If 3 tulips are randomly selected from the vase, what is the probability that at least 2 of them will be red? | def solve() -> int:
total_tulips = 7
red_tulips = 5
yellow_tulips = 2
prob_two_red = (red_tulips/total_tulips) * ((red_tulips-1)/(total_tulips-1)) * (yellow_tulips/(total_tulips-2)) + (red_tulips/total_tulips) * (yellow_tulips/(total_tulips-1)) * ((red_tulips-1)/(total_tulips-2)) + (yellow_tulips/total_... |
Ben sells lemonade for $. 25 per cup. He spends $12 on ingredients and cups. He sells 80 cups in one day. How much profit does he make? | def solve() -> int:
revenue = 80 * 0.25
cost = 12
profit = revenue - cost
result = profit
return result
|
Student: A toy car is traveling 25 feet every minute. How many feet will it travel in 2 and 1/2 minutes? | def solve() -> int:
time = 2.5 # minutes
distance_per_minute = 25 # feet
total_distance = time * distance_per_minute
result = total_distance
return result
|
A store has a sale where everything is 30% off. If a customer buys two shirts that cost $20 each, how much do they pay in total? | def solve() -> int:
shirt_price = 20
num_shirts = 2
discount_percentage = 0.3
total_price = shirt_price * num_shirts
discounted_price = total_price * (1 - discount_percentage)
result = discounted_price
return result
|
Michael invests $500 in stocks. After 5 years, he has quintuple the amount of money he started with. If his stocks earn him 10% interest per year, how much money does Michael earn in interest annually? | def solve() -> int:
principal = 500
years = 5
interest_rate = 0.10
amount_after_5_years = principal * (1 + interest_rate) ** years
interest_earned_annually = amount_after_5_years - principal
result = interest_earned_annually
return result
|
Sophia aims to exceed the number of minutes she exercised daily last week. She exercised a total of 300 minutes last week. On Sunday this week, she exercised 12 minutes. On Monday, she exercised 5 minutes. On Tuesday, she took a break. On Wednesday, she exercised 20 minutes. On Thursday, she exercised 15 minutes. On Fr... | def solve() -> int:
total_exercise_last_week = 300
exercise_this_week = 12 + 5 + 0 + 20 + 15 + 9
exercise_needed_on_saturday = total_exercise_last_week - exercise_this_week + 1
result = exercise_needed_on_saturday
return result
|
Five classmates, Emma, Frank, Gina, Harry, and Iris, are buying some books and pens from a bookstore. One book is worth $12.50, and a pack of 10 pens is worth $1.75. Emma buys two books and two packs of pens. Frank buys one book and four packs of pens. Gina buys three books and one pack of pens. Harry buys four books a... | def solve() -> int:
book_cost = 12.5
pen_cost = 1.75
emma_cost = 2 * book_cost + 2 * pen_cost
frank_cost = 1 * book_cost + 4 * pen_cost
gina_cost = 3 * book_cost + 1 * pen_cost
harry_cost = 4 * book_cost + 3 * pen_cost
iris_cost = 0 * book_cost + 5 * pen_cost
total_cost = emma_cost + fra... |
There are 8 candies in a carton. How many candies will be in 5 cartons? | def solve() -> int:
candies_in_carton = 8
number_of_cartons = 5
total_no_of_candies = candies_in_carton * number_of_cartons
result = total_no_of_candies
return result
|
A gym is offering a 6-month membership for $300.00. Another gym is offering the same membership for $45.00 a month and only has a 3-month membership option. How much more expensive, per month, in cents, is the deal at the second gym? | def solve() -> int:
price_6_months = 300.00
price_per_month = 45.00
num_months = 3
total_cost_second_gym = price_per_month * num_months
total_cost_first_gym = price_6_months
difference_per_month = (total_cost_second_gym - total_cost_first_gym) / num_months
difference_per_month_in_c... |
A person weighs 150 pounds. If they go uphill at a rate of 3 miles per hour for 2 hours, what is the total weight that they moved uphill? | def solve() -> int:
weight = 150
rate = 3
dist = rate * 2
total_weight = weight
result = total_weight
return result
|
If a product costs $150 after a 25% discount, what was the original price of the product? | def solve() -> int:
discount_percent = 25/100
original_price = 150/(1 - discount_percent)
result = f'<<<{original_price}>>>'
result = original_price
return result
|
At Diana's local children's home, there are twice as many girls as boys. If Diana wants to buy winter clothes for all the children and knows there are 30 boys, how many girls are there? | def solve() -> int:
boy_count = 30
girl_count = 2 * boy_count
total_children = boy_count + girl_count
result = int(girl_count)
return result
|
A student scored 70%, 75%, and 80% in three different subjects. If the weightage of each subject is 30%, 40%, and 30% respectively, what is the student's overall percentage? | def solve() -> int:
overall_percentage = 0.3*70 + 0.4*75 + 0.3*80
result = overall_percentage
return result
|
If a store has 50 items priced between $10 and $20, with an average price of $15, what is the total cost of all the items? | def solve() -> int:
num_items = 50
min_price = 10
max_price = 20
avg_price = 15
total_cost = num_items * avg_price
result = total_cost
return result
|
Leo is planning a trip to the zoo with his family. The zoo charges $15 for adults, $10 for children, and $5 for seniors. Leo's family consists of 2 adults, 3 children, and 1 senior. They also need to pay $10 for parking. How much will the trip cost them in total? | def solve() -> int:
adults_cost = 2 * 15
children_cost = 3 * 10
seniors_cost = 1 * 5
tickets_cost = adults_cost + children_cost + seniors_cost
total_cost = tickets_cost + 10
result = total_cost
return result
|
``` A recipe calls for 2 cups of sugar to make 10 cookies. If you want to make 25 cookies, how many cups of sugar will you need? | def solve() -> int:
cookies_needed = 25
sugar_for_10_cookies = 2
sugar_for_1_cookie = sugar_for_10_cookies / 10
sugar_needed = sugar_for_1_cookie * cookies_needed
result = sugar_needed
return result
|
Student: A coffee shop offers a loyalty program where after buying 10 drinks, the customer gets a free drink. If a customer buys 12 drinks, how many drinks have they paid for? | def solve() -> int:
num_drinks_bought = 12
num_free_drinks = 0
num_free_drinks = num_drinks_bought // 10
num_paid_drinks = num_drinks_bought - num_free_drinks
result = num_paid_drinks
return result
|
A group of 20 children went mini-golfing. Each child got to play 18 holes which cost $3 per hole. They were also offered a deal where they could play unlimited holes for $20 per person. 5 children chose that option. How much did the mini-golf course make in total? | def solve() -> int:
num_children = 20
normal_game_cost = 3
unlimited_game_cost = 20
num_unlimited_players = 5
num_normal_holes = num_children * 18
num_unlimited_holes = num_unlimited_players * 18
total_normal_games_sales = num_normal_holes * normal_game_cost
total_unlimited_games_sales =... |
Student: John has two jobs, in his first job he earned $20 per hour and in his second job he earned twice than the first. If John worked for 10 hours, how much money did he earn? | def solve() -> int:
hourly_rate_1 = 20 # The hourly rate of the first job
hourly_rate_2 = 2 * hourly_rate_1 # The hourly rate of the second job
hours_worked = 10 # The total hours worked
earnings_1 = hourly_rate_1 * hours_worked # The earnings from the first job
earnings_2 = hourly_rate_2 * hours_wo... |
A restaurant can serve 40 customers (each ordering 2 dishes) in 1 hour. If each customer ordered 3 dishes instead, how long would it take the restaurant to serve 30 customers? | def solve() -> int:
customers_per_hour = 40
dishes_per_customer = 2
total_dishes_per_hour = customers_per_hour * dishes_per_customer
new_dishes_per_customer = 3
new_customers = 30
new_total_dishes_per_hour = new_customers * new_dishes_per_customer
time_taken = 1 / (total_dishes_per... |
A bag contains 20 red balls and 30 blue balls. What is the probability of picking a red ball, given that a blue ball was picked on the first draw and not replaced? | def solve() -> int:
prob_red = 20/49
prob_blue = 30/49
prob_blue_then_red = prob_red * prob_blue/(1 - prob_blue)
result = prob_blue_then_red
return result
|
Paul has 5 times as much money as Lisa. Together they have $320. How much money does Paul have? | def solve() -> int:
total_money = 320
lisa_money = total_money / 6
paul_money = 5 * lisa_money
result = f'<<<{paul_money}>>>'
result = paul_money
return result
|
Mike needs to complete 64 credits in order to qualify for a particular job. If each class is 8 credits, how many courses does Mike need to complete? | def solve() -> int:
credits_needed = 64
credits_per_class = 8
courses_needed = credits_needed / credits_per_class
result = courses_needed
return result
|
If 15 workers can complete a project in 10 days, how many more workers are needed to complete the project in 5 days? | def solve() -> int:
workers = 15
days = 10
workers_needed = (workers*days)/5 - workers
result = workers_needed
return result
|
Jessie is planning on building a treehouse in her backyard. She has to pay $250 for necessary permits. She hires a carpenter for $120 a day for 3 days, along with a builder for $150 a day for 4 days. The inspector gives her a discount of 40% on checking the quality of the work. Determine the total cost of the project. | def solve() -> int:
permits = 250
carpenter = 120 * 3
builder = 150 * 4
total_cost = permits + carpenter + builder
discount = 0.4 * total_cost
total_cost_after_discount = total_cost - discount
result = total_cost_after_discount
return result
|
A book originally cost $60. After a 20% discount, what is the new price of the book? | def solve() -> int:
original_price = 60
discount_percent = 0.2
discount_amount = original_price * discount_percent
new_price = original_price - discount_amount
result = new_price
return result
|
Andrew is decorating his living room and created a budget of $100 for the task. He bought 5 picture frames at $7 each, a lamp for $25, and a rug. If he has $30 remaining in his budget, how much did he spend on the rug? | def solve() -> int:
num_picture_frames = 5
cost_per_picture_frame = 7
lamp_cost = 25
total_budget = 100
total_spent = (num_picture_frames * cost_per_picture_frame) + lamp_cost
remaining_budget = total_budget - total_spent
rug_cost = remaining_budget - 30
result = rug_cost
... |
At the electronics store, Emily bought 3 items: a laptop, a printer, and a set of headphones. The printer cost twice as much as the headphones, but only 1/4 the price of the laptop. If the printer cost $160, how much did the headphones cost? John bought 3 bags of candies and 5 boxes of chocolates. If each bag of candy ... | def solve() -> int:
printer_cost = 160
headphones_cost = 0
laptop_cost = 0
laptop_cost = printer_cost * 4
printer_headphones_ratio = 1/2
printer_cost = 160
headphones_cost = printer_cost / printer_headphones_ratio / 2
candy_cost = 3 * 4
chocolate_cost = 5 * 2 * 4
total_... |
Lucy, Max, and Ethan had to meet for a group project at 4:00 p.m. Lucy arrived at 4:20 p.m. Max arrived 15 minutes after Lucy, and Ethan was twice as late as Max. How late, in minutes, was Ethan to the project meeting? | def solve() -> int:
lucy_arrival = 20
max_arrival = lucy_arrival + 15
ethan_arrival = max_arrival * 2
result = ethan_arrival
return result
|
Emily is a teacher. She grades 10 exams per week. To save time, she grades all 10 exams at once. It takes her 45 minutes to set up her grading materials. Then she grades each exam for 15 minutes. She takes another 30 minutes to check and record the grades. Each exam takes 5 minutes to provide feedback for. How long doe... | def solve() -> int:
num_exams = 10
setup_time = 45
grading_time = 15 * num_exams
check_time = 30
feedback_time = 5 * num_exams
total_time = setup_time + grading_time + check_time + feedback_time
time_per_exam = total_time / num_exams
result = time_per_exam
return ... |
Alex bought some books. He gave a book to his brother. He then gave away 40% of the remaining books. If Alex has 10 books left, how many books did he buy in the first place? | def solve() -> int:
books_bought = 0
books_given_away = 0
books_left = 10
books_given_away = books_bought - 1
books_left_after_giving_away = books_given_away * 0.6
books_left_after_giving_away += 1 # Alex still has one book left
books_bought = books_left_after_giving_away / 0.... |
The cost of transporting 400 bottles of wine, each weighing 2 kgs, is $8000. What's the cost of transporting two times as many bottles of beer, each weighing 4/5 times as many kgs as the wine bottles? | def solve() -> int:
wine_bottles = 400
wine_weight = 2
wine_cost = 8000
beer_bottles = 2 * wine_bottles
beer_weight = (4/5) * wine_weight
beer_cost = (beer_bottles * beer_weight * wine_cost) / (wine_bottles * wine_weight)
result = beer_cost
return result
|
Oliver has 150 toy cars. He gave 2/5 of his cars to his brother, Liam, and then gave 2/7 of the remaining cars to his friend, Ethan. How many toy cars did Ethan get? | def solve() -> int:
cars = 150
brother_cars = (2/5) * cars
remaining_cars = cars - brother_cars
ethan_cars = (2/7) * remaining_cars
result = ethan_cars
return result
|
A candidate for student council raised $500 for their campaign. 25% of this amount came from their parents and 50% of the remaining amount came from their friends. How much did the candidate save for their campaign? | def solve() -> int:
amount_raised = 500
parents_contribution = amount_raised * 0.25
remaining_amount = amount_raised - parents_contribution
friends_contribution = remaining_amount * 0.50
candidate_savings = remaining_amount - friends_contribution
result = candidate_savings
return result... |
Student: Rachel has walked 3.75 km, she wants to walk a total of 8 km. What percentage of the total distance has she covered? | def solve() -> int:
total_distance = 8 # the total distance Rachel wants to walk in km
walked_distance = 3.75 # the distance Rachel has walked so far in km
percentage = (walked_distance / total_distance) * 100
result = percentage
return result
|
There were 9 ducks and 7 chickens on the farm. How many animals were there in total? | def solve() -> int:
ducks = 9
chickens = 7
total_animals = ducks + chickens
result = total_animals
return result
|
Denise has 35% more money than Mallory, and Mallory has 3 times as much money as Maria. If Denise has $63, how much money does Maria have? | def solve() -> int:
money_denise = 63
money_mallory = money_denise / 1.35
money_maria = money_mallory / 3
result = money_maria
return result
|
In a flock of birds, there are 5 times as many birds than there are ducks. If there are 30 ducks, how many birds and ducks are in the flock? | def solve() -> int:
birds_total = 0
ducks_total = 0
ducks_initial = 30
birds_total = ducks_initial * 5
ducks_total = ducks_initial
result = birds_total, ducks_total
return result
|
Kevin and Alice are playing a board game that involves rolling two dice and moving the corresponding number of spaces on the board. Kevin is 30 spaces away from the finish line, and Alice is 24 spaces away. Kevin rolls a 4 and a 5, and Alice rolls a 6 and a 3. How many spaces away from the finish line are they now? | def solve() -> int:
result = (21, 15) # We use a tuple to store the two numbers
return result
|
9. Carlitos needs to purchase supplies for a school project. He needs 2 cans of paint that each cost $10, 2 boxes of markers that each cost $5, and 5 pieces of paper that cost $1 each. If he receives 20% off his total order, how much money does he need to bring? | def solve() -> int:
total_cost = 2*10 + 2*5 + 5*1
discount = 0.2 * total_cost
total_cost_after_discount = total_cost - discount
result = total_cost_after_discount
return result
|
End of preview. Expand in Data Studio
tinysms qa 12m
Every training row of TinyGSM/TinyGSM as a math question
, preprocessed exactly as the model is trained on them:
the docstring is stripped and the entry point is renamed to solve.
Nothing else is stored -- no answers, no token counts, no rendered prompt, no ids.
train: 11,838,003 rows in 60 parquet file(s)test: the 1,919 questions of the project's test split -- questions only, no reference programs and no gold values, so the split is safe to publish- the last 4,000 rows of shard 0 -- the validation and test rows of
src/data.py-- are not intrain - 4,106 further rows whose question text is one of the val/test questions were dropped as well (
DROP_EVAL_COPIES = True): TinyGSM ships the same question with several reference programs, so those rows are copies of the evaluation questions - the reference programs are not executed, unlike the smaller
tinysms_train_qaandtinysms_train_qa_1msets: no answers are shipped, so a reference that fails to return a number is not filtered out - built shard by shard: every parquet file is uploaded to the Hub and deleted before the next one is written, so the whole set never exists on disk at once
Loading
from datasets import load_dataset
ds = load_dataset("SlavaYus/tinysms_qa_12m") # DatasetDict(train=..., test=...)
print(ds["train"][0], len(ds["test"]))
Schema
train:
question: string
code: string
test:
question: string
- Downloads last month
- 871