question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Student: A recipe calls for 2/3 cup of sugar for every 4 cups of flour. If you have 12 cups of flour, how much sugar do you need? | def solve() -> int:
flour = 12
sugar_per_4_cups_flour = 2/3
sugar = flour/4 * sugar_per_4_cups_flour
result = sugar
return result
|
Anna has a collection of stickers. She has 12 sheets of stickers, each with 25 stickers on it. She gives 3 sheets to her friend Maya and 2 sheets to her brother Leo. She also sticks 15 stickers on her notebook. How many stickers does she have left? | def solve() -> int:
total_stickers = 12 * 25
stickers_to_maya = 3 * 25
stickers_to_leo = 2 * 25
stickers_used = stickers_to_maya + stickers_to_leo + 15
stickers_left = total_stickers - stickers_used
result = stickers_left
return result
|
Kaitlyn makes 2 batches of cookies, with 24 cookies in each batch. Her family eats all of one batch and 90% of the second batch. If each cookie has 100 calories and she burns 2,000 calories in a workout, how many cookies can she eat after the workout? | def solve() -> int:
batch_size = 24
num_batches = 2
total_cookies = batch_size * num_batches
eaten_cookies = batch_size + (0.9 * batch_size)
remaining_cookies = total_cookies - eaten_cookies
calories_per_cookie = 100
total_calories = total_cookies * calories_per_cookie
cal... |
Landon bought a training ball for $10, two nets for $5 each, and a pair of socks for $4. What was the total cost? | def solve() -> int:
ball_cost = 10
net_cost = 5
sock_cost = 4
total_cost = ball_cost + (net_cost * 2) + sock_cost
result = total_cost
return result
|
Student: A cyclist can cover a certain distance in 1 hour 15 minutes. If he rides at a speed of 16 km/hr, how far will he travel in 30 minutes? | def solve() -> int:
speed = 16
time = 30
time_in_hours = time / 60
distance = speed * time_in_hours
result = distance
return result
|
Evan has 3 dogs. One dog weighs 40 pounds, another weighs 35 pounds, and the last dog weighs 50 pounds. How many pounds do all of his dogs weigh? | def solve() -> int:
dog1 = 40
dog2 = 35
dog3 = 50
total_weight = dog1 + dog2 + dog3
result = total_weight
return result
|
Michael buys a new smartphone plan. The first 5GB data cost $40 and for every additional 5GB data he pays half as much. If he shares the plan with his family, what is his total cost? | def solve() -> int:
data_limit = 5
additional_data = 10
cost_per_5GB = 40
additional_cost_per_5GB = cost_per_5GB / 2
total_data = data_limit + additional_data
additional_data_cost = (additional_data // 5) * additional_cost_per_5GB
total_cost = cost_per_5GB + additional_data_cost
... |
A road trip is 120 miles. If the car travels at an average speed of 60 mph, how long will it take to reach the destination? | def solve() -> int:
trip_distance = 120
average_speed = 60
time_to_destination = trip_distance / average_speed
result = time_to_destination
return result
|
Kevin is saving money for a trip. He has 100 dollars in his piggy bank and he adds 20 dollars every week. His trip costs 500 dollars and he gets a 10% discount if he pays in advance. How many weeks does he need to save money before he can pay for the trip in advance? | def solve() -> int:
from sympy import Symbol, solveset
x = Symbol('x')
x = solveset(100 + 20 * x - 450, x).inf
result = x
return result
|
Ms. Chen bakes a cake for 40 minutes and lets it cool for 20 minutes. She then cuts the cake into 12 equal slices and eats one slice every day. How much time (in hours) will she have spent on baking, cooling, and eating the cake after 10 days? | def solve() -> int:
minutes_per_bake = 40
minutes_per_cool = 20
minutes_per_eat = 5
hours_per_bake = minutes_per_bake / 60
hours_per_cool = minutes_per_cool / 60
hours_per_eat = minutes_per_eat / 60
hours_per_slice = hours_per_bake + hours_per_cool + hours_per_eat
slices_per_d... |
If a marathon is 26.2 miles long, how many kilometers is that (1 mile = 1.609 kilometers)? | def solve() -> int:
mile_to_km_conversion = 1.609
marathon_miles = 26.2
marathon_kms = marathon_miles * mile_to_km_conversion
result = marathon_kms
return result
|
Ben is counting trees in a park. He knows that of the trees that he sees, 25% will be oak trees and 75% will be another type of tree. On day one, he counts 50 trees. On day two, he counts twice as many. How many oak trees did he count over those two days? | def solve() -> int:
day_one_trees = 50
day_two_trees = 2 * day_one_trees
oak_trees_day_one = 0.25 * day_one_trees
oak_trees_day_two = 0.25 * day_two_trees
total_oak_trees = oak_trees_day_one + oak_trees_day_two
result = total_oak_trees
return result
|
A triangle with a base of 5 meters and a height of 4 meters is cut in half. What is the area of each new triangle? | def solve() -> int:
base = 5
height = 4
original_area = (1/2) * base * height
new_area = original_area / 2
result = new_area
return result
|
Aisha has $60 in her savings account. She withdraws $15 to buy a book and deposits $20 from her allowance. How much money does she have in her account now? | def solve() -> int:
savings = 60
withdraw = 15
deposit = 20
account = savings + deposit - withdraw
result = account
return result
|
-Question numbers should start from 1 A cake recipe requires 2/5 cup of sugar, 3/4 cup of flour, and 1/2 cup of milk. How much sugar is needed to make 3 cakes? | def solve() -> int:
sugar = 2/5 * 3
flour = 3/4 * 3
milk = 1/2 * 3
result = sugar
return result
|
A company sells a product at a profit of 20%. If the cost of production increases by 30%, by how much percentage should the selling price increase to maintain the same profit margin? | def solve() -> int:
profit_margin = 20
cost_increase = 30
new_profit_margin = (100 + profit_margin)/(100 + cost_increase) * 100 - 100
result = new_profit_margin
return result
|
Student: In a forest, there are twice as many wolves than bears and 7 fewer foxes than butterflies. The total number of animals are 18, and the number of deer is 3 times the amount of bears. What is the difference between the number of foxes and deer? | def solve() -> int:
wolves = 0
bears = 0
foxes = 0
butterflies = 0
deer = 0
wolves = (18 - bears - foxes - butterflies - deer) / 2
bears = deer / 3
foxes = butterflies - 7
butterflies = foxes + 7
deer = bears * 3
result = foxes - deer
return result
|
A pumpkin weighs 30 pounds, and each individual piece weighs 2 pounds. If Alex carves 3 pumpkins into pieces, how many individual pumpkin pieces did he make? | def solve() -> int:
total_pumpkin_weight = 30 * 3
individual_piece_weight = 2
number_of_pieces = total_pumpkin_weight / individual_piece_weight
result = number_of_pieces
return result
|
A carpenter bought a piece of wood that is 8 feet long. She cuts 2 feet off one end. She then cuts 3 pieces each that are 1.5 feet long. How much wood is left? | def solve() -> int:
num_pieces = 3
length_each = 1.5
length_left = 8 - 2 - num_pieces*length_each
result = length_left
return result
|
Mr. Johnson had 80 pencils. He kept 5/6 of it and gave the rest to his students. How many pencils did Mr. Johnson keep than his students? | def solve() -> int:
pencils = 80
kept = pencils * (5/6)
students = pencils - kept
difference = kept - students
result = difference
return result
|
Student: Olivia's son is 8 years older than Ava's son. Olivia's daughter is half the age of Ava's son. If Ava's son is 14 years old, how many years younger is Olivia's daughter than Olivia's son? | def solve() -> int:
son_Olivia = 0
son_Ava = 14
daughter_Olivia = 0
son_Olivia = son_Ava + 8
daughter_Olivia = son_Ava / 2
difference = son_Olivia - daughter_Olivia
result = difference
return result
|
There are 25 chairs in a room arranged in 5 rows and 5 columns. If the chairs in the first row are removed, how many chairs remain? | def solve() -> int:
rows = 5
columns = 5
chairs_in_first_row = columns
total_chairs = rows * columns
remaining_chairs = total_chairs - chairs_in_first_row
result = remaining_chairs
return result
|
John is building a deck and needs to buy 18 boards, 9 joists, and 16 screws. Each board costs $8, each joist costs $12, and each screw costs $0.50. How much will John spend on materials for his deck? | def solve() -> int:
boards = 18
joists = 9
screws = 16
board_cost = 8
joist_cost = 12
screw_cost = 0.5
total_board_cost = boards * board_cost
total_joist_cost = joists * joist_cost
total_screw_cost = screws * screw_cost
total_cost = total_board_cost + total_joist_c... |
Student: Mark is a painter. He takes 5 watercolor classes a week, 4 acrylic painting classes a week, and 2 oil painting classes a week. One watercolor class costs $12. One acrylic painting class costs $14, and one oil painting class costs $20. What is the total cost of Mark’s painting classes in one week? | def solve() -> int:
watercolor_classes = 5
acrylic_painting_classes = 4
oil_painting_classes = 2
watercolor_cost = 12
acrylic_painting_cost = 14
oil_painting_cost = 20
total_cost = watercolor_classes * watercolor_cost + acrylic_painting_classes * acrylic_painting_cost + oil_painting_classes ... |
Mark has 5 ribbons, Emma has 9 ribbons and Olivia has 4 ribbons. If they share the ribbons equally, how many ribbons will each of them get? | def solve() -> int:
total_ribbons = 5 + 9 + 4
ribbons_each = total_ribbons/3
result = ribbons_each
return result
|
A store has a sale where everything is 20% off. If a dress originally costs $50, what is the sale price? | def solve() -> int:
original_price = 50
discount_percent = 20
discount_amount = (original_price * discount_percent) / 100
sale_price = original_price - discount_amount
result = sale_price
return result
|
There are 75 people at a party and they are divided into 5 even groups. How many people are in each group? | def solve() -> int:
people = 75
people = people / 5
result = people
return result
|
If a recipe requires 5 cups of flour and 3 cups of sugar to make 24 cupcakes, how many cupcakes can be made with 10 cups of flour and 6 cups of sugar? | def solve() -> int:
flour_required = 5
sugar_required = 3
cupcakes_required = 24
flour_available = 10
sugar_available = 6
flour_ratio = flour_available / flour_required
sugar_ratio = sugar_available / sugar_required
cupcakes_possible = min(flour_ratio, sugar_ratio) * cupca... |
Bill goes grocery shopping each week during the summer and buys 3 apples that cost 75 cents each, 2 oranges that cost 50 cents each and 4 bananas that cost 25 cents each. How much money does Bill spend on groceries over 8 weeks? | def solve() -> int:
totalCost = 0
weekCounter = 1
while weekCounter <= 8:
totalCost = totalCost + (3 * 0.75) + (2 * 0.50) + (4 * 0.25)
weekCounter += 1
result = totalCost
return result
|
Maggie is an apple farmer. She needs to determine how many baskets she can make if she has 50 apple trees and each basket requires 10 apples. | def solve() -> int:
numAppleTrees = 50
numApplePerBasket = 10
totalApple = numAppleTrees * numApplePerBasket
result = totalApple // 10
return result
|
The construction company uses 400 cement bags every month. If they decide to increase their production by 20%, how many cement bags will they use in a year? | def solve() -> int:
bags_per_month = 400
increase_percentage = 20
bags_per_year = bags_per_month * 12
increase_amount = bags_per_month * (increase_percentage / 100)
bags_per_year_with_increase = bags_per_year + (increase_amount * 12)
result = bags_per_year_with_increase
return result
|
A triangle has a base of 10 cm and a height of 8 cm. What is the area of the triangle? | def solve() -> int:
base = 10
height = 8
area = base * height / 2
result = area
return result
|
Sarah reads three times as fast as Josh. If it takes Josh 40 minutes to read 20 pages, how long, in minutes, will it take Sarah to read 45 pages? | def solve() -> int:
josh_pages = 20
josh_time = 40
sarah_speed = 3 * josh_pages / josh_time
sarah_pages = 45
sarah_time = sarah_pages / sarah_speed
result = sarah_time
return result
|
Dylan had a group of toy cars containing 40 cars. He gave away 15, broke 3, found 6, and bought another 18. How many toy cars does Dylan have now? | def solve() -> int:
toy_cars = 40
given_away = 15
broken = 3
found = 6
bought = 18
remaining_cars = toy_cars - given_away - broken
remaining_cars += found
total_cars = remaining_cars + bought
result = total_cars
return result
|
Julian had a $66 and he bought four candy bars, each costing $1.50. How much money do they have left? | def solve() -> int:
cost = 1.50
num_candybar = 4
total_cost = cost*num_candybar
money = 66
result = money - total_cost
return result
|
There are 18 cookies in a jar. If John ate 3 and Priya took 2, how many more cookies are left in the jar? | def solve() -> int:
cookies_in_jar = 18
john = 3
priya = 2
leftover = cookies_in_jar - john - priya
result = leftover
return result
|
An airplane travels 3000 miles in 5 hours. What is the average speed of the airplane? | def solve() -> int:
distance = 3000
time = 5
speed = distance / time
result = speed
return result
|
Paul has saved $1400 to buy parts for a car. Each tire costs $75 and the other parts cost $390 altogether. How much money does he have left over to buy oil? | def solve() -> int:
result = 0
total_parts_cost = 75 * 4 + 390
if total_parts_cost > 1400:
result = 0
else:
result = 1400 - total_parts_cost
return result
|
Ethan went to a bulk candy store and got 36 chocolate-covered almonds. He then gets a scoop of trail mix, and the ratio of chocolate-covered almonds to trail mix is 1:6. Afterwards, he gets some M&Ms, which make up 20% of the candy in the bag. How many candies does Ethan have in total? | def solve() -> int:
chocolate_covered_almonds = 36
trail_mix = chocolate_covered_almonds * 6
mms = (chocolate_covered_almonds + trail_mix) * 0.2
total_candies = chocolate_covered_almonds + trail_mix + mms
result = total_candies
return result
|
A swimming pool has 500 cubic meters of water. If the length is twice the width and the depth is 5 meters, what are the dimensions of the pool? | def solve() -> int:
water_volume = 500
depth = 5
width = ((3*(water_volume/depth))/2)**(1/3)
length = 2 * width
result = (width, length)
return result
|
A box has 39 marbles in it. How many more marbles do you need to add to make it 57 marbles? | def solve() -> int:
total_marbles = 39
needed_marbles = 57
marbles_to_add = needed_marbles - total_marbles
result = marbles_to_add
return result
|
There are 365 days in a year. If a person walked 5000 steps each day, how many steps would they have taken in a year? | def solve() -> int:
days_in_year = 365
steps_per_day = 5000
total_steps = days_in_year * steps_per_day
result = total_steps
return result
|
Student: If Ketim has 33 coins, and he doubles the amount, how many coins does he have now? | def solve() -> int:
coins = 33
doubled_coins = coins * 2
result = doubled_coins
return result
|
Olivia plans to buy a $900 electric guitar or a cheaper classical guitar that costs one-third of the electric guitar. How much should Olivia spend if she chooses to buy both? | def solve() -> int:
electric_guitar = 900
classical_guitar = electric_guitar / 3
total_cost = electric_guitar + classical_guitar
result = total_cost
return result
|
Nia bought 3 pencils for $0.45 each and 4 pens at $0.50 each. How much money did she spend in total? | def solve() -> int:
pencils = 3 * 0.45
pens = 4 * 0.50
result = pencils + pens
return result
|
A recipe serves 6 people. If the recipe requires 500 grams of flour, how many grams of flour are needed to serve 12 people? | def solve() -> int:
people = 12
required_flour = (500/6) * people
result = required_flour
return result
|
William wants to become a journalist. He spent 3 years in college for a degree in communications. After that, he spent 2 years studying journalism. Finally, he spent an additional year as an intern at a news organization. How many years did William study to become a journalist? | def solve() -> int:
years_in_college = 3
years_studying_journalism = 2
years_as_intern = 1
total_years_studying = years_in_college + years_studying_journalism + years_as_intern
result = total_years_studying
return result
|
There are 40 students in a class. If the height of each student is 150 cm on average, what is the total height of all the students in meters? | def solve() -> int:
num_students = 40
height_cm = 150
total_height_cm = num_students * height_cm
total_height_m = total_height_cm / 100
result = round(total_height_m, 2)
return result
|
A rectangular garden has a length of 8 meters and a width of 5 meters. If a walkway that is 1 meter wide is constructed outside the garden, what is the area of the walkway? | def solve() -> int:
length = 8
width = 5
walkway_width = 1
garden_area = length * width
new_length = length + 2 * walkway_width
new_width = width + 2 * walkway_width
new_area = new_length * new_width
walkway_area = new_area - garden_area
result = walkway_area
return result
|
The Smith family went camping and stayed in a tent for 8 nights. They paid $224 for the whole trip. How much did they pay for each night? | def solve() -> int:
nights = 8
total_cost = 224
cost_per_night = total_cost/ nights
result = cost_per_night
return result
|
If the area of a rectangle is 104m2 and its length is 5m, what is its width? | def solve() -> int:
length = 5
width = 0
width = 104/5
result = width
return result
|
There are 24 students in a class and the teacher wants to divide them into four equal groups. How many students will be in each group? | def solve() -> int:
class_size = 24
number_of_groups = 4
students_per_group = class_size / number_of_groups
result = students_per_group
return result
|
A FedEx truck delivers 700 packages in 10 hours. If the truck is traveling at an average speed of 50 miles per hour, how many miles does the truck travel in 10 hours? | def solve() -> int:
average_speed = 50
total_hours = 10
total_distance = average_speed * total_hours
result = total_distance
return result
|
Student: A classroom has 25 students, and a bag full of 100 chocolates. If each student takes 3 chocolates, how many chocolates are left in the bag? | def solve() -> int:
students = 25
chocolates = 100
each_student_takes = 3
total_chocolates_taken = students * each_student_takes
chocolates_left = chocolates - total_chocolates_taken
result = chocolates_left
return result
|
Ryan is 6 years old and his brother is 3 times his age. What is the age difference between Ryan and his brother? | def solve() -> int:
Ryan = 6
brother = Ryan * 3
age_diff = brother - Ryan
result = age_diff
return result
|
A box contains 8 red balls and 11 blue balls. If a ball is randomly drawn from the box, what is the probability that it will be blue? | def solve() -> int:
total_balls = 8+11
blue_balls = 11
probability_blue = blue_balls/total_balls
result = probability_blue
return result
|
In Jack's collection, there are seventeen more yellow highlighters than orange highlighters and six times as many orange highlighters as markers. There are also four markers and two fewer green highlighters than markers. How many highlighters in all are there in Jack's collection? | def solve() -> int:
orange_highlighters = 6
yellow_highlighters = orange_highlighters + 17
markers = 4
green_highlighters = markers - 2
highlighters_total = orange_highlighters + yellow_highlighters + green_highlighters
result = highlighters_total
return result
|
Emma has 3 times as many marbles as Ethen, while Phillip has twice the number of marbles as Emma. If Ethen has 12 marbles, how many marbles does Phillip have? | def solve() -> int:
marbles_ethen = 12
marbles_emma = marbles_ethen * 3
marbles_phillip = marbles_emma * 2
result = marbles_phillip
return result
|
Lisa buys 5 apples for $1.25, twice that many oranges for $1.50, and three times as many bananas for $0.75. How much money did Lisa spend in total? | def solve() -> int:
apples = 5
apples_price = 1.25
oranges = 2 * apples
oranges_price = 1.50
bananas = 3 * oranges
bananas_price = 0.75
apples_cost = apples * apples_price
oranges_cost = oranges * oranges_price
bananas_cost = bananas * bananas_price
total_cost = apples_... |
Student: A loan of N500,000 attracts 8% simple interest per annum. How much interest will be paid after 4 years? | def solve() -> int:
principal = 500000
interest_rate = 0.08
time = 4
interest = principal * interest_rate * time
total_amount = principal + interest
result = interest
return result
|
A bus travels at 60km/hour. How many meters will it travel in 10 seconds? | def solve() -> int:
speed = 60/3.6
time = 10
distance = speed*time
result = distance
return result
|
Amy had 10 blue marbles and 8 red marbles. She traded some of her blue marbles for 4 yellow marbles. How many marbles does Amy have now? | def solve() -> int:
blue_marbles = 10
red_marbles = 8
yellow_marbles = 4
new_blue_marbles = blue_marbles - yellow_marbles
total_marbles = new_blue_marbles + red_marbles + yellow_marbles
result = total_marbles
return result
|
Anastasia and Brooke each have $1000 deposited in their bank accounts. Anastasia's account earns simple annual interest at the rate of 8.5%, while Brooke's account earns simple annual interest at the rate of 7.5%. In two years, how much more will Anastasia have in her account than Brooke? | def solve() -> int:
account1 = 1000
account2 = 1000
interest1 = 8.5/100
interest2 =7.5/100
for _ in range(2):
account1 += account1 * interest1
account2 += account2 * interest2
result = account1 - account2
return result
|
There are three consecutive integers whose sum is 84. Find the integers. | def solve() -> int:
sum_of_3_integers = 84
first_integer = (sum_of_3_integers - 3)//3
integers = [first_integer, first_integer + 1, first_integer + 2]
result = integers
return result
|
Student: Jane drove for 40 miles at a speed of 60 mph. If she stopped for a 30-minute break, and then continued to drive for another 70 miles at a speed of 70 mph, what was her average speed for the entire trip? | def solve() -> int:
distance1 = 40
speed1 = 60
time_break = 0.5
distance2 = 70
speed2 = 70
total_distance = distance1 + distance2
total_time = (distance1/speed1) + time_break + (distance2/speed2)
result = total_distance/total_time
return result
|
Sophia finished a drawing in 20 minutes, while her friend Ava took 40 minutes to complete hers. How many minutes faster did Sophia finish her drawing than Ava? | def solve() -> int:
sophia_time = 20
ava_time = 40
time_difference = ava_time - sophia_time
result = time_difference
return result
|
Possible questions and programs: Ben is trying to decide whether to go skiing on a snowy day. For every 4 inches of snow on the ground, his chances of falling increase 10%. If he falls, he has a 50% chance of getting injured. Otherwise, he'll have a fun time. If there are 12 inches of snow, what is the percentage chanc... | def solve() -> int:
snow_depth = 12
fall_chance = 0.1 * (snow_depth / 4)
injury_chance = 0.5 * fall_chance
result = injury_chance * 100
return result
|
Markus is buying ingredients for a salad. If he buys enough for 5 servings, it will cost him $7.50. There are 20 people at his party. How much will it cost for Markus to buy enough supplies for everyone? | def solve() -> int:
servings = 5
cost_per_serving = 7.50
total_people = 20
cost_for_everyone = (cost_per_serving / servings) * total_people
result = cost_for_everyone
return result
|
Tom is a musician. He records a song every week. He has been recording for 3 years and earns $1,000 per song. How much money has he made recording? | def solve() -> int:
years = 3
songs_per_week = 1
earnings_per_song = 1000
total_songs = years * 52 * songs_per_week
total_earnings = total_songs * earnings_per_song
result = total_earnings
return result
|
Jack and Jill are saving money for a trip. Jack saves $20 every week and Jill saves $15 every week. They also receive a gift of $100 from their grandparents. How many weeks do they need to save until they have $1000 for their trip? | def solve() -> int:
jack_savings = 20
jill_savings = 15
gift = 100
goal = 1000
total_savings = jack_savings + jill_savings
money_after_gift = gift + total_savings
money_needed = goal - money_after_gift
weeks_needed = money_needed / total_savings
result = ... |
The perimeter of a square is 52 cm. What is the length of one side of the square? | def solve() -> int:
perimeter = 52
side_length = perimeter/4
result = round(side_length,2)
return result
|
Jack runs 4 miles every weekday. How many miles will he run in a 30 day month (Assume there are no weekends in the month)? | def solve() -> int:
miles_per_weekday = 4
total_days = 30
total_weekdays = 5 * total_days / 7
total_miles = miles_per_weekday * total_weekdays
result = total_miles
return result
|
Kevin bought some wood planks and each plank is 3 feet long. He needs to cut them into smaller pieces that are 6 inches long. If he buys a total of 108 feet of planks, how many 6 inches pieces does he have in the end? | def solve() -> int:
plank_length = 3
cut_length = 0.5
total_plank_length = 108
total_cut_length = total_plank_length *12
total_pieces = total_cut_length // cut_length
result = total_pieces
return result
|
Two painters were competing to see who could paint the fastest. They were each going to paint a 100-square-foot wall, and the person who painted the wall in the shortest time would win. The first painter painted the wall in 2 hours, and the second painter painted the wall in 2.5 hours. What was the average speed of the... | def solve() -> int:
first_painter_time = 2
second_painter_time = 2.5
first_painter_speed = 100 / first_painter_time
second_painter_speed = 100 / second_painter_time
if first_painter_speed < second_painter_speed:
winner_speed = first_painter_speed
else:
winner_speed = se... |
A restaurant has 200 chairs. If 40 chairs break and they buy 60 new chairs, how many chairs do they have now? | def solve() -> int:
chairs = 200
broken_chairs = 40
new_chairs = 60
total_chairs = chairs - broken_chairs + new_chairs
result = total_chairs
return result
|
Olivia had 16 toy cars on her shelf. She bought three times as many toy cars and then donated 1/8 of what she had. How many toy cars does Olivia have now? | def solve() -> int:
toys_on_shelf = 16
additional_toys = 3 * toys_on_shelf
donated_toys = additional_toys / 8
total_toys = toys_on_shelf + additional_toys - donated_toys
result = total_toys
return result
|
In a marathon, 30% of the runners are women and the number of male runners is twice the number of female runners. What percentage of the runners are men? | def solve() -> int:
total_runners = 100
women_runners = total_runners*0.3
men_runners = 2*women_runners
percentage_men_runners = (men_runners/total_runners)*100
result = percentage_men_runners
return result
|
Jack is planning a party and wants to make sure he has enough paper cups for everyone. He has 6 half-full packs of cups and 9 full packs of cups. If each pack has 24 cups but he needs to throw away 48 that are unusable, how many cups does Jack have for the party? | def solve() -> int:
half_full_packs = 6
full_packs = 9
cups_per_pack = 24
unusable_cups = 48
total_cups = (half_full_packs * 0.5 + full_packs) * cups_per_pack - unusable_cups
result = total_cups
return result
|
Student: A TV costs $340 and is on sale for 20% off. What is the sale price? | def solve() -> int:
cost = 340
discount_rate = 0.2
sale_price = cost * (1 - discount_rate)
result = sale_price
return result
|
Ryan needs to purchase the ingredients for a cake. The cake calls for 2 cups of sugar, 3 cups of flour, and 2 eggs. If all of the ingredients cost $2.75 each, how much money does Ryan need to buy all of the ingredients? | def solve() -> int:
cost_per_item = 2.75
sugar_amount = 2
flour_amount = 3
eggs_amount = 2
total_cost = cost_per_item * (sugar_amount + flour_amount + eggs_amount)
result = total_cost
return result
|
``` Bob has 36 markers. He gave 3 markers to each of his friends. After giving away all of his markers, how many friends did Bob give markers to? | def solve() -> int:
total_markers = 36
markers_per_friend = 3
friends_given_to = total_markers // markers_per_friend
result = friends_given_to
return result
|
Valerie had 3 times as many books as Marcus, until Valerie gave Marcus 10 books. Afterwards, Valerie had twice as many books as Marcus. How many books did Valerie have originally? | def solve() -> int:
valerie = 0
marcus = 0
given_books = 10
valerie = given_books + marcus
marcus = marcus + given_books
valerie = 2 * marcus
valerie_originally = 3 * marcus
result = valerie_originally
return result
|
Possible questions and programs: Kim buys 3 apples and 4 bananas at the grocery store. Each apple costs $0.7 and each banana costs $0.5. She pays with a $10 bill and gets some change. How much change does she get? | def solve() -> int:
total_cost = 3 * 0.7 + 4 * 0.5
change = 10 - total_cost
result = change
return result
|
``` A rectangle has a perimeter of 26 meters and a width of 4 meters. What is the length of the rectangle? | def solve() -> int:
perimeter = 26
width = 4
length = (perimeter - (2 * width)) / 2
result = length
return result
|
John had 47 marbles. He gave 12 marbles to his brother and lost 8 marbles while playing outside. He found 16 marbles on the way home. If he divided all his marbles evenly into 5 bags, how many marbles would each bag have? | def solve() -> int:
marbles = 47
marbles -= 12
marbles -= 8
marbles += 16
bags = 5
marbles_per_bag = marbles // bags
result = marbles_per_bag
return result
|
The length of the three sides of a rectangle are in the ratio of 5:7:9. The perimeter of the rectangle is 336cm. What is the length of the longest side? | def solve() -> int:
x = 4
longest_side = 9*x
result = longest_side
return result
|
A train travels 300 kilometers in 3 hours. How long will it take the train to travel 500 kilometers at the same speed? | def solve() -> int:
speed = 300 / 3
time = 500 / speed
result = time
return result
|
In a pack of 200 pens, 15% of them are black. If Jack can take 25 pens at a time, then how many rounds are required for him to obtain 75 black pens? | def solve() -> int:
total_pens = 200
black_pens = total_pens * 0.15
pens_per_round = 25
rounds_needed = 75 / (black_pens / total_pens / pens_per_round)
result = int(rounds_needed)
return result
|
Jack bought some fruits and vegetables for his diet. He added 2 bunches of bananas, 8 times as much oranges as bananas, and 6 times as much apples as oranges. How many apples did Jack buy? | def solve() -> int:
bananas = 2
oranges = bananas * 8
apples = oranges * 6
result = apples
return result
|
For a social studies assignment, Jack was asked to note down the different types of farm animals (cows, horses, goats, pigs etc) he saw on his way to school. On his way, Jack saw 10 cows, 6 horses, 14 pigs and 4 goats. How many tails are there in total on the animals Jack noted down? | def solve() -> int:
cows = 10
horses = 6
pigs = 14
goats = 4
total_tails = cows + horses + pigs + goats
result = total_tails
return result
|
Brittany's truck gets 20 miles per gallon. She drove 90 miles and has 1/3 a tank of gas left. How much gas does her truck hold? | def solve() -> int:
mpg = 20
milesDriven = 90
oneThirdTank = 1/3
result = (milesDriven / mpg) * (1 - oneThirdTank)
return result
|
A department store has 80 employees. 1/6th of them are cashiers and the rest work in customer service. The store hires 5 new employees and all of them are cashiers. What is the total percentage of cashiers in the store now? | def solve() -> int:
total_employees = 80
cashiers = total_employees / 6
customer_service = total_employees - cashiers
new_employees = 5
new_cashiers = cashiers + new_employees
total_employees += new_employees
total_cashiers = new_cashiers
percentage_cashiers = (total_cashi... |
Olivia gets 1 headache for every 6 hours she spends studying. She studies for 10 hours on Monday, 7 hours on Tuesday, and 1/2 as many hours on Wednesday as she did on Monday. How many headaches does she get? Michael ate three fewer burgers yesterday than today. Yesterday, he ate eight burgers. How many burgers did Mich... | def solve() -> int:
monday_hours = 10
tuesday_hours = 7
wednesday_hours = monday_hours / 2
total_hours = monday_hours + tuesday_hours + wednesday_hours
headaches_per_hour = 1 / 6
total_headaches = total_hours * headaches_per_hour
result = total_headaches
... |
Belinda watches 2 hours of TV every day, except on Mondays when she watches four hours. Alvin watches half as much TV as Belinda, except on Mondays when he watches double the usual amount. How many more hours of TV does Belinda watch than Alvin in a week? | def solve() -> int:
belinda_daily = 2
alvin_daily = belinda_daily / 2
belinda_monday = 4
alvin_monday = belinda_monday * 2
belinda_weekly = belinda_daily * 6 + belinda_monday
alvin_weekly = alvin_daily * 6 + alvin_monday
difference = belinda_weekly - alvin_weekly
resu... |
Determine the slope of a line passing through the points (5, 8) and (3, 4). | def solve() -> int:
x1, y1 = 5, 8
x2, y2 = 3, 4
slope = (y2-y1)/(x2-x1)
result = slope
return result
|
David went grocery shopping and bought beef for $100 with a 25% discount, chicken for $80 with a 20% discount, and fish for $50 with a 15% discount. At checkout, there was an additional 9% discount. How much did he spend in total? | def solve() -> int:
beef_price = 100
beef_discount = 0.25
chicken_price = 80
chicken_discount = 0.20
fish_price = 50
fish_discount = 0.15
additional_discount = 0.09
beef_discounted_price = beef_price - (beef_price * beef_discount)
chicken_discounted_price = chicken_price - (chic... |
Oliver's snake has a body that's twice as long as its tail, and a head that's 1/5 the length of its body. If the snake measures 45 inches in length, how long is its body? | def solve() -> int:
tail = 45 / (2 + 1 + 1/5)
body = 2 * tail
result = body
return result
|
A hospital has nine different wards displaying triple as many patients as nurses displayed. Three of the wards are dedicated to nurses. The patients are divided evenly among the remaining wards. One ward is so large it contains all the patients, and the other wards have 11 smaller groups of patients each. How many nurs... | def solve() -> int:
total_wards = 9
nurse_wards = 3
patient_wards = total_wards - nurse_wards
total_patients = 33
patients_per_ward = total_patients / (patient_wards - 1)
patients_per_nurse = patients_per_ward / 3
result = patients_per_nurse
return result
|
A jar of pickles contains 36 ounces of pickles. Milo needs to pack the pickles into 8-ounce jars. How many jars can he fill completely? | def solve() -> int:
ounces_in_jar = 8
total_ounces_of_pickles = 36
jars_filled = total_ounces_of_pickles // ounces_in_jar
result = jars_filled
return result
|
A company has 120 employees. If 44 of them are full-time and the remaining employees are part-time, what percent of the employees are part-time? | def solve() -> int:
total_employees = 120
full_time_employees = 44
part_time_employees = total_employees - full_time_employees
percent_part_time_employees = (part_time_employees / total_employees) * 100
result = percent_part_time_employees
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.