{"conversations": [{"from": "human", "value": "Work out 174 ÷ 3."}, {"from": "gpt", "value": "174 ÷ 3 = 58, because 58 × 3 = 174."}]} {"conversations": [{"from": "human", "value": "Simplify the fraction 5/110."}, {"from": "gpt", "value": "Both numbers divide by 5: 5 ÷ 5 = 1 and 110 ÷ 5 = 22, so 5/110 = 1/22."}]} {"conversations": [{"from": "human", "value": "A motorcycle jacket costs €80. A 25% discount is applied, then a €25 voucher. What is the final price?"}, {"from": "gpt", "value": "After 25% off: €80 × 0.75 = €60. Then minus the €25 voucher: €60 − €25 = €35."}]} {"conversations": [{"from": "human", "value": "A recipe for 5 servings needs 10 grams of flour. How much flour is needed for 2 servings?"}, {"from": "gpt", "value": "10 g is for 5 servings, so one serving needs 2 g. For 2 servings: 2 × 2 = 4 g."}]} {"conversations": [{"from": "human", "value": "Solve for x: 12x - 14 = 58"}, {"from": "gpt", "value": "Add 14 to both sides: 12x = 72. Divide by 12: x = 72/12 = 6."}]} {"conversations": [{"from": "human", "value": "Maria buys 6 oranges at €1.50 each and 1 cans of tuna at €1.60 each. How much does Maria pay in total?"}, {"from": "gpt", "value": "6 × €1.50 = €9.00, and 1 × €1.60 = €1.60. Total: €10.60."}]} {"conversations": [{"from": "human", "value": "A rider travels at 50 km/h for 4 hours, then at 80 km/h for 1 hours. What is the total distance traveled?"}, {"from": "gpt", "value": "First leg: 50 × 4 = 200 km. Second leg: 80 × 1 = 80 km. Total: 200 + 80 = 280 km."}]} {"conversations": [{"from": "human", "value": "Solve for x: 8x - 8 = 120"}, {"from": "gpt", "value": "Add 8 to both sides: 8x = 128. Divide by 8: x = 128/8 = 16."}]} {"conversations": [{"from": "human", "value": "Write a Python function largest that takes a list of numbers and returns the largest one. For example, calling largest([20, 55, 53]) should return 55."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef largest(scores):\n return max(scores)\n```\n\nmax() returns the largest item; it also handles a single-element list."}]} {"conversations": [{"from": "human", "value": "Write a Python function evens that takes a list of numbers and returns a new list with only the even numbers. For example, calling evens([53, 19, 18]) should return [18]."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef evens(lst):\n return [x for x in lst if x % 2 == 0]\n```\n\nA list comprehension with a condition is the cleanest filter in Python."}]} {"conversations": [{"from": "human", "value": "Write a Python function common_items that takes two lists and returns a list of the values they have in common, without duplicates. For example, calling common_items([28, 19, 22], [1, 9, 19, 2, 30, 1]) should return [19]."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef common_items(first, second):\n return list(set(first) & set(second))\n```\n\nConverting both to sets makes the intersection a single & operation; converting back to a list is just form."}]} {"conversations": [{"from": "human", "value": "Which is larger: 2/5 or 5/5?"}, {"from": "gpt", "value": "Cross-multiply: 2 × 5 = 10 vs 5 × 5 = 25. Since 10 is less than 25, 2/5 is the smaller one."}]} {"conversations": [{"from": "human", "value": "What does 518 minus 96 equal?"}, {"from": "gpt", "value": "518 - 96 = 422. The difference is 422."}]} {"conversations": [{"from": "human", "value": "Calculate: 691 + 636"}, {"from": "gpt", "value": "691 + 636 = 1327. The sum is 1327."}]} {"conversations": [{"from": "human", "value": "Write a Python function digital_sum that takes a positive integer and returns the sum of its digits. For example, calling digital_sum(52566) should return 24."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef digital_sum(n):\n return sum(int(d) for d in str(n))\n```\n\nConverting to a string lets you iterate the digits directly; int() converts each back for summing."}]} {"conversations": [{"from": "human", "value": "Write a Python function format_time that takes a number of seconds and returns a string in 'H:MM:SS' format. For example, calling format_time(9084) should return '2:31:24'."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef format_time(secs):\n h = secs // 3600\n m = (secs % 3600) // 60\n s = secs % 60\n return f'{h}:{m:02d}:{s:02d}'\n```\n\nInteger division and modulo split the seconds; the :02d format pads minutes and seconds."}]} {"conversations": [{"from": "human", "value": "A boxing match has 6 rounds of 3 minutes each, with 1 minute of rest between rounds. How long does the whole match last from the first bell to the last bell?"}, {"from": "gpt", "value": "6 × 3 minutes of fighting = 18 minutes, plus 5 minutes of rest between rounds: 18 + 5 = 23 minutes."}]} {"conversations": [{"from": "human", "value": "Write a Python function evens that takes a list of numbers and returns a new list with only the even numbers. For example, calling evens([52, -16, 0, 48]) should return [52, -16, 0, 48]."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef evens(numbers):\n return [x for x in numbers if x % 2 == 0]\n```\n\nA list comprehension with a condition is the cleanest filter in Python."}]} {"conversations": [{"from": "human", "value": "Work out 7 × 87."}, {"from": "gpt", "value": "7 × 87 = 7 × 80 + 7 × 7 = 560 + 49 = 609."}]} {"conversations": [{"from": "human", "value": "What is 5/4 + 1/3?"}, {"from": "gpt", "value": "The common denominator is 12: 15/12 + 4/12 = 19/12, which simplifies to 19/12."}]} {"conversations": [{"from": "human", "value": "A recipe for 2 servings needs 4 grams of flour. How much flour is needed for 7 servings?"}, {"from": "gpt", "value": "4 g is for 2 servings, so one serving needs 2 g. For 7 servings: 2 × 7 = 14 g."}]} {"conversations": [{"from": "human", "value": "What does 326 minus 140 equal?"}, {"from": "gpt", "value": "326 - 140 = 186. The difference is 186."}]} {"conversations": [{"from": "human", "value": "Write a Python function digital_sum that takes a positive integer and returns the sum of its digits. For example, calling digital_sum(60251) should return 14."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef digital_sum(num):\n return sum(int(d) for d in str(num))\n```\n\nConverting to a string lets you iterate the digits directly; int() converts each back for summing."}]} {"conversations": [{"from": "human", "value": "What does 180 minus 23 equal?"}, {"from": "gpt", "value": "180 - 23 = 157. The difference is 157."}]} {"conversations": [{"from": "human", "value": "Decrease 300 by 60%. What is the result?"}, {"from": "gpt", "value": "A decrease of 60% removes 180, so the result is 300 - 180 = 120."}]} {"conversations": [{"from": "human", "value": "Work out 459 - 309."}, {"from": "gpt", "value": "459 - 309 = 150. The difference is 150."}]} {"conversations": [{"from": "human", "value": "True or false: Water boils at a lower temperature at high altitude."}, {"from": "gpt", "value": "True. True — lower air pressure means water boils below 100°C on mountains."}]} {"conversations": [{"from": "human", "value": "Work out 404 + 57."}, {"from": "gpt", "value": "404 + 57 = 461. The sum is 461."}]} {"conversations": [{"from": "human", "value": "What is 80% of 120?"}, {"from": "gpt", "value": "80% of 120 = 120 × 80/100 = 96."}]} {"conversations": [{"from": "human", "value": "Write a Python function backwards that takes a string and returns it reversed. For example, calling backwards('ciecd') should return 'dceic'."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef backwards(word):\n return word[::-1]\n```\n\nThe slice [::-1] walks the string from the end to the start — the classic Python idiom."}]} {"conversations": [{"from": "human", "value": "What is the capital of Greece?"}, {"from": "gpt", "value": "Athens."}]} {"conversations": [{"from": "human", "value": "Five people sit in a row of five seats. Alex sits next to Dan Dan sits next to Hugo Hugo sits next to Finn Finn sits next to Iris Alex sits at one end of the row. Which seat is Finn in?"}, {"from": "gpt", "value": "Starting from Alex at one end and following the 'next to' clues fixes the whole row. Finn is in seat 4."}]} {"conversations": [{"from": "human", "value": "Write a Python function common_items that takes two lists and returns a list of the values they have in common, without duplicates. For example, calling common_items([20, 3, 13, 18], [1, 7, 20, 5, 9, 22]) should return [20]."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef common_items(left, second):\n return list(set(left) & set(second))\n```\n\nConverting both to sets makes the intersection a single & operation; converting back to a list is just form."}]} {"conversations": [{"from": "human", "value": "What does 242 plus 170 equal?"}, {"from": "gpt", "value": "242 + 170 = 412. The sum is 412."}]} {"conversations": [{"from": "human", "value": "Work out 465 + 370."}, {"from": "gpt", "value": "465 + 370 = 835. The sum is 835."}]} {"conversations": [{"from": "human", "value": "Solve for x: 3x - 19 = 32"}, {"from": "gpt", "value": "Add 19 to both sides: 3x = 51. Divide by 3: x = 51/3 = 17."}]} {"conversations": [{"from": "human", "value": "What is 160 + 990?"}, {"from": "gpt", "value": "160 + 990 = 1150. The sum is 1150."}]} {"conversations": [{"from": "human", "value": "Write a Python function find_gcd that takes two positive integers and returns their greatest common divisor. For example, calling find_gcd(2, 36) should return 2."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef find_gcd(x, second):\n while second:\n x, second = second, x % second\n return x\n```\n\nEuclid's algorithm: repeated remainder until it hits zero — thousands of years old and still optimal."}]} {"conversations": [{"from": "human", "value": "Write a Python function pretty_time that takes a number of seconds and returns a string in 'H:MM:SS' format. For example, calling pretty_time(5518) should return '1:31:58'."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef pretty_time(secs):\n h = secs // 3600\n m = (secs % 3600) // 60\n s = secs % 60\n return f'{h}:{m:02d}:{s:02d}'\n```\n\nInteger division and modulo split the seconds; the :02d format pads minutes and seconds."}]} {"conversations": [{"from": "human", "value": "Work out 948 + 47."}, {"from": "gpt", "value": "948 + 47 = 995. The sum is 995."}]} {"conversations": [{"from": "human", "value": "A machine produces 234 bottles in 6 minutes. How many bottles does it produce per minute?"}, {"from": "gpt", "value": "234 ÷ 6 = 39 bottles per minute."}]} {"conversations": [{"from": "human", "value": "How many kilometres are in 33 miles?"}, {"from": "gpt", "value": "1 mile ≈ 1.609 km, so the answer is 53.1."}]} {"conversations": [{"from": "human", "value": "Decrease 380 by 50%. What is the result?"}, {"from": "gpt", "value": "A decrease of 50% removes 190, so the result is 380 - 190 = 190."}]} {"conversations": [{"from": "human", "value": "What is 70% of 340?"}, {"from": "gpt", "value": "70% of 340 = 340 × 70/100 = 238."}]} {"conversations": [{"from": "human", "value": "Five people sit in a row of five seats. Jack sits next to Ben Ben sits next to Hugo Hugo sits next to Eva Eva sits next to Dan Jack sits at one end of the row. Which seat is Hugo in?"}, {"from": "gpt", "value": "Starting from Jack at one end and following the 'next to' clues fixes the whole row. Hugo is in seat 3."}]} {"conversations": [{"from": "human", "value": "Write a Python function celsius_to_fahrenheit that takes a temperature in Celsius and returns it in Fahrenheit. For example, calling celsius_to_fahrenheit(37) should return 98.6."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef celsius_to_fahrenheit(celsius):\n return celsius * 9 / 5 + 32\n```\n\nThe formula is F = C × 9/5 + 32; 0°C → 32°F and 100°C → 212°F are the sanity checks."}]} {"conversations": [{"from": "human", "value": "Write 37/20 as a decimal."}, {"from": "gpt", "value": "Dividing 37 by 20 gives 1.85."}]} {"conversations": [{"from": "human", "value": "How many minutes are in 2 hours?"}, {"from": "gpt", "value": "1 hour = 60 minutes, so the answer is 120."}]} {"conversations": [{"from": "human", "value": "You know that Ben is shorter than Dan, Dan is shorter than Finn, Finn is shorter than Gina, Gina is shorter than Chris. Who is the tallest?"}, {"from": "gpt", "value": "Putting the heights in order: Ben, Dan, Finn, Gina, Chris (shortest to tallest). So the tallest is Chris."}]} {"conversations": [{"from": "human", "value": "A motorcycle jacket costs €80. A 25% discount is applied, then a €15 voucher. What is the final price?"}, {"from": "gpt", "value": "After 25% off: €80 × 0.75 = €60. Then minus the €15 voucher: €60 − €15 = €45."}]} {"conversations": [{"from": "human", "value": "What is the 10th term of the arithmetic sequence that starts 6 with common difference 4?"}, {"from": "gpt", "value": "Term n = first term + (n − 1) × difference = 6 + (10 − 1) × 4 = 6 + 36 = 42."}]} {"conversations": [{"from": "human", "value": "How do airplanes stay in the air?"}, {"from": "gpt", "value": "A plane flies because its wings generate lift. The wing is shaped so air moving over the top has to travel farther — and faster — than air underneath, creating lower pressure above the wing. That pressure difference pushes the wing up. The angle of attack (the wing tilted slightly into the airflow) adds even more lift by deflecting air downward, which pushes the wing up by Newton's third law. Engines provide thrust to keep air moving over the wings fast enough."}]} {"conversations": [{"from": "human", "value": "Find the next three terms of the sequence: 10, 14, 18, 22, ..."}, {"from": "gpt", "value": "The common difference is 4, so the next three terms are 26, 30, 34."}]} {"conversations": [{"from": "human", "value": "What is 25% of 100?"}, {"from": "gpt", "value": "25% of 100 = 100 × 25/100 = 25."}]} {"conversations": [{"from": "human", "value": "What is 862 plus 677?"}, {"from": "gpt", "value": "862 + 677 = 1539. The sum is 1539."}]} {"conversations": [{"from": "human", "value": "Simplify the fraction 22/24."}, {"from": "gpt", "value": "Both numbers divide by 2: 22 ÷ 2 = 11 and 24 ÷ 2 = 12, so 22/24 = 11/12."}]} {"conversations": [{"from": "human", "value": "A rider covers 360 km in 4 hours. What is the average speed?"}, {"from": "gpt", "value": "Average speed = distance ÷ time = 360 ÷ 4 = 90 km/h."}]} {"conversations": [{"from": "human", "value": "Five people sit in a row of five seats. Jack sits next to Hugo Hugo sits next to Alex Alex sits next to Dan Dan sits next to Eva Jack sits at one end of the row. Which seat is Jack in?"}, {"from": "gpt", "value": "Starting from Jack at one end and following the 'next to' clues fixes the whole row. Jack is in seat 1."}]} {"conversations": [{"from": "human", "value": "Five people sit in a row of five seats. Chris sits next to Iris Iris sits next to Ben Ben sits next to Jack Jack sits next to Dan Chris sits at one end of the row. Which seat is Chris in?"}, {"from": "gpt", "value": "Starting from Chris at one end and following the 'next to' clues fixes the whole row. Chris is in seat 1."}]} {"conversations": [{"from": "human", "value": "What is 2/6 + 4/5?"}, {"from": "gpt", "value": "The common denominator is 30: 10/30 + 24/30 = 34/30, which simplifies to 17/15."}]} {"conversations": [{"from": "human", "value": "Increase 180 by 45%. What is the result?"}, {"from": "gpt", "value": "An increase of 45% adds 81, so the result is 180 + 81 = 261."}]} {"conversations": [{"from": "human", "value": "A recipe for 5 servings needs 40 grams of flour. How much flour is needed for 8 servings?"}, {"from": "gpt", "value": "40 g is for 5 servings, so one serving needs 8 g. For 8 servings: 8 × 8 = 64 g."}]} {"conversations": [{"from": "human", "value": "What is 82 × 11?"}, {"from": "gpt", "value": "82 × 11 = 82 × 10 + 82 × 1 = 820 + 82 = 902."}]} {"conversations": [{"from": "human", "value": "Write a letter from your future self to your present self."}, {"from": "gpt", "value": "Hey. It's you, from five years from now. I know things feel stuck — the gym is hard, the bike needs work, the savings account is a joke. Here's what I need you to know: it's working. Every single boring session, every oil change you did yourself, every early night — it compounds. You don't feel it now because compound interest is invisible until it isn't. Keep going. Show up on the days you don't want to. And buy that set of Allen keys — you're going to need them more than you can imagine. — You, later"}]} {"conversations": [{"from": "human", "value": "Write a Python function gcd that takes two positive integers and returns their greatest common divisor. For example, calling gcd(36, 24) should return 12."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef gcd(first, right):\n while right:\n first, right = right, first % right\n return first\n```\n\nEuclid's algorithm: repeated remainder until it hits zero — thousands of years old and still optimal."}]} {"conversations": [{"from": "human", "value": "What does 348 plus 424 equal?"}, {"from": "gpt", "value": "348 + 424 = 772. The sum is 772."}]} {"conversations": [{"from": "human", "value": "Work out 26 × 78."}, {"from": "gpt", "value": "26 × 78 = 26 × 70 + 26 × 8 = 1820 + 208 = 2028."}]} {"conversations": [{"from": "human", "value": "Write a Python function remove_duplicates that takes a list and returns a new list with duplicates removed, keeping the original order. For example, calling remove_duplicates([34, 30, 7, 55, 32, 22, -14]) should return [34, 30, 7, 55, 32, 22, -14]."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef remove_duplicates(values):\n seen = set()\n result = []\n for item in values:\n if item not in seen:\n seen.add(item)\n result.append(item)\n return result\n```\n\nThe set gives O(1) membership checks; appending only first occurrences preserves order."}]} {"conversations": [{"from": "human", "value": "You know that Gina is shorter than Ben, Ben is shorter than Iris, Iris is shorter than Eva. Who is the second tallest?"}, {"from": "gpt", "value": "Putting the heights in order: Gina, Ben, Iris, Eva (shortest to tallest). So the second tallest is Iris."}]} {"conversations": [{"from": "human", "value": "Calculate: 522 - 57"}, {"from": "gpt", "value": "522 - 57 = 465. The difference is 465."}]} {"conversations": [{"from": "human", "value": "A motorcycle jacket costs €40 and is on sale with 50% off. What is the sale price?"}, {"from": "gpt", "value": "The discount is 50% of €40 = €20. Sale price: €40 - €20 = €20."}]} {"conversations": [{"from": "human", "value": "All eagles are birds. Rocky is a eagle. Is Rocky a bird?"}, {"from": "gpt", "value": "Yes. The first statement says every eagle belongs to birds, and Rocky is a eagle. So Rocky must be a bird."}]} {"conversations": [{"from": "human", "value": "Write a Python function last_element that takes a list and returns its last element. For example, calling last_element([-29, 6, 30, 1, -27, -26]) should return -26."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef last_element(lst):\n return lst[-1]\n```\n\nNegative indexing reaches from the end: -1 is the last element. An empty list would raise, so validate when it matters."}]} {"conversations": [{"from": "human", "value": "Decrease 320 by 80%. What is the result?"}, {"from": "gpt", "value": "A decrease of 80% removes 256, so the result is 320 - 256 = 64."}]} {"conversations": [{"from": "human", "value": "This function should return True if a string is a palindrome, ignoring case, but it has a bug:\n\n```python\ndef is_palindrome(s):\n return s == s[::-1]\n```\n\nFind and fix the bug."}, {"from": "gpt", "value": "The bug is: The comparison is case-sensitive, so 'Racecar' would return False even though it IS a palindrome. Lowercasing first fixes it. Here's the fixed version:\n\n```python\ndef is_palindrome(s):\n t = s.lower()\n return t == t[::-1]\n```"}]} {"conversations": [{"from": "human", "value": "What is 154 ÷ 11?"}, {"from": "gpt", "value": "154 ÷ 11 = 14, because 14 × 11 = 154."}]} {"conversations": [{"from": "human", "value": "You know that Gina is shorter than Alex, Alex is shorter than Chris, Chris is shorter than Finn. Who is the second shortest?"}, {"from": "gpt", "value": "Putting the heights in order: Gina, Alex, Chris, Finn (shortest to tallest). So the second shortest is Alex."}]} {"conversations": [{"from": "human", "value": "Write a Python function fact that takes a positive integer n and returns the factorial of n (n!). For example, calling fact(4) should return 24."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef fact(n):\n total = 1\n for i in range(2, n + 1):\n total *= i\n return total\n```\n\nAn iterative loop avoids recursion limits and is easy to read."}]} {"conversations": [{"from": "human", "value": "Decrease 220 by 40%. What is the result?"}, {"from": "gpt", "value": "A decrease of 40% removes 88, so the result is 220 - 88 = 132."}]} {"conversations": [{"from": "human", "value": "66 is what percent of 100?"}, {"from": "gpt", "value": "66/100 × 100 = 66%."}]} {"conversations": [{"from": "human", "value": "A motorcycle jacket costs €200 and is on sale with 30% off. What is the sale price?"}, {"from": "gpt", "value": "The discount is 30% of €200 = €60. Sale price: €200 - €60 = €140."}]} {"conversations": [{"from": "human", "value": "What does 8 times 23 equal?"}, {"from": "gpt", "value": "8 × 23 = 8 × 20 + 8 × 3 = 160 + 24 = 184."}]} {"conversations": [{"from": "human", "value": "The sum of a number and 26 is 58. What is the number?"}, {"from": "gpt", "value": "Number = 58 - 26 = 32."}]} {"conversations": [{"from": "human", "value": "Simplify the fraction 66/72."}, {"from": "gpt", "value": "Both numbers divide by 6: 66 ÷ 6 = 11 and 72 ÷ 6 = 12, so 66/72 = 11/12."}]} {"conversations": [{"from": "human", "value": "Calculate: 344 + 168"}, {"from": "gpt", "value": "344 + 168 = 512. The sum is 512."}]} {"conversations": [{"from": "human", "value": "Work out 25 × 31."}, {"from": "gpt", "value": "25 × 31 = 25 × 30 + 25 × 1 = 750 + 25 = 775."}]} {"conversations": [{"from": "human", "value": "What is 52 + 290?"}, {"from": "gpt", "value": "52 + 290 = 342. The sum is 342."}]} {"conversations": [{"from": "human", "value": "Five people sit in a row of five seats. Hugo sits next to Iris Iris sits next to Eva Eva sits next to Ben Ben sits next to Dan Hugo sits at one end of the row. Which seat is Dan in?"}, {"from": "gpt", "value": "Starting from Hugo at one end and following the 'next to' clues fixes the whole row. Dan is in seat 5."}]} {"conversations": [{"from": "human", "value": "What is 2/3 + 5/8?"}, {"from": "gpt", "value": "The common denominator is 24: 16/24 + 15/24 = 31/24, which simplifies to 31/24."}]} {"conversations": [{"from": "human", "value": "Write 42/25 as a decimal."}, {"from": "gpt", "value": "Dividing 42 by 25 gives 1.68."}]} {"conversations": [{"from": "human", "value": "What is the average (mean) of 63, 16, 11, 86?"}, {"from": "gpt", "value": "Sum = 176, count = 4, so mean = 176 ÷ 4 = 44."}]} {"conversations": [{"from": "human", "value": "You know that Ben is shorter than Finn, Finn is shorter than Dan, Dan is shorter than Chris. Who is the tallest?"}, {"from": "gpt", "value": "Putting the heights in order: Ben, Finn, Dan, Chris (shortest to tallest). So the tallest is Chris."}]} {"conversations": [{"from": "human", "value": "What is 7 multiplied by 28?"}, {"from": "gpt", "value": "7 × 28 = 7 × 20 + 7 × 8 = 140 + 56 = 196."}]} {"conversations": [{"from": "human", "value": "What is 41 × 10?"}, {"from": "gpt", "value": "41 × 10 = 41 × 1 × 10 = 41 × 10 = 410."}]} {"conversations": [{"from": "human", "value": "Decrease 280 by 80%. What is the result?"}, {"from": "gpt", "value": "A decrease of 80% removes 224, so the result is 280 - 224 = 56."}]} {"conversations": [{"from": "human", "value": "What is 3/7 + 1/2?"}, {"from": "gpt", "value": "The common denominator is 14: 6/14 + 7/14 = 13/14, which simplifies to 13/14."}]} {"conversations": [{"from": "human", "value": "Five people sit in a row of five seats. Eva sits next to Hugo Hugo sits next to Alex Alex sits next to Jack Jack sits next to Iris Eva sits at one end of the row. Which seat is Alex in?"}, {"from": "gpt", "value": "Starting from Eva at one end and following the 'next to' clues fixes the whole row. Alex is in seat 3."}]} {"conversations": [{"from": "human", "value": "Tom is 4 times as old as his sister. His sister is 14 years old. How old is Tom?"}, {"from": "gpt", "value": "14 × 4 = 56 years old."}]} {"conversations": [{"from": "human", "value": "Five people sit in a row of five seats. Chris sits next to Gina Gina sits next to Iris Iris sits next to Alex Alex sits next to Hugo Chris sits at one end of the row. Which seat is Chris in?"}, {"from": "gpt", "value": "Starting from Chris at one end and following the 'next to' clues fixes the whole row. Chris is in seat 1."}]} {"conversations": [{"from": "human", "value": "Write a Python function area_of that takes the width and height of a rectangle and returns its area. For example, calling area_of(3, 23) should return 69."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef area_of(width, height):\n return width * height\n```\n\nArea = width × height; the zero case is worth keeping in mind for validation."}]} {"conversations": [{"from": "human", "value": "Write a Python function evens that takes a list of numbers and returns a new list with only the even numbers. For example, calling evens([43, -19, 60, -7, 47]) should return [60]."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef evens(numbers):\n return [x for x in numbers if x % 2 == 0]\n```\n\nA list comprehension with a condition is the cleanest filter in Python."}]} {"conversations": [{"from": "human", "value": "What is 280 ÷ 10?"}, {"from": "gpt", "value": "280 ÷ 10 = 28, because 28 × 10 = 280."}]} {"conversations": [{"from": "human", "value": "Write a Python function last_item that takes a list and returns its last element. For example, calling last_item([32, 51, -22, 50, 34, 36, -26]) should return -26."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef last_item(values):\n return values[-1]\n```\n\nNegative indexing reaches from the end: -1 is the last element. An empty list would raise, so validate when it matters."}]} {"conversations": [{"from": "human", "value": "A rider covers 140 km in 2 hours. What is the average speed?"}, {"from": "gpt", "value": "Average speed = distance ÷ time = 140 ÷ 2 = 70 km/h."}]} {"conversations": [{"from": "human", "value": "Five people sit in a row of five seats. Chris sits next to Alex Alex sits next to Eva Eva sits next to Gina Gina sits next to Jack Chris sits at one end of the row. Which seat is Gina in?"}, {"from": "gpt", "value": "Starting from Chris at one end and following the 'next to' clues fixes the whole row. Gina is in seat 4."}]} {"conversations": [{"from": "human", "value": "How many centimetres are in 20 m?"}, {"from": "gpt", "value": "1 m = 100 cm, so the answer is 2000."}]} {"conversations": [{"from": "human", "value": "A recipe for 6 servings needs 12 grams of flour. How much flour is needed for 9 servings?"}, {"from": "gpt", "value": "12 g is for 6 servings, so one serving needs 2 g. For 9 servings: 2 × 9 = 18 g."}]} {"conversations": [{"from": "human", "value": "Write a Python function total_of that takes a list of numbers and returns their sum. For example, calling total_of([27, -21, -25]) should return -19."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef total_of(numbers):\n return sum(numbers)\n```\n\nPython's built-in sum() handles the whole job — including the empty list — in one line."}]} {"conversations": [{"from": "human", "value": "Calculate: 998 - 556"}, {"from": "gpt", "value": "998 - 556 = 442. The difference is 442."}]} {"conversations": [{"from": "human", "value": "Solve for x: 2x = 18"}, {"from": "gpt", "value": "Divide both sides by 2: x = 18/2 = 9."}]} {"conversations": [{"from": "human", "value": "What does 777 plus 735 equal?"}, {"from": "gpt", "value": "777 + 735 = 1512. The sum is 1512."}]} {"conversations": [{"from": "human", "value": "Calculate: 786 - 489"}, {"from": "gpt", "value": "786 - 489 = 297. The difference is 297."}]} {"conversations": [{"from": "human", "value": "A dinner bill of €72.00 is split equally among 6 people. How much does each person pay?"}, {"from": "gpt", "value": "€72.00 ÷ 6 = €12.00 each."}]} {"conversations": [{"from": "human", "value": "What is 921 + 828?"}, {"from": "gpt", "value": "921 + 828 = 1749. The sum is 1749."}]} {"conversations": [{"from": "human", "value": "What is 485 - 78?"}, {"from": "gpt", "value": "485 - 78 = 407. The difference is 407."}]} {"conversations": [{"from": "human", "value": "Why does the sun rise in the east?"}, {"from": "gpt", "value": "The sun doesn't move — Earth rotates. Our planet spins from west to east, so any fixed point on the surface (like you) is carried toward the east. As you rotate into the sunlit half of Earth, the sun appears to rise over the eastern horizon; as you rotate into the dark half, it sets in the west. It takes 24 hours for a full rotation, so the sun appears to travel across the sky once per day. The same spin is why the stars also appear to wheel around the sky at night."}]} {"conversations": [{"from": "human", "value": "A machine produces 144 bottles in 12 minutes. How many bottles does it produce per minute?"}, {"from": "gpt", "value": "144 ÷ 12 = 12 bottles per minute."}]} {"conversations": [{"from": "human", "value": "Write a Python function check_anagram that takes two strings and returns True if they are anagrams of each other (same letters, ignoring case and spaces). For example, calling check_anagram('desserts', 'rdeetsss') should return True."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef check_anagram(left, y):\n return sorted(left.replace(' ', '').lower()) == sorted(y.replace(' ', '').lower())\n```\n\nSorting both strings makes the comparison trivial — anagrams sort to identical letter lists."}]} {"conversations": [{"from": "human", "value": "A dinner bill of €120.00 is split equally among 3 people. How much does each person pay?"}, {"from": "gpt", "value": "€120.00 ÷ 3 = €40.00 each."}]} {"conversations": [{"from": "human", "value": "Write a Python function remove_duplicates that takes a list and returns a new list with duplicates removed, keeping the original order. For example, calling remove_duplicates([-13, 35, 36, 33]) should return [-13, 35, 36, 33]."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef remove_duplicates(values):\n seen = set()\n result = []\n for item in values:\n if item not in seen:\n seen.add(item)\n result.append(item)\n return result\n```\n\nThe set gives O(1) membership checks; appending only first occurrences preserves order."}]} {"conversations": [{"from": "human", "value": "Write a Python function is_anagram that takes two strings and returns True if they are anagrams of each other (same letters, ignoring case and spaces). For example, calling is_anagram('night', 'ntigh') should return True."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef is_anagram(x, y):\n return sorted(x.replace(' ', '').lower()) == sorted(y.replace(' ', '').lower())\n```\n\nSorting both strings makes the comparison trivial — anagrams sort to identical letter lists."}]} {"conversations": [{"from": "human", "value": "Summarize this passage in 2-3 sentences:\n\n\"Greece receives over thirty million visitors a year, and most of them see the same five islands and the same three museums. The traveler who ventures off the beaten path is rewarded with a different country entirely. The Peloponnese offers ancient sites without crowds — the theater at Epidaurus still hosts performances under the stars, and Monemvasia is a medieval fortress town carved into a rock island. In the north, the Vikos Gorge is one of the deepest in the world and takes hikers through landscapes untouched by mass tourism. Even the food changes with the region: mountain villages serve wild greens and local cheeses you will never find on a tourist menu. Greece rewards the curious, and the curious get Greece to themselves.\""}, {"from": "gpt", "value": "Most visitors to Greece see the same popular islands and sites, but off the beaten path — the Peloponnese, the Vikos Gorge, mountain villages — lie uncrowded ancient sites and regional food. The traveler willing to leave the tourist trail discovers a different, more personal country."}]} {"conversations": [{"from": "human", "value": "The sum of a number and 23 is 65. What is the number?"}, {"from": "gpt", "value": "Number = 65 - 23 = 42."}]} {"conversations": [{"from": "human", "value": "What is 178 - 124?"}, {"from": "gpt", "value": "178 - 124 = 54. The difference is 54."}]} {"conversations": [{"from": "human", "value": "A machine produces 585 bottles in 15 minutes. How many bottles does it produce per minute?"}, {"from": "gpt", "value": "585 ÷ 15 = 39 bottles per minute."}]} {"conversations": [{"from": "human", "value": "A motorcycle jacket costs €120 and is on sale with 30% off. What is the sale price?"}, {"from": "gpt", "value": "The discount is 30% of €120 = €36. Sale price: €120 - €36 = €84."}]} {"conversations": [{"from": "human", "value": "Work out 61 × 78."}, {"from": "gpt", "value": "61 × 78 = 61 × 70 + 61 × 8 = 4270 + 488 = 4758."}]} {"conversations": [{"from": "human", "value": "You know that Hugo is shorter than Iris, Iris is shorter than Chris, Chris is shorter than Finn. Who is the tallest?"}, {"from": "gpt", "value": "Putting the heights in order: Hugo, Iris, Chris, Finn (shortest to tallest). So the tallest is Finn."}]} {"conversations": [{"from": "human", "value": "Write a Python function total_of that takes a list of numbers and returns their sum. For example, calling total_of([59, -17, 52]) should return 94."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef total_of(values):\n return sum(values)\n```\n\nPython's built-in sum() handles the whole job — including the empty list — in one line."}]} {"conversations": [{"from": "human", "value": "You know that Hugo is shorter than Dan, Dan is shorter than Iris, Iris is shorter than Finn, Finn is shorter than Jack. Who is the shortest?"}, {"from": "gpt", "value": "Putting the heights in order: Hugo, Dan, Iris, Finn, Jack (shortest to tallest). So the shortest is Hugo."}]} {"conversations": [{"from": "human", "value": "The average of 11, 50, 16, 52 and one more number is 62. What is the missing number?"}, {"from": "gpt", "value": "Total of all 5 numbers = 62 × 5 = 310. Current sum = 129, so the missing number is 310 - 129 = 181."}]} {"conversations": [{"from": "human", "value": "Simplify the fraction 33/42."}, {"from": "gpt", "value": "Both numbers divide by 3: 33 ÷ 3 = 11 and 42 ÷ 3 = 14, so 33/42 = 11/14."}]} {"conversations": [{"from": "human", "value": "Solve for x: 2x - 30 = -22"}, {"from": "gpt", "value": "Add 30 to both sides: 2x = 8. Divide by 2: x = 8/2 = 4."}]} {"conversations": [{"from": "human", "value": "Peter buys 4 loaves of bread at €2.40 each and 4 bananas at €0.80 each. How much does Peter pay in total?"}, {"from": "gpt", "value": "4 × €2.40 = €9.60, and 4 × €0.80 = €3.20. Total: €12.80."}]} {"conversations": [{"from": "human", "value": "Write a Python function find_gcd that takes two positive integers and returns their greatest common divisor. For example, calling find_gcd(6, 8) should return 2."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef find_gcd(left, right):\n while right:\n left, right = right, left % right\n return left\n```\n\nEuclid's algorithm: repeated remainder until it hits zero — thousands of years old and still optimal."}]} {"conversations": [{"from": "human", "value": "A motorcycle travels at 90 km/h for 1.5 hours. How far does it travel?"}, {"from": "gpt", "value": "Distance = speed × time = 90 × 1.5 = 135.0 km."}]} {"conversations": [{"from": "human", "value": "Write 47/25 as a decimal."}, {"from": "gpt", "value": "Dividing 47 by 25 gives 1.88."}]} {"conversations": [{"from": "human", "value": "Write a Python function count_negatives that takes a list of numbers and returns how many of them are negative. For example, calling count_negatives([39, 10, 59, 52, 42]) should return 0."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef count_negatives(values):\n return sum(1 for x in values if x < 0)\n```\n\nThe generator expression yields a 1 for each negative value and sum() adds them up."}]} {"conversations": [{"from": "human", "value": "Write a Python function count_vowels that takes a string and returns the number of vowels (a, e, i, o, u) it contains. For example, calling count_vowels('fox over') should return 3."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef count_vowels(phrase):\n return sum(1 for ch in phrase.lower() if ch in 'aeiou')\n```\n\nLowercasing first makes the check case-insensitive; the generator expression counts matches in one pass."}]} {"conversations": [{"from": "human", "value": "A motorcycle jacket costs €100. A 25% discount is applied, then a €25 voucher. What is the final price?"}, {"from": "gpt", "value": "After 25% off: €100 × 0.75 = €75. Then minus the €25 voucher: €75 − €25 = €50."}]} {"conversations": [{"from": "human", "value": "What is 40% of 280?"}, {"from": "gpt", "value": "40% of 280 = 280 × 40/100 = 112."}]} {"conversations": [{"from": "human", "value": "Write a Python function dedupe that takes a list and returns a new list with duplicates removed, keeping the original order. For example, calling dedupe([4, 52, -16, -8, 42]) should return [4, 52, -16, -8, 42]."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef dedupe(lst):\n seen = set()\n result = []\n for item in lst:\n if item not in seen:\n seen.add(item)\n result.append(item)\n return result\n```\n\nThe set gives O(1) membership checks; appending only first occurrences preserves order."}]} {"conversations": [{"from": "human", "value": "Five people sit in a row of five seats. Finn sits next to Eva Eva sits next to Ben Ben sits next to Gina Gina sits next to Jack Finn sits at one end of the row. Which seat is Gina in?"}, {"from": "gpt", "value": "Starting from Finn at one end and following the 'next to' clues fixes the whole row. Gina is in seat 4."}]} {"conversations": [{"from": "human", "value": "Work out 368 ÷ 4."}, {"from": "gpt", "value": "368 ÷ 4 = 92, because 92 × 4 = 368."}]} {"conversations": [{"from": "human", "value": "What does 60 divided by 4 equal?"}, {"from": "gpt", "value": "60 ÷ 4 = 15, because 15 × 4 = 60."}]} {"conversations": [{"from": "human", "value": "Write a Python function backwards that takes a string and returns it reversed. For example, calling backwards('adgfadhba') should return 'abhdafgda'."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef backwards(s):\n return s[::-1]\n```\n\nThe slice [::-1] walks the string from the end to the start — the classic Python idiom."}]} {"conversations": [{"from": "human", "value": "What is 100 - 67?"}, {"from": "gpt", "value": "100 - 67 = 33. The difference is 33."}]} {"conversations": [{"from": "human", "value": "Five people sit in a row of five seats. Finn sits next to Ben Ben sits next to Jack Jack sits next to Alex Alex sits next to Dan Finn sits at one end of the row. Which seat is Alex in?"}, {"from": "gpt", "value": "Starting from Finn at one end and following the 'next to' clues fixes the whole row. Alex is in seat 4."}]} {"conversations": [{"from": "human", "value": "What does 78 minus 46 equal?"}, {"from": "gpt", "value": "78 - 46 = 32. The difference is 32."}]} {"conversations": [{"from": "human", "value": "This function should take a string and return it reversed, but it has a bug:\n\n```python\ndef reverse_string(s):\n return s[:-1]\n```\n\nFind and fix the bug."}, {"from": "gpt", "value": "The bug is: s[:-1] drops the LAST character — it doesn't reverse anything. The full reverse slice is s[::-1]. Here's the fixed version:\n\n```python\ndef reverse_string(s):\n return s[::-1]\n```"}]} {"conversations": [{"from": "human", "value": "Write a Python function evens that takes a list of numbers and returns a new list with only the even numbers. For example, calling evens([49, -20, 59, 25]) should return [-20]."}, {"from": "gpt", "value": "Here's a clean implementation:\n\n```python\ndef evens(numbers):\n return [x for x in numbers if x % 2 == 0]\n```\n\nA list comprehension with a condition is the cleanest filter in Python."}]} {"conversations": [{"from": "human", "value": "A recipe for 3 servings needs 18 grams of flour. How much flour is needed for 7 servings?"}, {"from": "gpt", "value": "18 g is for 3 servings, so one serving needs 6 g. For 7 servings: 6 × 7 = 42 g."}]} {"conversations": [{"from": "human", "value": "Work out 425 + 734."}, {"from": "gpt", "value": "425 + 734 = 1159. The sum is 1159."}]} {"conversations": [{"from": "human", "value": "A recipe for 2 servings needs 14 grams of flour. How much flour is needed for 9 servings?"}, {"from": "gpt", "value": "14 g is for 2 servings, so one serving needs 7 g. For 9 servings: 7 × 9 = 63 g."}]} {"conversations": [{"from": "human", "value": "Solve for x: 5x - 21 = 69"}, {"from": "gpt", "value": "Add 21 to both sides: 5x = 90. Divide by 5: x = 90/5 = 18."}]} {"conversations": [{"from": "human", "value": "The average of 48, 13, 46 and one more number is 72. What is the missing number?"}, {"from": "gpt", "value": "Total of all 4 numbers = 72 × 4 = 288. Current sum = 107, so the missing number is 288 - 107 = 181."}]} {"conversations": [{"from": "human", "value": "Work out 41 × 17."}, {"from": "gpt", "value": "41 × 17 = 41 × 10 + 41 × 7 = 410 + 287 = 697."}]} {"conversations": [{"from": "human", "value": "What should I have for breakfast? I have 10 minutes."}, {"from": "gpt", "value": "10 minutes, high protein, minimal effort: Greek yogurt with honey and some nuts, or two eggs scrambled with feta and a slice of toast. Both take under 5 minutes and will keep you full past lunch. If you're eating on the move, a protein shake and a banana works too. The key is protein — a carb-only breakfast (cereal, toast with jam) spikes your blood sugar and drops it by 10am, which is why you're starving by mid-morning."}, {"from": "human", "value": "I hate eggs."}, {"from": "gpt", "value": "Fair enough — swap them out. Overnight oats (make them tonight: oats, milk, yogurt, honey, fruit), a peanut butter banana sandwich on whole grain, or cottage cheese with tomatoes. Same rule: protein plus something slow-burning. The goal is to not be hungry by 10am. Find the version you'll actually eat — the best breakfast is the one you'll have every day."}]}