id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
94,819,001
kk
C#
logic_ops
advanced
C# тилінде 130 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 130; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 130 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 130; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,834,615
kk
Python
var_decl
beginner
Python тілінде 998769 мәнімен timer айнымалысын қалай жариялауға болады?
timer = 998769
### Instruction: Python тілінде 998769 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: timer = 998769
4,714,331
kk
JavaScript
var_decl
beginner
JavaScript тілінде 660310 мәнімен amount айнымалысын қалай жариялауға болады?
let amount = 660310;
### Instruction: JavaScript тілінде 660310 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: let amount = 660310;
99,391,013
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(); }
3,701,911
ru
Python
var_decl
beginner
Как объявить переменную health со значением 124248 в Python?
health = 124248
### Instruction: Как объявить переменную health со значением 124248 в Python? ### Response: health = 124248
95,627,350
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('');
4,957,766
en
Java
var_decl
beginner
How to declare a variable buffer with value 708725 in Java?
int buffer = 708725;
### Instruction: How to declare a variable buffer with value 708725 in Java? ### Response: int buffer = 708725;
4,247,478
en
Java
var_decl
beginner
How to declare a variable size with value 23349 in Java?
int size = 23349;
### Instruction: How to declare a variable size with value 23349 in Java? ### Response: int size = 23349;
944,972
ru
Unity
var_decl
beginner
Как объявить переменную buffer со значением 246279 в Unity?
int buffer = 246279;
### Instruction: Как объявить переменную buffer со значением 246279 в Unity? ### Response: int buffer = 246279;
23,981,600
ru
Java
array_ops
advanced
Напишите на Java функцию, которая фильтрует только четные числа из списка.
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: Напишите на Java функцию, которая фильтрует только четные числа из списка. ### 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; }
12,817,403
en
C#
string_ops
advanced
Write a function that converts a string to uppercase in C#.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C#. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
861,780
ru
Java
var_decl
beginner
Как объявить переменную result со значением 668714 в Java?
int result = 668714;
### Instruction: Как объявить переменную result со значением 668714 в Java? ### Response: int result = 668714;
74,840,581
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 461 простым.
public bool IsPrime() { int n = 461; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 461 простым. ### Response: public bool IsPrime() { int n = 461; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,719,974
en
Java
var_decl
beginner
How to declare a variable buffer with value 574657 in Java?
int buffer = 574657;
### Instruction: How to declare a variable buffer with value 574657 in Java? ### Response: int buffer = 574657;
64,857,964
ru
Java
array_ops
intermediate
Напишите на Java функцию, которая фильтрует только четные числа из списка.
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: Напишите на Java функцию, которая фильтрует только четные числа из списка. ### 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; }
89,717,137
kk
C#
logic_ops
intermediate
C# тилінде 1929 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1929; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1929 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1929; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
75,415,648
en
C++
array_ops
advanced
Write a function that reverses a list in C++.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C++. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
35,332,899
en
C#
string_ops
advanced
Write a function that counts vowels in a text in C#.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C#. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
465,955
kk
Unity
factorial
advanced
Unity тілінде 8206 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8206)); }
### Instruction: Unity тілінде 8206 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8206)); }
32,134,733
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая считает количество гласных букв в тексте.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Напишите на Python функцию, которая считает количество гласных букв в тексте. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
15,249,483
en
Java
string_ops
advanced
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; }
76,000,484
en
Java
array_ops
advanced
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
25,298,662
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]
86,848,182
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 137 is prime in JavaScript.
function isPrime() { let n = 137; 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 137 is prime in JavaScript. ### Response: function isPrime() { let n = 137; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
669,064
kk
JavaScript
factorial
advanced
JavaScript тілінде 7711 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7711));
### Instruction: JavaScript тілінде 7711 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7711));
2,893,086
ru
JavaScript
var_decl
beginner
Как объявить переменную rate со значением 63154 в JavaScript?
let rate = 63154;
### Instruction: Как объявить переменную rate со значением 63154 в JavaScript? ### Response: let rate = 63154;
61,555,956
en
C#
string_ops
advanced
Write a function that counts vowels in a text in C#.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C#. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
48,140,610
en
JavaScript
string_ops
advanced
Write a function that counts vowels in a text in JavaScript.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Write a function that counts vowels in a text in JavaScript. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
2,992,830
en
C#
var_decl
beginner
How to declare a variable health with value 663142 in C#?
int health = 663142;
### Instruction: How to declare a variable health with value 663142 in C#? ### Response: int health = 663142;
18,408,082
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 438 простым.
public bool IsPrime() { int n = 438; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 438 простым. ### Response: public bool IsPrime() { int n = 438; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
33,050,277
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 1986 високосным.
public bool IsLeap() { int y = 1986; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1986 високосным. ### Response: public bool IsLeap() { int y = 1986; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,577,801
ru
Unity
var_decl
beginner
Как объявить переменную rate со значением 857623 в Unity?
int rate = 857623;
### Instruction: Как объявить переменную rate со значением 857623 в Unity? ### Response: int rate = 857623;
94,433,257
kk
C#
string_ops
advanced
C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
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: C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### 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; }
1,918,445
kk
C#
var_decl
beginner
C# тілінде 153344 мәнімен x айнымалысын қалай жариялауға болады?
int x = 153344;
### Instruction: C# тілінде 153344 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 153344;
10,219,725
kk
Python
string_ops
intermediate
Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
56,900,634
en
Java
string_ops
advanced
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; }
4,119,690
ru
JavaScript
var_decl
beginner
Как объявить переменную x со значением 882248 в JavaScript?
let x = 882248;
### Instruction: Как объявить переменную x со значением 882248 в JavaScript? ### Response: let x = 882248;
620,922
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 856.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(856)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 856. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(856)); }
52,468,016
en
Java
array_ops
intermediate
Write a function that filters only even numbers from a list in Java.
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 Java. ### 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; }
52,305,219
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 403 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 403; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 403 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 403; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
3,585,451
ru
Python
var_decl
beginner
Как объявить переменную buffer со значением 856495 в Python?
buffer = 856495
### Instruction: Как объявить переменную buffer со значением 856495 в Python? ### Response: buffer = 856495
15,507,852
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(); }
68,984,695
ru
Python
array_ops
advanced
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
18,036,193
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 40 простым.
def is_prime(): n = 40 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 40 простым. ### Response: def is_prime(): n = 40 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
1,449,807
ru
Python
var_decl
beginner
Как объявить переменную limit со значением 299610 в Python?
limit = 299610
### Instruction: Как объявить переменную limit со значением 299610 в Python? ### Response: limit = 299610
30,632,149
kk
C++
logic_ops
intermediate
C++ тилінде 1902 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1902; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1902 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1902; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
59,490,065
en
Java
array_ops
advanced
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
2,935,164
en
Java
var_decl
beginner
How to declare a variable score with value 45381 in Java?
int score = 45381;
### Instruction: How to declare a variable score with value 45381 in Java? ### Response: int score = 45381;
2,217,001
en
JavaScript
var_decl
beginner
How to declare a variable score with value 375388 in JavaScript?
let score = 375388;
### Instruction: How to declare a variable score with value 375388 in JavaScript? ### Response: let score = 375388;
42,164,893
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; }
79,798,139
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C++ функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
22,086,032
ru
Java
string_ops
advanced
Напишите на 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: Напишите на 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; }
15,977,909
kk
Unity
logic_ops
intermediate
Unity тилінде 211 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 211; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 211 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 211; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,319,508
kk
C#
var_decl
beginner
C# тілінде 912892 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 912892;
### Instruction: C# тілінде 912892 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 912892;
4,635,689
ru
JavaScript
var_decl
beginner
Как объявить переменную buffer со значением 524505 в JavaScript?
let buffer = 524505;
### Instruction: Как объявить переменную buffer со значением 524505 в JavaScript? ### Response: let buffer = 524505;
89,939,447
en
C++
logic_ops
intermediate
Write a function that determines if the number 22 is prime in C++.
public bool IsPrime() { int n = 22; 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 22 is prime in C++. ### Response: public bool IsPrime() { int n = 22; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
540,165
kk
JavaScript
var_decl
beginner
JavaScript тілінде 706769 мәнімен amount айнымалысын қалай жариялауға болады?
let amount = 706769;
### Instruction: JavaScript тілінде 706769 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: let amount = 706769;
4,041,532
ru
Java
var_decl
beginner
Как объявить переменную health со значением 276234 в Java?
int health = 276234;
### Instruction: Как объявить переменную health со значением 276234 в Java? ### Response: int health = 276234;
39,065,416
kk
Unity
logic_ops
advanced
Unity тилінде 1929 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1929; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1929 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1929; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
40,764,384
en
C++
logic_ops
intermediate
Write a function that determines if the number 221 is prime in C++.
public bool IsPrime() { int n = 221; 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 221 is prime in C++. ### Response: public bool IsPrime() { int n = 221; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,660,184
kk
Python
var_decl
beginner
Python тілінде 361251 мәнімен result айнымалысын қалай жариялауға болады?
result = 361251
### Instruction: Python тілінде 361251 мәнімен result айнымалысын қалай жариялауға болады? ### Response: result = 361251
82,700,539
kk
Unity
string_ops
intermediate
Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
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: Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### 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; }
3,935,577
ru
Python
var_decl
beginner
Как объявить переменную count со значением 266128 в Python?
count = 266128
### Instruction: Как объявить переменную count со значением 266128 в Python? ### Response: count = 266128
49,509,521
en
C++
string_ops
intermediate
Write a function that checks if a string is a palindrome in C++.
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 C++. ### 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; }
23,104,613
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 2012 високосным.
public bool IsLeap() { int y = 2012; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2012 високосным. ### Response: public bool IsLeap() { int y = 2012; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
54,456,519
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);
56,027,652
kk
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; }
1,282,145
en
Python
var_decl
beginner
How to declare a variable score with value 930117 in Python?
score = 930117
### Instruction: How to declare a variable score with value 930117 in Python? ### Response: score = 930117
40,698,829
kk
Java
array_ops
advanced
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
1,083,135
en
Unity
var_decl
beginner
How to declare a variable timer with value 498534 in Unity?
int timer = 498534;
### Instruction: How to declare a variable timer with value 498534 in Unity? ### Response: int timer = 498534;
211,076
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 6592-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(6592) << std::endl;
### Instruction: C++ тілінде 1-ден 6592-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(6592) << std::endl;
69,295,798
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
10,865,681
en
Unity
array_ops
advanced
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
34,516,453
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 2023 is a leap year in JavaScript.
function isLeap() { let y = 2023; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2023 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2023; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
238,060
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 8118.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8118))
### Instruction: Write a function in Python that calculates the factorial of 8118. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8118))
24,456,540
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
3,983,526
ru
JavaScript
var_decl
beginner
Как объявить переменную timer со значением 259065 в JavaScript?
let timer = 259065;
### Instruction: Как объявить переменную timer со значением 259065 в JavaScript? ### Response: let timer = 259065;
701,016
ru
Python
var_decl
beginner
Как объявить переменную y со значением 642232 в Python?
y = 642232
### Instruction: Как объявить переменную y со значением 642232 в Python? ### Response: y = 642232
30,523,628
en
C#
logic_ops
intermediate
Write a function that determines if the number 146 is prime in C#.
public bool IsPrime() { int n = 146; 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 146 is prime in C#. ### Response: public bool IsPrime() { int n = 146; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
473,698
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 2081.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2081)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 2081. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2081)); }
75,334,600
en
JavaScript
array_ops
intermediate
Write a function that reverses a list in JavaScript.
const reverseArr = arr => arr.reverse();
### Instruction: Write a function that reverses a list in JavaScript. ### Response: const reverseArr = arr => arr.reverse();
95,981,440
kk
Unity
logic_ops
intermediate
Unity тилінде 123 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 123; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 123 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 123; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,951,219
kk
JavaScript
var_decl
beginner
JavaScript тілінде 598818 мәнімен total айнымалысын қалай жариялауға болады?
let total = 598818;
### Instruction: JavaScript тілінде 598818 мәнімен total айнымалысын қалай жариялауға болады? ### Response: let total = 598818;
18,447,151
en
C#
string_ops
advanced
Write a function that checks if a string is a palindrome in C#.
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 C#. ### 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; }
808,384
kk
C++
factorial
advanced
C++ тілінде 8897 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8897) << std::endl;
### Instruction: C++ тілінде 8897 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8897) << std::endl;
98,405,018
en
Python
string_ops
intermediate
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()
1,263,497
kk
C++
var_decl
beginner
C++ тілінде 976370 мәнімен y айнымалысын қалай жариялауға болады?
int y = 976370;
### Instruction: C++ тілінде 976370 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 976370;
88,781,831
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;
18,174,891
kk
Unity
string_ops
advanced
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
86,217,810
kk
Java
logic_ops
advanced
Java тилінде 2100 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2100; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2100 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2100; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
90,630,093
en
Unity
array_ops
intermediate
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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; }
77,632,415
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 367 простым.
def is_prime(): n = 367 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 367 простым. ### Response: def is_prime(): n = 367 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
68,991,358
en
Python
string_ops
intermediate
Write a function that checks if a string is a palindrome in Python.
def is_palindrome(s): return s == s[::-1]
### Instruction: Write a function that checks if a string is a palindrome in Python. ### Response: def is_palindrome(s): return s == s[::-1]
45,137,913
ru
C#
array_ops
advanced
Напишите на 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; }
478,661
kk
C++
var_decl
beginner
C++ тілінде 357165 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 357165;
### Instruction: C++ тілінде 357165 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 357165;
3,886,741
ru
Unity
var_decl
beginner
Как объявить переменную count со значением 384026 в Unity?
int count = 384026;
### Instruction: Как объявить переменную count со значением 384026 в Unity? ### Response: int count = 384026;
37,608,518
kk
Java
array_ops
intermediate
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
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: Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### 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; }
94,886,855
kk
Java
logic_ops
advanced
Java тилінде 108 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 108; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 108 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 108; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,195,542
kk
Unity
var_decl
beginner
Unity тілінде 257200 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 257200;
### Instruction: Unity тілінде 257200 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 257200;
35,076,371
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 17 простым.
public bool IsPrime() { int n = 17; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 17 простым. ### Response: public bool IsPrime() { int n = 17; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }