question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Possible new questions and programs are: Peter bought 12 pencils and 8 notebooks for $36. If each pencil costs $1.5, how much does each notebook cost? | def solve() -> int:
total_pencils = 12 * 1.5
remaining = 36 - total_pencils
cost_notebook = remaining / 8
result = cost_notebook
return result
|
A video game initially costs $60 and is on sale for 25% off. How much will the game cost after the sale? | def solve() -> int:
price = 60
discount = 25 / 100
new_price = price - (price * discount)
result = new_price
return result
|
A pizza chain sold 1200 pizzas in a week. If they sold 200 on Monday and 300 on Tuesday, how many did they sell the rest of the week? | def solve() -> int:
total_sales = 1200
monday = 200
tuesday = 300
rest_of_week = total_sales - (monday + tuesday)
result = rest_of_week
return result
|
Student: A recipe calls for 2/3 cup of sugar and makes 18 cookies. How much sugar is needed to make 36 cookies? | def solve() -> int:
sugar_per_cookie = 2/3
cookies = 18
cookies_needed = 36
sugar_needed = sugar_per_cookie * cookies_needed
result = sugar_needed
return result
|
The surface area of a cube is 294 square cm. What is the volume of the cube? | def solve() -> int:
surface_area = 294
side_length = (surface_area/6) ** 0.5
volume = side_length ** 3
result = volume
return result
|
If a school needs 40 pencils for every 2 classrooms, how many pencils will be needed for 15 classrooms? | def solve() -> int:
classrooms = 15
pencils_per_classroom = 40/2
total_pencils = pencils_per_classroom * classrooms
result = total_pencils
return result
|
Student: Gary receives $12 per hour for his job. He worked for 2 and a half hours on the last day. How much money did he make that day? | def solve() -> int:
hourly_rate = 12
hours_worked = 2.5
total_amount = hourly_rate * hours_worked
result = total_amount
return result
|
A restaurant adds a 15% service charge to the total cost of each order. If the total cost including the service charge for a group of 6 people is $328.50, what is the average cost per person for the group? | def solve() -> int:
people_count = 6
total_cost = 328.50
service_charge_pct = 0.15
subtotal_cost = total_cost / (1 + service_charge_pct)
cost_per_person = subtotal_cost / people_count
result = cost_per_person
return result
|
Aiden bought 2 cans of soda and 20 packs of chips. If each can of soda costs $1 and a pack of chips costs the same as 3 cans of soda, how much change will Aiden get back if he gave the cashier 4 $5 bills? | def solve() -> int:
soda_cost = 1
chips_cost = 3 * soda_cost
num_soda = 2
num_chips = 20
total_cost = (num_soda * soda_cost) + (num_chips * chips_cost)
cash_given = 4 * 5
change = cash_given - total_cost
result = change
return result
|
In the kingdom of Regulus, there are 50 chefs. One-tenth of the kingdom's chefs have won culinary awards. How many chefs have not won culinary awards? | def solve() -> int:
total_chefs = 50
award_winners = total_chefs / 10
non_winners = total_chefs - award_winners
result = non_winners
return result
|
There are 21 pencils in a box. If Ed takes 5 pencils, how many pencils are remaining in the box? | def solve() -> int:
n_pencils = 21
take_pencils = 5
n_remaining = n_pencils - take_pencils
result = n_remaining
return result
|
Omar's fish eats 5 flakes of food every 6 minutes. Omar feeds his fish 30 flakes of food before going to the park. When he returns, Omar sees that his fish has 12 flakes of food left in the tank. How many minutes did Omar play at the park? | def solve() -> int:
rate = 5 / 6
ate = 30 - 12
time = ate / rate
result = time
return result
|
Question5: If 8 kg of flour costs $13, how much would 4 kg cost? | def solve() -> int:
price_for_8kg_flour = 13
weight_of_flour = 4
price_for_4kg_flour = price_for_8kg_flour * (weight_of_flour / 8)
result = price_for_4kg_flour
return result
|
Jack has two more kites than Pearl has. If Jack has 18 kites, how many kites does Pearl have? | def solve() -> int:
kites_jack = 18
kites_pearl = kites_jack - 2
result = kites_pearl
return result
|
A train travels 150 miles from point A to point B in 3 hours. If the train travels at a constant speed, what is its average speed? | def solve() -> int:
distance = 150
time = 3
average_speed = distance / time
result = average_speed
return result
|
Ben purchases 6 DVD's from a store. Each DVD cost $5. How much does Ben spend in total? | def solve() -> int:
price_of_dvd = 5
number_of_dvd = 6
total_price = number_of_dvd * price_of_dvd
result = total_price
return result
|
Katie is planting a row of 10 trees. She digs a hole for the first tree and that hole is 3 feet deep. For each additional tree, the hole gets deeper by 2 feet. How deep is the hole for the last tree? | def solve() -> int:
holeDepth = 0
for n in range(10):
holeDepth += n * 2 + 3
result = holeDepth
return result
|
A video game console costs $300. If a store is offering a 20% discount, how much will the console cost after the discount? | def solve() -> int:
original_price = 300
discount = 20/100
discount_amount = original_price * discount
final_price = original_price - discount_amount
result = final_price
return result
|
A box of pencils contains 24 pencils. If you need 150 pencils for a classroom, how many boxes do you need to buy? | def solve() -> int:
num_pencils_per_box = 24
pencils_needed_for_classroom = 150
num_boxes_needed = pencils_needed_for_classroom / num_pencils_per_box
result = num_boxes_needed
return result
|
Michael has 2 bags of candies. The first bag contains 30 chocolates and 15 gummies, while the second bag contains 25 chocolates and 20 gummies. He adds 10 more chocolates to each bag. What is the ratio of chocolates to gummies in each bag now? | def solve() -> int:
first_bag_chocolates = 30
first_bag_gummies = 15
second_bag_chocolates = 25
second_bag_gummies = 20
first_bag_chocolates += 10
second_bag_chocolates += 10
first_bag_ratio = first_bag_chocolates / first_bag_gummies
second_bag_ratio = second_bag_chocolates / s... |
Carter bought 10 toy cars. Each car has 10 pieces. 4 pieces are blue and the rest are red. How many red pieces did Carter get? | def solve() -> int:
number_of_cars = 10
pieces_per_car = 10
blue_pieces_per_car = 4
total_pieces = number_of_cars * pieces_per_car
red_pieces = total_pieces - (number_of_cars * blue_pieces_per_car)
result = red_pieces
return result
|
A young athlete purchased 3 different kinds of sports gear for a total of $87. If the baseball bat was $30, and the running shoes were $35, how much did the other item cost? | def solve() -> int:
x = 87
y = 30
z = 35
result = x - y - z
return result
|
A pizza has 8 slices. If each slice has a calorie count of 200, how many calories are in the whole pizza? | def solve() -> int:
calories_per_slice = 200
num_of_slices_in_pizza = 8
total_calories_in_pizza = calories_per_slice * num_of_slices_in_pizza
result = total_calories_in_pizza
return result
|
Possible math questions and python programs: A farmer has 10 cows and 8 chickens. Each cow produces 12 liters of milk and each chicken produces 3 eggs per day. How many liters of milk and how many eggs does the farmer get in a week? | def solve() -> int:
cows = 10
chickens = 8
milk_per_cow = 12
eggs_per_chicken = 3
milk_per_day = cows * milk_per_cow
eggs_per_day = chickens * eggs_per_chicken
milk_per_week = milk_per_day * 7
eggs_per_week = eggs_per_day * 7
result = (milk_per_week, eggs_per_week)
return result
|
Student: Denise bought a box for storing her winter hats which contained 48 slots. If Denise has 14 hats, how many slots in the box are still empty? | def solve() -> int:
box_slots = 48
hats = 14
empty_slots = box_slots - hats
result = empty_slots
return result
|
A recipe for spaghetti sauce calls for 2 jars of sauce and serves 8 people. If you're expecting 24 guests, how many jars of sauce do you need? | def solve() -> int:
num_people = 24
original_people = 8
original_sauce = 2
people_factor = num_people / original_people
sauce_needed = original_sauce * people_factor
result = sauce_needed
return result
|
Emma paints a picture every five days for 4 years. If there was no leap year, how many pictures has she painted? | def solve() -> int:
days_in_a_year = 365
days_in_4_years = days_in_a_year * 4
pictures_per_day = 1 / 5
total_pictures = days_in_4_years * pictures_per_day
result = total_pictures
return result
|
Student: There are 27 balls in a basket with 3 different colors: green, yellow, and blue. There are an equal number of each color. What fraction of the balls is blue? | def solve() -> int:
total_balls = 27
num_colors = 3
num_blue = total_balls // num_colors
fraction_blue = num_blue / total_balls
result = fraction_blue
return result
|
``` A car traveled 30 miles in 45 minutes. If it wants to travel 150 miles, how long will it take? | def solve() -> int:
time1 = 45/60
distance1 = 30
distance2 = 150
speed = distance1/time1
time2 = distance2/speed
result = round(time2, 2)
return result
|
John has saved $180. He wants to divide it into three equal parts. What is the value of each part? | def solve() -> int:
savings = 180
num_parts = 3
part_val = savings // num_parts
result = part_val
return result
|
A farmer has a rectangular field with a length of 50 feet and a width of 30 feet. He wants to add a border of 5 feet around the field. What will be the area of the field including the border? | def solve() -> int:
length_of_field = 50
width_of_field = 30
width_of_border = 5
new_length_of_field = length_of_field + 2*width_of_border
new_width_of_field = width_of_field + 2*width_of_border
area_of_new_field = new_length_of_field * new_width_of_field
result = area_of_new_field
retu... |
Nick has 150 songs on his playlist, but he doesn't listen to a lot of them anymore. He decides to keep 60% of his songs and deletes the rest. Of the ones he deletes, only 75% get permanently deleted. How many songs are left on Nick's playlist after the deletion? | def solve() -> int:
total_songs = 150
keep_percentage = 0.6
delete_percentage = 0.4
permanently_deleted_percentage = 0.75
songs_kept = total_songs * keep_percentage
songs_deleted = total_songs * delete_percentage
permanently_deleted = songs_deleted * permanently_deleted_percen... |
Student: Tom bought a pack of gum for $1.25 and candy for $0.75. He gave the cashier $5. How much change did he receive? | def solve() -> int:
gum_price = 1.25
candy_price = 0.75
cash_given = 5
total_price = gum_price + candy_price
change = cash_given - total_price
result = change
return result
|
David collects 5 stamps every month and has 20 stamps at the start of the year. How many stamps will he have at the end of the year? | def solve() -> int:
stamps_year = 5 * 12
stamps_end = stamps_year + 20
result = stamps_end
return result
|
Larry has 15 coins in his piggy bank. 20% of them are quarters, and the rest are dimes. How many dimes does he have? | def solve() -> int:
coins = 15
percent_quarters = 20
quarters = coins * percent_quarters / 100
dimes = coins - quarters
result = dimes
return result
|
A train travels a distance of 200 miles. If it travels at 50 miles per hour for the first 100 miles and then at 75 miles per hour for the remaining distance, how long did the entire trip take? | def solve() -> int:
distance = 200
distance1 = 100
distance2 = distance - distance1
speed1 = 50
speed2 = 75
time1 = distance1 / speed1
time2 = distance2 / speed2
total_time = time1 + time2
result = total_time
return result
|
Matt is part of a book club that allows each member to take turns leading a book discussion every month. The club is made up of two couples and six single people along with Matt and his colleague. How many times a year does Matt get to lead a book discussion? | def solve() -> int:
couples = 2
single_people = 6
matt_and_colleague = 2
total_members = couples*2 + single_people + matt_and_colleague
discussions_per_year = 12
matt_discussions_per_year = discussions_per_year / total_members
result = matt_discussions_per_year
r... |
``` Phillip went to the store and bought two bottles of juice for $2.50 each, three bags of chips for $1.75 each, and a loaf of bread for $2.50. How much money did Phillip spend in total? | def solve() -> int:
juice_price = 2.50
chips_price = 1.75
bread_price = 2.50
juice_quantity = 2
chips_quantity = 3
total_price = (juice_price*juice_quantity) + (chips_price*chips_quantity) + bread_price
result = total_price
return result
|
Sabrina drove for 150 km on a highway and then for another 80% of that distance on a suburban road. How many kilometers did Sabrina drive in total? | def solve() -> int:
distance_hwy = 150
distance_sub = 0.8 * distance_hwy
total_distance = distance_hwy + distance_sub
result = total_distance
return result
|
Student: An ice cream shop has sold 12 liters of ice cream. It is known that each liter of the ice cream contains 8 scoops of ice cream. How many scoops of ice cream have been sold in total? | def solve() -> int:
liters = 12
scoops_per_liter = 8
total_scoops = liters * scoops_per_liter
result = total_scoops
return result
|
The cost of a bicycle is $250.00 and the tax rate is 9%. What is the total cost of the bicycle including tax? | def solve() -> int:
price = 250.00
tax_rate = 9
tax_amount = price * (tax_rate / 100)
total_cost = price + tax_amount
result = total_cost
return result
|
Lisa has a bag filled with candy. Every day, Lisa eats 5 pieces of candy and shares 3 pieces of candy with her brother. There are 200 pieces of candy in the bag at the start of the month. How many pieces of candy will be left in the bag at the end of the month? | def solve() -> int:
lisa_eats = 5 * 30
lisa_shares = 3 * 30
candy_left = 200 - lisa_eats - lisa_shares
result = candy_left
return result
|
Possible examples: Liam has 4 times as many pencils as Leah. If Leah has 12 pencils, how many more pencils does Liam have than Leah? | def solve() -> int:
leah_pencils = 12
liam_pencils = 4 * leah_pencils
difference = liam_pencils - leah_pencils
result = difference
return result
|
Robert bought 5 shirts for $8 each on a Monday. On a Wednesday, the same shirts cost twice as much, and he bought half as many. How much did he spend on shirts for both days? | def solve() -> int:
shirts_monday = 5
price_monday = 8
shirts_wednesday = shirts_monday / 2
price_wednesday = price_monday * 2
total_spent_monday = shirts_monday * price_monday
total_spent_wednesday = shirts_wednesday * price_wednesday
total_spent = total_spent_monday + total_... |
A store owner needs $800. He has $300 and he borrows $500. If he pays the loan back at 12% interest in one year, how much interest does he need to pay? | def solve() -> int:
loan_amount = 500
interest_rate = 0.12
interest_amount = loan_amount * interest_rate
result = interest_amount
return result
|
A train travels at a speed of 70 miles per hour and it is approaching another train moving at 40 miles per hour on the same track. If the two trains are 200 miles apart, how long will it take for them to collide? | def solve() -> int:
speed_train1 = 70
speed_train2 = 40
distance = 200
relative_speed = speed_train1 + speed_train2
time_to_collide = distance / relative_speed
result = time_to_collide
return result
|
Student: 7. Sabrina can learn 55 words a day, Arnold can learn 75 words a day, and Neal can learn 90 words a day. How many words can they learn in 4 days? | def solve() -> int:
sabrina_words = 55
arnold_words = 75
neal_words = 90
days = 4
total_words = sabrina_words * days + arnold_words * days + neal_words * days
result = total_words
return result
|
Mr. and Mrs. Brown have 90 goldfish, 10 sharks, and 40 angelfish in their aquarium. They gave away 5% of the animals and bought 30 more angelfish. If exactly half of the animals are tropical fish, how many tropical fish are in the aquarium? | def solve() -> int:
goldfish = 90
sharks = 10
angelfish = 40
total_animals = goldfish + sharks + angelfish
animals_given_away = total_animals * 0.05
new_angelfish = angelfish + 30
new_total_animals = total_animals - animals_given_away + 30
tropical_fish = new_tot... |
Chris purchased T-shirts for her workers. She purchased shirts for both males and females. Females' T-shirts were $John had $50. He lent $25 to his brother. If his brother returned the money with an interest of 15%, how much money will John have in total? | def solve() -> int:
john_money = 50
lent_money = 25
interest_rate = 0.15
returned_money = lent_money * (1 + interest_rate)
total_money = john_money + returned_money
result = total_money
return result
|
A pet store has 30 cats, of which 60% are males. If 80% of the females and 90% of the males are adopted, how many cats are left in the store? | def solve() -> int:
males = 30*0.6
females = 30 - males
males_adopted = males*0.9
females_adopted = females*0.2
remaining_cats = males + females - (males_adopted + females_adopted)
result = remaining_cats
return result
|
There were 100 marbles on the floor. John took 1/4th of all the marbles and 15 more marbles. After that, Ava picked up the left-over marbles. How many marbles were there on the floor initially? | def solve() -> int:
marbles_on_floor = 100
john_marbles = marbles_on_floor * 1/4 + 15
leftover_marbles = marbles_on_floor - john_marbles
initial_marbles = leftover_marbles + john_marbles
result = initial_marbles
return result
|
A cyclist cycles at 15 mph for 2 hours. How fast would they have to cycle for the next 3 hours to maintain an average speed of 20 mph? | def solve() -> int:
speed1 = 15
time1 = 2
distance1 = speed1 * time1
average_speed = 20
total_time = 5
distance2 = average_speed * total_time - distance1
speed2 = distance2 / 3
result = speed2
return result
|
A rectangular room has a length that is 5 meters longer than the width. The perimeter of the room is 26 meters. What are the dimensions of the room? | def solve() -> int:
perimeter = 26
length = (perimeter + 5) / 2
width = perimeter / 2 - length
result = (length, width)
return result
|
Student: Jennifer bought 5 t-shirts for $10 each and 3 pairs of jeans for $25 each. If tax is 7%, how much did Jennifer pay for everything? | def solve() -> int:
num_tshirts = 5
tshirt_price = 10
num_jeans = 3
jeans_price = 25
tax_rate = 0.07
total_tshirt_cost = num_tshirts * tshirt_price
total_jeans_cost = num_jeans * jeans_price
subtotal = total_tshirt_cost + total_jeans_cost
tax = subtotal * tax_rate
total_cost = su... |
In a game, there were 100 players. One-sixth were eliminated and were replaced with four times the number of players that were eliminated. Then, half as many referees came in as there are players left. How many total players and referees are there in the game? | def solve() -> int:
players = 100
eliminated = players // 6
replaced = 4 * eliminated
players_left = players - eliminated + replaced
referees = players_left // 2
total_players_and_referees = players_left + referees
result = total_players_and_referees
return result
|
A recipe calls for 3/4 cups of sugar to make 12 muffins. If you want to make 36 muffins, how much sugar do you need? | def solve() -> int:
muffins1 = 12
muffins2 = 36
sugar1 = 3/4
sugar2 = (muffins2 / muffins1) * sugar1
result = sugar2
return result
|
Noah is four times as old as Jacob. In 24 months, he will be 80 years old. How many months old is Jacob? | def solve() -> int:
noah_age = 80 - 2
jacob_age = noah_age / 4
months_old = jacob_age * 12
result = months_old
return result
|
A car rental company charges $50 per day for a car, plus 40 cents per mile driven. If a customer rents a car for 5 days and drives 600 miles, what is their total bill? | def solve() -> int:
days = 5
daily_charge = 50
miles_driven = 600
mileage_charge = 0.4
total_bill = days * daily_charge + mileage_charge * miles_driven
result = total_bill
return result
|
A student bought 5 oranges for $1 and 4 apples for $2. How much money has the student spent? | def solve() -> int:
no_of_oranges = 5
price_of_oranges = 1
no_of_apples = 4
price_of_apples = 2
total_cost = (no_of_oranges * price_of_oranges) + (no_of_apples * price_of_apples)
result = total_cost
return result
|
Nick has 5 apple trees in his backyard. Each tree has 7 apples, and each apple has 6 seeds. How many seeds does Nick have altogether? | def solve() -> int:
seeds = 0
for i in range(0, 5):
apples = 7
apple_seeds = 0
for j in range(0, apples):
seed_per_apple = 6
apple_seeds += seed_per_apple
seeds += apple_seeds
result = seeds
return result
|
In a class there are 34 desks and 8 of them are empty. How many desks are filled? | def solve() -> int:
filled_desks = 0
total_desks = 34
empty_desks = 8
filled_desks = total_desks - empty_desks
result = filled_desks
return result
|
Student: A recipe requires 1/4 cup of salt for every 2 cups of flour. If the recipe requires 8 cups of flour, how much salt is needed? | def solve() -> int:
flour = 8
salt = 0
salt = flour / 2 * 1/4
result = salt
return result
|
A trader bought 100 oranges at $20 per kg and sold it at $30 per kg. How much profit did the trader make? | def solve() -> int:
total_oranges = 100
price_bought = 20
price_sold = 30
profit = (price_sold - price_bought) * total_oranges
result = profit
return result
|
A charity fundraiser sold 100 tickets for $30 each, but 30 people did not show up for the event. The fundraiser then sold the leftover food for $10 per plate. How much money did the fundraiser make? | def solve() -> int:
num_tickets_sold = 100
ticket_price = 30
num_noShows = 30
price_per_leftover_plate = 10
total_sales = num_tickets_sold * ticket_price
total_revenue = total_sales + num_noShows * ticket_price + num_noShows * price_per_leftover_plate
result = total_revenue
re... |
If Tom is currently 25 and his mom is three times his age, how old was she when he was born in 1995? | def solve() -> int:
tom_age = 25
mom_age = 3 * tom_age
mom_age_when_tom_was_born = mom_age - tom_age
mom_age_when_tom_was_born_in_1995 = mom_age_when_tom_was_born - (2021 - 1995)
result = mom_age_when_tom_was_born_in_1995
return result
|
Tom works for 8 hours a day, 5 days a week. He gets paid $15 per hour for the first 40 hours he works and $22.5 per hour for any additional hours. If Tom works for 7 weeks, how much money will he earn? | def solve() -> int:
hours_per_day = 8
days_per_week = 5
hours_per_week = hours_per_day * days_per_week
hourly_rate = 15
overtime_rate = 22.5
regular_weekly_pay = hours_per_week * hourly_rate
overtime_pay = overtime_rate * (hours_per_week - 40)
total_weekly_pay = regular_weekly_pay + over... |
Alice wants to buy a set of 4 notebooks that costs $6 each and 2 packs of pens at $3 each. What is the total cost? | def solve() -> int:
set_notebooks = 4
notebook_price = 6
pack_pens = 2
pen_price = 3
total_cost = (set_notebooks * notebook_price) + (pack_pens * pen_price)
result = total_cost
return result
|
Amy has $100 and wants to buy some skirts and tops. She wants to buy at least 2 skirts and 3 tops. Skirts cost $20 each, and tops cost $15 each. What is the maximum number of skirts she can buy if she spends all her money? | def solve() -> int:
total_money = 100
skirt_cost = 20
top_cost = 15
min_skirts = 2
min_tops = 3
max_skirts = (total_money - min_tops * top_cost) // skirt_cost
result = max_skirts
return result
|
A pizza has a diameter of 16 inches. If the price is $0.10 per square inch, how much does the pizza cost? | def solve() -> int:
radius = 8
area = 3.14 * radius ** 2
cost = 0.1 * area
result = cost
return result
|
At a pizzeria, the cost of 4 slices of pizza is equal to the cost of 3 cans of soda. If a slice of pizza costs $2, how much does a can of soda cost? | def solve() -> int:
cost_of_pizza_slice = 2
slices_of_pizza = 4
cans_of_soda = 3
cost_of_soda_can = (slices_of_pizza * cost_of_pizza_slice) / cans_of_soda
result = cost_of_soda_can
return result
|
Jack has four bags of candy. Each bag contains 12 pieces of candy. He wants to share them equally among his six friends and himself. How many pieces of candy will each person get? | def solve() -> int:
bags = 4
pieces = 12
people = 7
total = bags * pieces
per_person = total // people
result = per_person
return result
|
Tom and Jerry have a total of $160. If Tom has twice as much money as Jerry, how much money does Tom have? | def solve() -> int:
total_money = 160
jerry_money = total_money / 3
tom_money = jerry_money * 2
result = tom_money
return result
|
Karen takes 25 minutes to run on a treadmill and one-fifth of that time to stretch afterwards. If Karen runs at a rate of 7 miles per hour for 3 miles, how long does she need to stretch to cool down? | def solve() -> int:
treadmill_time = 25
stretch_time = treadmill_time / 5
running_speed = 7
distance = 3
running_time = distance / running_speed
stretching_time = stretch_time * running_time
result = stretching_time
return result
|
Student: Sarah and her team are planting flowers at the park. On the first day they planted 58 flowers. On the second day, they planted four times as much as the first day and on the third day they planted an additional 57 flowers. How many flowers did they planted for the three days? | def solve() -> int:
first_day = 58
second_day = first_day * 4
third_day = 57
total_flowers = first_day + second_day + third_day
result = total_flowers
return result
|
A television was priced at $600, but it was sold for $510. What percent discount was given? | def solve() -> int:
discount = 1 - (510/600)
discount_percent = discount * 100
result = discount_percent
return result
|
Daniel’s doctor advised him to walk 120% of his weight in steps per day. If Daniel weighs 150 pounds, how many steps should he take each day? | def solve() -> int:
weight = 150
percentage = 120
steps = weight * (percentage / 100)
result = steps
return result
|
Student: Alex bought a new phone that costs $1000. If the shop was offering 10% discount, how much money did he save? | def solve() -> int:
price = 1000
discount = 0.1
saved = price * discount
final_price = price - saved
result = saved
return result
|
Lisa is planning her restaurant's menu and wants to calculate the average price of her dishes. She has 10 dishes on the menu with the prices 15.95, 18.50, 22.00, 14.75, 16.25, 21.50, 19.95, 24.00, 17.50, and 15.00. What is the average price of her dishes? | def solve() -> int:
num_dishes = 10
dish_prices = [15.95, 18.50, 22.00, 14.75, 16.25, 21.50, 19.95, 24.00, 17.50, 15.00]
total_price = sum(dish_prices)
average_price = total_price / num_dishes
result = average_price
return result
|
Possible new questions and programs: David has a box of chocolates that he wants to share with his friends. The box has 16 rows and 12 columns of chocolates. Each chocolate has a different flavor and a different number of calories. The top left chocolate has 50 calories, and each chocolate to the right of it has 10 mor... | def solve() -> int:
calories = 50
for col in range(1, 12):
calories += 10
for row in range(1, 16):
calories += 5
result = calories
return result
|
Student: A jar contains 36 jelly beans. If 12 are removed from the jar, how many jelly beans remain? | def solve() -> int:
jelly_beans_in_jar = 36
jelly_beans_removed = 12
jelly_beans_remaining = jelly_beans_in_jar - jelly_beans_removed
result = jelly_beans_remaining
return result
|
A picnic is being planned for 25 people. You are in charge of bringing the sandwiches. Each pack of sandwiches contains 8 sandwiches and costs $7 per pack. Assuming each person will have 1 sandwich, how much should each person pay for their share of the sandwiches? | def solve() -> int:
num_people = 25
sandwiches_per_pack = 8
cost_per_pack = 7
total_sandwiches = num_people
num_packs = total_sandwiches // sandwiches_per_pack + (total_sandwiches % sandwiches_per_pack > 0)
total_cost = num_packs * cost_per_pack
cost_per_person = total_cost / num_people... |
Nate and his friends are camping in the woods. They make a campfire with long logs of wood. They start off by burning one log of wood. After that, they burn 5 more logs that day before going to bed. The next day they burn 10 more logs before they have to pack up and leave. Calculate the total number of logs the group b... | def solve() -> int:
day1_logs = 1
day2_logs = 5
day3_logs = 10
total_logs = day1_logs + day2_logs + day3_logs
result = total_logs
return result
|
A building has 15 stories. The height of each story is 3.5 meters. What is the total height of the building in meters? | def solve() -> int:
story_height = 3.5
num_stories = 15
total_height = story_height * num_stories
result = total_height
return result
|
Student: John is walking his dog at a constant rate of 3 miles per hour. If he walks for 2 hours and then stops for 20 minutes, how far has he walked? | def solve() -> int:
rate = 3
time_walking = 2
time_stopped = 20
time_stopped_in_hours = time_stopped / 60
total_time = time_walking + time_stopped_in_hours
distance = rate * total_time
result = distance
return result
|
A group of 35 plants is divided equally among 5 shelves. How many plants are on each shelf? | def solve() -> int:
num_plants = 35
num_shelves = 5
per_shelf = num_plants / num_shelves
result = per_shelf
return result
|
Below are some possible new questions and programs: A farmer has 12 cows and 8 chickens. Each cow needs 21 gallons of water and each chicken needs 0.5 gallons of water per day. How much water does the farmer need for all his animals in a month (assume 30 days)? | def solve() -> int:
cows_water = 12 * 21
chickens_water = 8 * 0.5
total_water = cows_water + chickens_water
result = total_water * 30
return result
|
A restaurant bill comes to £28.75. If three friends split the bill equally, how much does each person need to pay including a 15% tip? | def solve() -> int:
bill_total = 28.75
tip_rate = 0.15
tip_amount = bill_total * tip_rate
total_with_tip = bill_total + tip_amount
num_people = 3
each_person_pay = total_with_tip / num_people
result = each_person_pay
return result
|
Student: A school has a playground 10 meters long and 9 meters wide. How many square meters of play ground are there in total? | def solve() -> int:
length = 10
width = 9
area = length * width
result = area
return result
|
A train travels 500 miles in 5 hours. What is its speed in miles per hour? | def solve() -> int:
distance = 500
time = 5
speed = distance / time
result = speed
return result
|
A soccer ball costs $20.99 before tax. If the tax rate is 6%, what is the total cost of the soccer ball after tax? | def solve() -> int:
cost_before_tax = 20.99
tax_rate = 0.06
total_cost = cost_before_tax * (1 + tax_rate)
result = total_cost
return result
|
Adam has $85. He spent $25 on groceries and $40 eating out. How much money does Adam have left? | def solve() -> int:
starting_money = 85
groceries_cost = 25
eating_out_cost = 40
money_left = starting_money - (groceries_cost + eating_out_cost)
result = money_left
return result
|
am and Alex are baking a cake. Sam uses 1/3 cup of sugar and Alex uses double the amount. If they want to use a total of 2 cups of sugar, how much sugar does Sam use? | def solve() -> int:
total_sugar = 2
a_sugar = 2/3
s_sugar = (total_sugar - a_sugar) / 2
result = s_sugar
return result
|
Sarah has 40 crayons. Tyler has 15 fewer crayons than Sarah, and Uma has 7 more crayons than Tyler. How many crayons do Tyler and Uma have together? | def solve() -> int:
sarah_crayons = 40
tyler_crayons = sarah_crayons - 15
uma_crayons = tyler_crayons + 7
total_crayons = tyler_crayons + uma_crayons
result = total_crayons
return result
|
Cameron, Dylan, and Emma are painting houses. Cameron painted twice as many houses as Dylan, but Emma painted three times as many houses as Dylan. If Dylan painted 4 houses, how many houses did Emma paint? | def solve() -> int:
dylan_houses = 4
cameron_houses = dylan_houses * 2
emma_houses = dylan_houses * 3
result = emma_houses
return result
|
A recipe calls for 2 cups of flour to make 12 muffins. If someone wants to make 24 muffins, how much flour will they need? | def solve() -> int:
num_muffins = 24
cups_per_muffin = 2/12
total_flour = num_muffins * cups_per_muffin
result = total_flour
return result
|
A box contains 200 candies. If 1/4 of the box is chocolate candies, how many chocolate candies are in the box? | def solve() -> int:
total_candies = 200
fraction_of_chocolates = 1/4
num_of_chocolates = total_candies * fraction_of_chocolates
result = num_of_chocolates
return result
|
Ms. White teaches math in three classes in her school. There are seven times as many students in her third-level math class as in her first-level math class, and the number of student in her second-level math class is three times that of her first-level math class. If Ms. White's first-level class has 30 students, how ... | def solve() -> int:
num1 = 30
num2 = num1 * 3
num3 = num1 * 7
num4 = num1 * 3
result = num1 + num2 + num3 + num4
return result
|
A researcher surveyed 1000 people in a city and found that 45% of them prefer coffee over tea. How many people answered as 'coffee lovers'? | def solve() -> int:
total_people_surveyed = 1000
percentage_of_coffee_lovers = 45
coffee_lovers_count = total_people_surveyed * (percentage_of_coffee_lovers / 100)
result = round(coffee_lovers_count)
return result
|
A company sells products at a price of $10 each. If the cost of producing each product is $7, what is the profit percentage of each product sold? | def solve() -> int:
profit = 10 - 7
profit_percentage = (profit/7)*100
result = profit_percentage
return result
|
A container can hold 20 liters of liquid. There are already 2 liters in the container. How many liters of liquid should be added to bring the container to 75% full? | def solve() -> int:
total_capacity = 20
current_level = 2
target_percentage = 0.75
empty_space = total_capacity - current_level
target_level = total_capacity * target_percentage
liters_required = target_level - current_level
result = liters_required
return result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.