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
42,878,327
en
Java
array_ops
intermediate
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); }
76,298,572
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; }
75,949
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 7751-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(7751) << std::endl;
### Instruction: C++ тілінде 1-ден 7751-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(7751) << std::endl;
20,139,481
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; }
48,811,159
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; }
49,116,733
kk
Unity
logic_ops
advanced
Unity тилінде 87 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 87; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 87 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 87; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
80,224,827
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('');
54,489,973
kk
C#
array_ops
intermediate
C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
4,589,337
kk
JavaScript
var_decl
beginner
JavaScript тілінде 415953 мәнімен amount айнымалысын қалай жариялауға болады?
let amount = 415953;
### Instruction: JavaScript тілінде 415953 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: let amount = 415953;
25,716,459
en
Python
string_ops
advanced
Write a function that counts vowels in a text in Python.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Write a function that counts vowels in a text in Python. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
96,068,258
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(); }
42,655,411
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 154 простым.
public bool IsPrime() { int n = 154; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 154 простым. ### Response: public bool IsPrime() { int n = 154; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
43,218,668
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
168,543
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 6394.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6394)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 6394. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6394)); }
528,195
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 2984.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(2984)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 2984. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(2984)); }
4,780,099
kk
C#
var_decl
beginner
C# тілінде 694087 мәнімен value айнымалысын қалай жариялауға болады?
int value = 694087;
### Instruction: C# тілінде 694087 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 694087;
51,073,900
kk
C++
logic_ops
intermediate
C++ тилінде 275 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 275; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 275 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 275; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
66,110,168
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; }
3,960,562
en
JavaScript
var_decl
beginner
How to declare a variable level with value 467923 in JavaScript?
let level = 467923;
### Instruction: How to declare a variable level with value 467923 in JavaScript? ### Response: let level = 467923;
86,949,268
kk
Java
logic_ops
intermediate
Java тилінде 262 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 262; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 262 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 262; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
13,824,172
ru
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]
2,182,821
en
C++
var_decl
beginner
How to declare a variable x with value 731600 in C++?
int x = 731600;
### Instruction: How to declare a variable x with value 731600 in C++? ### Response: int x = 731600;
34,601,968
en
Python
array_ops
advanced
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]
56,257,159
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;
77,067,876
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Unity функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
3,005,206
ru
C#
var_decl
beginner
Как объявить переменную score со значением 561058 в C#?
int score = 561058;
### Instruction: Как объявить переменную score со значением 561058 в C#? ### Response: int score = 561058;
34,798,207
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 292 простым.
function isPrime() { let n = 292; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 292 простым. ### Response: function isPrime() { let n = 292; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
15,596,952
ru
C++
logic_ops
advanced
Напишите на 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); }
68,903,290
kk
Python
logic_ops
advanced
Python тилінде 1984 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1984 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1984 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1984 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
49,945,194
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 151 is prime in JavaScript.
function isPrime() { let n = 151; 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 151 is prime in JavaScript. ### Response: function isPrime() { let n = 151; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
91,262,389
kk
C++
logic_ops
intermediate
C++ тилінде 72 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 72; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 72 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 72; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
38,853,604
kk
Python
logic_ops
advanced
Python тилінде 2001 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2001 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2001 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2001 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
2,754,835
en
C++
var_decl
beginner
How to declare a variable y with value 480126 in C++?
int y = 480126;
### Instruction: How to declare a variable y with value 480126 in C++? ### Response: int y = 480126;
41,106,061
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; }
21,922,688
kk
C++
array_ops
intermediate
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; }
87,073,519
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 477 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 477; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 477 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 477; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
2,948,098
ru
Unity
var_decl
beginner
Как объявить переменную amount со значением 75349 в Unity?
int amount = 75349;
### Instruction: Как объявить переменную amount со значением 75349 в Unity? ### Response: int amount = 75349;
20,034,650
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]
75,906,448
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 1994 is a leap year in JavaScript.
function isLeap() { let y = 1994; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1994 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1994; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
3,274,807
en
Python
var_decl
beginner
How to declare a variable timer with value 965578 in Python?
timer = 965578
### Instruction: How to declare a variable timer with value 965578 in Python? ### Response: timer = 965578
17,601,005
kk
C++
logic_ops
intermediate
C++ тилінде 144 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 144; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 144 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 144; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
746,118
en
C#
var_decl
beginner
How to declare a variable data with value 374027 in C#?
int data = 374027;
### Instruction: How to declare a variable data with value 374027 in C#? ### Response: int data = 374027;
32,412,341
kk
C#
logic_ops
advanced
C# тилінде 2050 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2050; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2050 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2050; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,789,578
en
Java
var_decl
beginner
How to declare a variable index with value 717582 in Java?
int index = 717582;
### Instruction: How to declare a variable index with value 717582 in Java? ### Response: int index = 717582;
90,803,212
en
JavaScript
string_ops
intermediate
Write a function that converts a string to uppercase in JavaScript.
const toUpper = s => s.toUpperCase();
### Instruction: Write a function that converts a string to uppercase in JavaScript. ### Response: const toUpper = s => s.toUpperCase();
2,895,741
en
Python
var_decl
beginner
How to declare a variable rate with value 200630 in Python?
rate = 200630
### Instruction: How to declare a variable rate with value 200630 in Python? ### Response: rate = 200630
95,809,318
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(); }
2,741,057
ru
Java
var_decl
beginner
Как объявить переменную count со значением 669219 в Java?
int count = 669219;
### Instruction: Как объявить переменную count со значением 669219 в Java? ### Response: int count = 669219;
64,893,709
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
27,260,296
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)
3,589,526
kk
Python
var_decl
beginner
Python тілінде 354999 мәнімен result айнымалысын қалай жариялауға болады?
result = 354999
### Instruction: Python тілінде 354999 мәнімен result айнымалысын қалай жариялауға болады? ### Response: result = 354999
52,571,445
ru
C++
array_ops
intermediate
Напишите на 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; }
34,807,009
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);
2,382,687
en
JavaScript
var_decl
beginner
How to declare a variable level with value 198602 in JavaScript?
let level = 198602;
### Instruction: How to declare a variable level with value 198602 in JavaScript? ### Response: let level = 198602;
4,347,320
en
Java
var_decl
beginner
How to declare a variable speed with value 549402 in Java?
int speed = 549402;
### Instruction: How to declare a variable speed with value 549402 in Java? ### Response: int speed = 549402;
66,839,225
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('');
2,052,824
kk
Java
var_decl
beginner
Java тілінде 940955 мәнімен level айнымалысын қалай жариялауға болады?
int level = 940955;
### Instruction: Java тілінде 940955 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 940955;
12,166,951
en
Python
array_ops
advanced
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]
55,272,143
kk
Python
logic_ops
intermediate
Python тилінде 2029 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2029 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2029 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2029 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
88,638,288
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; }
1,295,393
ru
C#
var_decl
beginner
Как объявить переменную size со значением 907204 в C#?
int size = 907204;
### Instruction: Как объявить переменную size со значением 907204 в C#? ### Response: int size = 907204;
10,050,481
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
509,198
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 7794.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7794) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 7794. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7794) << std::endl;
83,501,826
kk
Unity
logic_ops
advanced
Unity тилінде 1961 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1961; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1961 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1961; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
76,168,830
ru
Unity
string_ops
advanced
Напишите на 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; }
1,221,647
ru
C#
var_decl
beginner
Как объявить переменную result со значением 888416 в C#?
int result = 888416;
### Instruction: Как объявить переменную result со значением 888416 в C#? ### Response: int result = 888416;
21,008,949
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;
3,445,696
ru
Python
var_decl
beginner
Как объявить переменную weight со значением 745842 в Python?
weight = 745842
### Instruction: Как объявить переменную weight со значением 745842 в Python? ### Response: weight = 745842
127,272
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 3875.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3875)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 3875. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3875)); }
2,211,827
en
C++
var_decl
beginner
How to declare a variable limit with value 290861 in C++?
int limit = 290861;
### Instruction: How to declare a variable limit with value 290861 in C++? ### Response: int limit = 290861;
4,839,948
kk
C++
var_decl
beginner
C++ тілінде 964060 мәнімен y айнымалысын қалай жариялауға болады?
int y = 964060;
### Instruction: C++ тілінде 964060 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 964060;
24,768,673
en
C++
array_ops
advanced
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; }
72,333,322
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 2056 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2056; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2056 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2056; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
3,207,235
kk
Unity
var_decl
beginner
Unity тілінде 634178 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 634178;
### Instruction: Unity тілінде 634178 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 634178;
65,879,569
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 410 простым.
public bool IsPrime() { int n = 410; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 410 простым. ### Response: public bool IsPrime() { int n = 410; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
36,690,286
kk
Unity
array_ops
advanced
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
93,261,006
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; }
22,672,815
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 173 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 173; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 173 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 173; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
506,306
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 521.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(521)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 521. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(521)); }
2,414,990
kk
Java
var_decl
beginner
Java тілінде 120793 мәнімен level айнымалысын қалай жариялауға болады?
int level = 120793;
### Instruction: Java тілінде 120793 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 120793;
86,042,637
kk
Unity
string_ops
advanced
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; }
17,686,249
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
64,699,819
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; }
47,501,067
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 2064 високосным.
function isLeap() { let y = 2064; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2064 високосным. ### Response: function isLeap() { let y = 2064; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
28,597,247
ru
Python
string_ops
advanced
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
58,338,008
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); }
77,938,567
ru
Unity
array_ops
intermediate
Напишите на Unity функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Unity функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
2,049,693
en
C#
var_decl
beginner
How to declare a variable count with value 648183 in C#?
int count = 648183;
### Instruction: How to declare a variable count with value 648183 in C#? ### Response: int count = 648183;
3,687,595
ru
C#
var_decl
beginner
Как объявить переменную amount со значением 153083 в C#?
int amount = 153083;
### Instruction: Как объявить переменную amount со значением 153083 в C#? ### Response: int amount = 153083;
51,258,381
kk
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; }
71,483,372
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2064 високосным.
public bool IsLeap() { int y = 2064; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2064 високосным. ### Response: public bool IsLeap() { int y = 2064; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
66,754,064
en
C#
logic_ops
advanced
Write logic to check if the year 1977 is a leap year in C#.
public bool IsLeap() { int y = 1977; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1977 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1977; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
73,374,808
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; }
3,630,697
ru
JavaScript
var_decl
beginner
Как объявить переменную index со значением 993229 в JavaScript?
let index = 993229;
### Instruction: Как объявить переменную index со значением 993229 в JavaScript? ### Response: let index = 993229;
2,521,277
en
C++
var_decl
beginner
How to declare a variable total with value 308794 in C++?
int total = 308794;
### Instruction: How to declare a variable total with value 308794 in C++? ### Response: int total = 308794;
1,714,596
en
Python
var_decl
beginner
How to declare a variable y with value 156191 in Python?
y = 156191
### Instruction: How to declare a variable y with value 156191 in Python? ### Response: y = 156191
1,070,486
en
JavaScript
var_decl
beginner
How to declare a variable index with value 541972 in JavaScript?
let index = 541972;
### Instruction: How to declare a variable index with value 541972 in JavaScript? ### Response: let index = 541972;
4,000,609
ru
C++
var_decl
beginner
Как объявить переменную level со значением 356358 в C++?
int level = 356358;
### Instruction: Как объявить переменную level со значением 356358 в C++? ### Response: int level = 356358;
88,964,353
en
Java
array_ops
advanced
Write a function that finds the maximum number in an array in Java.
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 Java. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
1,440,662
ru
Unity
var_decl
beginner
Как объявить переменную weight со значением 855838 в Unity?
int weight = 855838;
### Instruction: Как объявить переменную weight со значением 855838 в Unity? ### Response: int weight = 855838;