id
int64
0
100M
language
stringclasses
3 values
prog_lang
stringclasses
6 values
category
stringclasses
10 values
difficulty
stringclasses
3 values
instruction
stringlengths
30
86
output
stringlengths
7
192
text
stringlengths
92
300
47,532,757
en
C#
array_ops
intermediate
Write a function that finds the maximum number in an array in C#.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C#. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
88,846,357
en
Python
array_ops
intermediate
Write a function that reverses a list in Python.
def reverse_list(arr): return arr[::-1]
### Instruction: Write a function that reverses a list in Python. ### Response: def reverse_list(arr): return arr[::-1]
53,547,410
kk
JavaScript
string_ops
intermediate
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
2,242,288
ru
C#
var_decl
beginner
Как объявить переменную value со значением 199132 в C#?
int value = 199132;
### Instruction: Как объявить переменную value со значением 199132 в C#? ### Response: int value = 199132;
43,907,188
kk
JavaScript
string_ops
advanced
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
215,113
ru
Python
var_decl
beginner
Как объявить переменную buffer со значением 860968 в Python?
buffer = 860968
### Instruction: Как объявить переменную buffer со значением 860968 в Python? ### Response: buffer = 860968
80,753,670
ru
C#
array_ops
intermediate
Напишите на C# функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C# функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
1,684,575
en
Java
var_decl
beginner
How to declare a variable amount with value 193478 in Java?
int amount = 193478;
### Instruction: How to declare a variable amount with value 193478 in Java? ### Response: int amount = 193478;
31,661,578
kk
Python
array_ops
advanced
Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
45,310
kk
Python
sum_n
intermediate
Python тілінде 1-ден 7429-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(7429))
### Instruction: Python тілінде 1-ден 7429-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(7429))
610,888
en
C++
var_decl
beginner
How to declare a variable count with value 110432 in C++?
int count = 110432;
### Instruction: How to declare a variable count with value 110432 in C++? ### Response: int count = 110432;
73,107,854
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
1,269,715
en
JavaScript
var_decl
beginner
How to declare a variable speed with value 286231 in JavaScript?
let speed = 286231;
### Instruction: How to declare a variable speed with value 286231 in JavaScript? ### Response: let speed = 286231;
11,584,300
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
27,537,597
kk
Unity
array_ops
intermediate
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
169,402
kk
Unity
var_decl
beginner
Unity тілінде 241664 мәнімен x айнымалысын қалай жариялауға болады?
int x = 241664;
### Instruction: Unity тілінде 241664 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 241664;
154,148
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 2395.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2395)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 2395. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2395)); }
2,804,534
en
C++
var_decl
beginner
How to declare a variable count with value 61150 in C++?
int count = 61150;
### Instruction: How to declare a variable count with value 61150 in C++? ### Response: int count = 61150;
1,571,033
ru
Python
var_decl
beginner
Как объявить переменную rate со значением 923873 в Python?
rate = 923873
### Instruction: Как объявить переменную rate со значением 923873 в Python? ### Response: rate = 923873
97,110,962
ru
Unity
array_ops
intermediate
Напишите на Unity функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Unity функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
20,439,821
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
80,655,694
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1978 is a leap year in JavaScript.
function isLeap() { let y = 1978; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1978 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1978; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
99,511,439
en
Python
array_ops
intermediate
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
46,859,475
kk
C#
logic_ops
advanced
C# тилінде 448 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 448; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 448 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 448; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
77,485,030
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 34 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 34; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 34 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 34; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
69,753,196
kk
C++
string_ops
advanced
C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
72,007,243
en
Unity
array_ops
advanced
Write a function that finds the maximum number in an array in Unity.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in Unity. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
610,473
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 7895.
int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(7895) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 7895. ### Response: int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(7895) << std::endl;
2,390,132
kk
C++
var_decl
beginner
C++ тілінде 754518 мәнімен data айнымалысын қалай жариялауға болады?
int data = 754518;
### Instruction: C++ тілінде 754518 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 754518;
29,608,146
ru
C#
array_ops
intermediate
Напишите на C# функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C# функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
11,115,735
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 259 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 259; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 259 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 259; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
2,486,103
ru
Java
var_decl
beginner
Как объявить переменную index со значением 736194 в Java?
int index = 736194;
### Instruction: Как объявить переменную index со значением 736194 в Java? ### Response: int index = 736194;
354,215
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 2768-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(2768));
### Instruction: JavaScript тілінде 1-ден 2768-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(2768));
54,643,723
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
42,057,165
kk
C++
array_ops
advanced
C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
17,894,917
kk
Java
logic_ops
advanced
Java тилінде 105 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 105; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 105 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 105; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
60,943,264
en
C#
array_ops
advanced
Write a function that filters only even numbers from a list in C#.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C#. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
61,470,054
ru
C++
string_ops
intermediate
Напишите на C++ функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C++ функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
358,180
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 1858.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1858));
### Instruction: Write a function in JavaScript that calculates the factorial of 1858. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1858));
71,860,110
en
Java
string_ops
intermediate
Write a function that checks if a string is a palindrome in Java.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Java. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
396,287
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 3148.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3148)); }
### Instruction: Write a function in Unity that calculates the factorial of 3148. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3148)); }
80,378,305
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Unity функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
74,406,767
en
JavaScript
array_ops
advanced
Write a function that filters only even numbers from a list in JavaScript.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Write a function that filters only even numbers from a list in JavaScript. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
52,152,250
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 101 is prime in JavaScript.
function isPrime() { let n = 101; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Write a function that determines if the number 101 is prime in JavaScript. ### Response: function isPrime() { let n = 101; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
4,914,579
kk
JavaScript
var_decl
beginner
JavaScript тілінде 609471 мәнімен count айнымалысын қалай жариялауға болады?
let count = 609471;
### Instruction: JavaScript тілінде 609471 мәнімен count айнымалысын қалай жариялауға болады? ### Response: let count = 609471;
204,681
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 9738.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9738) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 9738. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9738) << std::endl;
16,423,768
en
JavaScript
array_ops
advanced
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
82,482,310
kk
Java
string_ops
advanced
Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
173,403
kk
Java
sum_n
intermediate
Java тілінде 1-ден 7754-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7754));
### Instruction: Java тілінде 1-ден 7754-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7754));
59,461,499
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 310 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 310; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 310 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 310; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
64,446,838
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 491 простым.
public bool IsPrime() { int n = 491; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 491 простым. ### Response: public bool IsPrime() { int n = 491; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
29,579,236
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Unity функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
93,821,363
kk
Python
array_ops
intermediate
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
50,575,405
kk
Python
logic_ops
advanced
Python тилінде 92 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 92 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 92 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 92 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
45,420,443
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
54,890,063
en
Unity
array_ops
intermediate
Write a function that finds the maximum number in an array in Unity.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in Unity. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
88,285,925
en
Python
string_ops
advanced
Write a function that converts a string to uppercase in Python.
def to_upper(s): return s.upper()
### Instruction: Write a function that converts a string to uppercase in Python. ### Response: def to_upper(s): return s.upper()
82,088,764
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 225 простым.
public bool IsPrime() { int n = 225; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 225 простым. ### Response: public bool IsPrime() { int n = 225; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,686,958
en
Java
var_decl
beginner
How to declare a variable limit with value 510882 in Java?
int limit = 510882;
### Instruction: How to declare a variable limit with value 510882 in Java? ### Response: int limit = 510882;
91,294,577
kk
JavaScript
array_ops
advanced
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
86,312,795
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
68,277,489
en
C++
logic_ops
advanced
Write a function that determines if the number 452 is prime in C++.
public bool IsPrime() { int n = 452; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Write a function that determines if the number 452 is prime in C++. ### Response: public bool IsPrime() { int n = 452; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
56,995,337
ru
Java
string_ops
advanced
Напишите на Java функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Java функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
40,987,199
en
Python
array_ops
intermediate
Write a function that filters only even numbers from a list in Python.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Write a function that filters only even numbers from a list in Python. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
79,841,351
en
Python
logic_ops
intermediate
Write logic to check if the year 1978 is a leap year in Python.
def is_leap(): year = 1978 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1978 is a leap year in Python. ### Response: def is_leap(): year = 1978 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
4,734,883
kk
C#
var_decl
beginner
C# тілінде 33144 мәнімен x айнымалысын қалай жариялауға болады?
int x = 33144;
### Instruction: C# тілінде 33144 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 33144;
54,019,236
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1973 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1973; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1973 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1973; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
75,741,310
en
C#
logic_ops
intermediate
Write a function that determines if the number 234 is prime in C#.
public bool IsPrime() { int n = 234; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Write a function that determines if the number 234 is prime in C#. ### Response: public bool IsPrime() { int n = 234; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
58,904,316
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 117 простым.
def is_prime(): n = 117 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 117 простым. ### Response: def is_prime(): n = 117 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
44,583,589
kk
JavaScript
string_ops
advanced
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
996,987
kk
Python
var_decl
beginner
Python тілінде 70310 мәнімен index айнымалысын қалай жариялауға болады?
index = 70310
### Instruction: Python тілінде 70310 мәнімен index айнымалысын қалай жариялауға болады? ### Response: index = 70310
66,511
kk
Java
sum_n
intermediate
Java тілінде 1-ден 2684-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2684));
### Instruction: Java тілінде 1-ден 2684-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2684));
43,524,195
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
428,023
kk
Python
factorial
advanced
Python тілінде 3653 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3653))
### Instruction: Python тілінде 3653 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3653))
3,194,537
kk
C#
var_decl
beginner
C# тілінде 321933 мәнімен score айнымалысын қалай жариялауға болады?
int score = 321933;
### Instruction: C# тілінде 321933 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 321933;
2,683,492
en
Python
var_decl
beginner
How to declare a variable x with value 876787 in Python?
x = 876787
### Instruction: How to declare a variable x with value 876787 in Python? ### Response: x = 876787
1,841,897
ru
Java
var_decl
beginner
Как объявить переменную timer со значением 533558 в Java?
int timer = 533558;
### Instruction: Как объявить переменную timer со значением 533558 в Java? ### Response: int timer = 533558;
24,210,580
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1931 високосным.
public bool IsLeap() { int y = 1931; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1931 високосным. ### Response: public bool IsLeap() { int y = 1931; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
701,732
en
C++
var_decl
beginner
How to declare a variable index with value 329067 in C++?
int index = 329067;
### Instruction: How to declare a variable index with value 329067 in C++? ### Response: int index = 329067;
88,613,390
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
85,548,121
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на Unity функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
4,751,876
en
C#
var_decl
beginner
How to declare a variable offset with value 256671 in C#?
int offset = 256671;
### Instruction: How to declare a variable offset with value 256671 in C#? ### Response: int offset = 256671;
2,326,907
ru
Python
var_decl
beginner
Как объявить переменную result со значением 342181 в Python?
result = 342181
### Instruction: Как объявить переменную result со значением 342181 в Python? ### Response: result = 342181
90,485,213
kk
C#
string_ops
intermediate
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
97,052,614
kk
C++
logic_ops
intermediate
C++ тилінде 29 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 29; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 29 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 29; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
24,143,955
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
35,902,846
en
C++
logic_ops
advanced
Write logic to check if the year 2026 is a leap year in C++.
public bool IsLeap() { int y = 2026; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2026 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2026; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
97,228,877
en
C++
logic_ops
advanced
Write logic to check if the year 2064 is a leap year in C++.
public bool IsLeap() { int y = 2064; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2064 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2064; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
33,388,138
ru
Python
string_ops
advanced
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
1,984,324
en
Unity
var_decl
beginner
How to declare a variable timer with value 559196 in Unity?
int timer = 559196;
### Instruction: How to declare a variable timer with value 559196 in Unity? ### Response: int timer = 559196;
55,069,146
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 2061 високосным.
public bool IsLeap() { int y = 2061; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2061 високосным. ### Response: public bool IsLeap() { int y = 2061; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
32,396,022
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 237 простым.
public bool IsPrime() { int n = 237; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 237 простым. ### Response: public bool IsPrime() { int n = 237; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
60,373,795
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая фильтрует только четные числа из списка.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Напишите на Python функцию, которая фильтрует только четные числа из списка. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
268,619
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 2269.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2269));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 2269. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2269));
133,796
kk
C#
var_decl
beginner
C# тілінде 764906 мәнімен result айнымалысын қалай жариялауға болады?
int result = 764906;
### Instruction: C# тілінде 764906 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 764906;
67,180,405
en
Java
logic_ops
intermediate
Write logic to check if the year 1957 is a leap year in Java.
public bool IsLeap() { int y = 1957; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1957 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1957; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
75,414,490
en
Python
logic_ops
intermediate
Write logic to check if the year 1947 is a leap year in Python.
def is_leap(): year = 1947 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1947 is a leap year in Python. ### Response: def is_leap(): year = 1947 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
19,374,595
ru
Java
string_ops
advanced
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
76,123,627
kk
Java
array_ops
intermediate
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
2,213,147
ru
C++
var_decl
beginner
Как объявить переменную result со значением 403131 в C++?
int result = 403131;
### Instruction: Как объявить переменную result со значением 403131 в C++? ### Response: int result = 403131;