Datasets:

Modalities:
Text
Formats:
csv
Libraries:
Datasets
pandas
License:
Dataset Viewer
Auto-converted to Parquet
system_prompt
stringclasses
1 value
prompt
stringclasses
125 values
thinking (cot thinking mode)
stringclasses
25 values
output
stringclasses
22 values
You are a helpful coding assistant.
Can you write code to find the maximum of two numbers in C++?
The function should compare the two numbers and return the larger one.
int maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
Write a Java function to calculate factorial.
This can be done by use recursion to multiply the number by the factorial of the number minus one.
public int factorial(int n) { return n == 0 ? 1 : n * factorial(n - 1); }
You are a helpful coding assistant.
C# code to check if a number is even.
This can be done by check if the number modulo 2 is zero.
public bool IsEven(int n) { return n % 2 == 0; }
You are a helpful coding assistant.
Write a C# function to reverse a string.
This can be done by reverse the order of characters in the string.
public string ReverseString(string s) { char[] arr = s.ToCharArray(); Array.Reverse(arr); return new string(arr); }
You are a helpful coding assistant.
How do you check if a number is even in C?
First, check if the number modulo 2 is zero. Then, return the result.
int isEven(int n) { return n % 2 == 0; }
You are a helpful coding assistant.
Write a C# function to find the maximum of two numbers.
The function should compare the two numbers and return the larger one.
public int Maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
How do you add two numbers in Java?
The function should add the two input numbers and return the sum.
public int add(int a, int b) { return a + b; }
You are a helpful coding assistant.
Write a C# function to add two numbers.
This can be done by add the two input numbers and return the sum.
public int Add(int a, int b) { return a + b; }
You are a helpful coding assistant.
Show me a function in C that can check if a number is even.
We need to check if the number modulo 2 is zero.
int isEven(int n) { return n % 2 == 0; }
You are a helpful coding assistant.
Java code to calculate factorial.
The function should use recursion to multiply the number by the factorial of the number minus one.
public int factorial(int n) { return n == 0 ? 1 : n * factorial(n - 1); }
You are a helpful coding assistant.
Write a C function to reverse a string.
First, reverse the order of characters in the string. Then, return the result.
#include <string.h> void reverseString(char* s) { int len = strlen(s); for(int i = 0; i < len / 2; i++) { char temp = s[i]; s[i] = s[len - i - 1]; s[len - i - 1] = temp; } }
You are a helpful coding assistant.
Write a C function to reverse a string.
First, reverse the order of characters in the string. Then, return the result.
#include <string.h> void reverseString(char* s) { int len = strlen(s); for(int i = 0; i < len / 2; i++) { char temp = s[i]; s[i] = s[len - i - 1]; s[len - i - 1] = temp; } }
You are a helpful coding assistant.
Write a C# function to add two numbers.
The function should add the two input numbers and return the sum.
public int Add(int a, int b) { return a + b; }
You are a helpful coding assistant.
How do you add two numbers in C#?
First, add the two input numbers and return the sum. Then, return the result.
public int Add(int a, int b) { return a + b; }
You are a helpful coding assistant.
Java code to find the maximum of two numbers.
The function should compare the two numbers and return the larger one.
public int maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
Can you write code to check if a number is even in C#?
To check if a number is even, define a function and use the appropriate operation.
public bool IsEven(int n) { return n % 2 == 0; }
You are a helpful coding assistant.
Write a C# function to reverse a string.
The function should reverse the order of characters in the string.
public string ReverseString(string s) { char[] arr = s.ToCharArray(); Array.Reverse(arr); return new string(arr); }
You are a helpful coding assistant.
How do you add two numbers in C++?
First, add the two input numbers and return the sum. Then, return the result.
int add(int a, int b) { return a + b; }
You are a helpful coding assistant.
How do you find the maximum of two numbers in Python?
To find the maximum of two numbers, define a function and use the appropriate operation.
def maximum(a, b): return a if a > b else b
You are a helpful coding assistant.
Show me a function in C# that can add two numbers.
This can be done by add the two input numbers and return the sum.
public int Add(int a, int b) { return a + b; }
You are a helpful coding assistant.
Show me a function in Java that can calculate factorial.
To calculate factorial, define a function and use the appropriate operation.
public int factorial(int n) { return n == 0 ? 1 : n * factorial(n - 1); }
You are a helpful coding assistant.
How do you check if a number is even in C?
The function should check if the number modulo 2 is zero.
int isEven(int n) { return n % 2 == 0; }
You are a helpful coding assistant.
Python code to reverse a string.
The function should reverse the order of characters in the string.
def reverse_string(s): return s[::-1]
You are a helpful coding assistant.
Write a Java function to calculate factorial.
We need to use recursion to multiply the number by the factorial of the number minus one.
public int factorial(int n) { return n == 0 ? 1 : n * factorial(n - 1); }
You are a helpful coding assistant.
Java code to calculate factorial.
This can be done by use recursion to multiply the number by the factorial of the number minus one.
public int factorial(int n) { return n == 0 ? 1 : n * factorial(n - 1); }
You are a helpful coding assistant.
How do you add two numbers in C?
This can be done by add the two input numbers and return the sum.
int add(int a, int b) { return a + b; }
You are a helpful coding assistant.
Show me a function in Python that can reverse a string.
We need to reverse the order of characters in the string.
def reverse_string(s): return s[::-1]
You are a helpful coding assistant.
Show me a function in Java that can reverse a string.
First, reverse the order of characters in the string. Then, return the result.
public String reverseString(String s) { return new StringBuilder(s).reverse().toString(); }
You are a helpful coding assistant.
C++ code to add two numbers.
The function should add the two input numbers and return the sum.
int add(int a, int b) { return a + b; }
You are a helpful coding assistant.
Write a Java function to calculate factorial.
To calculate factorial, define a function and use the appropriate operation.
public int factorial(int n) { return n == 0 ? 1 : n * factorial(n - 1); }
You are a helpful coding assistant.
Can you write code to add two numbers in Java?
We need to add the two input numbers and return the sum.
public int add(int a, int b) { return a + b; }
You are a helpful coding assistant.
Show me a function in C++ that can calculate factorial.
To calculate factorial, define a function and use the appropriate operation.
int factorial(int n) { return n == 0 ? 1 : n * factorial(n - 1); }
You are a helpful coding assistant.
C code to calculate factorial.
First, use recursion to multiply the number by the factorial of the number minus one. Then, return the result.
int factorial(int n) { return n == 0 ? 1 : n * factorial(n - 1); }
You are a helpful coding assistant.
Can you write code to check if a number is even in C#?
The function should check if the number modulo 2 is zero.
public bool IsEven(int n) { return n % 2 == 0; }
You are a helpful coding assistant.
Write a Python function to add two numbers.
To add two numbers, define a function and use the appropriate operation.
def add(a, b): return a + b
You are a helpful coding assistant.
How do you calculate factorial in C?
This can be done by use recursion to multiply the number by the factorial of the number minus one.
int factorial(int n) { return n == 0 ? 1 : n * factorial(n - 1); }
You are a helpful coding assistant.
Write a C# function to reverse a string.
To reverse a string, define a function and use the appropriate operation.
public string ReverseString(string s) { char[] arr = s.ToCharArray(); Array.Reverse(arr); return new string(arr); }
You are a helpful coding assistant.
Can you write code to find the maximum of two numbers in C#?
We need to compare the two numbers and return the larger one.
public int Maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
Can you write code to reverse a string in C#?
This can be done by reverse the order of characters in the string.
public string ReverseString(string s) { char[] arr = s.ToCharArray(); Array.Reverse(arr); return new string(arr); }
You are a helpful coding assistant.
Show me a function in C that can calculate factorial.
The function should use recursion to multiply the number by the factorial of the number minus one.
int factorial(int n) { return n == 0 ? 1 : n * factorial(n - 1); }
You are a helpful coding assistant.
Can you write code to reverse a string in C#?
First, reverse the order of characters in the string. Then, return the result.
public string ReverseString(string s) { char[] arr = s.ToCharArray(); Array.Reverse(arr); return new string(arr); }
You are a helpful coding assistant.
Can you write code to add two numbers in Java?
First, add the two input numbers and return the sum. Then, return the result.
public int add(int a, int b) { return a + b; }
You are a helpful coding assistant.
Python code to calculate factorial.
We need to use recursion to multiply the number by the factorial of the number minus one.
def factorial(n): return 1 if n == 0 else n * factorial(n-1)
You are a helpful coding assistant.
Show me a function in C++ that can calculate factorial.
First, use recursion to multiply the number by the factorial of the number minus one. Then, return the result.
int factorial(int n) { return n == 0 ? 1 : n * factorial(n - 1); }
You are a helpful coding assistant.
How do you add two numbers in Python?
This can be done by add the two input numbers and return the sum.
def add(a, b): return a + b
You are a helpful coding assistant.
Write a Python function to check if a number is even.
This can be done by check if the number modulo 2 is zero.
def is_even(n): return n % 2 == 0
You are a helpful coding assistant.
C code to reverse a string.
First, reverse the order of characters in the string. Then, return the result.
#include <string.h> void reverseString(char* s) { int len = strlen(s); for(int i = 0; i < len / 2; i++) { char temp = s[i]; s[i] = s[len - i - 1]; s[len - i - 1] = temp; } }
You are a helpful coding assistant.
Python code to calculate factorial.
First, use recursion to multiply the number by the factorial of the number minus one. Then, return the result.
def factorial(n): return 1 if n == 0 else n * factorial(n-1)
You are a helpful coding assistant.
How do you check if a number is even in Python?
First, check if the number modulo 2 is zero. Then, return the result.
def is_even(n): return n % 2 == 0
You are a helpful coding assistant.
Can you write code to check if a number is even in C?
The function should check if the number modulo 2 is zero.
int isEven(int n) { return n % 2 == 0; }
You are a helpful coding assistant.
Show me a function in C that can check if a number is even.
To check if a number is even, define a function and use the appropriate operation.
int isEven(int n) { return n % 2 == 0; }
You are a helpful coding assistant.
Can you write code to reverse a string in Java?
To reverse a string, define a function and use the appropriate operation.
public String reverseString(String s) { return new StringBuilder(s).reverse().toString(); }
You are a helpful coding assistant.
C# code to add two numbers.
The function should add the two input numbers and return the sum.
public int Add(int a, int b) { return a + b; }
You are a helpful coding assistant.
How do you calculate factorial in Java?
To calculate factorial, define a function and use the appropriate operation.
public int factorial(int n) { return n == 0 ? 1 : n * factorial(n - 1); }
You are a helpful coding assistant.
Java code to find the maximum of two numbers.
First, compare the two numbers and return the larger one. Then, return the result.
public int maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
Write a C# function to check if a number is even.
This can be done by check if the number modulo 2 is zero.
public bool IsEven(int n) { return n % 2 == 0; }
You are a helpful coding assistant.
Write a Python function to calculate factorial.
This can be done by use recursion to multiply the number by the factorial of the number minus one.
def factorial(n): return 1 if n == 0 else n * factorial(n-1)
You are a helpful coding assistant.
Show me a function in Java that can calculate factorial.
First, use recursion to multiply the number by the factorial of the number minus one. Then, return the result.
public int factorial(int n) { return n == 0 ? 1 : n * factorial(n - 1); }
You are a helpful coding assistant.
Write a Java function to add two numbers.
To add two numbers, define a function and use the appropriate operation.
public int add(int a, int b) { return a + b; }
You are a helpful coding assistant.
How do you calculate factorial in C#?
The function should use recursion to multiply the number by the factorial of the number minus one.
public int Factorial(int n) { return n == 0 ? 1 : n * Factorial(n - 1); }
You are a helpful coding assistant.
How do you reverse a string in Java?
The function should reverse the order of characters in the string.
public String reverseString(String s) { return new StringBuilder(s).reverse().toString(); }
You are a helpful coding assistant.
Write a C# function to find the maximum of two numbers.
We need to compare the two numbers and return the larger one.
public int Maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
Show me a function in Python that can check if a number is even.
We need to check if the number modulo 2 is zero.
def is_even(n): return n % 2 == 0
You are a helpful coding assistant.
Java code to add two numbers.
The function should add the two input numbers and return the sum.
public int add(int a, int b) { return a + b; }
You are a helpful coding assistant.
How do you find the maximum of two numbers in C?
This can be done by compare the two numbers and return the larger one.
int maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
C++ code to find the maximum of two numbers.
First, compare the two numbers and return the larger one. Then, return the result.
int maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
How do you reverse a string in C++?
The function should reverse the order of characters in the string.
#include <algorithm> #include <string> std::string reverseString(std::string s) { std::reverse(s.begin(), s.end()); return s; }
You are a helpful coding assistant.
Show me a function in C that can check if a number is even.
First, check if the number modulo 2 is zero. Then, return the result.
int isEven(int n) { return n % 2 == 0; }
You are a helpful coding assistant.
C++ code to find the maximum of two numbers.
The function should compare the two numbers and return the larger one.
int maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
Python code to calculate factorial.
The function should use recursion to multiply the number by the factorial of the number minus one.
def factorial(n): return 1 if n == 0 else n * factorial(n-1)
You are a helpful coding assistant.
Java code to add two numbers.
We need to add the two input numbers and return the sum.
public int add(int a, int b) { return a + b; }
You are a helpful coding assistant.
C code to add two numbers.
We need to add the two input numbers and return the sum.
int add(int a, int b) { return a + b; }
You are a helpful coding assistant.
How do you find the maximum of two numbers in C++?
First, compare the two numbers and return the larger one. Then, return the result.
int maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
Show me a function in C# that can check if a number is even.
First, check if the number modulo 2 is zero. Then, return the result.
public bool IsEven(int n) { return n % 2 == 0; }
You are a helpful coding assistant.
How do you check if a number is even in Java?
To check if a number is even, define a function and use the appropriate operation.
public boolean isEven(int n) { return n % 2 == 0; }
You are a helpful coding assistant.
Write a C# function to reverse a string.
This can be done by reverse the order of characters in the string.
public string ReverseString(string s) { char[] arr = s.ToCharArray(); Array.Reverse(arr); return new string(arr); }
You are a helpful coding assistant.
Show me a function in C++ that can calculate factorial.
We need to use recursion to multiply the number by the factorial of the number minus one.
int factorial(int n) { return n == 0 ? 1 : n * factorial(n - 1); }
You are a helpful coding assistant.
Can you write code to find the maximum of two numbers in C++?
To find the maximum of two numbers, define a function and use the appropriate operation.
int maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
Can you write code to reverse a string in C?
First, reverse the order of characters in the string. Then, return the result.
#include <string.h> void reverseString(char* s) { int len = strlen(s); for(int i = 0; i < len / 2; i++) { char temp = s[i]; s[i] = s[len - i - 1]; s[len - i - 1] = temp; } }
You are a helpful coding assistant.
C# code to add two numbers.
First, add the two input numbers and return the sum. Then, return the result.
public int Add(int a, int b) { return a + b; }
You are a helpful coding assistant.
Can you write code to reverse a string in Java?
This can be done by reverse the order of characters in the string.
public String reverseString(String s) { return new StringBuilder(s).reverse().toString(); }
You are a helpful coding assistant.
Write a Java function to find the maximum of two numbers.
The function should compare the two numbers and return the larger one.
public int maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
C++ code to find the maximum of two numbers.
We need to compare the two numbers and return the larger one.
int maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
How do you reverse a string in Python?
We need to reverse the order of characters in the string.
def reverse_string(s): return s[::-1]
You are a helpful coding assistant.
Can you write code to add two numbers in Java?
The function should add the two input numbers and return the sum.
public int add(int a, int b) { return a + b; }
You are a helpful coding assistant.
Show me a function in C++ that can reverse a string.
To reverse a string, define a function and use the appropriate operation.
#include <algorithm> #include <string> std::string reverseString(std::string s) { std::reverse(s.begin(), s.end()); return s; }
You are a helpful coding assistant.
Show me a function in Java that can find the maximum of two numbers.
This can be done by compare the two numbers and return the larger one.
public int maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
Can you write code to add two numbers in Java?
First, add the two input numbers and return the sum. Then, return the result.
public int add(int a, int b) { return a + b; }
You are a helpful coding assistant.
How do you add two numbers in C#?
This can be done by add the two input numbers and return the sum.
public int Add(int a, int b) { return a + b; }
You are a helpful coding assistant.
Write a C# function to calculate factorial.
First, use recursion to multiply the number by the factorial of the number minus one. Then, return the result.
public int Factorial(int n) { return n == 0 ? 1 : n * Factorial(n - 1); }
You are a helpful coding assistant.
Can you write code to reverse a string in Python?
First, reverse the order of characters in the string. Then, return the result.
def reverse_string(s): return s[::-1]
You are a helpful coding assistant.
Python code to find the maximum of two numbers.
First, compare the two numbers and return the larger one. Then, return the result.
def maximum(a, b): return a if a > b else b
You are a helpful coding assistant.
Show me a function in Java that can reverse a string.
First, reverse the order of characters in the string. Then, return the result.
public String reverseString(String s) { return new StringBuilder(s).reverse().toString(); }
You are a helpful coding assistant.
Show me a function in Python that can check if a number is even.
First, check if the number modulo 2 is zero. Then, return the result.
def is_even(n): return n % 2 == 0
You are a helpful coding assistant.
Show me a function in Java that can find the maximum of two numbers.
We need to compare the two numbers and return the larger one.
public int maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
Can you write code to check if a number is even in C?
To check if a number is even, define a function and use the appropriate operation.
int isEven(int n) { return n % 2 == 0; }
You are a helpful coding assistant.
Java code to add two numbers.
First, add the two input numbers and return the sum. Then, return the result.
public int add(int a, int b) { return a + b; }
You are a helpful coding assistant.
How do you find the maximum of two numbers in C++?
The function should compare the two numbers and return the larger one.
int maximum(int a, int b) { return a > b ? a : b; }
You are a helpful coding assistant.
How do you check if a number is even in Java?
The function should check if the number modulo 2 is zero.
public boolean isEven(int n) { return n % 2 == 0; }
You are a helpful coding assistant.
C# code to calculate factorial.
We need to use recursion to multiply the number by the factorial of the number minus one.
public int Factorial(int n) { return n == 0 ? 1 : n * Factorial(n - 1); }
End of preview. Expand in Data Studio

Simple code is a dataset consisting of simple code problems, such as converting Celcius to Fahrenheit in Python, adding/dividing numbers in C++, and so on. If you have any ideas/questions/concerns for the dataset, feel free to open a community discussion :)

-Aclevo

Downloads last month
125