Datasets:
task_id
stringlengths 8
11
| language
stringclasses 1
value | prompt
stringlengths 67
820
| description
stringlengths 12
628
| test
stringlengths 134
152
| entry_point
stringclasses 1
value | canonical_solution
stringlengths 46
582
|
---|---|---|---|---|---|---|
MathQA/0 | python | def problem():
"""
what will be the difference between simple and compound interest at 14 % per annum on a sum of rs . 1000 after 4 years ? n0 = 14.0 n1 = 1000.0 n2 = 4.0
"""
| what will be the difference between simple and compound interest at 14 % per annum on a sum of rs . 1000 after 4 years ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 128.96016000000077)
def check(x): pass
| problem | n0 = 14.0
n1 = 1000.0
n2 = 4.0
t0 = n0 / 100.0
t1 = t0 + 1.0
t2 = n1 * t0
t3 = n2 * t2
t4 = t1**min(n2, 5)
t5 = n1 * t4
t6 = t5 - n1
answer = t6 - t3
return answer
|
MathQA/1 | python | def problem():
"""
there are 28 stations between hyderabad and bangalore . how many second class tickets have to be printed , so that a passenger can travel from any station to any other station ? n0 = 28.0
"""
| there are 28 stations between hyderabad and bangalore . how many second class tickets have to be printed , so that a passenger can travel from any station to any other station ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 870.0)
def check(x): pass
| problem | n0 = 28.0
t0 = n0 + 1.0
t1 = t0 + 1.0
answer = t0 * t1
return answer
|
MathQA/2 | python | def problem():
"""
a full stationary oil tank that is a right circular cylinder has a radius of 100 feet and a height of 25 feet . oil is pumped from the stationary tank to an oil truck that has a tank that is a right circular cylinder until the truck ' s tank is completely filled . if the truck ' s tank has a radius of 6 feet and a height of 10 feet , how far ( in feet ) did the oil level drop in the stationary tank ? n0 = 100.0 n1 = 25.0 n2 = 6.0 n3 = 10.0
"""
| a full stationary oil tank that is a right circular cylinder has a radius of 100 feet and a height of 25 feet . oil is pumped from the stationary tank to an oil truck that has a tank that is a right circular cylinder until the truck ' s tank is completely filled . if the truck ' s tank has a radius of 6 feet and a height of 10 feet , how far ( in feet ) did the oil level drop in the stationary tank ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 0.036)
def check(x): pass
| problem | import math
n0 = 100.0
n1 = 25.0
n2 = 6.0
n3 = 10.0
t0 = math.pi * n0**2
t1 = math.pi * n2**2 * n3
answer = t1 / t0
return answer
|
MathQA/3 | python | def problem():
"""
if n is an integer and 101 n ^ 2 is less than or equal to 10000 , what is the greatest possible value of n ? n0 = 101.0 n1 = 2.0 n2 = 10000.0
"""
| if n is an integer and 101 n ^ 2 is less than or equal to 10000 , what is the greatest possible value of n ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 9.0)
def check(x): pass
| problem | import math
n0 = 101.0
n1 = 2.0
n2 = 10000.0
t0 = n2 / n0
t1 = math.sqrt(max(0, t0))
answer = math.floor(t1)
return answer
|
MathQA/4 | python | def problem():
"""
a constructor estimates that 10 people can paint mr khans house in 4 days . if he uses 5 people instead of 10 , how long will they take to complete the job ? n0 = 10.0 n1 = 4.0 n2 = 5.0 n3 = 10.0
"""
| a constructor estimates that 10 people can paint mr khans house in 4 days . if he uses 5 people instead of 10 , how long will they take to complete the job ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 8.0)
def check(x): pass
| problem | n0 = 10.0
n1 = 4.0
n2 = 5.0
n3 = 10.0
t0 = n0 * n1
t1 = 1.0 / t0
t2 = n2 * t1
answer = 1.0 / t2
return answer
|
MathQA/5 | python | def problem():
"""
the percentage profit earned by selling an article for rs . 1920 is equal to the percentage loss incurred by selling the same article for rs . 1280 . at what price should the article be sold to make 40 % profit ? n0 = 1920.0 n1 = 1280.0 n2 = 40.0
"""
| the percentage profit earned by selling an article for rs . 1920 is equal to the percentage loss incurred by selling the same article for rs . 1280 . at what price should the article be sold to make 40 % profit ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 2240.0)
def check(x): pass
| problem | n0 = 1920.0
n1 = 1280.0
n2 = 40.0
t0 = n2 + 100.0
t1 = n0 + n1
t2 = t0 / 100.0
t3 = t1 / 2.0
answer = t2 * t3
return answer
|
MathQA/6 | python | def problem():
"""
running at the same constant rate , 6 identical machines can produce a total of 360 bottles per minute . at this rate , how many bottles could 10 such machines produce in 4 minutes ? n0 = 6.0 n1 = 360.0 n2 = 10.0 n3 = 4.0
"""
| running at the same constant rate , 6 identical machines can produce a total of 360 bottles per minute . at this rate , how many bottles could 10 such machines produce in 4 minutes ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 2400.0)
def check(x): pass
| problem | n0 = 6.0
n1 = 360.0
n2 = 10.0
n3 = 4.0
t0 = n1 / n0
t1 = n3 * t0
answer = n2 * t1
return answer
|
MathQA/7 | python | def problem():
"""
there are 1000 buildings in a street . a sign - maker is contracted to number the houses from 1 to 1000 . how many zeroes will he need ? n0 = 1000.0 n1 = 1.0 n2 = 1000.0
"""
| there are 1000 buildings in a street . a sign - maker is contracted to number the houses from 1 to 1000 . how many zeroes will he need ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 192.0)
def check(x): pass
| problem | n0 = 1000.0
n1 = 1.0
n2 = 1000.0
t0 = n0 / 10.0
t1 = 10.0 - n1
t2 = t1 * 10.0
t3 = t0 + t2
answer = t3 + 2.0
return answer
|
MathQA/8 | python | def problem():
"""
? % of 360 = 108 n0 = 360.0 n1 = 108.0
"""
| ? % of 360 = 108 | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 30.0)
def check(x): pass
| problem | n0 = 360.0
n1 = 108.0
t0 = n1 * 100.0
answer = t0 / n0
return answer
|
MathQA/9 | python | def problem():
"""
a train running at the speed of 120 km / hr crosses a pole in 18 seconds . what is the length of the train ? n0 = 120.0 n1 = 18.0
"""
| a train running at the speed of 120 km / hr crosses a pole in 18 seconds . what is the length of the train ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 600.0)
def check(x): pass
| problem | n0 = 120.0
n1 = 18.0
t0 = n0 * 1000.0
t1 = t0 / 3600.0
answer = n1 * t1
return answer
|
MathQA/10 | python | def problem():
"""
a train 100 meters long completely crosses a 300 meters long bridge in 45 seconds . what is the speed of the train is ? n0 = 100.0 n1 = 300.0 n2 = 45.0
"""
| a train 100 meters long completely crosses a 300 meters long bridge in 45 seconds . what is the speed of the train is ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 32.0)
def check(x): pass
| problem | n0 = 100.0
n1 = 300.0
n2 = 45.0
t0 = n0 + n1
t1 = n2 / 3600.0
t2 = t0 / 1000.0
answer = t2 / t1
return answer
|
MathQA/11 | python | def problem():
"""
each month a retailer sells 100 identical items . on each item he makes a profit of $ 40 that constitutes 10 % of the item ' s price to the retailer . if the retailer contemplates giving a 5 % discount on the items he sells , what is the least number of items he will have to sell each month to justify the policy of the discount ? n0 = 100.0 n1 = 40.0 n2 = 10.0 n3 = 5.0
"""
| each month a retailer sells 100 identical items . on each item he makes a profit of $ 40 that constitutes 10 % of the item ' s price to the retailer . if the retailer contemplates giving a 5 % discount on the items he sells , what is the least number of items he will have to sell each month to justify the policy of the discount ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 222.22222222222223)
def check(x): pass
| problem | n0 = 100.0
n1 = 40.0
n2 = 10.0
n3 = 5.0
t0 = n0 * n1
t1 = t0 / n2
t2 = n1 + t1
t3 = n3 * t2
t4 = t3 / n0
t5 = n1 - t4
answer = t0 / t5
return answer
|
MathQA/12 | python | def problem():
"""
bookman purchased 55 copies of a new book released recently , 10 of which are hardback and sold for $ 20 each , and rest are paperback and sold for $ 10 each . if 14 copies were sold and the total value of the remaining books was 460 , how many paperback copies were sold ? n0 = 55.0 n1 = 10.0 n2 = 20.0 n3 = 10.0 n4 = 14.0 n5 = 460.0
"""
| bookman purchased 55 copies of a new book released recently , 10 of which are hardback and sold for $ 20 each , and rest are paperback and sold for $ 10 each . if 14 copies were sold and the total value of the remaining books was 460 , how many paperback copies were sold ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 9.0)
def check(x): pass
| problem | import scipy
n0 = 55.0
n1 = 10.0
n2 = 20.0
n3 = 10.0
n4 = 14.0
n5 = 460.0
t0 = scipy.gcd(int(n0), int(n1))
t1 = n1 * n2
t2 = n0 - n1
t3 = n1 * t2
t4 = n2 * t0
t5 = t3 + t1
t6 = t5 - n5
t7 = t6 - t4
answer = t7 / n1
return answer
|
MathQA/13 | python | def problem():
"""
diana is painting statues . she has 1 / 2 of a gallon of paint remaining . each statue requires 1 / 16 gallon of paint . how many statues can she paint ? n0 = 1.0 n1 = 2.0 n2 = 1.0 n3 = 16.0
"""
| diana is painting statues . she has 1 / 2 of a gallon of paint remaining . each statue requires 1 / 16 gallon of paint . how many statues can she paint ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 8.0)
def check(x): pass
| problem | n0 = 1.0
n1 = 2.0
n2 = 1.0
n3 = 16.0
t0 = n0 / n1
t1 = n2 / n3
answer = t0 / t1
return answer
|
MathQA/14 | python | def problem():
"""
if the price of gasoline increases by 25 % and a driver intends to spend only 20 % more on gasoline , by how much percent should the driver reduce the quantity of gasoline that he buys ? n0 = 25.0 n1 = 20.0
"""
| if the price of gasoline increases by 25 % and a driver intends to spend only 20 % more on gasoline , by how much percent should the driver reduce the quantity of gasoline that he buys ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 4.0)
def check(x): pass
| problem | n0 = 25.0
n1 = 20.0
t0 = n0 + 100.0
t1 = n1 + 100.0
t2 = t0 - t1
t3 = t2 / t0
answer = t3 * 100.0
return answer
|
MathQA/15 | python | def problem():
"""
an art gallery has only paintings and sculptures . currently , 1 / 3 of the pieces of art are displayed , and 1 / 6 of the pieces on display are sculptures . if 1 / 3 of the pieces not on display are paintings , and 1000 sculptures are not on display , how many pieces of art does the gallery have ? n0 = 1.0 n1 = 3.0 n2 = 1.0 n3 = 6.0 n4 = 1.0 n5 = 3.0 n6 = 1000.0
"""
| an art gallery has only paintings and sculptures . currently , 1 / 3 of the pieces of art are displayed , and 1 / 6 of the pieces on display are sculptures . if 1 / 3 of the pieces not on display are paintings , and 1000 sculptures are not on display , how many pieces of art does the gallery have ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 2249.9999999999995)
def check(x): pass
| problem | n0 = 1.0
n1 = 3.0
n2 = 1.0
n3 = 6.0
n4 = 1.0
n5 = 3.0
n6 = 1000.0
t0 = n0 / n1
t1 = 1.0 - t0
t2 = n6 / t1
answer = t2 / t1
return answer
|
MathQA/16 | python | def problem():
"""
john and ingrid pay 30 % and 40 % tax annually , respectively . if john makes $ 60000 and ingrid makes $ 72000 , what is their combined tax rate ? n0 = 30.0 n1 = 40.0 n2 = 60000.0 n3 = 72000.0
"""
| john and ingrid pay 30 % and 40 % tax annually , respectively . if john makes $ 60000 and ingrid makes $ 72000 , what is their combined tax rate ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 35.45454545454545)
def check(x): pass
| problem | n0 = 30.0
n1 = 40.0
n2 = 60000.0
n3 = 72000.0
t0 = n2 + n3
t1 = n0 / 100.0
t2 = n1 / 100.0
t3 = n2 * t1
t4 = n3 * t2
t5 = t3 + t4
t6 = t5 / t0
answer = t6 * 100.0
return answer
|
MathQA/17 | python | def problem():
"""
the lenght of a room is 5.5 m and width is 4 m . find the cost of paving the floor by slabs at the rate of rs . 900 per sq . metre . n0 = 5.5 n1 = 4.0 n2 = 900.0
"""
| the lenght of a room is 5.5 m and width is 4 m . find the cost of paving the floor by slabs at the rate of rs . 900 per sq . metre . | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 19800.0)
def check(x): pass
| problem | n0 = 5.5
n1 = 4.0
n2 = 900.0
t0 = n0 * n1
answer = n2 * t0
return answer
|
MathQA/18 | python | def problem():
"""
a corporation double its annual bonus to 100 of its employees . what percent of the employees ’ new bonus is the increase ? n0 = 100.0
"""
| a corporation double its annual bonus to 100 of its employees . what percent of the employees ’ new bonus is the increase ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 50.0)
def check(x): pass
| problem | n0 = 100.0
t0 = 2.0 - 1.0
t1 = t0 / 2.0
answer = n0 * t1
return answer
|
MathQA/19 | python | def problem():
"""
three walls have wallpaper covering a combined area of 300 square meters . by overlapping the wallpaper to cover a wall with an area of 180 square meters , the area that is covered by exactly two layers of wallpaper is 34 square meters . what is the area that is covered with three layers of wallpaper ? n0 = 300.0 n1 = 180.0 n2 = 34.0
"""
| three walls have wallpaper covering a combined area of 300 square meters . by overlapping the wallpaper to cover a wall with an area of 180 square meters , the area that is covered by exactly two layers of wallpaper is 34 square meters . what is the area that is covered with three layers of wallpaper ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 43.0)
def check(x): pass
| problem | n0 = 300.0
n1 = 180.0
n2 = 34.0
t0 = n0 - n1
t1 = t0 - n2
answer = t1 / 2.0
return answer
|
MathQA/20 | python | def problem():
"""
a trader bought a car at 20 % discount on its original price . he sold it at a 40 % increase on the price he bought it . what percent of profit did he make on the original price ? n0 = 20.0 n1 = 40.0
"""
| a trader bought a car at 20 % discount on its original price . he sold it at a 40 % increase on the price he bought it . what percent of profit did he make on the original price ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 12.00000000000001)
def check(x): pass
| problem | n0 = 20.0
n1 = 40.0
t0 = n1 + 100.0
t1 = 100.0 - n0
t2 = t0 * t1
t3 = t2 / 100.0
t4 = t3 / 100.0
t5 = t4 - 1.0
answer = t5 * 100.0
return answer
|
MathQA/21 | python | def problem():
"""
what is the unit digit in the product ( 3 ^ 65 x 6 ^ 59 x 7 ^ 71 ) ? n0 = 3.0 n1 = 65.0 n2 = 6.0 n3 = 59.0 n4 = 7.0 n5 = 71.0
"""
| what is the unit digit in the product ( 3 ^ 65 x 6 ^ 59 x 7 ^ 71 ) ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 4.0)
def check(x): pass
| problem | n0 = 3.0
n1 = 65.0
n2 = 6.0
n3 = 59.0
n4 = 7.0
n5 = 71.0
t0 = n0 * n2
t1 = n0 * t0
t2 = t1 - 4.0
answer = t1 - t2
return answer
|
MathQA/22 | python | def problem():
"""
a start walking from a place at a uniform speed of 6 kmph in a particular direction . after half an hour , b starts from the same place and walks in the same direction as a at a uniform speed and overtakes a after 1 hour 48 minutes . find the speed of b . n0 = 6.0 n1 = 1.0 n2 = 48.0
"""
| a start walking from a place at a uniform speed of 6 kmph in a particular direction . after half an hour , b starts from the same place and walks in the same direction as a at a uniform speed and overtakes a after 1 hour 48 minutes . find the speed of b . | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 6.555555555555555)
def check(x): pass
| problem | n0 = 6.0
n1 = 1.0
n2 = 48.0
t0 = n2 + 60.0
t1 = t0 / 60.0
t2 = n1 / t1
answer = n0 + t2
return answer
|
MathQA/23 | python | def problem():
"""
oak street begins at pine street and runs directly east for 2 kilometers until it ends when it meets maple street . oak street is intersected every 400 meters by a perpendicular street , and each of those streets other than pine street and maple street is given a number beginning at 1 st street ( one block east of pine street ) and continuing consecutively ( 2 nd street , 3 rd street , etc . . . ) until the highest - numbered street one block west of maple street . what is the highest - numbered street that intersects oak street ? n0 = 2.0 n1 = 400.0 n2 = 1.0 n3 = 2.0 n4 = 3.0
"""
| oak street begins at pine street and runs directly east for 2 kilometers until it ends when it meets maple street . oak street is intersected every 400 meters by a perpendicular street , and each of those streets other than pine street and maple street is given a number beginning at 1 st street ( one block east of pine street ) and continuing consecutively ( 2 nd street , 3 rd street , etc . . . ) until the highest - numbered street one block west of maple street . what is the highest - numbered street that intersects oak street ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 4.0)
def check(x): pass
| problem | n0 = 2.0
n1 = 400.0
n2 = 1.0
n3 = 2.0
n4 = 3.0
t0 = n0 * 1000.0
t1 = t0 / n1
answer = t1 - 1.0
return answer
|
MathQA/24 | python | def problem():
"""
50 percent of the members of a study group are women , and 30 percent of those women are lawyers . if one member of the study group is to be selected at random , what is the probability that the member selected is a woman lawyer ? n0 = 50.0 n1 = 30.0
"""
| 50 percent of the members of a study group are women , and 30 percent of those women are lawyers . if one member of the study group is to be selected at random , what is the probability that the member selected is a woman lawyer ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 0.15)
def check(x): pass
| problem | n0 = 50.0
n1 = 30.0
t0 = 5.0 * 5.0
t1 = t0 * 4.0
t2 = n0 / t1
t3 = n1 / t1
answer = t2 * t3
return answer
|
MathQA/25 | python | def problem():
"""
the cost of one photocopy is $ 0.02 . however , a 25 % discount is offered on orders of more than 100 photocopies . if arthur and david have to make 80 copies each , how much will each of them save if they submit a single order of 160 copies ? n0 = 0.02 n1 = 25.0 n2 = 100.0 n3 = 80.0 n4 = 160.0
"""
| the cost of one photocopy is $ 0.02 . however , a 25 % discount is offered on orders of more than 100 photocopies . if arthur and david have to make 80 copies each , how much will each of them save if they submit a single order of 160 copies ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 0.40000000000000013)
def check(x): pass
| problem | n0 = 0.02
n1 = 25.0
n2 = 100.0
n3 = 80.0
n4 = 160.0
t0 = n0 * n3
t1 = n2 - n1
t2 = t1 / n2
t3 = t0 * 2.0
t4 = n4 * t2
t5 = n0 * t4
t6 = t3 - t5
answer = t6 / 2.0
return answer
|
MathQA/26 | python | def problem():
"""
if 6 men and 8 women can do a piece of work in 10 days while 26 men and 48 women can do the same in 2 days , the time taken by 15 men and 20 women in doing the same type of work will be ? n0 = 6.0 n1 = 8.0 n2 = 10.0 n3 = 26.0 n4 = 48.0 n5 = 2.0 n6 = 15.0 n7 = 20.0
"""
| if 6 men and 8 women can do a piece of work in 10 days while 26 men and 48 women can do the same in 2 days , the time taken by 15 men and 20 women in doing the same type of work will be ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 4.0)
def check(x): pass
| problem | n0 = 6.0
n1 = 8.0
n2 = 10.0
n3 = 26.0
n4 = 48.0
n5 = 2.0
n6 = 15.0
n7 = 20.0
t0 = n4 * n5
t1 = n1 * n2
t2 = n0 * n2
t3 = n3 * n5
t4 = t0 - t1
t5 = t2 - t3
t6 = t4 / t5
t7 = n1 / t6
t8 = n7 / t6
t9 = n0 + t7
t10 = n6 + t8
t11 = n2 * t9
answer = t11 / t10
return answer
|
MathQA/27 | python | def problem():
"""
the maximum number of students among them 1345 pens and 775 pencils can be distributed in such a way that each student gets the same number of pens and same number of pencils is : n0 = 1345.0 n1 = 775.0
"""
| the maximum number of students among them 1345 pens and 775 pencils can be distributed in such a way that each student gets the same number of pens and same number of pencils is : | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 5.0)
def check(x): pass
| problem | import scipy
n0 = 1345.0
n1 = 775.0
answer = scipy.gcd(int(n0), int(n1))
return answer
|
MathQA/28 | python | def problem():
"""
two - third of a positive number and 16 / 216 of its reciprocal are equal . find the positive number . n0 = 16.0 n1 = 216.0
"""
| two - third of a positive number and 16 / 216 of its reciprocal are equal . find the positive number . | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 0.3333333333333333)
def check(x): pass
| problem | import math
n0 = 16.0
n1 = 216.0
t0 = n0 * 3.0
t1 = n1 * 2.0
t2 = t0 / t1
answer = math.sqrt(max(0, t2))
return answer
|
MathQA/29 | python | def problem():
"""
find large number from below question the difference of two numbers is 1365 . on dividing the larger number by the smaller , we get 6 as quotient and the 15 as remainder n0 = 1365.0 n1 = 6.0 n2 = 15.0
"""
| find large number from below question the difference of two numbers is 1365 . on dividing the larger number by the smaller , we get 6 as quotient and the 15 as remainder | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 1620.0)
def check(x): pass
| problem | n0 = 1365.0
n1 = 6.0
n2 = 15.0
t0 = n0 - n2
t1 = n1 - 1.0
t2 = t0 / t1
answer = n1 * t2
return answer
|
MathQA/30 | python | def problem():
"""
in a recent election , james received 0.5 percent of the 2,000 votes cast . to win the election , a candidate needed to receive more than 50 percent of the vote . how many additional votes would james have needed to win the election ? n0 = 0.5 n1 = 2000.0 n2 = 50.0
"""
| in a recent election , james received 0.5 percent of the 2,000 votes cast . to win the election , a candidate needed to receive more than 50 percent of the vote . how many additional votes would james have needed to win the election ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 1000.0)
def check(x): pass
| problem | n0 = 0.5
n1 = 2000.0
n2 = 50.0
t0 = 1000.0 + 1000.0
t1 = n0 * t0
answer = t0 - t1
return answer
|
MathQA/31 | python | def problem():
"""
what least number must be subtracted from 3832 so that the remaining number is divisible by 5 ? n0 = 3832.0 n1 = 5.0
"""
| what least number must be subtracted from 3832 so that the remaining number is divisible by 5 ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 2.0)
def check(x): pass
| problem | import math
n0 = 3832.0
n1 = 5.0
t0 = n0 / n1
t1 = math.floor(t0)
t2 = n1 * t1
answer = n0 - t2
return answer
|
MathQA/32 | python | def problem():
"""
find the length of the wire required to go 14 times round a square field containing 5625 m 2 . n0 = 14.0 n1 = 5625.0 n2 = 2.0
"""
| find the length of the wire required to go 14 times round a square field containing 5625 m 2 . | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 4200.0)
def check(x): pass
| problem | import math
n0 = 14.0
n1 = 5625.0
n2 = 2.0
t0 = math.sqrt(n1) # square edge given area
t1 = 4 * t0
answer = n0 * t1
return answer
|
MathQA/33 | python | def problem():
"""
how many bricks , each measuring 25 cm x 11.25 cm x 6 cm , will be needed to build a wall of 1 m x 2 m x 20 cm ? n0 = 25.0 n1 = 11.25 n2 = 6.0 n3 = 1.0 n4 = 2.0 n5 = 20.0
"""
| how many bricks , each measuring 25 cm x 11.25 cm x 6 cm , will be needed to build a wall of 1 m x 2 m x 20 cm ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 237.03703703703704)
def check(x): pass
| problem | n0 = 25.0
n1 = 11.25
n2 = 6.0
n3 = 1.0
n4 = 2.0
n5 = 20.0
t0 = n3 * 100.0
t1 = n4 * 100.0
t2 = n0 * n1
t3 = t0 * t1
t4 = n2 * t2
t5 = n5 * t3
answer = t5 / t4
return answer
|
MathQA/34 | python | def problem():
"""
spanish language broadcast records last 90 min on each of two sides . if it takes 3 hours to translate one hour of broadcast , how long will it take to translate 16 full records ? n0 = 90.0 n1 = 3.0 n2 = 16.0
"""
| spanish language broadcast records last 90 min on each of two sides . if it takes 3 hours to translate one hour of broadcast , how long will it take to translate 16 full records ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 144.0)
def check(x): pass
| problem | n0 = 90.0
n1 = 3.0
n2 = 16.0
t0 = n0 * 2.0
t1 = t0 / 60.0
t2 = n2 * t1
answer = n1 * t2
return answer
|
MathQA/35 | python | def problem():
"""
a can do a piece of work in 4 hours ; b and c together can do it in 3 hours , which a and c together can do it in 2 hours . how long will b alone take to do it ? n0 = 4.0 n1 = 3.0 n2 = 2.0
"""
| a can do a piece of work in 4 hours ; b and c together can do it in 3 hours , which a and c together can do it in 2 hours . how long will b alone take to do it ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 12.000000000000004)
def check(x): pass
| problem | n0 = 4.0
n1 = 3.0
n2 = 2.0
t0 = 1.0 / n1
t1 = 1.0 / n2
t2 = 1.0 / n0
t3 = t1 - t2
t4 = t0 - t3
answer = 1.0 / t4
return answer
|
MathQA/36 | python | def problem():
"""
how many seconds will a 650 meter long train moving with a speed of 63 km / hr take to cross a man walking with a speed of 3 km / hr in the direction of the train ? n0 = 650.0 n1 = 63.0 n2 = 3.0
"""
| how many seconds will a 650 meter long train moving with a speed of 63 km / hr take to cross a man walking with a speed of 3 km / hr in the direction of the train ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 38.99688024958004)
def check(x): pass
| problem | n0 = 650.0
n1 = 63.0
n2 = 3.0
t0 = n1 - n2
t1 = t0 * 0.2778
answer = n0 / t1
return answer
|
MathQA/37 | python | def problem():
"""
today is thursday . i came home from a trip 3 days before the day after last monday . how many days have i been home ? n0 = 3.0
"""
| today is thursday . i came home from a trip 3 days before the day after last monday . how many days have i been home ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 6.0)
def check(x): pass
| problem | n0 = 3.0
t0 = n0 + 1.0
answer = t0 + 2.0
return answer
|
MathQA/38 | python | def problem():
"""
in one hour , a boat goes 19 km along the stream and 5 km against the stream . the speed of the boat in still water ( in km / hr ) is : n0 = 19.0 n1 = 5.0
"""
| in one hour , a boat goes 19 km along the stream and 5 km against the stream . the speed of the boat in still water ( in km / hr ) is : | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 12.0)
def check(x): pass
| problem | n0 = 19.0
n1 = 5.0
t0 = n0 + n1
answer = t0 / 2.0
return answer
|
MathQA/39 | python | def problem():
"""
a profit of rs . 900 is divided between x and y in the ratio of 1 / 2 : 1 / 3 . what is the difference between their profit shares ? n0 = 900.0 n1 = 1.0 n2 = 2.0 n3 = 1.0 n4 = 3.0
"""
| a profit of rs . 900 is divided between x and y in the ratio of 1 / 2 : 1 / 3 . what is the difference between their profit shares ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 180.0)
def check(x): pass
| problem | n0 = 900.0
n1 = 1.0
n2 = 2.0
n3 = 1.0
n4 = 3.0
t0 = n1 / n2
t1 = n1 / n4
t2 = t0 + t1
t3 = n0 / t2
t4 = t3 / n2
t5 = t3 / n4
answer = t4 - t5
return answer
|
MathQA/40 | python | def problem():
"""
a is two years older than b who is twice as old as c . if the total of the ages of a , b and c be 27 , the how old is b ? n0 = 27.0
"""
| a is two years older than b who is twice as old as c . if the total of the ages of a , b and c be 27 , the how old is b ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 10.0)
def check(x): pass
| problem | n0 = 27.0
t0 = 1.0 + 4.0
t1 = n0 - 2.0
t2 = t1 * 2.0
answer = t2 / t0
return answer
|
MathQA/41 | python | def problem():
"""
calculate the share of y , if rs . 2880 is divided among x , y and z in the ratio 3 : 5 : 8 ? n0 = 2880.0 n1 = 3.0 n2 = 5.0 n3 = 8.0
"""
| calculate the share of y , if rs . 2880 is divided among x , y and z in the ratio 3 : 5 : 8 ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 540.0)
def check(x): pass
| problem | n0 = 2880.0
n1 = 3.0
n2 = 5.0
n3 = 8.0
t0 = n1 + n2
t1 = n3 + t0
t2 = n0 / t1
answer = n1 * t2
return answer
|
MathQA/42 | python | def problem():
"""
3 years ago , paula was 3 times as old as karl . in 9 years , paula will be twice as old as karl . what is the sum of their ages now ? n0 = 3.0 n1 = 3.0 n2 = 9.0
"""
| 3 years ago , paula was 3 times as old as karl . in 9 years , paula will be twice as old as karl . what is the sum of their ages now ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 54.0)
def check(x): pass
| problem | n0 = 3.0
n1 = 3.0
n2 = 9.0
t0 = n2 * 2.0
t1 = n0 * n1
t2 = n2 - t0
t3 = t1 - n0
t4 = -t2
t5 = t4 + t3
t6 = t5 * n1
t7 = t6 - t3
answer = t5 + t7
return answer
|
MathQA/43 | python | def problem():
"""
if soundharya rows 49 km upstream and 77 km down steam taking 7 hours each , then the speed of the stream n0 = 49.0 n1 = 77.0 n2 = 7.0
"""
| if soundharya rows 49 km upstream and 77 km down steam taking 7 hours each , then the speed of the stream | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 2.0)
def check(x): pass
| problem | n0 = 49.0
n1 = 77.0
n2 = 7.0
t0 = n2 * 2.0
t1 = n1 - n0
answer = t1 / t0
return answer
|
MathQA/44 | python | def problem():
"""
the digital sum of a number is the sum of its digits . for how many of the positive integers 24 - 140 inclusive is the digital sum a multiple of 7 ? n0 = 24.0 n1 = 140.0 n2 = 7.0
"""
| the digital sum of a number is the sum of its digits . for how many of the positive integers 24 - 140 inclusive is the digital sum a multiple of 7 ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 15.0)
def check(x): pass
| problem | n0 = 24.0
n1 = 140.0
n2 = 7.0
t0 = n0 - n2
answer = t0 - 2.0
return answer
|
MathQA/45 | python | def problem():
"""
20 beavers , working together in a constant pace , can build a dam in 6 hours . how many hours will it take 12 beavers that work at the same pace , to build the same dam ? n0 = 20.0 n1 = 6.0 n2 = 12.0
"""
| 20 beavers , working together in a constant pace , can build a dam in 6 hours . how many hours will it take 12 beavers that work at the same pace , to build the same dam ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 10.0)
def check(x): pass
| problem | n0 = 20.0
n1 = 6.0
n2 = 12.0
t0 = n0 * n1
answer = t0 / n2
return answer
|
MathQA/46 | python | def problem():
"""
if a student loses 6 kilograms , he will weigh twice as much as his sister . together they now weigh 126 kilograms . what is the student ' s present weight in kilograms ? n0 = 6.0 n1 = 126.0
"""
| if a student loses 6 kilograms , he will weigh twice as much as his sister . together they now weigh 126 kilograms . what is the student ' s present weight in kilograms ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 86.0)
def check(x): pass
| problem | n0 = 6.0
n1 = 126.0
t0 = n1 - n0
t1 = t0 / 3.0
answer = n1 - t1
return answer
|
MathQA/47 | python | def problem():
"""
a person buys an article at rs . 575 . at what price should he sell the article so as to make a profit of 15 % ? n0 = 575.0 n1 = 15.0
"""
| a person buys an article at rs . 575 . at what price should he sell the article so as to make a profit of 15 % ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 661.25)
def check(x): pass
| problem | n0 = 575.0
n1 = 15.0
t0 = n1 / 100.0
t1 = n0 * t0
answer = n0 + t1
return answer
|
MathQA/48 | python | def problem():
"""
two consultants can type up a report in 12.5 hours and edit it in 7.5 hours . if mary needs 30 hours to type the report and jim needs 12 hours to edit it alone , how many t hours will it take if jim types the report and mary edits it immediately after he is done ? n0 = 12.5 n1 = 7.5 n2 = 30.0 n3 = 12.0
"""
| two consultants can type up a report in 12.5 hours and edit it in 7.5 hours . if mary needs 30 hours to type the report and jim needs 12 hours to edit it alone , how many t hours will it take if jim types the report and mary edits it immediately after he is done ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 41.42857142857143)
def check(x): pass
| problem | n0 = 12.5
n1 = 7.5
n2 = 30.0
n3 = 12.0
t0 = 1.0 / n0
t1 = 1.0 / n2
t2 = 1.0 / n1
t3 = 1.0 / n3
t4 = t0 - t1
t5 = t2 - t3
t6 = 1 / t4
t7 = 1 / t5
answer = t6 + t7
return answer
|
MathQA/49 | python | def problem():
"""
a trader sells 40 metres of cloth for rs . 8200 at a profit of rs . 15 per metre of cloth . how much profit will the trder earn on 40 metres of cloth ? n0 = 40.0 n1 = 8200.0 n2 = 15.0 n3 = 40.0
"""
| a trader sells 40 metres of cloth for rs . 8200 at a profit of rs . 15 per metre of cloth . how much profit will the trder earn on 40 metres of cloth ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 600.0)
def check(x): pass
| problem | n0 = 40.0
n1 = 8200.0
n2 = 15.0
n3 = 40.0
answer = n0 * n2
return answer
|
MathQA/50 | python | def problem():
"""
a thief goes away with a santro car at a speed of 50 kmph . the theft has been discovered after half an hour and the owner sets off in a bike at 60 kmph when will the owner over take the thief from the start ? n0 = 50.0 n1 = 60.0
"""
| a thief goes away with a santro car at a speed of 50 kmph . the theft has been discovered after half an hour and the owner sets off in a bike at 60 kmph when will the owner over take the thief from the start ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 2.0)
def check(x): pass
| problem | n0 = 50.0
n1 = 60.0
t0 = 1.0 / 2.0
t1 = n1 - n0
t2 = n0 * t0
t3 = t2 / t1
answer = t3 - t0
return answer
|
MathQA/51 | python | def problem():
"""
the average weight of 18 boys in a class is 50.25 kg and that of the remaining 8 boys is 45.15 kg . find the average weights of all the boys in the class . n0 = 18.0 n1 = 50.25 n2 = 8.0 n3 = 45.15
"""
| the average weight of 18 boys in a class is 50.25 kg and that of the remaining 8 boys is 45.15 kg . find the average weights of all the boys in the class . | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 48.68076923076923)
def check(x): pass
| problem | n0 = 18.0
n1 = 50.25
n2 = 8.0
n3 = 45.15
t0 = n0 + n2
t1 = n0 * n1
t2 = n2 * n3
t3 = t1 + t2
answer = t3 / t0
return answer
|
MathQA/52 | python | def problem():
"""
what is the probability for a family with 3 children to have a girl and two boys ( assuming the probability of having a boy or a girl is equal ) ? n0 = 3.0
"""
| what is the probability for a family with 3 children to have a girl and two boys ( assuming the probability of having a boy or a girl is equal ) ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 0.375)
def check(x): pass
| problem | n0 = 3.0
t0 = 1.0 / 2.0
t1 = t0**min(n0, 5)
t2 = t1 * 2.0
t3 = 1.0 - t2
answer = t3 / 2.0
return answer
|
MathQA/53 | python | def problem():
"""
a manufacturer produces a certain men ' s athletic shoe in integer sizes from 8 to 17 . for this particular shoe , each unit increase in size corresponds to a 1 / 5 - inch increase in the length of the shoe . if the largest size of this shoe is 30 % longer than the smallest size , how long , in inches , is the shoe in size 15 ? n0 = 8.0 n1 = 17.0 n2 = 1.0 n3 = 5.0 n4 = 30.0 n5 = 15.0
"""
| a manufacturer produces a certain men ' s athletic shoe in integer sizes from 8 to 17 . for this particular shoe , each unit increase in size corresponds to a 1 / 5 - inch increase in the length of the shoe . if the largest size of this shoe is 30 % longer than the smallest size , how long , in inches , is the shoe in size 15 ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 7.4)
def check(x): pass
| problem | n0 = 8.0
n1 = 17.0
n2 = 1.0
n3 = 5.0
n4 = 30.0
n5 = 15.0
t0 = n2 / n3
t1 = n4 / 100.0
t2 = n1 - n0
t3 = n5 - n0
t4 = t0 * t2
t5 = t0 * t3
t6 = t4 / t1
answer = t6 + t5
return answer
|
MathQA/54 | python | def problem():
"""
a 240 m long train running at the speed of 120 km / hr crosses another train running in opposite direction at the speed of 80 km / hr in 9 sec . what is the length of the other train ? n0 = 240.0 n1 = 120.0 n2 = 80.0 n3 = 9.0
"""
| a 240 m long train running at the speed of 120 km / hr crosses another train running in opposite direction at the speed of 80 km / hr in 9 sec . what is the length of the other train ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 260.03999999999996)
def check(x): pass
| problem | n0 = 240.0
n1 = 120.0
n2 = 80.0
n3 = 9.0
t0 = n1 + n2
t1 = t0 * 0.2778
t2 = n3 * t1
answer = t2 - n0
return answer
|
MathQA/55 | python | def problem():
"""
34 . the side surface of a cylinder is rolled with a rectangular plate . if the perimeter of the circular base is 9 feet , and the diagonal of the rectangular plate was 15 ft . what is height of the of the cylinder ? n0 = 34.0 n1 = 9.0 n2 = 15.0
"""
| 34 . the side surface of a cylinder is rolled with a rectangular plate . if the perimeter of the circular base is 9 feet , and the diagonal of the rectangular plate was 15 ft . what is height of the of the cylinder ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 12.0)
def check(x): pass
| problem | import math
n0 = 34.0
n1 = 9.0
n2 = 15.0
t0 = n2**min(2.0, 5)
t1 = n1**min(2.0, 5)
t2 = t0 - t1
answer = math.sqrt(max(0, t2))
return answer
|
MathQA/56 | python | def problem():
"""
what quantity of water should be added to reduce 9 liters of 50 % acidic liquid to 30 % acidic liquid ? n0 = 9.0 n1 = 50.0 n2 = 30.0
"""
| what quantity of water should be added to reduce 9 liters of 50 % acidic liquid to 30 % acidic liquid ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 6.0)
def check(x): pass
| problem | n0 = 9.0
n1 = 50.0
n2 = 30.0
t0 = n1 / 100.0
t1 = n0 * t0
t2 = t1 * 100.0
t3 = t2 / n2
answer = t3 - n0
return answer
|
MathQA/57 | python | def problem():
"""
the average weight of 20 persons sitting in a boat had some value . a new person added to them whose weight was 46 kg only . due to his arrival , the average weight of all the persons decreased by 5 kg . find the average weight of first 20 persons ? n0 = 20.0 n1 = 46.0 n2 = 5.0 n3 = 20.0
"""
| the average weight of 20 persons sitting in a boat had some value . a new person added to them whose weight was 46 kg only . due to his arrival , the average weight of all the persons decreased by 5 kg . find the average weight of first 20 persons ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 59.0)
def check(x): pass
| problem | n0 = 20.0
n1 = 46.0
n2 = 5.0
n3 = 20.0
t0 = n0 + 1.0
t1 = n2 * t0
answer = t1 - n1
return answer
|
MathQA/58 | python | def problem():
"""
a and b can together finish a work in 40 days . they worked together for 10 days and then b left . after another 18 days , a finished the remaining work . in how many days a alone can finish the job ? n0 = 40.0 n1 = 10.0 n2 = 18.0
"""
| a and b can together finish a work in 40 days . they worked together for 10 days and then b left . after another 18 days , a finished the remaining work . in how many days a alone can finish the job ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 24.0)
def check(x): pass
| problem | n0 = 40.0
n1 = 10.0
n2 = 18.0
t0 = n0 * n2
t1 = n0 - n1
answer = t0 / t1
return answer
|
MathQA/59 | python | def problem():
"""
a student gets 55 % in one subject , 65 % in the other . to get an overall of 55 % how much should get in third subject . n0 = 55.0 n1 = 65.0 n2 = 55.0
"""
| a student gets 55 % in one subject , 65 % in the other . to get an overall of 55 % how much should get in third subject . | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 45.0)
def check(x): pass
| problem | n0 = 55.0
n1 = 65.0
n2 = 55.0
t0 = n0 + n1
t1 = n2 * 3.0
answer = t1 - t0
return answer
|
MathQA/60 | python | def problem():
"""
in an election between two candidates , the winner has a margin of 10 % of the votes polled . if 4000 people change their mind and vote for the loser , the loser would have won by a margin of 10 % of the votes polled . find the total number of votes polled in the election ? n0 = 10.0 n1 = 4000.0 n2 = 10.0
"""
| in an election between two candidates , the winner has a margin of 10 % of the votes polled . if 4000 people change their mind and vote for the loser , the loser would have won by a margin of 10 % of the votes polled . find the total number of votes polled in the election ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 40000.0)
def check(x): pass
| problem | n0 = 10.0
n1 = 4000.0
n2 = 10.0
t0 = n0 / 100.0
answer = n1 / t0
return answer
|
MathQA/61 | python | def problem():
"""
there are 28 stations between ernakulam and chennai . how many second class tickets have to be printed , so that a passenger can travel from one station to any other station ? n0 = 28.0
"""
| there are 28 stations between ernakulam and chennai . how many second class tickets have to be printed , so that a passenger can travel from one station to any other station ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 870.0)
def check(x): pass
| problem | n0 = 28.0
t0 = n0 + 2.0
t1 = t0 - 1.0
answer = t0 * t1
return answer
|
MathQA/62 | python | def problem():
"""
25 is subtracted from 75.00001 % of a number , the result is 50 . find the number ? n0 = 25.0 n1 = 75.00001 n2 = 50.0
"""
| 25 is subtracted from 75.00001 % of a number , the result is 50 . find the number ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 99.99998666666843)
def check(x): pass
| problem | n0 = 25.0
n1 = 75.00001
n2 = 50.0
t0 = n0 + n2
t1 = n1 / 100.0
answer = t0 / t1
return answer
|
MathQA/63 | python | def problem():
"""
half a number plus 7 is 11 . what is the number ? n0 = 7.0 n1 = 11.0
"""
| half a number plus 7 is 11 . what is the number ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 8.0)
def check(x): pass
| problem | n0 = 7.0
n1 = 11.0
t0 = n1 - n0
answer = t0 * 2.0
return answer
|
MathQA/64 | python | def problem():
"""
of the total amount that jill spent on a shopping trip , excluding taxes , she spent 25 percent on clothing , 25 percent on food , and 50 percent on other items . if jill paid a 10 percent tax on the clothing , no tax on the food , and an 2 percent tax on all other items , then the total tax that she paid was what percent of the total amount that she spent , excluding taxes ? n0 = 25.0 n1 = 25.0 n2 = 50.0 n3 = 10.0 n4 = 2.0
"""
| of the total amount that jill spent on a shopping trip , excluding taxes , she spent 25 percent on clothing , 25 percent on food , and 50 percent on other items . if jill paid a 10 percent tax on the clothing , no tax on the food , and an 2 percent tax on all other items , then the total tax that she paid was what percent of the total amount that she spent , excluding taxes ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 3.5000000000000004)
def check(x): pass
| problem | n0 = 25.0
n1 = 25.0
n2 = 50.0
n3 = 10.0
n4 = 2.0
t0 = n3 / 100.0
t1 = n4 / 100.0
t2 = n0 * t0
t3 = n2 * t1
t4 = t2 + t3
t5 = t4 / 100.0
answer = t5 * 100.0
return answer
|
MathQA/65 | python | def problem():
"""
how many 1 / 6 s are there in 37 1 / 2 ? n0 = 1.0 n1 = 6.0 n2 = 37.0 n3 = 1.0 n4 = 2.0
"""
| how many 1 / 6 s are there in 37 1 / 2 ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 225.0)
def check(x): pass
| problem | n0 = 1.0
n1 = 6.0
n2 = 37.0
n3 = 1.0
n4 = 2.0
t0 = n0 / n4
t1 = n0 / n1
t2 = n2 + t0
answer = t2 / t1
return answer
|
MathQA/66 | python | def problem():
"""
the ratio between the present ages of a and b is 7 : 3 respectively . the ratio between a ' s age 4 years ago and b ' s age 4 years hence is 1 : 1 . what is the ratio between a ' s age 4 years hence and b ' s age 4 years ago ? n0 = 7.0 n1 = 3.0 n2 = 4.0 n3 = 4.0 n4 = 1.0 n5 = 1.0 n6 = 4.0 n7 = 4.0
"""
| the ratio between the present ages of a and b is 7 : 3 respectively . the ratio between a ' s age 4 years ago and b ' s age 4 years hence is 1 : 1 . what is the ratio between a ' s age 4 years hence and b ' s age 4 years ago ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 9.0)
def check(x): pass
| problem | n0 = 7.0
n1 = 3.0
n2 = 4.0
n3 = 4.0
n4 = 1.0
n5 = 1.0
n6 = 4.0
n7 = 4.0
t0 = n0 + n0
t1 = n0 - n1
t2 = t0 / t1
t3 = n0 * t2
t4 = n1 * t2
t5 = n0 + t3
t6 = t4 - n0
answer = t5 / t6
return answer
|
MathQA/67 | python | def problem():
"""
if sharon ' s weekly salary increased by 15 percent , she would earn $ 460 per week . if instead , her weekly salary were to increase by 10 percent , how much would she earn per week ? n0 = 15.0 n1 = 460.0 n2 = 10.0
"""
| if sharon ' s weekly salary increased by 15 percent , she would earn $ 460 per week . if instead , her weekly salary were to increase by 10 percent , how much would she earn per week ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 440.00000000000006)
def check(x): pass
| problem | n0 = 15.0
n1 = 460.0
n2 = 10.0
t0 = n0 / 100.0
t1 = n2 / 100.0
t2 = t0 + 1.0
t3 = n1 / t2
t4 = t1 * t3
answer = t3 + t4
return answer
|
MathQA/68 | python | def problem():
"""
a fruit seller had some oranges . he sells 10 % oranges and still has 360 oranges . how many oranges he had originally ? n0 = 10.0 n1 = 360.0
"""
| a fruit seller had some oranges . he sells 10 % oranges and still has 360 oranges . how many oranges he had originally ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 396.0)
def check(x): pass
| problem | n0 = 10.0
n1 = 360.0
t0 = n0 / 100.0
t1 = n1 * t0
answer = n1 + t1
return answer
|
MathQA/69 | python | def problem():
"""
because he ’ s taxed by his home planet , mork pays a tax rate of 40 % on his income , while mindy pays a rate of only 20 % on hers . if mindy earned 4 times as much as mork did , what was their combined tax rate ? n0 = 40.0 n1 = 20.0 n2 = 4.0
"""
| because he ’ s taxed by his home planet , mork pays a tax rate of 40 % on his income , while mindy pays a rate of only 20 % on hers . if mindy earned 4 times as much as mork did , what was their combined tax rate ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 24.000000000000004)
def check(x): pass
| problem | n0 = 40.0
n1 = 20.0
n2 = 4.0
t0 = n2 + 1.0
t1 = n0 / 100.0
t2 = n1 / 100.0
t3 = n2 * t2
t4 = t1 + t3
t5 = t4 / t0
answer = t5 * 100.0
return answer
|
MathQA/70 | python | def problem():
"""
the length of the bridge , which a train 180 metres long and travelling at 45 km / hr can cross in 30 seconds , is ? n0 = 180.0 n1 = 45.0 n2 = 30.0
"""
| the length of the bridge , which a train 180 metres long and travelling at 45 km / hr can cross in 30 seconds , is ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 195.0)
def check(x): pass
| problem | n0 = 180.0
n1 = 45.0
n2 = 30.0
t0 = 1000.0 / 1.0
t1 = 3600.0 / 1.0
t2 = n1 * t0
t3 = t2 / t1
t4 = n2 * t3
answer = t4 - n0
return answer
|
MathQA/71 | python | def problem():
"""
the difference of 2 digit number & the number obtained by interchanging the digits is 36 . what is the difference the sum and the number if the ratio between the digits of the number is 1 : 2 ? n0 = 2.0 n1 = 36.0 n2 = 1.0 n3 = 2.0
"""
| the difference of 2 digit number & the number obtained by interchanging the digits is 36 . what is the difference the sum and the number if the ratio between the digits of the number is 1 : 2 ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 8.0)
def check(x): pass
| problem | n0 = 2.0
n1 = 36.0
n2 = 1.0
n3 = 2.0
t0 = n0 * 1.0
t1 = 10.0 - 1.0
t2 = t0 * t1
t3 = t2 - t1
t4 = n1 / t3
answer = t4 * 2.0
return answer
|
MathQA/72 | python | def problem():
"""
at the faculty of aerospace engineering , 312 students study random - processing methods , 232 students study scramjet rocket engines and 112 students study them both . if every student in the faculty has to study one of the two subjects , how many students are there in the faculty of aerospace engineering ? n0 = 312.0 n1 = 232.0 n2 = 112.0
"""
| at the faculty of aerospace engineering , 312 students study random - processing methods , 232 students study scramjet rocket engines and 112 students study them both . if every student in the faculty has to study one of the two subjects , how many students are there in the faculty of aerospace engineering ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 432.0)
def check(x): pass
| problem | n0 = 312.0
n1 = 232.0
n2 = 112.0
t0 = n2 / 2.0
t1 = n0 - t0
t2 = n1 - t0
answer = t1 + t2
return answer
|
MathQA/73 | python | def problem():
"""
if the average ( arithmetic mean ) of a and b is 100 , and the average of b and c is 160 , what is the value of a − c ? n0 = 100.0 n1 = 160.0
"""
| if the average ( arithmetic mean ) of a and b is 100 , and the average of b and c is 160 , what is the value of a − c ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 120.0)
def check(x): pass
| problem | n0 = 100.0
n1 = 160.0
t0 = n1 * 2.0
t1 = n0 * 2.0
answer = t0 - t1
return answer
|
MathQA/74 | python | def problem():
"""
if n = 2 ^ 0.20 and n ^ b = 16 , b must equal n0 = 2.0 n1 = 0.2 n2 = 16.0
"""
| if n = 2 ^ 0.20 and n ^ b = 16 , b must equal | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 19.99999999999999)
def check(x): pass
| problem | import math
n0 = 2.0
n1 = 0.2
n2 = 16.0
t0 = math.log(max(1e-5, n2), 2)
t1 = n0**min(n1, 5)
t2 = math.log(max(1e-5, t1), 2)
answer = t0 / t2
return answer
|
MathQA/75 | python | def problem():
"""
a man buys an item at rs . 800 and sells it at the loss of 20 percent . then what is the selling price of that item n0 = 800.0 n1 = 20.0
"""
| a man buys an item at rs . 800 and sells it at the loss of 20 percent . then what is the selling price of that item | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 640.0)
def check(x): pass
| problem | n0 = 800.0
n1 = 20.0
t0 = n1 / 100.0
t1 = 1.0 - t0
answer = n0 * t1
return answer
|
MathQA/76 | python | def problem():
"""
find the expenditure on digging a well 14 m deep and of 3 m diameter at rs . 14 per cubic meter ? n0 = 14.0 n1 = 3.0 n2 = 14.0
"""
| find the expenditure on digging a well 14 m deep and of 3 m diameter at rs . 14 per cubic meter ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 1385.442360233099)
def check(x): pass
| problem | import math
n0 = 14.0
n1 = 3.0
n2 = 14.0
t0 = n1 / 2.0
t1 = math.pi * t0**2 * n0
answer = n2 * t1
return answer
|
MathQA/77 | python | def problem():
"""
rani bought more apples than oranges . she sells apples at ₹ 23 apiece and makes 15 % profit . she sells oranges at ₹ 10 apiece and makes 25 % profit . if she gets ₹ 653 after selling all the apples and oranges , find her profit percentage z . n0 = 23.0 n1 = 15.0 n2 = 10.0 n3 = 25.0 n4 = 653.0
"""
| rani bought more apples than oranges . she sells apples at ₹ 23 apiece and makes 15 % profit . she sells oranges at ₹ 10 apiece and makes 25 % profit . if she gets ₹ 653 after selling all the apples and oranges , find her profit percentage z . | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 17.446043165467625)
def check(x): pass
| problem | n0 = 23.0
n1 = 15.0
n2 = 10.0
n3 = 25.0
n4 = 653.0
t0 = n1 + 2.0
t1 = n3 / 100.0
t2 = n2 * 2.0
t3 = t2 + 1.0
t4 = t1 + 1.0
t5 = n2 / t4
t6 = t3 * t2
t7 = t0 * t5
t8 = t6 + t7
t9 = n4 - t8
t10 = t9 / t8
answer = t10 * 100.0
return answer
|
MathQA/78 | python | def problem():
"""
if 8 men or 12 women can do a piece of work in 25 days , in how many days can the same work be done by 6 men and 11 women ? n0 = 8.0 n1 = 12.0 n2 = 25.0 n3 = 6.0 n4 = 11.0
"""
| if 8 men or 12 women can do a piece of work in 25 days , in how many days can the same work be done by 6 men and 11 women ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 15.0)
def check(x): pass
| problem | n0 = 8.0
n1 = 12.0
n2 = 25.0
n3 = 6.0
n4 = 11.0
t0 = n0 * n2
t1 = n1 * n2
t2 = n3 / t0
t3 = n4 / t1
t4 = t2 + t3
answer = 1 / t4
return answer
|
MathQA/79 | python | def problem():
"""
a train 140 meters long takes 6 seconds to cross a man walking at 5 kmph in the direction opposite to that of the train . find the speed of the train . n0 = 140.0 n1 = 6.0 n2 = 5.0
"""
| a train 140 meters long takes 6 seconds to cross a man walking at 5 kmph in the direction opposite to that of the train . find the speed of the train . | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 78.993280537557)
def check(x): pass
| problem | n0 = 140.0
n1 = 6.0
n2 = 5.0
t0 = n1 * 0.2778
t1 = n0 / t0
answer = t1 - n2
return answer
|
MathQA/80 | python | def problem():
"""
find the average of all the number between 6 and 34 which are divisible by 5 . n0 = 6.0 n1 = 34.0 n2 = 5.0
"""
| find the average of all the number between 6 and 34 which are divisible by 5 . | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 20.0)
def check(x): pass
| problem | n0 = 6.0
n1 = 34.0
n2 = 5.0
t0 = n0 + 4.0
t1 = n1 - 4.0
t2 = t0 + t1
answer = t2 / 2.0
return answer
|
MathQA/81 | python | def problem():
"""
if the wheel is 14 cm then the number of revolutions to cover a distance of 880 cm is ? n0 = 14.0 n1 = 880.0
"""
| if the wheel is 14 cm then the number of revolutions to cover a distance of 880 cm is ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 10.009099181073703)
def check(x): pass
| problem | n0 = 14.0
n1 = 880.0
t0 = 100.0 * 3.0
t1 = 1.0 * 10.0
t2 = t0 + t1
t3 = t2 + 4.0
t4 = t3 / 100.0
t5 = t4 * 2.0
t6 = n0 * t5
answer = n1 / t6
return answer
|
MathQA/82 | python | def problem():
"""
a and b can do a piece of work in 7 days , b and c in 8 days , c and a in 9 days . how long will c take to do it ? n0 = 7.0 n1 = 8.0 n2 = 9.0
"""
| a and b can do a piece of work in 7 days , b and c in 8 days , c and a in 9 days . how long will c take to do it ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 21.44680851063829)
def check(x): pass
| problem | n0 = 7.0
n1 = 8.0
n2 = 9.0
t0 = n0 * 3.0
t1 = t0 / n0
t2 = t0 / n1
t3 = t0 / n2
t4 = t1 + t2
t5 = t4 + t3
t6 = t5 / 2.0
t7 = t6 - t1
answer = t0 / t7
return answer
|
MathQA/83 | python | def problem():
"""
oil cans x and y are right circular cylinders and the height and radius of y are each 5 times those of x . if the oil in can x filled to capacity sells for $ 1 , how much does the oil in y sell for if y is only 1 / 5 th filled ? n0 = 5.0 n1 = 1.0 n2 = 1.0 n3 = 5.0
"""
| oil cans x and y are right circular cylinders and the height and radius of y are each 5 times those of x . if the oil in can x filled to capacity sells for $ 1 , how much does the oil in y sell for if y is only 1 / 5 th filled ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 25.0)
def check(x): pass
| problem | n0 = 5.0
n1 = 1.0
n2 = 1.0
n3 = 5.0
t0 = n0**min(n1, 5)
answer = n0 * t0
return answer
|
MathQA/84 | python | def problem():
"""
car x began traveling at an average speed of 35 miles per hour . after 36 minutes , car y began traveling at an average speed of 38 miles per hour . when both cars had traveled the same distance , both cars stopped . how many miles did car x travel from the time car y began traveling until both cars stopped ? n0 = 35.0 n1 = 36.0 n2 = 38.0
"""
| car x began traveling at an average speed of 35 miles per hour . after 36 minutes , car y began traveling at an average speed of 38 miles per hour . when both cars had traveled the same distance , both cars stopped . how many miles did car x travel from the time car y began traveling until both cars stopped ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 245.0)
def check(x): pass
| problem | n0 = 35.0
n1 = 36.0
n2 = 38.0
t0 = n1 / 60.0
t1 = n2 - n0
t2 = n0 * t0
t3 = t2 / t1
answer = n0 * t3
return answer
|
MathQA/85 | python | def problem():
"""
cindy has her eye on a sundress but thinks it is too expensive . it goes on sale for 15 % less than the original price . before cindy can buy the dress , however , the store raises the new price by 25 % . if the dress cost $ 51 after it went on sale for 15 % off , what is the difference between the original price and the final price ? n0 = 15.0 n1 = 25.0 n2 = 51.0 n3 = 15.0
"""
| cindy has her eye on a sundress but thinks it is too expensive . it goes on sale for 15 % less than the original price . before cindy can buy the dress , however , the store raises the new price by 25 % . if the dress cost $ 51 after it went on sale for 15 % off , what is the difference between the original price and the final price ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 3.75)
def check(x): pass
| problem | n0 = 15.0
n1 = 25.0
n2 = 51.0
n3 = 15.0
t0 = n1 + 100.0
t1 = 100.0 - n0
t2 = t0 / 100.0
t3 = t1 / 100.0
t4 = n2 / t3
t5 = n2 * t2
answer = t5 - t4
return answer
|
MathQA/86 | python | def problem():
"""
a grocer has a sale of rs . 4435 , rs . 4927 , rs . 4855 , rs . 5230 and rs . 4562 for 5 consecutive months . how much sale must he have in the sixth month so that he gets an average sale of rs . 4500 ? n0 = 4435.0 n1 = 4927.0 n2 = 4855.0 n3 = 5230.0 n4 = 4562.0 n5 = 5.0 n6 = 4500.0
"""
| a grocer has a sale of rs . 4435 , rs . 4927 , rs . 4855 , rs . 5230 and rs . 4562 for 5 consecutive months . how much sale must he have in the sixth month so that he gets an average sale of rs . 4500 ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 2991.0)
def check(x): pass
| problem | n0 = 4435.0
n1 = 4927.0
n2 = 4855.0
n3 = 5230.0
n4 = 4562.0
n5 = 5.0
n6 = 4500.0
t0 = n5 + 1.0
t1 = n0 + n1
t2 = n2 + t1
t3 = n6 * t0
t4 = n3 + t2
t5 = n4 + t4
answer = t3 - t5
return answer
|
MathQA/87 | python | def problem():
"""
what is the sum of all 3 digit integers formed using the digits 34 and 5 ( repetition is allowed ) n0 = 3.0 n1 = 34.0 n2 = 5.0
"""
| what is the sum of all 3 digit integers formed using the digits 34 and 5 ( repetition is allowed ) | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 11988.0)
def check(x): pass
| problem | n0 = 3.0
n1 = 34.0
n2 = 5.0
t0 = 10.0 + 100.0
t1 = n0 + n2
t2 = 3.0**min(2.0, 5)
t3 = t0 + 1.0
t4 = t1 + 4.0
t5 = t3 * t4
answer = t5 * t2
return answer
|
MathQA/88 | python | def problem():
"""
two men are going along a track rail in the opposite direction . one goods train crossed the first person in 20 sec . after 10 min the train crossed the other person who is coming in opposite direction in 18 sec . after the train has passed , when the two persons will meet ? n0 = 20.0 n1 = 10.0 n2 = 18.0
"""
| two men are going along a track rail in the opposite direction . one goods train crossed the first person in 20 sec . after 10 min the train crossed the other person who is coming in opposite direction in 18 sec . after the train has passed , when the two persons will meet ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 90.0)
def check(x): pass
| problem | n0 = 20.0
n1 = 10.0
n2 = 18.0
t0 = n2 / 2.0
t1 = n1 * 60.0
t2 = t0 * t1
answer = t2 / 60.0
return answer
|
MathQA/89 | python | def problem():
"""
there are 6 people in the elevator . their average weight is 150 lbs . another person enters the elevator , and increases the average weight to 151 lbs . what is the weight of the 7 th person . n0 = 6.0 n1 = 150.0 n2 = 151.0 n3 = 7.0
"""
| there are 6 people in the elevator . their average weight is 150 lbs . another person enters the elevator , and increases the average weight to 151 lbs . what is the weight of the 7 th person . | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 157.0)
def check(x): pass
| problem | n0 = 6.0
n1 = 150.0
n2 = 151.0
n3 = 7.0
t0 = n2 * n3
t1 = n0 * n1
answer = t0 - t1
return answer
|
MathQA/90 | python | def problem():
"""
average of money that group of 4 friends pay for rent each month is $ 800 . after one persons rent is increased by 20 % the new mean is $ 860 . what was original rent of friend whose rent is increased ? n0 = 4.0 n1 = 800.0 n2 = 20.0 n3 = 860.0
"""
| average of money that group of 4 friends pay for rent each month is $ 800 . after one persons rent is increased by 20 % the new mean is $ 860 . what was original rent of friend whose rent is increased ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 1200.0)
def check(x): pass
| problem | n0 = 4.0
n1 = 800.0
n2 = 20.0
n3 = 860.0
t0 = n2 / 100.0
t1 = n3 - n1
t2 = n0 * t1
answer = t2 / t0
return answer
|
MathQA/91 | python | def problem():
"""
if 11.25 m of a uniform steel rod weighs 42.75 kg . what will be the weight of 10 m of the same rod ? n0 = 11.25 n1 = 42.75 n2 = 10.0
"""
| if 11.25 m of a uniform steel rod weighs 42.75 kg . what will be the weight of 10 m of the same rod ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 38.0)
def check(x): pass
| problem | n0 = 11.25
n1 = 42.75
n2 = 10.0
t0 = n1 * n2
answer = t0 / n0
return answer
|
MathQA/92 | python | def problem():
"""
8 men can dig a pit in 20 days . if a man works half as much again a s a boy , then 4 men and 9 boys can dig a similar pit in : n0 = 8.0 n1 = 20.0 n2 = 4.0 n3 = 9.0
"""
| 8 men can dig a pit in 20 days . if a man works half as much again a s a boy , then 4 men and 9 boys can dig a similar pit in : | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 16.0)
def check(x): pass
| problem | n0 = 8.0
n1 = 20.0
n2 = 4.0
n3 = 9.0
t0 = 3.0 / 2.0
t1 = n0 * t0
t2 = n2 * t0
t3 = n3 + t2
t4 = n1 * t1
answer = t4 / t3
return answer
|
MathQA/93 | python | def problem():
"""
john makes $ 40 a week from his job . he earns a raise and now makes $ 70 a week . what is the % increase ? n0 = 40.0 n1 = 70.0
"""
| john makes $ 40 a week from his job . he earns a raise and now makes $ 70 a week . what is the % increase ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 75.0)
def check(x): pass
| problem | n0 = 40.0
n1 = 70.0
t0 = n1 - n0
t1 = t0 / n0
answer = t1 * 100.0
return answer
|
MathQA/94 | python | def problem():
"""
a train is 410 meter long is running at a speed of 45 km / hour . in what time will it pass a bridge of 140 meter length n0 = 410.0 n1 = 45.0 n2 = 140.0
"""
| a train is 410 meter long is running at a speed of 45 km / hour . in what time will it pass a bridge of 140 meter length | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 44.0)
def check(x): pass
| problem | n0 = 410.0
n1 = 45.0
n2 = 140.0
t0 = n0 + n2
t1 = n1 * 1000.0
t2 = t1 / 3600.0
answer = t0 / t2
return answer
|
MathQA/95 | python | def problem():
"""
the average ( arithmetic mean ) of 4 positive integers is 50 . if the average of 2 of these integers is 40 , what is the greatest possible value that one of the other 2 integers can have ? n0 = 4.0 n1 = 50.0 n2 = 2.0 n3 = 40.0 n4 = 2.0
"""
| the average ( arithmetic mean ) of 4 positive integers is 50 . if the average of 2 of these integers is 40 , what is the greatest possible value that one of the other 2 integers can have ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 120.0)
def check(x): pass
| problem | n0 = 4.0
n1 = 50.0
n2 = 2.0
n3 = 40.0
n4 = 2.0
t0 = n0 * n1
t1 = n2 * n3
answer = t0 - t1
return answer
|
MathQA/96 | python | def problem():
"""
an uneducated retailer marks all his goods at 50 % above the cost price and thinking that he will still make 25 % profit , offers a discount of 25 % on the marked price . what is his actual profit on the sales ? n0 = 50.0 n1 = 25.0 n2 = 25.0
"""
| an uneducated retailer marks all his goods at 50 % above the cost price and thinking that he will still make 25 % profit , offers a discount of 25 % on the marked price . what is his actual profit on the sales ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 12.5)
def check(x): pass
| problem | n0 = 50.0
n1 = 25.0
n2 = 25.0
t0 = n0 / 100.0
t1 = n1 / 100.0
t2 = t0 + 1.0
t3 = t2 * t1
t4 = t2 - t3
t5 = t4 - 1.0
answer = t5 * 100.0
return answer
|
MathQA/97 | python | def problem():
"""
the mass of 1 cubic meter of a substance is 300 kg under certain conditions . what is the volume in cubic centimeters of 1 gram of this substance under these conditions ? ( 1 kg = 1,000 grams and 1 cubic meter = 1 , 000,000 cubic centimeters ) n0 = 1.0 n1 = 300.0 n2 = 1.0 n3 = 1.0 n4 = 1000.0 n5 = 1.0 n6 = 1.0 n7 = 0.0
"""
| the mass of 1 cubic meter of a substance is 300 kg under certain conditions . what is the volume in cubic centimeters of 1 gram of this substance under these conditions ? ( 1 kg = 1,000 grams and 1 cubic meter = 1 , 000,000 cubic centimeters ) | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 3.3333333333333335)
def check(x): pass
| problem | n0 = 1.0
n1 = 300.0
n2 = 1.0
n3 = 1.0
n4 = 1000.0
n5 = 1.0
n6 = 1.0
n7 = 0.0
t0 = n4 * n4
t1 = n1 * n4
answer = t0 / t1
return answer
|
MathQA/98 | python | def problem():
"""
a train 520 m long can cross an electric pole in 20 sec and then find the speed of the train ? n0 = 520.0 n1 = 20.0
"""
| a train 520 m long can cross an electric pole in 20 sec and then find the speed of the train ? | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 93.6)
def check(x): pass
| problem | n0 = 520.0
n1 = 20.0
t0 = n0 / 1000.0
t1 = n1 / 3600.0
answer = t0 / t1
return answer
|
MathQA/99 | python | def problem():
"""
in a throw of dice what is the probability of ge æ « ng number greater than 4 n0 = 4.0
"""
| in a throw of dice what is the probability of ge æ « ng number greater than 4 | import math
def compare(x, y):
return math.fabs(x-y)<1e-8
candidate = problem
assert compare(candidate(), 0.3333333333333333)
def check(x): pass
| problem | n0 = 4.0
t0 = 6.0 - n0
answer = t0 / 6.0
return answer
|
MxEval
Multilingual Execution Evaluation
Dataset Summary
This repository contains data and code to perform execution-based multi-lingual evaluation of code generation capabilities and the corresponding data,
namely, a multi-lingual benchmark MBXP, multi-lingual MathQA and multi-lingual HumanEval.
Results and findings can be found in the paper "Multi-lingual Evaluation of Code Generation Models".
Supported Tasks and Leaderboards
Languages
The programming problems are written in multiple programming languages and contain English natural text in comments and docstrings.
Dataset Structure
To lookup currently supported datasets
get_dataset_config_names("mxeval/mxeval")
['mathqa-x', 'mbxp', 'multi-humaneval']
To load a specific dataset and language
from datasets import load_dataset
load_dataset("mxeval/mxeval", "mbxp", split="python")
Dataset({
features: ['task_id', 'language', 'prompt', 'test', 'entry_point', 'description', 'canonical_solution'],
num_rows: 974
})
Data Instances
An example of a dataset instance:
{
"task_id": "MBSCP/6",
"language": "scala",
"prompt": "object Main extends App {\n /**\n * You are an expert Scala programmer, and here is your task.\n * * Write a Scala function to check whether the two numbers differ at one bit position only or not.\n *\n * >>> differAtOneBitPos(13, 9)\n * true\n * >>> differAtOneBitPos(15, 8)\n * false\n * >>> differAtOneBitPos(2, 4)\n * false\n */\n def differAtOneBitPos(a : Int, b : Int) : Boolean = {\n",
"test": "\n\n var arg00 : Int = 13\n var arg01 : Int = 9\n var x0 : Boolean = differAtOneBitPos(arg00, arg01)\n var v0 : Boolean = true\n assert(x0 == v0, \"Exception -- test case 0 did not pass. x0 = \" + x0)\n\n var arg10 : Int = 15\n var arg11 : Int = 8\n var x1 : Boolean = differAtOneBitPos(arg10, arg11)\n var v1 : Boolean = false\n assert(x1 == v1, \"Exception -- test case 1 did not pass. x1 = \" + x1)\n\n var arg20 : Int = 2\n var arg21 : Int = 4\n var x2 : Boolean = differAtOneBitPos(arg20, arg21)\n var v2 : Boolean = false\n assert(x2 == v2, \"Exception -- test case 2 did not pass. x2 = \" + x2)\n\n\n}\n",
"entry_point": "differAtOneBitPos",
"description": "Write a Scala function to check whether the two numbers differ at one bit position only or not."
}
Data Fields
task_id
: identifier for the data sampleprompt
: input for the model containing function header and docstringscanonical_solution
: solution for the problem in theprompt
description
: task descriptiontest
: contains function to test generated code for correctnessentry_point
: entry point for testlanguage
: programming lanuage identifier to call the appropriate subprocess call for program execution
Data Splits
- HumanXEval
- Python
- Java
- JavaScript
- Csharp
- CPP
- Go
- Kotlin
- PHP
- Perl
- Ruby
- Swift
- Scala
- MBXP
- Python
- Java
- JavaScript
- TypeScript
- Csharp
- CPP
- Go
- Kotlin
- PHP
- Perl
- Ruby
- Swift
- Scala
- MathQA
- Python
- Java
- JavaScript
Dataset Creation
Curation Rationale
Since code generation models are often trained on dumps of GitHub a dataset not included in the dump was necessary to properly evaluate the model. However, since this dataset was published on GitHub it is likely to be included in future dumps.
Personal and Sensitive Information
None.
Social Impact of Dataset
With this dataset code generating models can be better evaluated which leads to fewer issues introduced when using such models.
Dataset Curators
AWS AI Labs
Execution
Execution Example
Install the repo mbxp-exec-eval to execute generations or canonical solutions for the prompts from this dataset.
>>> from datasets import load_dataset
>>> from mxeval.execution import check_correctness
>>> mbxp_python = load_dataset("mxeval/mxeval", "mbxp", split="python")
>>> example_problem = mbxp_python[0]
>>> check_correctness(example_problem, example_problem["canonical_solution"], timeout=20.0)
{'task_id': 'MBPP/1', 'passed': True, 'result': 'passed', 'completion_id': None, 'time_elapsed': 10.582208633422852}
Considerations for Using the Data
Make sure to sandbox the execution environment since generated code samples can be harmful.
Licensing Information
Citation Information
@article{mbxp_athiwaratkun2022,
title = {Multi-lingual Evaluation of Code Generation Models},
author = {Athiwaratkun, Ben and
Gouda, Sanjay Krishna and
Wang, Zijian and
Li, Xiaopeng and
Tian, Yuchen and
Tan, Ming
and Ahmad, Wasi Uddin and
Wang, Shiqi and
Sun, Qing and
Shang, Mingyue and
Gonugondla, Sujan Kumar and
Ding, Hantian and
Kumar, Varun and
Fulton, Nathan and
Farahani, Arash and
Jain, Siddhartha and
Giaquinto, Robert and
Qian, Haifeng and
Ramanathan, Murali Krishna and
Nallapati, Ramesh and
Ray, Baishakhi and
Bhatia, Parminder and
Sengupta, Sudipta and
Roth, Dan and
Xiang, Bing},
doi = {10.48550/ARXIV.2210.14868},
url = {https://arxiv.org/abs/2210.14868},
keywords = {Machine Learning (cs.LG), Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
publisher = {arXiv},
year = {2022},
copyright = {Creative Commons Attribution 4.0 International}
}
Contributions
- Downloads last month
- 0