question stringlengths 11 2.89k | code stringlengths 20 7.24k |
|---|---|
Possible new questions and Python programs are: Kamila is wrapping some gifts for her friends. She has a roll of ribbon that is 18 feet long. She cuts off a piece of ribbon that is 8 inches long for each gift. After wrapping 16 gifts, she notices that she has used up more than half of the ribbon. She decides to cut off... | def solve() -> int:
ribbon = 18 * 12
ribbon_used = 16 * 8
ribbon_left = ribbon - ribbon_used
more_gifts = ribbon_left // 6
result = more_gifts
return result
|
phen bought 8 books for $3.50 each. Mary bought 2 books for $3.50 each and 2 books for $4.50 each. How much money did Stephen and Mary spend on books together, in dollars? | def solve() -> int:
stephen_books = 8
mary_books_3_50 = 2
mary_books_4_50 = 2
stephen_cost = stephen_books * 3.50
mary_cost_3_50 = mary_books_3_50 * 3.50
mary_cost_4_50 = mary_books_4_50 * 4.50
total_cost = stephen_cost + mary_cost_3_50 + mary_cost_4_50
result = total_cost... |
John and his friends ordered 2 buckets of chicken, each with 30 pieces. They had 18 pieces in the fridge. If they finished all the chicken in 3 days, how many pieces of chicken did they eat each day? | def solve() -> int:
buckets = 2
pieces_per_bucket = 30
pieces_in_fridge = 18
days = 3
total_pieces = (buckets * pieces_per_bucket) + pieces_in_fridge
pieces_per_day = total_pieces / days
result = pieces_per_day
return result
|
Susan runs 5 kilometers in 35 minutes. At this speed, how long would it take her to run 8 kilometers? | def solve() -> int:
distance_run = 5
time_taken = 35
distance_to_run = 8
time_needed = (time_taken / distance_run) * distance_to_run
result = time_needed
return result
|
To rent a car, you need to pay a daily rate of $40 and a mileage charge of $0.2 per mile. Max rented a car for 2 days and drove 150 miles. He also bought the insurance option that costs $15 per day. How much did Max pay in total for his car rental? | def solve() -> int:
daily_rate = 40
mileage_charge = 0.2
rental_days = 2
miles_driven = 150
insurance_cost = 15
daily_rental_fee = daily_rate * rental_days
mileage_fee = mileage_charge * miles_driven
insurance_fee = insurance_cost * rental_days
total_rental_fee = ... |
A pizza restaurant sells a large pizza for $15 and a small pizza for $10. If the restaurant sold 4 large pizzas and 6 small pizzas one day, how much money did they make? | def solve() -> int:
large_pizza_price = 15
small_pizza_price = 10
num_large_pizzas = 4
num_small_pizzas = 6
total_money_made = (large_pizza_price * num_large_pizzas) + (small_pizza_price * num_small_pizzas)
result = total_money_made
return result
|
QUESTION 5: Alison has 68 baseball cards. She puts them all into 7 even piles. How many cards are in each pile? | def solve() -> int:
cards = 68
cards_per_pile = cards // 7
result = cards_per_pile
return result
|
A rectangular pool measures 30 feet by 15 feet. If the pool needs to be covered with tiles measuring 2 feet by 2 feet, how many tiles are needed? | def solve() -> int:
pool_length = 30
pool_width = 15
tile_length = 2
tile_width = 2
area_pool = pool_length * pool_width
area_tile = tile_length * tile_width
num_tiles = area_pool/area_tile
result = num_tiles
return result
|
Jim and Kim bought 20 ice-creams yesterday. Today they plan to buy 25% more ice-creams than yesterday. If they plan to buy 100 ice-creams in total, how many ice-creams do they have to buy today? A concert hall has 20 rows of seats, with a walkway dividing each row into two sections. If each section fits 5 people, how m... | def solve() -> int:
yesterday = 20
increase = 25
total = 100
today = (total - yesterday) * (100 + increase) / 100
rows = 20
sections = 2
capacity = 5
capacity_total = rows * sections * capacity
result = today + capacity_total
return re... |
A rectangular plot has a length of 50 meters and a width of 30 meters. A path 2 meters wide is to be constructed outside along the perimeter. What is the area of this path? | def solve() -> int:
length = 50
width = 30
path_width = 2
new_length = length + 2 * path_width
new_width = width + 2 * path_width
new_area = new_length * new_width - length * width
result = new_area
return result
|
Monica has a box of 69 pencils. She gave 11 pencils to Jane, and James received 18 pencils. How many pencils are left in the box? | def solve() -> int:
total_pencil = 69
pencil_given_to_jane = 11
pencil_given_to_james = 18
pencil_left = total_pencil - pencil_given_to_jane - pencil_given_to_james
result = pencil_left
return result
|
Ethan has 80 stickers. He wants to divide them equally among his 10 friends and keep 3 for himself. How many stickers will each person get? | def solve() -> int:
stickers_per_friend = (80 - 3) // 10
result = stickers_per_friend
return result
|
A stationary store decides to shut down and sell off all of its items. They have 800 pieces of stationary that would normally cost $10 each. They offer a 90% discount but only sell 60% of the stationary. After paying off their debts, what is the amount of money they have left? | def solve() -> int:
stationary_count = 800
stationary_cost = 10
discount = 0.9
sold_percentage = 0.6
total_cost = stationary_count * stationary_cost
discounted_cost = total_cost * discount
amount_sold = stationary_count * sold_percentage
amount_earned = amount_sold * stationary_cost... |
A car drives at 60 miles per hour for 2 hours. What is the total distance travelled by the car in this time? | def solve() -> int:
speed = 60
time = 2
result = speed * time
return result
|
Eric is learning how to bake and he wants to bake 3 dozen cookies. How many cookies will he need to bake? | def solve() -> int:
total_cookies = 3 * 12
result = 36
return result
|
If there were 40 seats available on a train last week, but only 30 seats available this week, how many less passengers can the train hold this week compared to last week? | def solve() -> int:
last_week_seats = 40
this_week_seats = 30
passengers_difference = last_week_seats - this_week_seats
result = passengers_difference
return result
|
Student: Sam has 15 marbles and he wants to divide them equally among 5 friends. How many marbles does each friend get? | def solve() -> int:
marbles = 15
friends = 5
marbles_per_friend = marbles // friends
remaining_marbles = marbles % friends
result = marbles_per_friend
return result
|
If it takes Tom thrice as long to solve a math exam as it takes him to solve a single problem, and he can solve a single problem in 5 minutes, how many questions can he solve in 2 hours if he spent 30 minutes reviewing the exam paper? | def solve() -> int:
time_per_problem = 5
time_to_solve_exam = time_per_problem * 3
time_spent_reviewing = 30
total_time_available = 2 * 60 - time_spent_reviewing
number_of_problems_solved = total_time_available // time_to_solve_exam
result = number_of_problems_solved
return re... |
Sonia has $500 and she decides to invest half of her money in stocks, which she holds for a month, while the remaining half she deposits in a savings account at a bank that pays 3% interest per annum. How much money does she have at the end of the month? | def solve() -> int:
savings = 500/2
stocks = 500/2
savings += savings*3/12/100
result = savings + stocks
return result
|
There are 412 pages in Robert's textbook. If each page contains 4 questions and he needs to answer all the questions, how many questions does Robert need to answer? | def solve() -> int:
total_pages = 412
questions_per_page = 4
total_questions = total_pages * questions_per_page
result = total_questions
return result
|
George has bought 500 apples at a cost of $3 each. How much did he spend on apples? | def solve() -> int:
cost_per_apple = 3
num_apples = 500
total_cost = 0
total_cost = cost_per_apple * num_apples
result = total_cost
return result
|
Student: In a class of 30 students, the ratio of boys to girls is 2:3. How many boys are there? | def solve() -> int:
total_students = 30
ratio_boys_girls = 2 / 3
fraction_boys = ratio_boys_girls / (ratio_boys_girls + 1)
number_boys = fraction_boys * total_students
number_boys = round(number_boys)
result = number_boys
return result
|
Heather is making a grilled cheese sandwich. She wants to use 2 slices of cheese per sandwich. In a pack of cheese, there are 24 slices. How many packs of cheese will she need to make 20 sandwiches? | def solve() -> int:
slices_per_sandwich = 2
sandwiches_needed = 20
slices_needed = sandwiches_needed * slices_per_sandwich
slices_per_pack = 24
packs_needed = slices_needed / slices_per_pack
result = packs_needed
return result
|
Alex can do 10 push-ups in 1 minute. If he wants to do 50 push-ups, how many minutes will it take him? | def solve() -> int:
push_ups_per_minute = 10
target_push_ups = 50
minutes = target_push_ups / push_ups_per_minute
result = minutes
return result
|
``` A triangle has a base of 18 meters and a height of 12 meters. What is the area of the triangle? | def solve() -> int:
base = 18
height = 12
area = 0.5 * base * height
result = area
return result
|
A rectangular box is 2 feet long, 3 feet wide, and 4 feet high. What is its volume? | def solve() -> int:
length = 2
width = 3
height = 4
volume = length * width * height
result = volume
return result
|
If Mandy is 8 years younger than Mike and their sum of ages is 34, what is Mike's age? | def solve() -> int:
sum_ages = 34
mandy_mike_diff = (sum_ages / 2) - 8
mike_age = mandy_mike_diff + 8
result = mike_age
return result
|
Alex has 5 fewer books than Maria and Maria has twice the number of books as Eva. If Eva has 10 books, how many books does Alex have? | def solve() -> int:
books_eva = 10
books_maria = books_eva * 2
books_alex = books_maria - 5
result = books_alex
return result
|
Michael is counting the number of seats in the auditorium. 60% of the seats are on the main level, 30% are in the balcony, and the rest are in the VIP section. If there are 50 seats in the balcony, how many seats are in the VIP section? | def solve() -> int:
main_level_seats = 0.6
balcony_seats = 0.3
total_seats = 100
balcony_seats_count = 50
main_level_seats_count = total_seats * main_level_seats
vip_seats_count = total_seats - (main_level_seats_count + balcony_seats_count)
result = vip_seats_count
return ... |
Possible questions and programs are: Ben has 3 medium pizzas, each with 6 slices. He shares them equally with his 4 friends. How many slices does each person get? | def solve() -> int:
total_slices = 3 * 6
number_of_people = 5
slices_per_person = total_slices / number_of_people
result = slices_per_person
return result
|
Q7) There were 22 coins in a pouch. Jim took 8 coins and added 4 back. Then he removed 12 more coins. How many coins are in the pouch now? | def solve() -> int:
coins = 22
taken_coins = 8
added_coins = 4
removed_coins = 12
total_coins = coins + added_coins - taken_coins - removed_coins
result = total_coins
return result
|
A pizza has 8 slices. Tom and Jerry share 2 pizzas with Tom eating 3 slices and Jerry eating 2 slices. How many slices are left? | def solve() -> int:
total_slices = 8 * 2
slices_eaten = 3 + 2
slices_left = total_slices - slices_eaten
result = slices_left
return result
|
Ryan and Emily are making a salad. Ryan puts in 18 pieces of lettuce and Emily puts in half that amount. Emily also adds 5 cherry tomatoes. If they end up with a total of 28 items in their salad, how many pieces of lettuce did Emily put in? | def solve() -> int:
lettuce_ryan = 18
lettuce_emily = lettuce_ryan / 2
tomatoes_emily = 5
total_items = lettuce_ryan + lettuce_emily + tomatoes_emily
lettuce_emily = (total_items - tomatoes_emily) / 2
result = lettuce_emily
return result
|
A triangle with sides 5 cm, 12 cm, and a certain side has a perimeter of 42 cm. What is the length of the unknown side? | def solve() -> int:
perimeter = 42
known_sides = 5 + 12
unknown_side = perimeter - known_sides
result = unknown_side
return result
|
A bag has 10 red marbles and 8 blue marbles. If you pick 3 marbles at random, what is the probability that all 3 marbles will be red? | def solve() -> int:
red_marbles = 10
blue_marbles = 8
total_marbles = red_marbles + blue_marbles
prob_1_red = red_marbles / total_marbles
prob_2_red = (red_marbles - 1) / (total_marbles - 1)
prob_3_red = (red_marbles - 2) / (total_marbles - 2)
probability = prob_1_red * prob_2_red * prob_3_r... |
A jar contains 120 red marbles, 80 blue marbles, and 100 green marbles. If a marble is chosen at random, what is the probability it will be blue? | def solve() -> int:
total_marbles = 120 + 80 + 100
blue_marbles = 80
probability_of_blue = blue_marbles / total_marbles
result = probability_of_blue
return result
|
A rectangular swimming pool has a length of 75 feet and a width of 50 feet. The pool is surrounded by a concrete deck that is 5 feet wide. How much area does the concrete deck cover? | def solve() -> int:
deck_area = 4800 - 3750
result = deck_area
return result
|
John runs 3 km on Monday, 4 km on Tuesday, and 5 km on Wednesday. On average, how many kilometers does John run each day in a week. | def solve() -> int:
total_km = 3 + 4 + 5
avg_km_per_day = total_km / 3
result = avg_km_per_day
return result
|
A library has 30 shelves of books, each containing 50 books of different genres. On average, it takes 2 minutes to find a book of a specific genre. How long would it take to find all the books of each genre? | def solve() -> int:
num_shelves = 30
books_per_shelf = 50
time_per_book = 2
total_books = num_shelves * books_per_shelf
total_time = total_books * time_per_book
result = total_time
return result
|
Every month, Katie spends $40 on internet. If she continues to do this for 2 years, how much does she spend on internet in total? | def solve() -> int:
monthly_cost = 40
total_cost = monthly_cost * 12 * 2
result = total_cost
return result
|
arah is saving up to buy a laptop for $850. She earns $20 for each day of babysitting, and she has already saved $250. How many days of babysitting does Sarah need to do to buy her laptop? | def solve() -> int:
days_needed = 0
money_earned = 20
money_needed = 850 - 250
days_needed = money_needed / money_earned
result = days_needed
return result
|
Ava is walking up stairs to reach her office on the 10th floor. Each level has 14 steps. Each step is made up of two metal plates. By the time she reaches her floor, she has walked past 1,400 metal plates. How many levels are in the office building? Emma wants to increase her daily step count from 5,000 to 8,000 in 90 ... | def solve() -> int:
plates_per_level = 14 * 2
total_plates = 1400
levels_walked_past = total_plates // plates_per_level
total_levels = 10
office_level = total_levels - levels_walked_past
additional_steps = (8000 - 5000) / 90
result = office_level, additional_ste... |
At a restaurant, 70% of customers ordered burgers, while 40% ordered fries. If 30% ordered both, what percentage of customers ordered neither burgers nor fries? | def solve() -> int:
burgers = 0.7
fries = 0.4
both = 0.3
neither = 1 - (burgers + fries - both)
result = neither
return result
|
Student: David has a lemonade stand that sells lemonade for $0.25 per cup. He spends $5.00 on lemons, $3.00 on sugar, and $2.00 on cups every week. He can make 100 cups of lemonade with the ingredients he buys. He sells 80 cups of lemonade every week. How much money does he save in a week? | def solve() -> int:
price = 0.25
cost_lemons = 5.00
cost_sugar = 3.00
cost_cups = 2.00
cups_made = 100
cups_sold = 80
revenue = price * cups_sold
cost = cost_lemons + cost_sugar + cost_cups
profit = revenue - cost
saved = profit + (cups_made - cups_sold) * price
res... |
A recipe calls for 3/4 cups of flour and 1/2 cup of sugar. If you want to double the recipe, how much of each ingredient would you need? | def solve() -> int:
flour = 3/4
sugar = 1/2
doubled_flour = flour * 2
doubled_sugar = sugar * 2
result = (doubled_flour, doubled_sugar)
return result
|
Emma does a 20 minute yoga routine every day to maintain her health. She does yoga on Monday, Wednesday, and Friday. On Friday, she did yoga for 8 minutes. On Wednesday, she did twice as long as on Monday. How long did she do yoga on Monday? | def solve() -> int:
monday_yoga = 0
wednesday_yoga = 0
friday_yoga = 8
monday_yoga = friday_yoga / 2
result = monday_yoga
return result
|
If David has to pay $15/month for 250 minutes of talk time and $0.10/minute for every additional minute, how much will he need to pay for 400 minutes of talk time? | def solve() -> int:
minutes_included = 250
additional_minutes = 400 - minutes_included
additional_cost = additional_minutes * 0.10
total_cost = 15 + additional_cost
result = total_cost
return result
|
There are 12 eggs in a carton. If 2 cartons are used, how many eggs are left? | def solve() -> int:
eggs_per_carton = 12
cartons_used = 2
total_eggs = eggs_per_carton*cartons_used
eggs_left = total_eggs - eggs_per_carton
result = eggs_left
return result
|
Anna and her friends are promoting an upcoming concert. They have printed out 750 flyers to distribute. David gave out 100 flyers, Lucy gave out 150, and Anna handed out the rest. What percentage of the flyers did Anna distribute? | def solve() -> int:
total_flyers = 750
david_flyers = 100
lucy_flyers = 150
anna_flyers = total_flyers - david_flyers - lucy_flyers
percentage_anna = (anna_flyers / total_flyers) * 100
result = percentage_anna
return result
|
Student: Tom had 24 candies and he gave away some to his friends. He kept one-third of the candies for himself and divided the rest equally among 6 friends. How many candies did each friend get? | def solve() -> int:
total_candies = 24
candies_for_himself = total_candies // 3
candies_for_friends = total_candies - candies_for_himself
candies_per_friend = candies_for_friends // 6
result = candies_per_friend
return result
|
Madison bakes a cake and would like to divide it evenly into 16 pieces. What angle does she need to cut the cake at so that it can be divided evenly? | def solve() -> int:
number_of_pieces = 16
angle_of_cut = 360 / number_of_pieces
result = angle_of_cut
return result
|
Possible questions and programs are: Kevin and Leah both participated in a spelling bee contest with 30 words. Kevin spelled 5 words wrong and Leah spelled 3 more words wrong than half the number of words Kevin spelled right. How many words did Leah spell wrong? | def solve() -> int:
kevin_right = 30 - 5
kevin_half = kevin_right / 2
leah_more = 3
leah_wrong = kevin_half + leah_more
result = leah_wrong
return result
|
A jewelry store sells $2000 worth of jewelry every day. If they want to make $250,000 in an entire year, how much more money per day should they make selling jewelry? | def solve() -> int:
jewelry_sold_per_day = 2000
total_days_in_a_year = 365
target_yearly_income = 250000
target_daily_income = target_yearly_income / total_days_in_a_year
additional_income_per_day = target_daily_income - jewelry_sold_per_day
result = additional_income_per_day
retur... |
Max is a store owner. He buys 5 gizmos from a wholesaler, each costing $30. When he resells them, he charges a total of $185, including a 7.5% sales tax. How much did Max initially pay to the wholesaler? | def solve() -> int:
total_cost = 185
quantity_of_gizmos = 5
sales_tax = 7.5
total_cost_without_tax = total_cost / (1 + (sales_tax/100))
total_cost_paid_to_wholesaler = total_cost_without_tax / quantity_of_gizmos
result = total_cost_paid_to_wholesaler
return result
|
A bottle of water contains 750 ml of water. If Alex drinks 25% of the water, how much water remains in the bottle? | def solve() -> int:
water_bottle = 750
drunk_percent = 0.25
drunk_water = water_bottle * drunk_percent
remaining_water = water_bottle - drunk_water
result = remaining_water
return result
|
Lily and Sam were painting pictures for a school project. They had two cans of paint, one red and one blue. Each can had 500 ml of paint. Lily used 150 ml of red paint and 100 ml of blue paint. Sam mixed 100 ml of red paint and 200 ml of blue paint to make purple paint. How much more paint did Sam use than Lily? | def solve() -> int:
lily_paint = 150 + 100
sam_paint = 100 + 200
difference = sam_paint - lily_paint
result = difference
return result
|
A car traveled 150 miles on a full tank of gas. If the gas tank can hold up to 18 gallons of gas, what is the gas mileage (miles per gallon) for this car? | def solve() -> int:
distance = 150
gas_tank_capacity = 18
gas_mileage = distance / gas_tank_capacity
result = gas_mileage
return result
|
John saved $40 every month. After 8 months, he decided to spend half of his savings, and then he found that he had $40 left. How much did he save in total? | def solve() -> int:
savings_per_month = 40
months_saved = 8
total_savings = savings_per_month * months_saved
spent_savings = total_savings / 2
remaining_savings = 40
total_savings = (remaining_savings + spent_savings) * 2
result = total_savings
return result
|
Jane has 48 apples, and she gave some to her friends. If she gave away 1/6 of her apples, how many apples are left with her? | def solve() -> int:
apples = 48
gave_away = apples / 6
left = apples - gave_away
result = left
return result
|
A company produces 500 units of product A per day. If they improve their production by 20%, how many units will they produce per day? | def solve() -> int:
production_increase = 0.2
production2 = 500 * (1 + production_increase)
result = round(production2)
return result
|
Denise has 8 boxes of apples. Each box has 10 apples inside. How many apples does Denise have in total? | def solve() -> int:
num_boxes = 8
num_apples = 10
total_apples = num_boxes * num_apples
result = total_apples
return result
|
Aidan wants to save up for a new camera, which costs $700. He has $200 saved up and gets paid $8 per hour working a part-time job. How many hours will he need to work to have enough money for the camera? | def solve() -> int:
hourly_wage = 8
camera_cost = 700
current_savings = 200
hours_needed = (camera_cost - current_savings)/hourly_wage
result = hours_needed
return result
|
A housing complex has 100 apartments. If each apartment has 3 bedrooms and 4 people live in each bedroom, how many people live in total in the complex? | def solve() -> int:
total_apartments = 100
bedrooms_per_apartment = 3
people_per_bedroom = 4
total_people = total_apartments * bedrooms_per_apartment * people_per_bedroom
result = total_people
return result
|
At the pet store, Marcus had 25 fish. After selling half of them, he then bought 12 more fish. After his cat ate 3 fish and he returned 2 back to the store, how many fish does Marcus have left? In John's cooking class, there are 25 students and 5 instructors. John has 10 aprons on hand. If 30% of his students brought t... | def solve() -> int:
fish_start = 25
fish_sold = fish_start / 2
fish_left = fish_start - fish_sold
fish_bought = 12
fish_total = fish_left + fish_bought
fish_cat = 3
fish_returned = 2
fish_final = fish_total - fish_cat + fish_returned
students = 25
instructors = 5
aprons ... |
Q3: Mary has a store with 30 shelves, each shelf has 5 boxes. Each box has 8 items. How many items are there in all? | def solve() -> int:
total_items = 0
for shelves in range(1, 31):
for boxes in range(1, 6):
total_items = total_items + 8
result = total_items
return result
|
A company offers a bonus of $500 to any employee who brings in a customer who purchases at least $1,000 worth of products. If John just brought in a customer who purchased $2,500 worth of products, how much will he receive as a bonus? | def solve() -> int:
purchase_amount = 2500
min_purchase = 1000
bonus = 500
if purchase_amount >= min_purchase:
john_bonus = bonus
else:
john_bonus = 0
result = john_bonus
return result
|
At a store, a 10-pack of pens costs $5.50 and a 20-pack of pens costs $10. How much does a 30-pack of pens cost? | def solve() -> int:
numPens10Pack = 10
cost10Pack = 5.50
numPens20Pack = 20
cost20Pack = 10
numPens30Pack = 30
cost30Pack = (cost10Pack*(numPens30Pack//numPens10Pack)) + (cost20Pack*(numPens30Pack//numPens20Pack))
result = cost30Pack
return result
|
Student: A salesperson earns a 10% commission on every sale. How much in sales does the salesperson need to make to earn $500 in commission? | def solve() -> int:
commission = 500
percentage = 0.1
sales = commission / percentage
result = sales
return result
|
A family splits the cost of their weekly shopping trip equally. They spent $56 on groceries and $32 on toiletries. If one family member paid $24 in total, what was the total value of their shopping expenses for the week? | def solve() -> int:
groceries = 56
toiletries = 32
total_paid = 24
total_expenses = (groceries + toiletries) * (total_paid / (groceries + toiletries))
result = total_expenses
return result
|
Kevin has a box of cookies to share with his study group. The box has 24 cookies. He brings 3 total boxes. His study group decide that for every box he brings, they will bring one more identical one. There are 18 students in the study group. How many cookies does each student get? | def solve() -> int:
cookies_per_box = 24
total_boxes = 3
total_students = 18
total_cookies = cookies_per_box * total_boxes
cookies_per_student = total_cookies / total_students
result = cookies_per_student
return result
|
Emma wants to knit a scarf for her friend. She wants 1/2 of the scarf to be blue, 30% to be green, and the remainder to be striped. If she uses 4 blue sections and 2 green sections, how many total sections will she need for a scarf that is 60 sections long? | def solve() -> int:
blue_sections = 4
green_sections = 2
total_sections = 60
striped_sections = total_sections - (blue_sections + green_sections)
result = blue_sections + green_sections + striped_sections
return result
|
remaining_money = 3000 / (1 - 2/3) original_money = remaining_money / (1 - 1/5) result = original_money A company produced 3000 items on Monday and 5000 items on Tuesday. If the company increased its production by 50% on Wednesday, how many did they produce on Wednesday? | def solve() -> int:
wednesday_production = 1.5 * (3000 + 5000)
result = wednesday_production
return result
|
John runs 1 mile the first day and then increased his distance by 25% for the five consecutive days. What is the total distance he runs in miles after 5 days? | def solve() -> int:
distance = 1
for i in range(0,5):
distance = distance * 1.25
result = distance
return result
|
A company's revenue in 2020 was 5 million dollars. If the revenue increased by 15%, what was the revenue in 2021? | def solve() -> int:
revenue_2020 = 5000000
increase_percentage = 15
increase_amount = (increase_percentage/100)*revenue_2020
revenue_2021 = revenue_2020 + increase_amount
result = revenue_2021
return result
|
A school has 300 students. If 40% of them are boys, how many girls are there in the school? | def solve() -> int:
percentage_of_boys = 0.4
total_students = 300
boys = percentage_of_boys * total_students
girls = total_students - boys
result = girls
return result
|
A jar has 100 marbles, 60% of them are red and the rest are blue. How many blue marbles are there? | def solve() -> int:
total_marbles = 100
red_percentage = 60
red_marbles = total_marbles * red_percentage / 100
blue_marbles = total_marbles - red_marbles
result = blue_marbles
return result
|
Student: Aiden saw a car for sale at a dealership. He has $14,800 and the car is being sold for $15,310. How much more money does Aiden need to buy the car? | def solve() -> int:
Aiden_money = 14800
Car_price = 15310
Money_needed = Car_price - Aiden_money
result = Money_needed
return result
|
A bike messenger can pedal 10 miles in 40 minutes. After taking cycling lessons, she improves her speed by 40%. How long will it take her to pedal 20 miles? | def solve() -> int:
speed = 10 / (40/60)
improved_speed = speed * 1.4
time = 20 / improved_speed
result = time * 60
return result
|
Student: If a car travels 160 miles in 4 hours, how long will it take to travel 240 miles? | def solve() -> int:
distance = 240
speed = 160/4
time = distance/speed
result = time
return result
|
The price of a shirt is $30. If the store marks it up by 50%, what is the selling price of the shirt? | def solve() -> int:
cost_price = 30
markup_percentage = 50
selling_price = cost_price * (1 + markup_percentage/100)
result = selling_price
return result
|
There are 3 bags of marbles, with 40 marbles in each bag. If 10 marbles are added to each bag, how many marbles are there in total? | def solve() -> int:
marbles_per_bag = 40 + 10
num_bags = 3
total_marbles = marbles_per_bag * num_bags
result = total_marbles
return result
|
Alan bought a pottery set that was originally priced at $30 and went on sale for 25% off. He also paid 6% tax on the discounted price, how much did he pay in total? | def solve() -> int:
original_price = 30
discount = 25/100
tax_rate = 6/100
discount_price = original_price * (1-discount)
final_price = round(discount_price * (1 + tax_rate), 2)
result = final_price
return result
|
Victoria wants to style her hair. She needs to wash it, blow dry it and then flat iron it. It takes 15 minutes to wash her hair, 20 minutes to blow dry it and 10 minutes to flat iron it. Assuming her hair is already washed and dried, how many minutes will it take Victoria to finish styling her hair? | def solve() -> int:
wash_time = 15
dry_time = 20
flat_iron_time = 10
total_time = wash_time + dry_time + flat_iron_time
result = total_time
return result
|
A store has 3000 items. 20% of the items are electronics and 35% are books. How many items are not electronics or books? | def solve() -> int:
total_items = 3000
electronics = total_items * 0.2
books = total_items * 0.35
result = total_items - electronics - books
return result
|
George owns a cow farm and each cow produces 25 cups of milk per day. If it takes 1 cup of milk to make 1 ounce of cheese and 1 ounce of cheese sells for $3, how much can George make from his cow farm in 1 month? | def solve() -> int:
num_cows = 50
milk_per_cow = 25
total_milk = num_cows * milk_per_cow
cheese_per_day = total_milk
days_per_month = 30
total_cheese = cheese_per_day * days_per_month
price_per_ounce = 3
total_revenue = total_cheese * price_per_ounce
res... |
There are 635 plants in a garden. Jennifer plans to water a fourth of them every day. How many plants will Jennifer water each day? | def solve() -> int:
plants_watered = 0
total_plants = 635
fraction_of_plants = 4
plants_watered = total_plants // fraction_of_plants
result = plants_watered
return result
|
Student: Giselle has a discount coupon worth 20% off on a $270 dress. What will the dress cost, in dollars, after the discount? | def solve() -> int:
price = 270
discount = 0.2
discounted_price = price * (1 - discount)
result = round(discounted_price, 2)
return result
|
A store has 1000 toys in stock. The store sells 30% of its toys and gets a new batch of 500 toys. How many toys does the store have in stock now? | def solve() -> int:
total_toys = 1000
sold_toys = total_toys*0.30
remaining_toys = total_toys - sold_toys
new_toys = 500
result = remaining_toys + new_toys
return result
|
A swimming pool is 60ft long, 20ft wide and 10ft deep. How many cubic yards of water are needed to fill the pool? | def solve() -> int:
length = 60
width = 20
depth = 10
cubic_yards_per_cubic_foot = 0.037037
total_cubic_yards = (length * width * depth) * cubic_yards_per_cubic_foot
result = total_cubic_yards
return result
|
Brian and his family are going to the beach with a total budget of $500. Brian spends $150 on a parasol and $50 on snacks and drinks, while his family spends a total of $200 on beach chairs and coolers. How much do they have left for beach activities? | def solve() -> int:
total_budget = 500
brian_parasol = 150
brian_snacks_drinks = 50
family_beach_items = 200
total_spent = brian_parasol + brian_snacks_drinks + family_beach_items
remaining_budget = total_budget - total_spent
result = remaining_budget
return result
|
-**Do not reuse any variables in different questions** Mia is making bracelets for her friends. She has 100 beads of different colors. She wants to use 20 beads for each bracelet. She decides to make each bracelet with 5 blue beads, 4 green beads, 3 red beads, and the rest yellow beads. How many yellow beads does she n... | def solve() -> int:
blue = 5
green = 4
red = 3
yellow = 20 - blue - green - red
bracelets = 100 // 20
total_yellow = yellow * bracelets
result = total_yellow
return result
|
Mark borrowed $1,000 for 3 years at a simple interest rate of 7% per year. How much interest will Mark have to pay? | def solve() -> int:
principal = 1000
rate = 7 / 100
time = 3
interest = principal * rate * time
result = interest
return result
|
A car travels 60 miles per hour. If the car travels for 3 hours, how far will it have gone? | def solve() -> int:
miles_per_hour = 60
hours_driven = 3
total_distance = miles_per_hour * hours_driven
result = f'{total_distance} miles'
result = total_distance
return result
|
Some possible questions and programs are: Mr. Lee bought 480 oranges for his fruit stand. He sold 60% of them in the morning and 25% of the remaining ones in the afternoon. How many oranges did he have left at the end of the day? | def solve() -> int:
oranges = 480
sold_morning = 0.6 * oranges
sold_afternoon = 0.25 * (oranges - sold_morning)
left = oranges - sold_morning - sold_afternoon
result = left
return result
|
A farmer counted a total of 90 cherry trees in his field and remembered that he planted 10 cherry trees each year for the last 9 years. How many cherry trees were already in the field before the 9 year period? | def solve() -> int:
total_trees = 90
trees_added_each_year = 10
years = 9
total_trees_added = trees_added_each_year * years
existing_trees = total_trees - total_trees_added
result = existing_trees
return result
|
A company has $50,000 in profits and wants to pay a bonus to its employees. If the company has 25 employees and the total bonus is $10,000, how much will each employee receive? | def solve() -> int:
bonus_per_employee = 10000 / 25
result = bonus_per_employee
return result
|
A television set costs $350. If the price of the television is increased by 5%, how much will the new tv set cost? | def solve() -> int:
tv_cost=350
percentage_increase=5
new_cost=tv_cost*(1+percentage_increase/100)
result = new_cost
return result
|
In a group of 100 students, 30% own a motorcycle. Of these students, 60% have a driver's license. What is the probability of picking a student who owns a motorcycle and has a driver's license? | def solve() -> int:
total_students = 100
motorcycle_owners = total_students * 0.3
licensed_motorcycle_owners = motorcycle_owners * 0.6
probability = licensed_motorcycle_owners / total_students
result = probability
return result
|
Student: Albert is building a fence around his house. He needs 7 pieces of lumber that are 6 feet long each. How many total feet of lumber does Albert need? | def solve() -> int:
pieces_of_lumber = 7
length_of_lumber = 6
total_feet_of_lumber = pieces_of_lumber * length_of_lumber
result = total_feet_of_lumber
return result
|
The Grand Canyon has a depth that is 1/3 that of the Mariana Trench. The depth of the Mariana Trench is 36,070 feet. One foot of copper on the Grand Canyon is worth 25 times that of one foot of copper on the Mariana Trench. If the total value of all the copper in the world is 8 billion dollars, what is the total value ... | def solve() -> int:
mariana_depth = 36070
grand_canyon_depth = mariana_depth / 3
copper_value_ratio = 25
total_copper_value = 8000000000
mariana_copper_value = mariana_depth * copper_value_ratio
grand_canyon_copper_value = grand_canyon_depth * copper_value_ratio
grand_canyon_total_value = (g... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.