messages listlengths 2 2 | category stringclasses 3
values | source stringclasses 6
values |
|---|---|---|
[
{
"content": "The kids in Ms. Swanson's class have an average of 5 zits each. The kids in another class have an average of six zits each. There are 25 kids in Ms. Swanson's class and 67 more zits in the other class than in Ms. Swanson's. How many kids are in the other class?",
"role": "user"
},
{
"c... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Jenna sets a goal of reading 600 pages a month for the month of September (which has 30 days). She knows that she'll be really busy at work the four weekdays starting on the 13th, so she won't have time to read. She can also read 100 pages on the 23rd, when she'll have a long boring flight. If she... | math | meta-math/MetaMathQA |
[
{
"content": "Jed’s family wants to buy 6 different board games. Each board game costs $15 and Jed paid using a $100 bill. If the cashier gave Jed only $5 bills for his change, how many bills did Jed receive?",
"role": "user"
},
{
"content": "First, let's calculate the total cost of the 6 board game... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "In Fred the Farmer's barn, there were 100 horses, 29 sheep, and 9 chickens. Brian bought half of the animals and sold them at the market. Jeremy then gifted Fred some goats. If exactly half of the animals in the barn are male animals, and there are 53 male animals, how many goats did Jeremy gift F... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Let $f(x) = Ax + B$ and $g(x) = Bx + A$, where $A \\neq B$. If $f(g(x)) - g(f(x)) = B - A$, what is $A + B$?",
"role": "user"
},
{
"content": "We start by computing $f(g(x))$ and $g(f(x))$. We find that \\[f(g(x)) = f(Bx + A) = A(Bx + A) + B = ABx + A^2 + B\\]and \\[g(f(x)) = g(Ax + B)... | math | meta-math/MetaMathQA |
[
{
"content": "Tamika drove for 8 hours at an average speed of 45 miles per hour. Logan drove for 5 hours at 55 miles an hour. How many miles farther did Tamika drive?",
"role": "user"
},
{
"content": "To find out how many miles Tamika and Logan each drove, we need to multiply their driving time by t... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Outline the events of the following movie: The Great Gatsby.",
"role": "user"
},
{
"content": "1. Jay Gatsby throws lavish parties in hopes of winning the heart of Daisy Buchanan. \n2. Nick Carraway, Daisy’s cousin, looks on as Gatsby and Daisy reunite. \n3. Gatsby and Daisy plan to ru... | instruction | tatsu-lab/alpaca |
[
{
"content": "Create a Python program which prints the calendar for a given year.\nyear = 2019",
"role": "user"
},
{
"content": "import calendar\n\nc = calendar.TextCalendar(calendar.SUNDAY)\nstr = c.formatyear(2019, 2, 1, 1, 3)\nprint (str)",
"role": "assistant"
}
] | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "Develop a recursive program in Python to traverse a given binary tree in-order.",
"role": "user"
},
{
"content": "class Node: \n \n # Constructor to create a new binary node \n def __init__(self, data):\n self.data = data \n self.left = None\n self.right = ... | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "Connor sleeps 6 hours a night. His older brother Luke sleeps a certain number of hours longer than Connor. Connor's new puppy sleeps twice as long as Luke. The puppy sleeps 16 hours. How many hours longer does Luke sleep than Connor?",
"role": "user"
},
{
"content": "If the puppy sleep... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Janice can type 6 sentences per minute. Today at work, Janice continued working on a paper she started typing yesterday. She typed for 20 minutes, took a break, and typed 15 minutes longer. She then had to erase 40 sentences she had typed incorrectly. After a meeting, she typed for 18 minutes more... | math | meta-math/MetaMathQA |
[
{
"content": "Aaron is gathering can lids to take to the recycling center. He uses 3 equal-sized boxes of canned tomatoes and adds the lids he gets to the 14 can lids he already has. He is now taking 53 can lids to the recycling center. How many cans lids did he get from each box?",
"role": "user"
},
{
... | math | openai/gsm8k |
[
{
"content": "How many times is the volume of a cube with a side length of 2 meters (m) bigger compared to the volume of a cube with a side length of 100 centimeters (cm)?",
"role": "user"
},
{
"content": "First, let's calculate the volume of each cube.\n\nFor the cube with a side length of 2 meters... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Create a CSS style for all <h1> tags to have a red border.",
"role": "user"
},
{
"content": "h1{ \n border: 1px solid red;\n}",
"role": "assistant"
}
] | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "If Alice saved $10 in the first month and an additional $30 each month for three months, what is the total amount of money she saved by the end of the third month?",
"role": "user"
},
{
"content": "In the first month, Alice saved $10.\nIn the second month, Alice saved an additional $30... | math | meta-math/MetaMathQA |
[
{
"content": "A supermarket has 2355 loaves of bread at the start of the day. By afternoon, 629 loaves are sold, and a further 489 loaves are delivered to the supermarket by their supplier in the evening. How many loaves of bread are there at the end of the day?",
"role": "user"
},
{
"content": "In ... | math | openai/gsm8k |
[
{
"content": "Brooke is milking cows and then selling the milk at the market for $3 a gallon. Whatever milk doesn't sell, she turns into butter. One gallon of milk equals 2 sticks of butter. She then sells the butter for $1.5 a stick. She has 12 cows. Each cow produces 4 gallons of milk. She has 6 customers, ea... | math | meta-math/MetaMathQA |
[
{
"content": "An animal shelter recently took in twelve cats. The shelter already had half that number of cats. Two days later, three had been adopted. The next day, one of the cats had five kittens, and a certain number of people arrived to pick up their missing pets. The shelter now has 19 cats. How many miss... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Write a python script that displays the greatest common divisor (GCD) of two positive integers?\n12, 24",
"role": "user"
},
{
"content": "def gcd(a, b): \n if a == 0 : \n return b \n \n return gcd(b % a, a) \n \na = 12\nb = 24\ngcd = gcd(a, b) \nprint(gcd)",
... | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "If $3 \\cdot f(x) + 4 \\cdot g(x) = h(x)$ and $f(x),$ $g(x),$ and $h(x)$ are polynomials in $x,$ and the degree of $f(x)$ is 8 while the degree of $h(x)$ is 9, what is the smallest possible degree of $g(x)$?",
"role": "user"
},
{
"content": " is the highest power of $x$ in the polynomi... | math | meta-math/MetaMathQA |
[
{
"content": "Mary and Jimmy start running from the same spot, but in opposite directions. Mary runs at 5 miles per hour and Jimmy runs at a certain speed. The distance between them after 1 hour is 9 miles. What is Jimmy's speed?",
"role": "user"
},
{
"content": "If Mary runs at 5 miles per hour, th... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Describe the role of a project manager",
"role": "user"
},
{
"content": "The role of a project manager is to lead a team of people in order to meet a project’s objectives. They are responsible for planning, organizing, directing and controlling the activities of the project. This inclu... | instruction | tatsu-lab/alpaca |
[
{
"content": "Tom has a quarter as much money as Nataly. Nataly has x times as much money as Raquel. How much money do Tom, Raquel, and Nataly have combined if Raquel has $40?\nIf we know the answer to the above question is 190, what is the value of unknown variable x?",
"role": "user"
},
{
"content... | math | meta-math/MetaMathQA |
[
{
"content": "The sum of three numbers $a, b$ and $c$ is 60. If we decrease $a$ by 7, we get the value $N$. If we increase $b$ by X, we get the value $N$. If we multiply $c$ by 7, we also get the value $N$. The value of $N$ is 28. What is the value of unknown variable X?",
"role": "user"
},
{
"conte... | math | meta-math/MetaMathQA |
[
{
"content": "Find the similarities between red apples and green apples.",
"role": "user"
},
{
"content": "Red apples and green apples have many similarities. They both come from apple trees and have a similar texture and taste. Both varieties have similar amounts of antioxidants, vitamins, and mine... | instruction | tatsu-lab/alpaca |
[
{
"content": "Implement the merge sort algorithm to sort a given array ascending.\ngiven_array = [7,9,3,8,1]",
"role": "user"
},
{
"content": "def merge_sort(arr):\n if len(arr) > 1: \n mid = len(arr) // 2\n L = arr[:mid]\n R = arr[mid:]\n\n #calling merge sort functio... | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "The barrel has contained 4 fish (a) and 3 fish (b). I bought some more fish today and put them in the barrel, so there are 10 fish in total. How many more fish did I put in today?",
"role": "user"
},
{
"content": "You originally had 4 fish (a) and 3 fish (b), which totals to 7 fish. No... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "The batting cage sells golf balls by the dozen. They charge $30 for a certain number of dozens. Dan buys 5 dozen, Gus buys 2 dozen, and Chris buys 48 golf balls. They purchase a total of 132 golf balls, assuming 12 golf balls are 1 dozen. For how many dozens do they charge $30?",
"role": "user... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "In how many ways can four people line up in a straight line if the youngest person cannot be first in line?",
"role": "user"
},
{
"content": "There are four people, so there are $4!=24$ ways to arrange them if there are no restrictions.\nHowever, if the youngest person cannot be first ... | math | meta-math/MetaMathQA |
[
{
"content": "Write a python program to parse an XML document and return a list of tag objects.\n<xml>\n <root>\n <child1 id=\"1\">\n <subchild1 value=\"a\">\n </subchild1>\n <subchild2 value=\"b\">\n </subchild2>\n </child1>\n <child2 id=\"2\">\n <subchild3 value=\"c\">\n ... | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "Sally took 342 pens to her class of 44 students. If she gave x pens to each student, left half of the remainder in her locker, and took the rest home, how many did she take home?\nIf we know the answer to the above question is 17, what is the value of unknown variable x?",
"role": "user"
},
... | math | meta-math/MetaMathQA |
[
{
"content": "Mark wants to set the record for most consecutive ropes jumped. The record is 54,000. He can jump 3 times a second. How many hours would he need to jump rope to set the record?",
"role": "user"
},
{
"content": "To calculate the number of hours Mark would need to jump rope to set the re... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Write a function definition in JavaScript that calculates the factorial of a number.",
"role": "user"
},
{
"content": "function factorial(n) {\n let fact = 1;\n for (let i = 1; i <= n; i++) {\n fact = fact * i;\n }\n return fact;\n}",
"role": "assistant"
}
] | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "What is the prime number $n$ between 20 and 30 such that when divided by 8, the remainder is 5?",
"role": "user"
},
{
"content": "To find the prime number $n$ between 20 and 30 such that when divided by 8, the remainder is 5,\nwe can start by listing the numbers between 20 and 30 that ... | math | meta-math/MetaMathQA |
[
{
"content": "In a school with 800 students, 5/8 of the students are girls. Seven-tenths of the girls and two-fifths of the boys are in the primary grades, while the rest are middle schoolers. How many middle schoolers are there?",
"role": "user"
},
{
"content": "There are 800 x 5/8 = <<800*5/8=500>... | math | openai/gsm8k |
[
{
"content": "Suggest a completion for the following Python code so that it prints all the numbers between 0 and 10 (inclusive).\nfor num in range(11)",
"role": "user"
},
{
"content": "for num in range(11):\n print(num)",
"role": "assistant"
}
] | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "Tobias is buying a new pair of shoes that costs $95. He has been saving up his money each month for the past three months. He gets a $5 allowance a month. He also mows lawns and shovels driveways. He charges $15 to mow a lawn and $7 to shovel. After buying the shoes, he has $15 in change. He mowed... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Out of the 150 students, 60% are girls and the rest are boys. Only 1/3 of the boys joined varsity clubs. How many of the boys did not join varsity clubs?",
"role": "user"
},
{
"content": "Out of the 150 students, 100% - 60% = 40% are boys.\nSo, there are 150 x 40/100 = <<150*40/100=60>... | math | openai/gsm8k |
[
{
"content": "What is the fraction equivalent to $0.\\overline{4}$?",
"role": "user"
},
{
"content": "Let $x = 0.\\overline{4}$.\nThen $10x = 4.\\overline{4}$.\nSubtracting the two equations, we get $10x - x = 4.\\overline{4} - 0.\\overline{4}$, which simplifies to $9x = 4$.\nDividing both sides by ... | math | meta-math/MetaMathQA |
[
{
"content": "Mr. Maximilian has a rental building that he collects rent from every month. The number of units in the building is 100. If the building is 3/4 occupied for a whole year, and each resident of the building pays a rent of $400, calculate the amount of money Mr. Maximilian receives in that year.",
... | math | meta-math/MetaMathQA |
[
{
"content": "Explain the functions of ribosomes in a cell.",
"role": "user"
},
{
"content": "Ribosomes are small organelles found in the cytoplasm of cells which are responsible for protein synthesis. They use mRNA as a template to string together amino acids which form proteins. Ribosomes also bin... | instruction | tatsu-lab/alpaca |
[
{
"content": "Lao is farming chickens. He can sell each chicken for $1.50. A bag of chicken feed weighs 20 pounds and costs $2. Each chicken will need 2 pounds of feed from the time it hatches to the time he sells it. If he makes $65 profit from selling chickens, how many did he sell?",
"role": "user"
},
... | math | openai/gsm8k |
[
{
"content": "Jeremy's uncle gave him $50 to spend on basketball equipment. He bought 5 jerseys that cost $2 each, a basketball that cost $18, and a pair of shorts that cost $8. How much money does Jeremy have left?",
"role": "user"
},
{
"content": "First, let's calculate the total cost of the jerse... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "The average score for Korean, English, and science is 95 points, and if math scores are included, the average score falls by 3 points. What is math score?",
"role": "user"
},
{
"content": "Let's denote the math score as M.\n\nThe average score for Korean, English, and science is 95 poi... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Use regex to match a substring, 'the' within a sentence.\nThe quick brown fox",
"role": "user"
},
{
"content": "regex = /the/\n\nThis regex will match the substring \"the\" in the sentence \"The quick brown fox.\"",
"role": "assistant"
}
] | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "Stacy bought two packs of printer paper for the office. Each pack has 240 sheets of paper. Her office prints 80 one-page documents per day. How many days will the printer paper last her office?",
"role": "user"
},
{
"content": "Stacy bought 2 * 240 = <<2*240=480>>480 sheets of paper.\n... | math | openai/gsm8k |
[
{
"content": "If a courier received 80 packages yesterday and twice as many today, and all of these packages need to be delivered tomorrow, how many packages should the courier deliver tomorrow?",
"role": "user"
},
{
"content": "Yesterday, the courier received 80 packages.\nToday, the courier receiv... | math | meta-math/MetaMathQA |
[
{
"content": "Create a basic query using two variables.\nsky, blue",
"role": "user"
},
{
"content": "SELECT *\nFROM table\nWHERE sky = 'blue';",
"role": "assistant"
}
] | code | sahil2801/CodeAlpaca-20k |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.