Dataset Viewer
Auto-converted to Parquet Duplicate
instruction
stringlengths
14
5.13k
messages
listlengths
2
2
generator
stringclasses
1 value
reasoning
stringclasses
1 value
synthetic_model
stringclasses
1 value
thinking_disabled
bool
1 class
Write a SQL query to find all the users in a database who have an age greater than 25 and whose first name starts with the letter 'J'. Additionally, the query should only return users whose last name ends with the letter 's'. Furthermore, the query should return the users in descending order of their ages.
[ { "role": "user", "content": "Write a SQL query to find all the users in a database who have an age greater than 25 and whose first name starts with the letter 'J'. Additionally, the query should only return users whose last name ends with the letter 's'. \nFurthermore, the query should return the users in ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Rewrite the given Python code using a for-loop and ensure that the loop iterates only for odd values of 'i' within the range of 1 to 100, and terminates if 'i' exceeds 50.
[ { "role": "user", "content": "Rewrite the given Python code using a for-loop and ensure that the loop iterates only for odd values of 'i' within the range of 1 to 100, and terminates if 'i' exceeds 50." }, { "role": "assistant", "content": "Certainly! Here's the Python code rewritten using a `fo...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Count the number of vowels in the string and return a dictionary where the keys are the vowels and the values are the counts of each vowel. However, you are not allowed to use any built-in functions or libraries that directly count the number of vowels in the string. text = "Hello World!" For example, for the given t...
[ { "role": "user", "content": "Count the number of vowels in the string and return a dictionary where the keys are the vowels and the values are the counts of each vowel. However, you are not allowed to use any built-in functions or libraries that directly count the number of vowels in the string.\n\ntext = ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Edit the following code to print out all even numbers from 1 to 100, but exclude numbers that are divisible by both 3 and 5.
[ { "role": "user", "content": "Edit the following code to print out all even numbers from 1 to 100, but exclude numbers that are divisible by both 3 and 5." }, { "role": "assistant", "content": "Sure! Here's the edited code that prints all even numbers from 1 to 100, but **excludes numbers that a...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a function that takes in a list of integers and returns the sum of all the numbers that are a multiple of 3. If there is no number that is a multiple of 3, the function should return 0. Please note that the input list can contain both positive and negative numbers. Example: Input: [8, -2, 14, 25, -33, 6] Outpu...
[ { "role": "user", "content": "Write a function that takes in a list of integers and returns the sum of all the numbers that are a multiple of 3. If there is no number that is a multiple of 3, the function should return 0.\n\nPlease note that the input list can contain both positive and negative numbers.\n\n...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Create a JSON object with five key-value pairs. The keys should be "name", "age", "city", "occupation", and "hobbies", and the corresponding values should be your name, your age, your city of residence, your occupation, and a list of your hobbies. The hobbies should be stored as an array within the JSON object. Additio...
[ { "role": "user", "content": "Create a JSON object with five key-value pairs. The keys should be \"name\", \"age\", \"city\", \"occupation\", and \"hobbies\", and the corresponding values should be your name, your age, your city of residence, your occupation, and a list of your hobbies. The hobbies should b...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Edit the following code to add a try-except block that handles the specific exception of ValueError and prints a custom error message when the input values cannot be converted to integers. Additionally, modify the code to handle a KeyboardInterrupt exception and terminate the program gracefully when the user interrupts...
[ { "role": "user", "content": "Edit the following code to add a try-except block that handles the specific exception of ValueError and prints a custom error message when the input values cannot be converted to integers. Additionally, modify the code to handle a KeyboardInterrupt exception and terminate the p...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a Python function to convert a given string to lowercase and remove any punctuation marks, but preserve any whitespace characters. The function should also remove any digits from the string. string = "FOO, BAR! 123"
[ { "role": "user", "content": "Write a Python function to convert a given string to lowercase and remove any punctuation marks, but preserve any whitespace characters. The function should also remove any digits from the string.\nstring = \"FOO, BAR! 123\"" }, { "role": "assistant", "content": "He...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Increase the difficulty by asking to print the square of each number in reverse order using a while loop instead of a for loop. Additionally, ask to only print the squares of odd numbers. i = n while i >= 1: if i % 2 != 0: print(i ** 2) i -= 1
[ { "role": "user", "content": "Increase the difficulty by asking to print the square of each number in reverse order using a while loop instead of a for loop. Additionally, ask to only print the squares of odd numbers.\n\ni = n\nwhile i >= 1:\n if i % 2 != 0:\n print(i ** 2)\n i -= 1" }, { ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Implement a function to check if a given string is a valid palindrome. The function should return True if the string is a valid palindrome, and False otherwise. A valid palindrome is a string that reads the same forwards and backwards, ignoring any non-alphabetic characters and considering only lowercase alphabets. The...
[ { "role": "user", "content": "Implement a function to check if a given string is a valid palindrome. The function should return True if the string is a valid palindrome, and False otherwise. A valid palindrome is a string that reads the same forwards and backwards, ignoring any non-alphabetic characters and...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Please rewrite the following code using nested ternary operators and add a condition to check if num1 is divisible by num2. num1 = 15 num2 = 3 # Incorrect code added for misdirection output = "num1 is smaller than num2" if num1 < num2 else "num1 is greater than or equal to num2" if num1 > num2 else "num1 is equal to ...
[ { "role": "user", "content": "Please rewrite the following code using nested ternary operators and add a condition to check if num1 is divisible by num2.\n\nnum1 = 15\nnum2 = 3\n\n# Incorrect code added for misdirection\noutput = \"num1 is smaller than num2\" if num1 < num2 else \"num1 is greater than or eq...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a SQL query to return the sum of salaries for each department, excluding any departments where the average salary is less than or equal to $75,000. Additionally, exclude departments where the total salary of all employees in the department is less than or equal to $500,000.
[ { "role": "user", "content": "Write a SQL query to return the sum of salaries for each department, excluding any departments where the average salary is less than or equal to $75,000. Additionally, exclude departments where the total salary of all employees in the department is less than or equal to $500,00...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a function that takes in a matrix of numbers and reverses the order of the rows and columns. The matrix will have at least 2 rows and 2 columns. The function should handle matrices of any size, with the number of rows and columns being greater than or equal to 2. Additionally, you should ensure that the function ...
[ { "role": "user", "content": "Write a function that takes in a matrix of numbers and reverses the order of the rows and columns. The matrix will have at least 2 rows and 2 columns. The function should handle matrices of any size, with the number of rows and columns being greater than or equal to 2. Addition...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Parse the string and return the number of unique consonants in the string. The input string can contain both lowercase and uppercase letters. Return the count of unique consonants in a case-insensitive manner. Example: Input: "ApplE" Output: 2 Input: "MissiSsippi" Output: 2
[ { "role": "user", "content": "Parse the string and return the number of unique consonants in the string. The input string can contain both lowercase and uppercase letters. Return the count of unique consonants in a case-insensitive manner.\n\nExample: \nInput: \"ApplE\"\nOutput: 2\n\nInput: \"MissiSsippi\"\...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a function that removes all vowels from a given string and returns the string sorted in descending order of character frequency. Example: Input: "Hello World" Output: "llWrHd" Note: - The input string may contain uppercase and lowercase vowels. - The function should return the string sorted in descending order ...
[ { "role": "user", "content": "Write a function that removes all vowels from a given string and returns the string sorted in descending order of character frequency.\n\nExample:\nInput: \"Hello World\"\nOutput: \"llWrHd\"\n\nNote:\n- The input string may contain uppercase and lowercase vowels.\n- The functio...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
# This program prints a conversion table from Fahrenheit to Celsius # Print a heading for the table in the following format: # Temperature Conversion Table (Fahrenheit to Celsius) # Print the column headings in the following format: # Fahrenheit Celsius # Calculate and print the table body. The table should inc...
[ { "role": "user", "content": "# This program prints a conversion table from Fahrenheit to Celsius\n\n# Print a heading for the table in the following format:\n# Temperature Conversion Table (Fahrenheit to Celsius)\n\n# Print the column headings in the following format:\n# Fahrenheit Celsius\n\n# Calcul...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Create a function in JavaScript to find the number of occurrences of a word in a sentence. The function should consider both uppercase and lowercase occurrences of the word. If the word is not found in the sentence, the function should return 0. The function should have a time complexity of O(n), where n is the length ...
[ { "role": "user", "content": "Create a function in JavaScript to find the number of occurrences of a word in a sentence. The function should consider both uppercase and lowercase occurrences of the word. If the word is not found in the sentence, the function should return 0. The function should have a time ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Edit the code to create a try-except block to handle the exception and include a custom error message. The custom error message should indicate the specific variables that were involved in the division. Additionally, modify the code to ensure that the program continues running even if an exception occurs, and print the...
[ { "role": "user", "content": "Edit the code to create a try-except block to handle the exception and include a custom error message. The custom error message should indicate the specific variables that were involved in the division. Additionally, modify the code to ensure that the program continues running ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a code to sort the following array in increasing order. The array may contain duplicate elements. The time complexity of the algorithm should be O(n^2). [10, 2, 7, 8, 32, 4, 8, 7, 10, 2] *Provide an example solution that uses a sorting algorithm with a time complexity of O(n^2).
[ { "role": "user", "content": "Write a code to sort the following array in increasing order. The array may contain duplicate elements. The time complexity of the algorithm should be O(n^2).\n\n[10, 2, 7, 8, 32, 4, 8, 7, 10, 2]\n\n*Provide an example solution that uses a sorting algorithm with a time complexi...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Create a function to calculate the area of a given circle. The input parameter for the radius should be a string instead of a number. Additionally, the function should handle invalid inputs and return an error message if the input is not a valid number. The function should also validate that the radius is a positive n...
[ { "role": "user", "content": "Create a function to calculate the area of a given circle. The input parameter for the radius should be a string instead of a number. Additionally, the function should handle invalid inputs and return an error message if the input is not a valid number.\n\nThe function should a...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Create a function that takes an array of integers as an argument and returns the sum of all the prime numbers in the array. If the array does not contain any prime numbers, return 0. Example: Input: [1, 2, 3, 4, 5] Output: 10 Input: [1, 3, 5] Output: 9 Input: [2, 4, 6, 8] Output: 2 Input: [1, 2, 3, 4, 5, 6, 7, 8, ...
[ { "role": "user", "content": "Create a function that takes an array of integers as an argument and returns the sum of all the prime numbers in the array. If the array does not contain any prime numbers, return 0.\n\nExample:\n\nInput: [1, 2, 3, 4, 5]\nOutput: 10\n\nInput: [1, 3, 5]\nOutput: 9\n\nInput: [2, ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Create a CSS script that not only centers the login form on the webpage, but also adds a transition effect when the form is hovered over. The transition effect should smoothly change the background color of the form from white to a light shade of blue. Additionally, the form should have a border radius of 10px and a dr...
[ { "role": "user", "content": "Create a CSS script that not only centers the login form on the webpage, but also adds a transition effect when the form is hovered over. The transition effect should smoothly change the background color of the form from white to a light shade of blue. Additionally, the form sh...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write an HTML template to display a greeting message. The message should include the name of the user who visits the website. The username variable should be assigned dynamically using JavaScript. <script> // Write code here to dynamically assign a value to the username variable // The value should be retrieve...
[ { "role": "user", "content": "Write an HTML template to display a greeting message. The message should include the name of the user who visits the website. The username variable should be assigned dynamically using JavaScript.\n\n<script>\n // Write code here to dynamically assign a value to the username...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Create a nested loop to print every combination of numbers between 0-9, excluding any combination that contains the number 5. Additionally, exclude any combination that contains a repeating digit. Implement the solution without using any built-in functions or libraries to check for repeating digits.
[ { "role": "user", "content": "Create a nested loop to print every combination of numbers between 0-9, excluding any combination that contains the number 5. Additionally, exclude any combination that contains a repeating digit. Implement the solution without using any built-in functions or libraries to check...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a JavaScript function that takes in an array of numbers and returns the sum of all the even numbers in the array. Additionally, the function should ignore any duplicate numbers in the array and only consider the unique even numbers for the sum calculation. The function should also handle negative numbers and deci...
[ { "role": "user", "content": "Write a JavaScript function that takes in an array of numbers and returns the sum of all the even numbers in the array. Additionally, the function should ignore any duplicate numbers in the array and only consider the unique even numbers for the sum calculation. The function sh...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
numbers = [i for i in range(10) if i % 2 == 0] is_greater_than_five = all(num > 5 for num in numbers) is_sum_even = sum(numbers) % 2 == 0 result = is_greater_than_five and is_sum_even
[ { "role": "user", "content": "numbers = [i for i in range(10) if i % 2 == 0] \nis_greater_than_five = all(num > 5 for num in numbers)\nis_sum_even = sum(numbers) % 2 == 0\nresult = is_greater_than_five and is_sum_even" }, { "role": "assistant", "content": "Let's break down the code step by step ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Edit the following code to remove the bugs and also make it case-insensitive. The input string must contain at least one letter and cannot be longer than 100 characters. The function should also remove any special characters and only reverse the alphabetic characters. def reverse_string(user_string): if len(user_st...
[ { "role": "user", "content": "Edit the following code to remove the bugs and also make it case-insensitive. The input string must contain at least one letter and cannot be longer than 100 characters. The function should also remove any special characters and only reverse the alphabetic characters.\n\ndef re...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a function that calculates the factorial of each number in the list using recursion, but without using any built-in libraries or mathematical operators. arr = [1, 2, 3, 4, 5]
[ { "role": "user", "content": "Write a function that calculates the factorial of each number in the list using recursion, but without using any built-in libraries or mathematical operators.\narr = [1, 2, 3, 4, 5]" }, { "role": "assistant", "content": "To calculate the factorial of each number in ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
What is the output of the following code? list1 = ['a', 'b', 'c', 'd', 'e', 'f'] list2 = [1, 2, 3, 4, 5, 6] for x, y in zip(list1[::-1], list2[::3]): print(x * y)
[ { "role": "user", "content": "What is the output of the following code?\nlist1 = ['a', 'b', 'c', 'd', 'e', 'f']\nlist2 = [1, 2, 3, 4, 5, 6]\n\nfor x, y in zip(list1[::-1], list2[::3]):\n print(x * y)" }, { "role": "assistant", "content": "Let's break down the code step by step to determine th...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a C# program to find the maximum and minimum of an array of integers. Additionally, the program should only use a single line of code to accomplish this task. The program should have a time complexity of O(n) and a space complexity of O(1). However, you are not allowed to use any built-in functions or methods fo...
[ { "role": "user", "content": "Write a C# program to find the maximum and minimum of an array of integers. Additionally, the program should only use a single line of code to accomplish this task. The program should have a time complexity of O(n) and a space complexity of O(1).\n\nHowever, you are not allowed...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write an algorithm in Python to determine if a number is prime or composite. Your algorithm should have a time complexity of O(n^2). Note: You are not allowed to use any built-in functions or libraries to check if a number is prime. You have to implement the algorithm from scratch. Examples: 1. Input: 2 Output: Pr...
[ { "role": "user", "content": "Write an algorithm in Python to determine if a number is prime or composite. Your algorithm should have a time complexity of O(n^2).\n\nNote: You are not allowed to use any built-in functions or libraries to check if a number is prime. You have to implement the algorithm from s...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Create a React component using JSX that renders a "Hello, World!" message in the browser. The rendered message should have a font size of 20px, be displayed in the center of the page, and be surrounded by a border with a width of 2px and a color of red. Additionally, the message should be animated to fade in and out ev...
[ { "role": "user", "content": "Create a React component using JSX that renders a \"Hello, World!\" message in the browser. The rendered message should have a font size of 20px, be displayed in the center of the page, and be surrounded by a border with a width of 2px and a color of red. Additionally, the mess...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write code that removes spaces and punctuation marks from a given string and returns the modified string. The input string may contain uppercase and lowercase letters, spaces, punctuation marks (such as periods, commas, exclamation marks, etc.), and digits. The modified string should only contain the alphanumeric chara...
[ { "role": "user", "content": "Write code that removes spaces and punctuation marks from a given string and returns the modified string. The input string may contain uppercase and lowercase letters, spaces, punctuation marks (such as periods, commas, exclamation marks, etc.), and digits. The modified string ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a SQL query to calculate the total number of orders in the "orders" table, where the orders have been placed in the last 30 days, have a total order value greater than $1000, and have at least 3 different items included in the order.
[ { "role": "user", "content": "Write a SQL query to calculate the total number of orders in the \"orders\" table, where the orders have been placed in the last 30 days, have a total order value greater than $1000, and have at least 3 different items included in the order." }, { "role": "assistant", ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Follow the comments to complete the code that finds the maximum value in an array. The array must contain at least 20 elements and the maximum value must be greater than or equal to 1000. Additionally, the solution should have a time complexity of O(n log n) or better. # Find the maximum value in an array arr = [2018,...
[ { "role": "user", "content": "Follow the comments to complete the code that finds the maximum value in an array. The array must contain at least 20 elements and the maximum value must be greater than or equal to 1000. Additionally, the solution should have a time complexity of O(n log n) or better.\n\n# Fin...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Create a function in Java that takes a string and returns a new string that is reversed and contains only the unique characters in the original string. The function should also convert all uppercase characters to lowercase in the reversed string before returning it. Additionally, the function should remove all digits a...
[ { "role": "user", "content": "Create a function in Java that takes a string and returns a new string that is reversed and contains only the unique characters in the original string. The function should also convert all uppercase characters to lowercase in the reversed string before returning it. Additionall...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Compose a function named average_list which takes a list of numbers as its argument and computes the average. The list may contain both positive and negative numbers. The function should handle the following edge cases: - If the list is empty, the function should return None. - If the list contains only one element, t...
[ { "role": "user", "content": "Compose a function named average_list which takes a list of numbers as its argument and computes the average. The list may contain both positive and negative numbers.\n\nThe function should handle the following edge cases:\n- If the list is empty, the function should return Non...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a Python program to concatenate all elements in a list into a string separated by a given separator. The separator must be a non-alphanumeric character. If the separator is not provided, the default separator should be a hyphen ("-"). Additionally, if the input list contains any nested lists, the program should ...
[ { "role": "user", "content": "Write a Python program to concatenate all elements in a list into a string separated by a given separator. The separator must be a non-alphanumeric character. If the separator is not provided, the default separator should be a hyphen (\"-\").\n\nAdditionally, if the input list ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Modify the code below to make it calculate the sum of all the prime numbers from 1 to n. The final sum should be stored in the variable "total". Also, add a condition to skip any numbers that are divisible by both 2 and 3. num = 15 total = 0 for i in range(1, num+1): if i % 2 == 0 and i % 3 == 0: continue elif ...
[ { "role": "user", "content": "Modify the code below to make it calculate the sum of all the prime numbers from 1 to n. The final sum should be stored in the variable \"total\". Also, add a condition to skip any numbers that are divisible by both 2 and 3.\nnum = 15\ntotal = 0\nfor i in range(1, num+1):\n if...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a function to generate the nth Fibonacci number. The function should have a time complexity of O(log n) and use dynamic programming. Additionally, the function should only use a constant amount of space, without using any arrays or additional data structures.
[ { "role": "user", "content": "Write a function to generate the nth Fibonacci number. The function should have a time complexity of O(log n) and use dynamic programming. Additionally, the function should only use a constant amount of space, without using any arrays or additional data structures." }, { ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Sum up all the prime numbers in the array, excluding the number 3, using JavaScript. The array should have a minimum length of 15 and a maximum length of 25.
[ { "role": "user", "content": "Sum up all the prime numbers in the array, excluding the number 3, using JavaScript. The array should have a minimum length of 15 and a maximum length of 25." }, { "role": "assistant", "content": "Here's a JavaScript function that sums all the **prime numbers** in a...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Please write a function in JavaScript to count the number of vowels in a given string. However, you are not allowed to use any built-in string methods or regular expressions. The input string may contain lowercase and/or uppercase alphabets, as well as special characters and numbers. The function should be case-insensi...
[ { "role": "user", "content": "Please write a function in JavaScript to count the number of vowels in a given string. However, you are not allowed to use any built-in string methods or regular expressions. The input string may contain lowercase and/or uppercase alphabets, as well as special characters and nu...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Sort the array in descending order without using any built-in sorting functions or libraries. The array may contain duplicate elements. Constraints: - The input array has a length of at most 10^6. - The elements in the array are integers between -10^9 and 10^9. arr = [3, 2, 1, 5, 4]
[ { "role": "user", "content": "Sort the array in descending order without using any built-in sorting functions or libraries. The array may contain duplicate elements.\n\nConstraints:\n- The input array has a length of at most 10^6.\n- The elements in the array are integers between -10^9 and 10^9.\n\narr = [3...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Edit the Python code so that it prints out the total number of odd elements in the list. Additionally, you need to modify the code to handle a potential error scenario. If the list contains any non-integer elements, the program should raise a ValueError exception with a descriptive error message. The program should als...
[ { "role": "user", "content": "Edit the Python code so that it prints out the total number of odd elements in the list. Additionally, you need to modify the code to handle a potential error scenario. If the list contains any non-integer elements, the program should raise a ValueError exception with a descrip...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Create a program that can calculate the distance between two points in three-dimensional space. However, you are not allowed to use the standard distance formula (sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2)). Additionally, your solution should have a time complexity of O(1) and should not use any mathematical functions or ...
[ { "role": "user", "content": "Create a program that can calculate the distance between two points in three-dimensional space. However, you are not allowed to use the standard distance formula (sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2)). Additionally, your solution should have a time complexity of O(1) and sho...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a JavaScript code snippet to print the numbers from 1 to 100 in a pattern where each number is repeated a number of times equal to its value. For example, the number 1 should be printed once, the number 2 should be printed twice, the number 3 should be printed three times, and so on. The pattern should continue u...
[ { "role": "user", "content": "Write a JavaScript code snippet to print the numbers from 1 to 100 in a pattern where each number is repeated a number of times equal to its value. For example, the number 1 should be printed once, the number 2 should be printed twice, the number 3 should be printed three times...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Using the given function, create a loop that counts from 0 to 9. Additionally, display the square of each number within the loop. However, you are not allowed to use the multiplication operator (*) to calculate the square. You must come up with an alternative method to calculate the square. Please ensure that your code...
[ { "role": "user", "content": "Using the given function, create a loop that counts from 0 to 9. Additionally, display the square of each number within the loop. However, you are not allowed to use the multiplication operator (*) to calculate the square. You must come up with an alternative method to calculat...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a function that takes a string and reverses the words in it, while also maintaining the original order of punctuation marks and special characters. The function should only reverse the words and not alter the position or order of any non-alphabetic characters. Additionally, the function should not use any built-i...
[ { "role": "user", "content": "Write a function that takes a string and reverses the words in it, while also maintaining the original order of punctuation marks and special characters. The function should only reverse the words and not alter the position or order of any non-alphabetic characters. Additionall...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a Python program to split a string on a given character separator. However, if the separator is not found in the string, raise a custom exception called "SeparatorNotFoundError". Additionally, handle any potential errors that may occur during the program execution. mystring = "Hello, World!" separator = "#" # I...
[ { "role": "user", "content": "Write a Python program to split a string on a given character separator. However, if the separator is not found in the string, raise a custom exception called \"SeparatorNotFoundError\". Additionally, handle any potential errors that may occur during the program execution.\n\nm...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a C program to find the sum of all the even digits of a given number, where the number must be positive, less than 1000, and can be of any data type (int, long, or double). #Erroneous Code# ``` #include<stdio.h> int main() { int num, digit, sum = 0; printf("Enter a number: "); scanf("%d", &num); ...
[ { "role": "user", "content": "Write a C program to find the sum of all the even digits of a given number, where the number must be positive, less than 1000, and can be of any data type (int, long, or double).\n\n#Erroneous Code#\n```\n#include<stdio.h>\nint main()\n{\n int num, digit, sum = 0;\n print...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Generate a dictionary of 1000 key-value pairs, where the key is a randomly generated string of length 10 and the values are random numbers from 1 to 1000. Additionally, ensure that none of the keys are repeated in the dictionary. The dictionary should be sorted in descending order based on the values. The program shou...
[ { "role": "user", "content": "Generate a dictionary of 1000 key-value pairs, where the key is a randomly generated string of length 10 and the values are random numbers from 1 to 1000. Additionally, ensure that none of the keys are repeated in the dictionary. The dictionary should be sorted in descending or...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Create a function in JavaScript that takes an array of integers and returns the second largest number. However, you are not allowed to use any built-in sorting methods or loops like for, while, or forEach. You need to come up with an alternative solution that uses only logical steps and conditional statements to determ...
[ { "role": "user", "content": "Create a function in JavaScript that takes an array of integers and returns the second largest number. However, you are not allowed to use any built-in sorting methods or loops like for, while, or forEach. You need to come up with an alternative solution that uses only logical ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a SQL query to find the total number of orders placed between two given dates, group the results by the month in which the orders were placed, and include only orders with a total cost greater than $100. start_date = '2020-01-01' end_date = '2020-02-01'. Reference: Unfortunately, there is an error in the given c...
[ { "role": "user", "content": "Write a SQL query to find the total number of orders placed between two given dates, group the results by the month in which the orders were placed, and include only orders with a total cost greater than $100. start_date = '2020-01-01' end_date = '2020-02-01'.\n\nReference: Unf...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Create a new folder called 'data' within the current working directory only if it doesn't already exist. If the folder already exists, check if it contains any files. If it does, display an error message and terminate the program. If it doesn't contain any files, proceed to create the folder. Additionally, the program ...
[ { "role": "user", "content": "Create a new folder called 'data' within the current working directory only if it doesn't already exist. If the folder already exists, check if it contains any files. If it does, display an error message and terminate the program. If it doesn't contain any files, proceed to cre...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a function to print all prime numbers between two given numbers, excluding any prime numbers that contain the digit 5. Additionally, ensure that the function is optimized to handle larger inputs efficiently. The time complexity of the solution should be O(n log log n) where n is the difference between the two giv...
[ { "role": "user", "content": "Write a function to print all prime numbers between two given numbers, excluding any prime numbers that contain the digit 5. Additionally, ensure that the function is optimized to handle larger inputs efficiently. The time complexity of the solution should be O(n log log n) whe...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a Python code to calculate the median of a given array, but without using any built-in functions or libraries for sorting or calculating the length of the array. Your solution should have a time complexity of O(nlogn) or better. #Hint# To find the median, you need to first sort the array in ascending order. Then...
[ { "role": "user", "content": "Write a Python code to calculate the median of a given array, but without using any built-in functions or libraries for sorting or calculating the length of the array. Your solution should have a time complexity of O(nlogn) or better.\n\n#Hint#\nTo find the median, you need to ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a function to find the maximum difference between two prime numbers in a given array. The array can contain positive and negative integers, and can be unsorted. Additionally, the function should handle arrays of any length. The function should return the maximum difference as an absolute value. For example, for t...
[ { "role": "user", "content": "Write a function to find the maximum difference between two prime numbers in a given array. The array can contain positive and negative integers, and can be unsorted. Additionally, the function should handle arrays of any length. The function should return the maximum differenc...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a function that checks if a given number is prime or not. The function should return "Prime" if the number is prime, and "Not Prime" if the number is not prime. Note: A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. Additional Requirements: 1. The time com...
[ { "role": "user", "content": "Write a function that checks if a given number is prime or not. The function should return \"Prime\" if the number is prime, and \"Not Prime\" if the number is not prime.\n\nNote: A prime number is a natural number greater than 1 that has no positive divisors other than 1 and i...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Read the JSON string below and convert it into a dictionary. After converting the JSON string into a dictionary, iterate through each key-value pair in the dictionary and perform the following operations: 1. If the key is 'name', check if the value is a string. If it is not a string, raise an exception with an appropri...
[ { "role": "user", "content": "Read the JSON string below and convert it into a dictionary. After converting the JSON string into a dictionary, iterate through each key-value pair in the dictionary and perform the following operations:\n1. If the key is 'name', check if the value is a string. If it is not a ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write an SQL query to calculate the average order price for each product category in the "orders" table. Additionally, calculate the total number of orders, the total revenue generated, the total quantity sold, and the total profit for each category. To do this, you will need to join the "orders" table with the "produ...
[ { "role": "user", "content": "Write an SQL query to calculate the average order price for each product category in the \"orders\" table. Additionally, calculate the total number of orders, the total revenue generated, the total quantity sold, and the total profit for each category.\n\nTo do this, you will n...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Create a dictionary for counting the occurrence of each lowercase letter in the given string. However, exclude any whitespace characters, punctuation marks, and numbers from being counted. Additionally, the solution should have a time complexity of O(n) and a space complexity of O(1), where n is the length of the strin...
[ { "role": "user", "content": "Create a dictionary for counting the occurrence of each lowercase letter in the given string. However, exclude any whitespace characters, punctuation marks, and numbers from being counted. Additionally, the solution should have a time complexity of O(n) and a space complexity o...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a program that extracts all the email addresses from a given string. The program should handle various formats of email addresses, including those with different domains and subdomains. Additionally, the program should be able to handle email addresses that are embedded within other text, such as "Contact me at ...
[ { "role": "user", "content": "Write a program that extracts all the email addresses from a given string. The program should handle various formats of email addresses, including those with different domains and subdomains.\n\nAdditionally, the program should be able to handle email addresses that are embedde...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write a Python program to generate the first n Fibonacci numbers and display them in reverse order. Additionally, the program should only use recursion to calculate the Fibonacci sequence and should not use any loops or built-in functions for calculating the Fibonacci numbers. Furthermore, the program should optimize t...
[ { "role": "user", "content": "Write a Python program to generate the first n Fibonacci numbers and display them in reverse order. Additionally, the program should only use recursion to calculate the Fibonacci sequence and should not use any loops or built-in functions for calculating the Fibonacci numbers. ...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Create a function that takes in two numbers as arguments and returns the product of the two. However, you are not allowed to use the multiplication operator or any built-in functions or methods that directly calculate the product of two numbers. Additionally, your solution should have a time complexity of O(log n), whe...
[ { "role": "user", "content": "Create a function that takes in two numbers as arguments and returns the product of the two. However, you are not allowed to use the multiplication operator or any built-in functions or methods that directly calculate the product of two numbers. Additionally, your solution shou...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
Write an SQL query to select the number of employees in each department, along with their average salary and the name of the highest-paid employee in each department. Additionally, include the department ID, department name, and the total salary of all employees in each department. Only include departments that have mo...
[ { "role": "user", "content": "Write an SQL query to select the number of employees in each department, along with their average salary and the name of the highest-paid employee in each department. Additionally, include the department ID, department name, and the total salary of all employees in each departm...
Qwen/Qwen3-4B
off
Qwen/Qwen3-4B
true
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
6