messages listlengths 2 2 | category stringclasses 3
values | source stringclasses 6
values |
|---|---|---|
[
{
"content": "A new book sold 15 copies at the bookstore on Wednesday. On Thursday the book sold three times that many copies. On Friday the book sold one-fifth the number of copies it did on Thursday. How many copies of the book did the bookstore sell by Friday?",
"role": "user"
},
{
"content": "On... | math | meta-math/MetaMathQA |
[
{
"content": "Change each noun to its plural form.\ntable, book, woman",
"role": "user"
},
{
"content": "tables, books, women",
"role": "assistant"
}
] | instruction | tatsu-lab/alpaca |
[
{
"content": "Miles and Daphne are comparing their reading collection. They figured out that for Miles, 1 inch equals 5 pages, but for Daphne 1 inch equals some pages. If Miles's books are 240 inches tall and Daphne's collection is 25 inches tall, and the longest collection has 1250 pages, how many pages does 1... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "John is an eccentric millionaire. He decides to fill his swimming pool with bottled water. A cubic foot of water is 25 liters. His pool is 10 feet deep and 6 feet by 20 feet. A liter of water costs $3. How much does it cost to fill the pool?",
"role": "user"
},
{
"content": "The p... | math | openai/gsm8k |
[
{
"content": "Generate a Python program which will filter all prime numbers from a list of integers.\n[19, 32, 13, 35, 22, 17, 27]",
"role": "user"
},
{
"content": "def filter_prime_numbers(l):\n result = []\n for num in l:\n if is_prime(num):\n result.append(num)\n return... | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "When a certain number that should be divided by 8 is divided by 7, the quotient is 13 and the remainder is 1. Find the sum of the correctly calculated quotient and remainder.",
"role": "user"
},
{
"content": "Let's call the certain number \\( N \\).\n\nAccording to the problem, when \\... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "There are 6000 Go stones in total. There are more white Go stones than black Go stones. When the difference between the number of white and black stones is subtracted from the total number of stones, the result is 4800. How many white Go stones are there?",
"role": "user"
},
{
"content... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Create a Python program to read a string and return the character with the highest frequency.\nSample string",
"role": "user"
},
{
"content": "import collections\n\nstr = \"Sample string\"\ncount = collections.Counter(str)\nhighest_freq = 0\nhighest_freq_char = ''\n\nfor char, value in... | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "If Xavier will be 30 years old in six years and he is currently twice as old as Yasmin, what is the total of their current ages?",
"role": "user"
},
{
"content": "If Xavier will be 30 years old in six years, that means he is currently 30 - 6 = 24 years old.\nIf Xavier is currently twic... | math | meta-math/MetaMathQA |
[
{
"content": "Madeline needs $1200 to pay rent, $400 for groceries, $200 for medical expenses, and a certain amount for utilities. She also wants to save $200 in case of an emergency. She makes $15 per hour at her job and needs to work 138 hours this month. How much does Madeline need for utilities?",
"role... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Design an algorithm in Python to shuffle a standard deck of 52 playing cards.\nNot applicable",
"role": "user"
},
{
"content": "import random \n \n# Function to shuffle a deck of cards \ndef shuffle_cards(cards): \n # Shuffle the deck \n random.shuffle(cards) \n \n return c... | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "Find all local maxima in the given list.\nlist_vals = [1, 2, 3, 4, 5, 2, 1]",
"role": "user"
},
{
"content": "[3, 4, 5]",
"role": "assistant"
}
] | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "John wants to finish a show in 5 days. There are 20 episodes and they are each a certain number of minutes long. He has to watch 2 hours a day. How long is each episode?",
"role": "user"
},
{
"content": "First, let's convert the total time John has to watch the show into minutes. Since... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "For $n = 2^{31}3^{19}$, how many positive integer divisors of $n^2$ are less than $n$ but do not divide $n$?",
"role": "user"
},
{
"content": "Since $n = 2^{31}3^{19}$, we have $n^2 = (2^{31}3^{19})^2 = 2^{62}3^{38}$.\nThe prime factorization of $n^2$ is $2^{62}3^{38}$, so an integer d... | math | meta-math/MetaMathQA |
[
{
"content": "Based on the photo provided, give a detailed description.\n[photo of a car dealership]",
"role": "user"
},
{
"content": "This photo depicts a car dealership with a large selection of cars ranging from small sedans to sports utility vehicles. The open area in front of the dealership is ... | instruction | tatsu-lab/alpaca |
[
{
"content": "Explain why online banking is more secure than physical banking.",
"role": "user"
},
{
"content": "Online banking is typically more secure than physical banking because of the added layers of authentication. With online banking, it is difficult for fraudsters to access personal informa... | instruction | tatsu-lab/alpaca |
[
{
"content": "An eight-sided die has its faces numbered from 1 to X. What is the expected value of the roll of the die?\nIf we know the answer to the above question is 4.5, what is the value of unknown variable X?",
"role": "user"
},
{
"content": "To find the expected value of the roll of the die, w... | math | meta-math/MetaMathQA |
[
{
"content": "On Monday, Daisy played with 5 dog toys. On Tuesday, Daisy had 3 dog toys left after losing some, and her owner went to the store and got her some more. On Wednesday, all of Daisy's old and new dog toys were missing, so her owner went to the store and bought her 5 more. If Daisy's owner found all ... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Create a python program which will take user name as input and print the same",
"role": "user"
},
{
"content": "name = input(\"Enter your name: \")\nprint(\"Hello \" + name + \"!\")",
"role": "assistant"
}
] | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "John buys a chair. He then buys a table that is some times the price of the chair. Then, he buys a couch that is 5 times the price of the table. John paid $380 for all these items, and the price of the couch is $300. What is the ratio of the price of the table to the price of the chair?",
"rol... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Write a JavaScript function to check if a string ends with the given substring.\nmainStr = “Hello World”\nsubStr = “orld”",
"role": "user"
},
{
"content": "function endsWith(mainStr, subStr) {\n let startIndex = mainStr.length - subStr.length;\n let checkStr = mainStr.substring(s... | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "How many elements will the array arr have after executing the following Python code?\narr = [1, 2, 3]\narr.pop(1)",
"role": "user"
},
{
"content": "2",
"role": "assistant"
}
] | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "Create a Python program to find all combinations of three numbers that add up to a given sum.\ntargetSum = 7",
"role": "user"
},
{
"content": "def threeNumSum(arr, targetSum):\n combinations = []\n\n for i in range(len(arr)):\n for j in range(i+1, len(arr)):\n f... | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "Create a program in Python to grade an essay.\nThe student’s essay should be graded on a scale of 0-10, with 10 being the highest score.",
"role": "user"
},
{
"content": "def grade_essay(essay):\n score = 0\n # Score based on content\n # Score based on grammar\n # Score based on spelli... | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "Construct an argument in support of universal basic income.",
"role": "user"
},
{
"content": "Universal basic income (UBI) is a policy proposal that provides a regular, unconditional cash payment to all citizens. UBI has the potential to reduce poverty, improve public health and wellbe... | instruction | tatsu-lab/alpaca |
[
{
"content": "Generate a random password in Python with length 10, containing both lowercase and uppercase characters.",
"role": "user"
},
{
"content": "import string\nimport random\n\ndef generatePassword():\n # Generate list of lowercase and uppercase letters\n letters = string.ascii_letters... | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "Categorize the following into sentence types\nThe bridge collapsed in the storm.",
"role": "user"
},
{
"content": "Declarative sentence.",
"role": "assistant"
}
] | instruction | tatsu-lab/alpaca |
[
{
"content": "The average of $x+6$, $6x+2$, and $2x+7$ is $4x-7$. What is $x$?",
"role": "user"
},
{
"content": "The average of three numbers is found by adding them and dividing by 3, so we have the equation\n\\[\\frac{(x+6) + (6x+2) + (2x+7)}{3} = 4x-7.\\]\nSimplifying the left side gives\n\\[\\fr... | math | meta-math/MetaMathQA |
[
{
"content": "The recipe for a four-person cake requires 2 eggs and 4 cups of milk. Tyler wants to use this recipe to make a cake for eight people. If Tyler has x eggs in the fridge, how many more eggs does Tyler need to buy?\nIf we know the answer to the above question is 1, what is the value of unknown variab... | math | meta-math/MetaMathQA |
[
{
"content": "Chowon used 1/5 of the entire tape yesterday while packing the box for two days, and used 3/4 of the remaining tape today. If the length of the remaining tape is 1 meter (m) and 50 centimeters (cm), how long is the length of the tape that Chowon originally had in meters (m)?",
"role": "user"
... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Which language is used to develop applications for the Android platform?",
"role": "user"
},
{
"content": "The official language for developing applications for the Android platform is Java. Java is an object-oriented programming language, which allows developers to create robust and r... | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "Jason bought a new bookcase that can hold a maximum of 80 pounds of weight. Jason has 70 hardcover books that each weigh x% a pound, 30 textbooks that each weigh 2 pounds, and 3 knick-knacks that each weight 6 pounds. This total collection of items is 33 pounds over the bookcase's weight limit. Wh... | math | meta-math/MetaMathQA |
[
{
"content": "Create a JavaScript object representing a student.\n{\n name: \"John Smith\",\n age: 15\n}",
"role": "user"
},
{
"content": "let student = {\n name: \"John Smith\",\n age: 15\n};",
"role": "assistant"
}
] | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "Fred has 38 red marbles, half as many green ones, and the rest are dark blue. If he has 63 marbles, how many of them are dark blue?",
"role": "user"
},
{
"content": "Fred has 38/2 = <<38/2=19>>19 green marbles.\nFred has 63-38-19 = <<63-38-19=6>>6 dark blue marbles.\n#### 6",
"role... | math | openai/gsm8k |
[
{
"content": "If Joe sold 50 cookies and earned $60, and he sells the cookies for 20% more than the cost to make them, what is the cost of making each cookie?",
"role": "user"
},
{
"content": "If Joe sold 50 cookies and earned $60, we can assume that each cookie was sold for $60/50 = $1.20\nIf Joe s... | math | meta-math/MetaMathQA |
[
{
"content": "Write a Python program to print out the list of even numbers from 0 to given limit.\nlimit = 10",
"role": "user"
},
{
"content": "# declare list of numbers\nnumbers = [x for x in range(0, limit+1)]\n\n# declare empty list of even numbers\neven_numbers = []\n\n# loop through list of num... | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "Basil gets 1/2 of a dog cookie in the morning and before bed. She gets 2 whole cookies during the day. Basil's cookies are packaged with a certain number of cookies per box. She needs 2 boxes to last her for 30 days. How many cookies are in each box?",
"role": "user"
},
{
"content": "L... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Given a dialogue, identify whether the user is confused or not.\n- Agent: You can use this code to redeem the tickets\n- Customer: What code?",
"role": "user"
},
{
"content": "Confused",
"role": "assistant"
}
] | instruction | tatsu-lab/alpaca |
[
{
"content": "54 is this number minus 39. What do you get if this number is divided by 3?",
"role": "user"
},
{
"content": "If 54 is the number minus 39, then the number is 54 + 39 = 93.\n\nIf this number (93) is divided by 3, you get 93 / 3 = 31.",
"role": "assistant"
}
] | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Jack, who weighs 60 pounds, wants to play on the see-saw with his cousin Anna, who weighs 40 pounds. How many 4-pound rocks does Jack need to hold to make their weights equal?",
"role": "user"
},
{
"content": "First find the total difference in weight between the two people: 60 pounds ... | math | openai/gsm8k |
[
{
"content": "Calen originally had 5 more pencils than does Caleb, and Caleb has 3 less than twice as many pencils as does Candy. If Calen lost x pencils, which left him with 10 pencils, then how many pencils does Candy have?\nIf we know the answer to the above question is 9, what is the value of unknown varia... | math | meta-math/MetaMathQA |
[
{
"content": "Evaluate the expression $\\frac{x^2-x-6}{x-3}$ when $x=2$. Express your answer in simplest form.",
"role": "user"
},
{
"content": "Substituting $x=2$ into the expression, we get\n\\[\\frac{(2)^2 - 2 - 6}{2 - 3} = \\frac{4 - 2 - 6}{-1} = \\frac{-4}{-1} = \\boxed{4}.\\]\nThe answer is: 4... | math | meta-math/MetaMathQA |
[
{
"content": "Create a web service in Python which accepts a URL as input and prints the HTML of the page.\nurl = \"www.example.com\"",
"role": "user"
},
{
"content": "import requests\n\ndef get_html(url):\n response = requests.get(url) \n if response.status_code == 200:\n return resp... | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "Create a class in Python that represents a given animal object.\nCat",
"role": "user"
},
{
"content": "class Cat:\n def __init__(self):\n self.name = \"\"\n self.colour = \"\"\n self.age = 0\n self.breed = \"\"\n\n def meow(self):\n print(self.n... | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "Mr. and Mrs. Hugo went on a road trip. On the first day, they traveled 200 miles. On the second day, they traveled 3/4 as far. On the third day, they traveled 1/2 as many miles as the first two days combined. How many miles did they travel for 3 days?",
"role": "user"
},
{
"content": "... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "James decides to buy himself a new barbell. It cost 30% more than his old $250 barbell. How much did it cost?",
"role": "user"
},
{
"content": "It cost 250*.3=$<<250*.3=75>>75 more than his old barbell\nSo it cost 250+75=$<<250+75=325>>325\n#### 325",
"role": "assistant"
}
] | math | openai/gsm8k |
[
{
"content": "Jenny wants to heat a dish for dinner. It needs to be at 100 degrees before it is ready to eat. It is 20 degrees when she places it in the oven, and it heats up 5 degrees every minute. How many minutes will it take to be ready?",
"role": "user"
},
{
"content": "To determine this, we... | math | openai/gsm8k |
[
{
"content": "Determine the interval of all x values for which both 2x and 3x are within the range of (1,2).",
"role": "user"
},
{
"content": "To determine the interval of all x values for which both 2x and 3x are within the range of (1,2),\nwe need to find the interval in which both 2x and 3x are g... | math | meta-math/MetaMathQA |
[
{
"content": "Calculate the product of 5 and 3.",
"role": "user"
},
{
"content": "The product of 5 and 3 is 15.",
"role": "assistant"
}
] | instruction | tatsu-lab/alpaca |
[
{
"content": "Identify any usage errors in the following sentence.\nWe all need to take a walk on the wile side.",
"role": "user"
},
{
"content": "The usage error in the sentence is that the phrase should be \"walk on the wild side,\" not \"wile side.\"",
"role": "assistant"
}
] | instruction | tatsu-lab/alpaca |
[
{
"content": "Compute $\\cos 72^\\circ.$",
"role": "user"
},
{
"content": "We can use the trigonometric identity $\\cos 2\\theta = 2\\cos^2 \\theta - 1.$\nLetting $\\theta = 36^\\circ,$ we have $\\cos 72^\\circ = \\cos 2\\theta = 2\\cos^2 \\theta - 1 = 2(\\cos 36^\\circ)^2 - 1.$\nWe can also use the... | math | meta-math/MetaMathQA |
[
{
"content": "If Minnie mounts three more horses per day than the number of days in a week, and Mickey mounts an average of six less than twice as many horses per day as Minnie, how many horses does Mickey mount per week?",
"role": "user"
},
{
"content": "The number of days in a week is 7.\nMinnie m... | math | meta-math/MetaMathQA |
[
{
"content": "Construct a loop statement in JavaScript that prints each word in the given array and its corresponding index.\nvar words = [\"apple\", \"banana\", \"corn\"];",
"role": "user"
},
{
"content": "for (var i = 0; i < words.length; i++){\n console.log(words[i] + \" \" + i);\n}\n// prints: a... | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "If $a$ and $b$ are real numbers, and one of the roots of the equation $x^3 + ax + b = 0$ is $1 + i \\sqrt{3}$, what is the value of $a + b$?",
"role": "user"
},
{
"content": "Since the coefficients of the polynomial are real, the other two roots must be the complex conjugates of $1 + i... | math | meta-math/MetaMathQA |
[
{
"content": "There are 8 apples in the basket. Jungkook put 7 more apples in the basket. How many apples are in the basket?",
"role": "user"
},
{
"content": "If there were originally 8 apples in the basket and Jungkook added 7 more, you would add the two amounts together to find the total number of... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "A 10 m long and 8 m wide rectangular floor is to be covered with a square carpet with 4 m sides. How many square meters of the floor are uncovered?",
"role": "user"
},
{
"content": "The area of the floor is 10 m x 8 m = 80 square meters.\nThe area of the carpet is 4 m x 4 m = 16 square... | math | meta-math/MetaMathQA |
[
{
"content": "If Uncle Jerry was able to harvest 120 tomatoes yesterday and today he harvested 50 more tomatoes than yesterday, what is the total number of tomatoes that Uncle Jerry harvested?",
"role": "user"
},
{
"content": "Yesterday, Uncle Jerry harvested 120 tomatoes.\nToday, he harvested 50 mo... | math | meta-math/MetaMathQA |
[
{
"content": "You want to share 7 apples with 2 monkeys. In this case, if the monkeys get at least one apple, how many ways can monkeys share the apple?",
"role": "user"
},
{
"content": "To share 7 apples with 2 monkeys where each monkey gets at least one apple, we can first give each monkey one app... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Design a Python program to generate a set of Fibonacci numbers up to a given value.\nn = 10",
"role": "user"
},
{
"content": "def fibonacci(n): \n fib = [] \n \n a, b = 0, 1\n while a < n: \n fib.append(a) \n a, b = b, a + b \n \n return fib\n\nn = 10\nprint(fibonacci(n))",
"role... | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "Let $\\mathbf{v}_0$ be a vector. The vector $\\mathbf{v}_0$ is projected onto $\\begin{pmatrix} 3 \\\\ 1 \\end{pmatrix},$ resulting in the vector $\\mathbf{v}_1.$ The vector $\\mathbf{v}_1$ is then projected onto $\\begin{pmatrix} 1 \\\\ X \\end{pmatrix},$ resulting in the vector $\\mathbf{v}_2.... | math | meta-math/MetaMathQA |
[
{
"content": "Last year Dallas was 3 times the age of his sister Darcy. Darcy is twice as old as Dexter who is 8 right now. How old is Dallas now?",
"role": "user"
},
{
"content": "Let's start by figuring out Darcy's current age. If Dexter is 8 years old right now, and Darcy is twice as old as Dexte... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "The height of the green chair is 0.309 meters (m) and the height of the blue chair is 48.2 centimeters (cm). Which color is the taller chair?",
"role": "user"
},
{
"content": "To compare the heights of the two chairs, we need to convert them to the same unit of measurement. Let's conve... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Santino has 2 papaya trees and 3 mango trees. If each papaya tree produces 10 papayas and each mango tree produces 20 mangos, how many fruits does Santino have in total?",
"role": "user"
},
{
"content": "The number of papayas from the papaya trees is 2 trees * 10 papayas/tree = 20 papa... | math | meta-math/MetaMathQA |
[
{
"content": "Damien collects glasses for a hobby and decides he wants to put them in display cupboards. His tall cupboard can hold 20 glasses, his wide cupboard can hold twice as many, and his narrow cupboard can hold 15 glasses with the glasses divided equally among the three shelves. As Damien is putting gla... | math | openai/gsm8k |
[
{
"content": "Jimmy and Tonya both like collecting matchbooks and stamps. They decide to trade some stamps and matchbooks. They have each decided that one stamp is worth 12 matches. Each matchbook contains 24 matches. Tonya arrives with 13 stamps, Jimmy has some matchbooks, and Jimmy trades all his matchbooks f... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Bubba bought a new two-story warehouse. When empty, the first floor of the building contains twice as much floor space for storage as the second floor. The first items he brought into his empty building were several thousand boxes; and he put them all on the second floor, which filled one-quarte... | math | meta-math/MetaMathQA |
[
{
"content": "You have a die with the sum of the number of eyes on one side and the number of eyes on the other side is 7. Given that the eyes on this die are 1 through 6, find the number of eyes on the opposite side of 5 multiplied by 5.",
"role": "user"
},
{
"content": "On a standard six-sided die... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "The lattice shown is continued for $9$ rows. What will be the third number in the $9$th row? \\begin{tabular}{rccccc}\nRow 1: & 1 & 2 & 3 & 4 & 5 \\\\\nRow 2: & 6 & 7 & 8 & 9 & 10 \\\\\nRow 3: & 11 & 12 & 13 & 14 & 15 \\\\\nRow 4: & 16 & 17 & X & 19 & 20\n\\end{tabular}\nIf we know the answer to t... | math | meta-math/MetaMathQA |
[
{
"content": "What is the value of the number if 25% of it is equal to 20% of 30?",
"role": "user"
},
{
"content": "Let the number be $x$.\nWe have the equation $0.25x=0.20(30)$.\nSimplifying, we get $0.25x=6$.\nDividing both sides by 0.25, we find $x=\\boxed{24}$.The answer is: 24",
"role": "as... | math | meta-math/MetaMathQA |
[
{
"content": "Build a function in Python to output a list of the first n Fibonacci numbers.",
"role": "user"
},
{
"content": "def Fibonacci(n): \n \n # Taking 1st two Fibonacci numbers as 0 and 1 \n FibArray = [0, 1] \n \n for i in range(2, n): \n FibArray.append(FibArray[i-2] ... | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "Hayden works for a limousine company as a driver. He gets reimbursed for any gas he puts in the limo, his hourly wage is $15, and he gets paid an additional $5 for every ride he gives. A positive review from a rider in his limo also gets him a $20 bonus. Today, he gave rides to x groups, drove for... | math | meta-math/MetaMathQA |
[
{
"content": "Shane wants to take as many photos as possible this year. He takes 146 photos in the first 2 months of the year. In January, he takes x photos every day. The rest of the photos were taken in February. If in February he took an equal number of photos each week, Shane took 21 photos each week in Feb... | math | meta-math/MetaMathQA |
[
{
"content": "Write a CSS code snippet to add a shadow effect to all buttons on the page.",
"role": "user"
},
{
"content": "button {\n -webkit-box-shadow: 0px 2px 5px 2px rgba(0,0,0,0.75);\n -moz-box-shadow: 0px 2px 5px 2px rgba(0,0,0,0.75);\n box-shadow: 0px 2px 5px 2px rgba(0,0,0,0.75);\n}",
... | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "If the sum of three consecutive even numbers is 1194, what is the sum of the smallest and largest even numbers?",
"role": "user"
},
{
"content": "Let's denote the three consecutive even numbers as n, n+2, and n+4, where n is the smallest even number.\n\nAccording to the problem, the su... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Write a 2-3 sentence script for a movie advertisement for a horror movie.",
"role": "user"
},
{
"content": "Are you ready for an all-new adventure of terror and suspense? Get ready to scream with the all-new horror movie, coming to theaters this fall! Experience the fear of the unknown... | instruction | tatsu-lab/alpaca |
[
{
"content": "How would you code a basic spell-checker",
"role": "user"
},
{
"content": "def spell_checker(input_text):\n correct_words = []\n wrong_words = []\n \n for word in input_text.split():\n if is_correct(word):\n correct_words.append(word)\n else:\n ... | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "Sara is 6 inches taller than her brother Joe. Joe is 3 inches taller than his friend Roy. If Sara is 45 inches tall, how tall is Roy?",
"role": "user"
},
{
"content": "If Sara is 45 inches tall and she is 6 inches taller than her brother Joe, then Joe is 45 - 6 = 39 inches tall.\n\nSin... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Linda is painting her bedroom. Her bedroom has 4 walls, with the room being 20 feet wide by 20 feet long by 8 feet tall. One wall has a 3-foot by 7-foot doorway. A second wall has a 6-foot by 4-foot window. A third wall has a 5-foot by 7-foot doorway to a walk-in-closet. And the fourth wall is com... | math | meta-math/MetaMathQA |
[
{
"content": "Find $t$ such that $(t,5)$ lies on the line through $(0,3)$ and $(-8,0)$.",
"role": "user"
},
{
"content": "The slope of the line passing through $(0,3)$ and $(-8,0)$ is\n$$\\frac{0-3}{-8-0} = \\frac{-3}{-8} = \\frac{3}{8}.$$\nUsing the point-slope form of the equation of a line, the e... | math | meta-math/MetaMathQA |
[
{
"content": "There are 26 chickens, x piglets, and 34 goats at Stacy’s farm. A really bad storm hits and half of all the animals get sick. In total, 50 animals get sick. What is the value of unknown variable x?",
"role": "user"
},
{
"content": "To solve this problem, we need to determine the value ... | math | meta-math/MetaMathQA |
[
{
"content": "Aryan owes Fernanda $1200, which is twice what Kyro owes Fernanda. Aryan decides to pay 60% of her debt to Fernanda, and Kyro pays Fernanda 80% of her dept. If Fernanda had $300 in her savings account and adds the money she's been paid by her debtors to the savings account, calculate the total amo... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Design an algorithm to detect whether two given strings are permutations of each other.",
"role": "user"
},
{
"content": "Algorithm:\n\n// Take two strings, str1 and str2\n\n// Step 1:\n// Start\n\n// Step 2:\n// Run a loop over the length of the strings\n\n// Step 3:\n// For each char... | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "Construct an XPath query to select all <h2> tags from a web page",
"role": "user"
},
{
"content": "//h2",
"role": "assistant"
}
] | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "Borgnine wants to see 1100 legs at the zoo. He has already seen 12 chimps, some lions, and 5 lizards. He is next headed to see the tarantulas and needs to see 125 tarantulas to meet his goal. How many lions has he seen?",
"role": "user"
},
{
"content": "Let's calculate the total number... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Create a function in Python that takes an input list of strings and returns the longest string in the list.\nlist = [\"cat\", \"dog\", \"elephant\"]",
"role": "user"
},
{
"content": "def longest_string(list):\n longest_word = \"\"\n for word in list:\n if len(word) > len(longest_w... | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "Write a Java code snippet to set the 3rd element in an array of integers to the value 5.\nint[] arr = {1, 2, 3, 4, 5};",
"role": "user"
},
{
"content": "arr[2] = 5;",
"role": "assistant"
}
] | code | sahil2801/CodeAlpaca-20k |
[
{
"content": "Terrell usually lifts two 20-pound weights 12 times. If he uses two 15-pound weights instead, how many times must Terrell lift them in order to lift the same total weight?",
"role": "user"
},
{
"content": "The total weight lifted is the product of the weight and the number of lifts.\nI... | math | meta-math/MetaMathQA |
[
{
"content": "The diagonals of a rhombus are 6 inches and 8 inches. What is the perimeter, in inches, of the rhombus below? [asy]\nimport geometry; size(150); defaultpen(linewidth(0.8));\npair A = (0,0),B = (8,6),C = (16,0),D = (8,-6), E = (8,0);\ndraw(A--B--C--D--cycle);\ndraw(A--C,StickIntervalMarker(2,2,10))... | math | meta-math/MetaMathQA |
[
{
"content": "John's pool is 5 feet deeper than 2 times Sarah’s pool. If John’s pool is 15 feet deep, how deep is Sarah’s pool?",
"role": "user"
},
{
"content": "Let x be the number of feet in John’s pool\n2*x + 5=15\n2x=10\nx=<<5=5>>5\n#### 5",
"role": "assistant"
}
] | math | openai/gsm8k |
[
{
"content": "The cube below has sides of length 4 feet. If a cylindrical section of radius 2 feet is removed from the solid, what is the total remaining volume of the cube? Express your answer in cubic feet in terms of $\\pi$.\n\n[asy]\nimport solids; size(150); import three; defaultpen(linewidth(0.8)); curren... | math | meta-math/MetaMathQA |
[
{
"content": "Categorize each code snippet into the appropriate programming language.\nCode snippet 1:\n\ndef add(a, b):\n return a + b\n\nCode Snippet 2:\n\nint add (int a, int b) \n{\n return a + b;\n}",
"role": "user"
},
{
"content": "Code snippet 1: Python\nCode snippet 2: C/C++",
"role":... | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "There is a chicken pizza set menu in which you can choose one of four kinds of chicken and one of three kinds of pizza. When Eunsung and Sungmin are ordering the set menus, what is the number of cases in which they order only one same kind of menu among pizza and chicken?",
"role": "user"
},... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Create a marketing slogan that conveys customer satisfaction.",
"role": "user"
},
{
"content": "\"Happy customers, happy us!\"",
"role": "assistant"
}
] | instruction | tatsu-lab/alpaca |
[
{
"content": "How many integers $n$ satisfy $(n+3)(n-7) \\le 0$?",
"role": "user"
},
{
"content": "To find the integers $n$ that satisfy $(n+3)(n-7) \\le 0$,\nwe can consider the sign of each factor and determine when the product is less than or equal to zero.\nThe factor $n+3$ is positive when $n >... | math | meta-math/MetaMathQA |
[
{
"content": "Write a Python script to read an array from the user and then determine the mean and median of the array.\narr = [10, 15, 20, 25, 30, 35]",
"role": "user"
},
{
"content": "def mean_median(arr): \n arr_sum = 0 \n for i in range(len(arr)): \n arr_sum += arr[i] \n ... | code | iamtarun/python_code_instructions_18k_alpaca |
[
{
"content": "When Jason plays the video game, Duty for Ashes, his mission to slay the dragon hoard requires that he fire his weapon on average every 15 seconds. And each time he fires his weapon, his power-fire setting allows him to shoot a flame for 5 seconds. On average, how many seconds per minute does J... | math | meta-math/MetaMathQA |
[
{
"content": "If Markus is twice the age of his son, and his son is twice the age of his grandson, and the sum of their ages is 140 years, then how old is Markus's grandson?",
"role": "user"
},
{
"content": "Let's assume the age of Markus's grandson is G.\nIf the son is twice the age of the grandson... | math | meta-math/MetaMathQA |
[
{
"content": "Krystian works in the library. He borrows an average of 40 books every day. Every Friday, his number of borrowed books is about 40% higher than the daily average. How many books does he borrow in a week if the library is open from Monday to Friday?",
"role": "user"
},
{
"content": "Kry... | math | microsoft/orca-math-word-problems-200k |
[
{
"content": "Shari walks at a constant rate of 3 miles per hour. After 1.5 hours, how many miles did she walk? Express your answer as a decimal to the nearest tenth.",
"role": "user"
},
{
"content": "Since Shari walks at a constant rate of 3 miles per hour, after 1.5 hours she would have walked $1.... | math | meta-math/MetaMathQA |
[
{
"content": "Three marbles are randomly selected, without replacement, from a bag containing two red, two blue and two green marbles. What is the probability that one marble of each color is selected? Express your answer as a common fraction.",
"role": "user"
},
{
"content": "There are $\\binom{6}{... | math | meta-math/MetaMathQA |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.