question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Student: Astrid is running a lemonade stand to raise some money. She has 35 lemons in total and it takes her 4 lemons to make a gallon of lemonade. How many gallons of lemonade can Astrid make with all of her lemons? | def solve() -> int:
lemons = 35
lemons_per_gallon = 4
gallons = lemons / lemons_per_gallon
result = gallons
return result
|
Mia hops over a rope 7 times per minute. If she jumps for 40 minutes, how many skips will she have? | def solve() -> int:
skips_per_minute = 7
minutes = 40
skips = skips_per_minute * minutes
result = skips
return result
|
A shipping company charges $5 per package plus $1.5 per pound of weight. How much will it cost to ship a package that weighs 4 pounds? | def solve() -> int:
weight = 4
cost_per_pound = 1.5
additional_cost = weight * cost_per_pound
shipping_cost = 5 + additional_cost
result = shipping_cost
return result
|
Tom owns a toy store that supplies toys to different preschools. The first preschool needs 10 teddy bears, the second preschool needs 7 cars, and the third preschool needs 20 dolls per day. How many toys does he need to supply all the preschools in 5 days? | def solve() -> int:
teddy_bears_per_day = 10
cars_per_day = 7
dolls_per_day = 20
toys_per_day = teddy_bears_per_day + cars_per_day + dolls_per_day
toys_needed = toys_per_day * 5
result = toys_needed
return result
|
Student: Richard has a total of $120. He spends 1/3 of the money on a new video game and gives 1/5 of the remaining money to his sister. How much money does Richard have left? | def solve() -> int:
total_money = 120
video_game_cost = total_money / 3
remaining_money = total_money - video_game_cost
sister_money = remaining_money / 5
result = remaining_money - sister_money
return result
|
Student: A car travels 60 miles per hour. How many feet does it travel in 2 minutes? | def solve() -> int:
speed_mph = 60
time_min = 2
speed_fpm = speed_mph * 5280 / 60
distance_ft = speed_fpm * time_min
result = distance_ft
return result
|
Student: Tom is twice as old as his little sister. If his sister is 7 years old, how old is Tom? | def solve() -> int:
tom = 2 * 7
sister = 7
result = tom - sister
return result
|
In a Literature quiz, Ava got 27 points, which is 3 points more than Ben. Claire got 6 points less than Ben. What is the ratio of the highest score to the lowest score among the three students? | def solve() -> int:
ben_score = 27 - 3
claire_score = ben_score - 6
highest_score = max(27, ben_score, claire_score)
lowest_score = min(27, ben_score, claire_score)
ratio = highest_score / lowest_score
result = ratio
return result
|
A store sells soda cans for $1 each. If you buy 10 cans, you get 20% off. If you buy 20 cans, you get 30% off. How much will it cost to buy 15 soda cans? | def solve() -> int:
soda_price = 1
amt_1 = 10
amt_2 = 20
discount_1 = 0.2
discount_2 = 0.3
amt_3 = 15
if amt_3 < amt_1:
cost = soda_price * amt_3
elif amt_3 >= amt_1 and amt_3 < amt_2:
cost = (1-discount_1)*soda_price*amt_3
else:
cost = (1-discount_2)*soda_pri... |
Kevin has $170. Jean has $125 more than twice as much as Kevin has. Susan has $10 less than Kevin. How much money do they have altogether? | def solve() -> int:
Kevin = 170
Jean = (2*Kevin) + 125
Susan = Kevin - 10
Total = Kevin + Jean + Susan
result = Total
return result
|
Andrew earns $18 per hour as a delivery driver. He needs to make at least $1200 for his monthly expenses. He works 6 hours every weekday and 2 hours on a Sunday. How many weeks does it take for Andrew to earn enough to cover his monthly expenses? | def solve() -> int:
hourly_rate = 18
weekday_hours = 6
sunday_hours = 2
monthly_expenses = 1200
weekly_hours = (weekday_hours * 5) + sunday_hours
weekly_earnings = weekly_hours * hourly_rate
weeks_needed = monthly_expenses / weekly_earnings
result = weeks_needed
return resu... |
If there are 4 more chairs than 6 times the number of tables in a conference room, and there are 76 chairs in total, how many tables are there? Yesterday, Sarah had 5 cupcakes and 2 brownies for dessert. Today she's planning to have 3 more cupcakes than yesterday, 7 times as many brownies as she ate yesterday, and half... | def solve() -> int:
t = (76 - 4) / 6
c_yesterday = 5
b_yesterday = 2
c_today = c_yesterday + 3
b_today = b_yesterday * 7
cookies_today = (c_today + b_today) / 2
total_desserts = c_yesterday + b_yesterday + c_today + b_today + cookies_today
result = tota... |
Student: Grant has 18 bananas. His friends give him 12 more bananas. If he gives 3 bananas to his brother, how many bananas does Grant have? | def solve() -> int:
bananas_grant = 18
bananas_friends = 12
bananas_brother = 3
bananas_grant = bananas_grant + bananas_friends
bananas_grant = bananas_grant - bananas_brother
result = bananas_grant
return result
|
A baking class of 25 students make an average of 30 cupcakes per day. If each student must bring in their own ingredients and have an identical recipe, how many pounds of flour are needed to make all of the cupcakes? | def solve() -> int:
num_students = 25
avg_cupcakes_per_day = 30
total_cupcakes = num_students * avg_cupcakes_per_day
flour_per_cupcake = 0.25
total_flour = total_cupcakes * flour_per_cupcake
result = total_flour
return result
|
Jessica has twice as many stickers as Emily, who has 15 more than Tom. If Tom has 40 stickers, how many does Jessica have? | def solve() -> int:
stickers_of_Tom = 40
stickers_of_Emily = stickers_of_Tom + 15
stickers_of_Jessica = stickers_of_Emily * 2
result = stickers_of_Jessica
return result
|
Rachel borrowed $75 from her friend to buy concert tickets. She has to repay her $80 before the end of the day. Rachel spent $50 on the tickets. She sells them for $100. After she pays back her friend, how much money does Rachel have? | def solve() -> int:
borrowed = 75
repay = 80
spent = 50
sold = 100
money_left = sold - spent
money_left -= repay - borrowed
result = money_left
return result
|
Student: Bill had 3 apples, and he ate one of them. Later he bought 2 more apples. How many apples does Bill have now? | def solve() -> int:
initial_apples = 3
ate_apples = 1
bought_apples = 2
total_apples = initial_apples + bought_apples - ate_apples
result = total_apples
return result
|
A puppy gains 2 pounds every week. If the puppy weighs 10 pounds today, how long will it take until it weighs 30 pounds? | def solve() -> int:
puppy_weight = 10
weekly_gain = 2
goal_weight = 30
weeks = (goal_weight - puppy_weight) / weekly_gain
result = weeks
return result
|
Owen is organizing a potluck with 30 attendees. Each attendee wants a serving of 1/2 cup of potato salad. A bowl of potato salad contains 6 cups. How many bowls of potato salad will Owen need to make if he wants to have 4 extra cups for himself? | def solve() -> int:
attendees = 30
serving_per_attendee = 1/2
bowl_capacity = 6
extra_cups = 4
total_servings_needed = attendees * serving_per_attendee
total_cups_needed = total_servings_needed / bowl_capacity
bowls_needed = total_cups_needed + extra_cups
result = bowls_ne... |
Student: A student purchased 6 pencils that cost $8 each, what is the total cost of the pencils in total? | def solve() -> int:
num_pencils = 6
cost_per_pencil = 8
total_cost = num_pencils * cost_per_pencil
result = total_cost
return result
|
Student: If a train travels 40 miles in 30 minutes, what is its speed in miles per hour? | def solve() -> int:
distance = 40
time = 30
time_in_hours = time / 60
speed = distance / time_in_hours
result = speed
return result
|
There are about 3.78 liters in a gallon. How many gallons will there be if there are 28.9 liters? | def solve() -> int:
liters = 28.9
gallons = liters / 3.78
result = round(gallons, 2)
return result
|
If a loaf of bread costs $3.25 and a jar of peanut butter costs $2.50, how much would it cost to buy 5 loaves of bread and 4 jars of peanut butter? | def solve() -> int:
b_cost = 5 * 3.25
p_cost = 4 * 2.50
total_cost = b_cost + p_cost
result = total_cost
result
return result
|
Peter wants to buy a new bike that costs $225. If he saves $25 per week for his bike, how many weeks will it take him to save enough money to buy the bike? | def solve() -> int:
bike_cost = 225
savings_per_week = 25
weeks_to_save = bike_cost / savings_per_week
result = weeks_to_save
return result
|
A rectangular garden is 12 feet long and 8 feet wide. If a fence post is located at each corner and posts are spaced 2 feet apart along the sides, how many fence posts will be needed? | def solve() -> int:
length = 12
width = 8
corner_posts = 4
side_posts = 2 * (length-1 + width-1)
total_posts = corner_posts + side_posts
result = total_posts
return result
|
am reads 20 pages of a book every day and 30 pages on Sundays. The book has 360 pages in total. How many days does it take him to finish the book? | def solve() -> int:
pages_per_day = 20
pages_on_sunday = 30
total_pages = 360
pages_per_week = pages_per_day * 6 + pages_on_sunday
full_weeks = total_pages // pages_per_week
pages_left = total_pages % pages_per_week
if pages_left == 0:
extra_days = 0
elif pages_... |
At the Art Supply Store, John sells paintbrushes. He puts 5 paintbrushes in each bag, and each bag is 6 inches long, 4 inches wide, and 1 inch tall. He then packs the bags in boxes that are 20 inches long, 16 inches wide, and 6 inches high. How many bags of paintbrushes can fit into each box? | def solve() -> int:
brushes_per_bag = 5
bag_length = 6
bag_width = 4
bag_height = 1
bag_volume = bag_length * bag_width * bag_height
box_length = 20
box_width = 16
box_height = 6
box_volume = box_length * box_width * box_height
bags_per_box = box_... |
An electronics store bought 30 HDTVs for $12,000. They sold 15 of them for $500 each and the remaining at $400 each. What is the total profit the store made? | def solve() -> int:
cost_price = 12000
selling_price_one = 500
selling_price_two = 400
qty_one = 15
qty_two = 15
total_selling_price = qty_one * selling_price_one + qty_two * selling_price_two
profit = total_selling_price - cost_price
result = profit
return result
|
A video game that used to cost $60 is now on a 30% discount. What is the new price? | def solve() -> int:
orig_price = 60
percent_discount = 0.30
discount_amount = orig_price * percent_discount
new_price = orig_price - discount_amount
result = new_price
return result
|
Nathan is walking a nature trail that has 5 parts. The total distance of the trail is 10 kilometers. The first part of the trail is 2 kilometers long. The second and third parts are each 1.5 kilometers long. How many kilometers is the last part of the trail? | def solve() -> int:
total_distance = 10
part1 = 2
part2 = 1.5
part3 = 1.5
total_distance_first3 = part1 + part2 + part3
last_part = total_distance - total_distance_first3
result = last_part
return result
|
A school has a total of 700 students. 200 of them are boys. What is the percentage of girls in the school? | def solve() -> int:
girls_in_school = 700 - 200
percentage_of_girls = (girls_in_school / 700) * 100
result = percentage_of_girls
return result
|
Sarah can bake 12 cupcakes in 30 minutes and takes a 3-minute break every 20 minutes. How long does it take for Sarah to bake 60 cupcakes? | def solve() -> int:
cupcakes_per_minute = 12 / 30
time_without_breaks = 60 / cupcakes_per_minute
num_breaks = 60 // 12
total_break_time = num_breaks * 3
total_time = time_without_breaks + total_break_time
result = total_time
return result
|
If Jake measures the length of a rope and finds it to be 20 meters, what is the length of that rope in centimeters? | def solve() -> int:
length_meter = 20
length_cm = length_meter * 100
result = length_cm
return result
|
Johnny has $20 to spend at the grocery store. If he wants to buy apples at $0.75 each, how many apples can he buy? | def solve() -> int:
apples_can_buy = 20 / 0.75
result = apples_can_buy
return result
|
Emma has a coupon that gives her 20% off any item at the bookstore. She buys a book that costs $12 and a magazine that costs $4. How much does she pay after using the coupon on the book? | def solve() -> int:
book_price = 12
magazine_price = 4
discount = 0.2
discount_amount = book_price * discount
final_payment = (book_price - discount_amount) + magazine_price
result = final_payment
return result
|
Possible new questions and programs are: Anna wants to knit a scarf that is 180 cm long. She has already knitted 45 cm of the scarf. She can knit 6 cm of the scarf in one hour. How many more hours does she need to finish the scarf? | def solve() -> int:
length_left = 180 - 45
hours_needed = length_left / 6
result = hours_needed
return result
|
Tom ran a total of 12 kilometers in 4.5 hours, how many meters did Tom ran per hour? | def solve() -> int:
distance_total = 12000
time_elapsed = 4.5
distance_per_hour = (distance_total / time_elapsed)
result = distance_per_hour
return result
|
A company makes a profit of $2200 on a product that costs $8000 to produce. What is the profit margin as a percentage? | def solve() -> int:
profit = 2200
cost = 8000
revenue = cost + profit
profit_margin_pct = (profit/revenue) * 100
result = profit_margin_pct
return result
|
Q2: Gary has 9 letters while John has 6 times the number of letters Gary has. What's 6 times the average number of letters in both names? | def solve() -> int:
num1 = 9
num2 = 9 * 6
result = 6 * ((num1 + num2) / 2)
return result
|
If a rectangular plot has an area of 1920 square meters and a length of 64 meters, what is the width of the plot? | def solve() -> int:
length = 64
area = 1920
width = area / length
result = width
return result
|
A basketball team scored 500 points in a season. If the team scored 120 points in the first game, how many points did it score in the second game? | def solve() -> int:
total_points = 500
first_game_points = 120
second_game_points = total_points - first_game_points
result = second_game_points
return result
|
Joe has $3000. He spends 20% of it on clothes and the rest on travel. How much does Joe spend on travel? | def solve() -> int:
money = 3000
clothesCost = money*0.2
travelCost = money - clothesCost
result = travelCost
return result
|
10. Ken needs to buy machinery for his business that costs $5000. He also has to pay a 10% commission on the purchase price. How much will he pay in total? | def solve() -> int:
price = 5000
commission = 0.1
total_price = price + price*commission
result = total_price
return result
|
A bicycle tire has a circumference of 73.6 cm. What is the diameter of the tire? | def solve() -> int:
pi = 3.14
circumference = 73.6
diameter = circumference/pi
result = diameter
return result
|
Jane has $500. She spends 10% of her money on clothes, 20% of what's left on food, and then spends $100 on entertainment. How much money does she have left? | def solve() -> int:
x = 500
clothes = x * 0.1
y = x - clothes
food = y * 0.2
z = y - food
z -= 100
result = z
return result
|
Maria bought 24 pencils at the store. She gave half of them to her friend Lucy, and then she lost 4 of them on her way home. How many pencils does Maria have left? | def solve() -> int:
pencils_gave_away = 24 / 2
pencils_lost = 4
pencils_left = 24 - (pencils_gave_away + pencils_lost)
result = pencils_left
return result
|
John bought 7 pencils for $0.50 each and 5 erasers for $1.20 each. What was the total cost? | def solve() -> int:
num_pencils = 7
cost_per_pencil = 0.50
num_erasers = 5
cost_per_eraser = 1.20
total_cost = (num_pencils * cost_per_pencil) + (num_erasers * cost_per_eraser)
result = total_cost
return result
|
A store sells 24 boxes of candy. Each box of candy has 8 pieces of candy, how many pieces of candy did they sell in total? | def solve() -> int:
num_boxes = 24
num_candy_per_box = 8
total_num_candy = num_boxes * num_candy_per_box
result = total_num_candy
return result
|
Max and his friends want to buy tickets for a concert, so they ask their grandmother for money, who gives them $200 in total to use. Max buys three tickets at $45 each, and his friends use the remaining amount to buy five t-shirts at $10 each and some posters. How much money did Max's friends spend on posters? | def solve() -> int:
total_money = 200
max_tickets = 3
ticket_price = 45
max_spent = max_tickets * ticket_price
friends_money = total_money - max_spent
num_tshirts = 5
tshirt_price = 10
tshirts_cost = num_tshirts * tshirt_price
posters_cost = friends_money - tshirts_cost
result = ... |
Student: A football team won 8 games and lost 4 games this season. What is the win percentage of the team? | def solve() -> int:
won = 8
lost = 4
total = won + lost
win_percentage = (won / total) * 100
result = win_percentage
return result
|
Student: Mary sold 10 boxes of chocolates each at a price of $4. She also sold 6 boxes of chips each at a price of $2.50. How much money did Mary make altogether? | def solve() -> int:
choco_boxes = 10
choco_price = 4
chip_boxes = 6
chip_price = 2.5
choco_sales = choco_boxes * choco_price
chip_sales = chip_boxes * chip_price
total_sales = choco_sales + chip_sales
result = total_sales
return result
|
Alice and Bob are painting the same amount of square footage for different clients. Alice charges $10 per square feet, while Bob charges $12 per square feet. If Alice finishes 2/3 of the painting job, and Bob finished the rest, how much more will the client pay for Bob’s work than Alice’s work? | def solve() -> int:
squareFeet = 10
aliceRate = 10
bobRate = 12
aliceWork = 2/3 * squareFeet
bobWork = (1 - (2/3)) * squareFeet
alicePay = aliceWork * aliceRate
bobPay = bobWork * bobRate
difference = bobPay - alicePay
result = difference
return result
|
Jessica paid $2 for 1 pound of mangoes and 1 pound of pineapples. Mark paid $18 for 5 pounds of mangoes and 4 pounds of pineapples. How much does 1 pound of mangoes cost? | def solve() -> int:
pounds_of_mangoes_jessica = 1
pounds_of_pineapples_jessica = 1
total_cost_jessica = 2
pounds_of_mangoes_mark = 5
pounds_of_pineapples_mark = 4
total_cost_mark = 18
cost_per_pound_pineapples_jessica = total_cost_jessica / pounds_of_pineapples_jessica
cost_per_poun... |
If 477 visitors watched a show, and 22 visitors per table, how many tables were needed? | def solve() -> int:
visitors = 477
visitors_per_table = 22
tables = visitors / visitors_per_table
result = round(tables)
return result
|
Student: John is at the store buying ingredients for dinner. He has a total of $35 to spend. He purchases 2 lbs of ground beef for $3 per lb. He purchases 2 packages of saltine crackers for $2 each. He buys 1 lb of cheese for $5. With the remaining money, how many $1.50 packages of macaroni can he purchase? | def solve() -> int:
total_money = 35
ground_beef_price = 3
ground_beef_lbs = 2
ground_beef_cost = ground_beef_price * ground_beef_lbs
crackers_price = 2
crackers_packages = 2
crackers_cost = crackers_price * crackers_packages
cheese_price = 5
cheese_lbs = 1
cheese_cost = cheese_p... |
Julie's family saved $10 in November and increased their deposits by $3 for the following months. How much will they saved after 8 months? | def solve() -> int:
month = 12
sum_money = 10
while month <= 19:
sum_money = sum_money + 3
month = month + 1
if month == 19:
total_money = sum_money
result = total_money
return result
|
What is the ratio of the area of the garden to the area of the playground? | def solve() -> int:
sideLen = 27
width = 12
length = 9
areaPlayground = sideLen**2
areaGarden = width * length
ratio = areaGarden/areaPlayground
result = ratio
return result
|
Student: Mohan has 56 shields. He divided them equally among 3 of his friends and kept 7 himself. How many shields did each of his friends get? | def solve() -> int:
shields = 56
mohan = 7
shields_left = shields - mohan
friends = 3
shields_per_friend = shields_left // friends
result = shields_per_friend
return result
|
A store sells t-shirts for $15 each, pants for $25 each, and jackets for $50 each. The store sold 40 t-shirts, 20 pants, and 10 jackets. How much money did the store make from these sales? | def solve() -> int:
num_tshirts = 40
num_pants = 20
num_jackets = 10
tshirt_price = 15
pants_price = 25
jacket_price = 50
total_tshirt_cost = num_tshirts * tshirt_price
total_pants_cost = num_pants * pants_price
total_jacket_cost = num_jackets * jacket_price
total_sales = total_t... |
Tayla eats 3 apples a day and apples cost $2 each. How much does Tayla spend on apples in 4 months? | def solve() -> int:
price_per_apple = 2
num_apples_per_day = 3
num_days_in_4_months = 120
total_cost = price_per_apple * num_apples_per_day * num_days_in_4_months
result = total_cost
return result
|
A factory produced 1200 items. If 1/5 were rejected and 3/7 of the remainder were sold, how many items were sold? | def solve() -> int:
items = 1200
rejected = 1/5*items
remainder = items - rejected
sold = 3/7*remainder
result = sold
return result
|
Avocados used to cost $2 per piece. The price got lowered 30%. How much does it cost to buy 3 pieces of avocados for each person in a 5 member family? | def solve() -> int:
price_per_piece = 2
discount = 0.30
number_of_pieces = 3
number_of_people = 5
total_cost = price_per_piece * (1 - discount) * number_of_pieces * number_of_people
result = total_cost
return result
|
A recipe calls for 3/4 cup of flour to make 6 cookies. How much flour is needed to make 5 dozen cookies? | def solve() -> int:
flour_for_6 = 3/4
cookies = 5 * 12
flour_for_5_dozen = (flour_for_6 / 6) * cookies
result = flour_for_5_dozen
return result
|
Student: A teacher has a total of 600 sheets of papers. She wants to divide them equally among 25 students for a project. Each student needs 20 sheets of paper for the project. How many sheets of paper will be left unused? | def solve() -> int:
total_sheets = 600
num_students = 25
sheets_per_student = 20
total_sheets_used = num_students * sheets_per_student
sheets_left_unused = total_sheets - total_sheets_used
result = sheets_left_unused
return result
|
Result: 24 A company has 100 employees. ⅓ of them are managers. Out of the managers, ⅖ are women. How many women are managers? | def solve() -> int:
total_employees = 100
managers = total_employees / 3
female_managers = managers * 2/5
result = female_managers
return result
|
If a train travels at a constant speed of 80km/hr for 2hrs, how far does it travel? | def solve() -> int:
time_in_hours = 2
distance_covered_in_time = time_in_hours*80
result = distance_covered_in_time
return result
|
Mary drove from Denver to San Francisco with her family and made 2 stops during the journey; the first was 40 minutes, and the second was 20 minutes. If they left at 7:00 AM and arrived at 7:00 PM, how many hours did they spend on the road? | def solve() -> int:
start_time = 7 * 60
end_time = 19 * 60
stop1_duration = 40
stop2_duration = 20
total_duration = end_time - start_time - stop1_duration - stop2_duration
hours_spent = total_duration // 60
result = hours_spent
return result
|
Lila has a set of marbles of different colors. Her red marble has a diameter of 2.5 centimeters and her blue marble has one-fifth as much diameter as the red. If the marble that is next to the blue marble in her bag has six times the diameter of the blue marble, then how many centimeters is the diameter of that marble? | def solve() -> int:
red = 2.5
blue = red / 5
next_to_blue = blue * 6
result = next_to_blue
return result
|
A train travels at a speed of 80 km/h for 2 hours and then slows down to 50 km/h for another 3 hours. What is the total distance the train travels? | def solve() -> int:
speed_1 = 80
speed_2 = 50
time_1 = 2
time_2 = 3
distance_1 = speed_1*time_1
distance_2 = speed_2*time_2
total_distance = distance_1 + distance_2
result = total_distance
return result
|
Student: Sarah can walk 5 miles per hour. If she walks for 2.5 hours, how far will she have gone? | def solve() -> int:
speed = 5
time = 2.5
distance = speed * time
result = distance
return result
|
A school bake sale makes $500 selling brownies and cookies. If the ratio of the number of brownies to the number of cookies sold is 3:5, how much money was earned from selling only brownies? | def solve() -> int:
total_ratio = 3+5
brownie_ratio = 3/total_ratio
cookie_ratio = 5/total_ratio
brownie_money = brownie_ratio * 500
result = brownie_money
return result
|
You have 100 marbles, and you decide to give a third of them to your friend. How many marbles do you have left? | def solve() -> int:
total_marbles = 100
marbles_given_away = total_marbles // 3
marbles_left = total_marbles - marbles_given_away
result = marbles_left
return result
|
Student: Leo, Emma, and Jake all played video games. Leo played 18 hours of video games. Emma played 6 less hours than Leo. If they played 42 hours altogether, how many did Jake play? | def solve() -> int:
leo = 18
emma = leo - 6
leo_emma = leo + emma
jake = 42 - leo_emma
result = jake
return result
|
At a pet fish tank, there are 4 times as many guppies as tetras. If there are 12 tetras, how many guppies are there? | def solve() -> int:
guppies = 0
tetras = 12
ratio = 4
guppies = tetras * ratio
result = guppies
return result
|
Jack and Luke divide a sum of money in the ratio 2:5. If Luke gets $350, what is the total amount they shared? | def solve() -> int:
jack_ratio = 2
luke_ratio = 5
luke_amount = 350
total_ratio = jack_ratio + luke_ratio
jack_amount = (jack_ratio / total_ratio) * luke_amount
total_amount = jack_amount + luke_amount
result = total_amount
return result
|
A dice is rolled. What is the probability of getting an even number? | def solve() -> int:
num_possible_outcomes = 6
num_desired_outcomes = num_possible_outcomes // 2
probability = num_desired_outcomes / num_possible_outcomes
result = probability
return result
|
Suzy decides to save money every week for a year. She starts with $10 a week, and adds an additional $5 each week until she reaches $35 a week. How much money will she save in a year? | def solve() -> int:
starting_amt = 10
increment = 5
max_amt = 35
weeks = 52
total_saved = ((starting_amt + max_amt) * weeks / 2) + ((weeks - 7) * (starting_amt + max_amt) / 2) + ((weeks - 1) * (weeks - 2) / 2 * increment)
result = total_saved
return result
|
Tanya's car lot has 195 cars, of which 3 out of every 5 cars are luxury cars. How many non-luxury cars are in Tanya's lot? | def solve() -> int:
total_cars = 195
luxury_cars = 3 * total_cars / 5
non_luxury_cars = total_cars - luxury_cars
result = non_luxury_cars
return result
|
If a book costs $15 and Cindy buys 3 books, how much does she spend in total? | def solve() -> int:
book_price = 15
num_books = 3
total_cost = book_price * num_books
result = total_cost
return result
|
Question5: Jake bought 10 canadian flag for $6. How much he will pay for 12 canadian flags? | def solve() -> int:
flag_cost = 6
quantity = 12
cost = flag_cost * quantity
result = cost
return result
|
Eva is 38 and her husband Adam is 44 years old. Their daughter, Zoe was born when Eva was 26. How old was Adam when Zoe started kindergarten at the age of 5? | def solve() -> int:
eva = 38
adam = 44
zoe = 38 - 26
age_diff = adam - zoe
adam_kinder = zoe + 5 + age_diff
result = adam_kinder
return result
|
A clothing store sold 100 shirts in a month. In the first week, 20 shirts were sold. In the second week, half as many shirts were sold. There was an equal number of shirts sold in the third and fourth week. How many shirts were sold in the third and fourth week? | def solve() -> int:
total_shirts_sold = 100
shirts_sold_first_week = 20
shirts_sold_second_week = shirts_sold_first_week / 2
shirts_sold_third_week = (total_shirts_sold - shirts_sold_first_week - shirts_sold_second_week) / 2
shirts_sold_fourth_week = shirts_sold_third_week
result = shi... |
Tyson created 16 paintings. He created 3 fewer paintings than Kyle. Carla created 5 more paintings than Kyle. How many paintings did they create altogether? | def solve() -> int:
painting_num_Tyson = 16
painting_num_Kyle = painting_num_Tyson + 3
painting_num_Carla = painting_num_Kyle + 5
result = painting_num_Tyson + painting_num_Kyle + painting_num_Carla
return result
|
A pizza has a diameter of 12 inches. What is its circumference in inches, rounded to the nearest tenth of an inch? | def solve() -> int:
diameter = 12
circumference = 3.14 * diameter
result = round(circumference, 1)
return result
|
A plane can fly 600 km with a full tank of fuel. The plane uses 1/4 of its fuel to fly from city A to city B. It refills its tank at city B and then flies to city C, using another 1/5 of its fuel. How much fuel is left in the tank when the plane reaches city C? | def solve() -> int:
full_tank = 600
fuel_used_AB = 1/4 * full_tank
fuel_left_AB = full_tank - fuel_used_AB
fuel_used_BC = 1/5 * full_tank
fuel_left_BC = fuel_left_AB - fuel_used_BC
result = fuel_left_BC
return result
|
Tennis player Maria played two sets of tennis. She won 6-2 in the first set and 7-5 in the second. Maria lost the match yesterday by 3 to 6. What was the total score of yesterday's match? | def solve() -> int:
set1 = 6
set2 = 7
opponent_score = 6
total_games = set1 + set2 + opponent_score
total_wins = set1 + set2
total_losses = total_games - total_wins
final_score = f"{total_wins}-{total_losses}"
result = final_score
return result
|
A restaurant ordered 500 kg of potatoes. On the first day, they cooked and served 100 kg of potatoes. On the second day, they threw away 25 kg of potatoes because they were not fresh anymore. On the third day, another shipment arrived which was three times larger than the first one. How much potatoes did the restaurant... | def solve() -> int:
potatoes_ordered = 500
potatoes_cooked_first_day = 100
potatoes_thrown_away_second_day = 25
potatoes_shipment_third_day = 3 * potatoes_ordered
potatoes_ready_fourth_day = potatoes_ordered - potatoes_cooked_first_day - potatoes_thrown_away_second_day + potatoes_shipment_third... |
Lily and Bella are baking cookies. At the start of the day, Lily had baked 24 cookies, while Bella had baked only 16 cookies. In the morning, Lily baked half the amount of the cookies she made the day before while Bella baked 2 more cookies than the day before. In the afternoon, they both baked the same amount of cooki... | def solve() -> int:
lily_start = 24
bella_start = 16
lily_morning = lily_start / 2
bella_morning = bella_start + 2
total_cookies = lily_start + bella_start + lily_morning + bella_morning
afternoon_cookies = (75 - total_cookies) / 2
result = afternoon_cookies
retu... |
Jack had 25 marbles. He gave away 10 of them and then lost 7. How many marbles does Jack have left? | def solve() -> int:
initial = 25
given = 10
lost = 7
result = initial-given-lost
return result
|
If a room is 10 feet wide and 15 feet long, what is the perimeter of the room? | def solve() -> int:
room_width = 10
room_length = 15
perimeter = 2 * (room_width + room_length)
result = perimeter
return result
|
Student: A recipe for a cake calls for 3 cups of flour and 2 cups of sugar. If you want to make 2 cakes, how many cups of flour and sugar will you need? | def solve() -> int:
flour = 3
sugar = 2
flour_2 = flour * 2
sugar_2 = sugar * 2
result = (flour_2, sugar_2)
return result
|
Jason turned 28 years old 4 years ago. 6 years ago, Lisa was 3 years older than half Jason's age. How old was Lisa in the previous year? | def solve() -> int:
jason_age = 28 + 4
jason_age_6_years_ago = jason_age - 6
lisa_age_6_years_ago = jason_age_6_years_ago / 2 + 3
lisa_age_previous_year = lisa_age_6_years_ago + 1
result = lisa_age_previous_year
return result
|
A store has a sale where all items are 20% off. If a customer buys $80 worth of items, how much will they have to pay? | def solve() -> int:
price = 80
discount_rate = 0.2
discount = price * discount_rate
total_price = price - discount
result = total_price
return result
|
If a recipe calls for 2 and 1/4 cups of flour to make 24 cookies, how much flour would be needed for a batch of 72 cookies? | def solve() -> int:
flour_per_cookie = 2.25/24
total_flour = 72 * flour_per_cookie
result = total_flour
return result
|
An aquarium has 100 fish. If 20 die from the heat, how many are left? | def solve() -> int:
initial_fish = 100
dead_fish = 20
remaining_fish = initial_fish - dead_fish
result = remaining_fish
return result
|
- Sam collects stickers and has 120 stickers in his album. He gives 20% of his stickers to his friend and then buys 15 more stickers from the store. How many stickers does he have now? | def solve() -> int:
initial = 120
final = 0
given = initial * 0.2
remaining = initial - given
final = remaining + 15
result = final
return result
|
Sarah bought 4 pencils for $2.25 each, 5 notebooks for $4.50 each, and 1 ruler for $1.75. How much did Sarah spend in total? | def solve() -> int:
pencil_price = 2.25
notebook_price = 4.50
ruler_price = 1.75
num_pencils = 4
num_notebooks = 5
total_cost = pencil_price*num_pencils + notebook_price*num_notebooks + ruler_price
result = total_cost
return result
|
At a store, Daniel purchased 4 snacks for $2 each, 2 drinks for $1 each, and 3 candy bars for $3 each. If he paid with a credit card that gives him a 10% discount, what is the final amount that he paid? | def solve() -> int:
snack = 2
drink = 1
candy = 3
s_quantity = 4
d_quantity = 2
c_quantity = 3
total = (snack*s_quantity)+(drink*d_quantity)+(candy*c_quantity)
discount = total*0.1
final_total = total - discount
result = final_total
return result
|
The perimeter of a rectangle is 110. The length of the rectangle is twice its width. Find the length and width of the rectangle. | def solve() -> int:
from sympy import solve,symbols
w,l = symbols('w l')
eq1 = 2*(2*w + w) - 110
eq2 = l - 2*w
s = solve((eq1,eq2),(l,w))
result = (s[l],s[w])
return result
|
A rectangle has a length that is twice its width. If its perimeter is 24, what is the length of the rectangle? | def solve() -> int:
perimeter = 24
width = perimeter / 6
length = 2 * width
result = length
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.