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
3,313,474
en
JavaScript
var_decl
beginner
How to declare a variable result with value 797684 in JavaScript?
let result = 797684;
### Instruction: How to declare a variable result with value 797684 in JavaScript? ### Response: let result = 797684;
396,381
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 9610-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(9610) << std::endl;
### Instruction: C++ тілінде 1-ден 9610-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(9610) << std::endl;
110,919
en
C++
var_decl
beginner
How to declare a variable size with value 491823 in C++?
int size = 491823;
### Instruction: How to declare a variable size with value 491823 in C++? ### Response: int size = 491823;
1,519,861
kk
Python
var_decl
beginner
Python тілінде 280625 мәнімен data айнымалысын қалай жариялауға болады?
data = 280625
### Instruction: Python тілінде 280625 мәнімен data айнымалысын қалай жариялауға болады? ### Response: data = 280625
3,534,347
kk
JavaScript
var_decl
beginner
JavaScript тілінде 530972 мәнімен count айнымалысын қалай жариялауға болады?
let count = 530972;
### Instruction: JavaScript тілінде 530972 мәнімен count айнымалысын қалай жариялауға болады? ### Response: let count = 530972;
4,095,090
kk
JavaScript
var_decl
beginner
JavaScript тілінде 352706 мәнімен level айнымалысын қалай жариялауға болады?
let level = 352706;
### Instruction: JavaScript тілінде 352706 мәнімен level айнымалысын қалай жариялауға болады? ### Response: let level = 352706;
16,876,859
kk
C#
logic_ops
intermediate
C# тилінде 1946 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1946; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1946 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1946; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
787,698
kk
Unity
var_decl
beginner
Unity тілінде 317268 мәнімен result айнымалысын қалай жариялауға болады?
int result = 317268;
### Instruction: Unity тілінде 317268 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 317268;
92,458,680
kk
Python
logic_ops
advanced
Python тилінде 66 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 66 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 66 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 66 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
51,089,670
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,876,667
ru
C++
var_decl
beginner
Как объявить переменную result со значением 682988 в C++?
int result = 682988;
### Instruction: Как объявить переменную result со значением 682988 в C++? ### Response: int result = 682988;
2,270,673
en
Python
var_decl
beginner
How to declare a variable index with value 951181 in Python?
index = 951181
### Instruction: How to declare a variable index with value 951181 in Python? ### Response: index = 951181
4,240,395
ru
JavaScript
var_decl
beginner
Как объявить переменную score со значением 25824 в JavaScript?
let score = 25824;
### Instruction: Как объявить переменную score со значением 25824 в JavaScript? ### Response: let score = 25824;
38,051,956
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 496 простым.
public bool IsPrime() { int n = 496; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 496 простым. ### Response: public bool IsPrime() { int n = 496; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
457,721
kk
Unity
var_decl
beginner
Unity тілінде 125334 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 125334;
### Instruction: Unity тілінде 125334 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 125334;
154,288
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 9339.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9339)); }
### Instruction: Write a function in Unity that calculates the factorial of 9339. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9339)); }
3,428,933
kk
C++
var_decl
beginner
C++ тілінде 278720 мәнімен value айнымалысын қалай жариялауға болады?
int value = 278720;
### Instruction: C++ тілінде 278720 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 278720;
71,803
en
Python
var_decl
beginner
How to declare a variable y with value 524613 in Python?
y = 524613
### Instruction: How to declare a variable y with value 524613 in Python? ### Response: y = 524613
982,157
en
C#
var_decl
beginner
How to declare a variable limit with value 546399 in C#?
int limit = 546399;
### Instruction: How to declare a variable limit with value 546399 in C#? ### Response: int limit = 546399;
93,922,205
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 162 is prime in JavaScript.
function isPrime() { let n = 162; 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 162 is prime in JavaScript. ### Response: function isPrime() { let n = 162; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
4,935,009
en
Java
var_decl
beginner
How to declare a variable x with value 465567 in Java?
int x = 465567;
### Instruction: How to declare a variable x with value 465567 in Java? ### Response: int x = 465567;
1,179,559
ru
C#
var_decl
beginner
Как объявить переменную level со значением 269976 в C#?
int level = 269976;
### Instruction: Как объявить переменную level со значением 269976 в C#? ### Response: int level = 269976;
4,944,685
en
C#
var_decl
beginner
How to declare a variable data with value 588652 in C#?
int data = 588652;
### Instruction: How to declare a variable data with value 588652 in C#? ### Response: int data = 588652;
3,723,235
kk
Python
var_decl
beginner
Python тілінде 513743 мәнімен x айнымалысын қалай жариялауға болады?
x = 513743
### Instruction: Python тілінде 513743 мәнімен x айнымалысын қалай жариялауға болады? ### Response: x = 513743
26,160,913
en
JavaScript
string_ops
advanced
Write a function that checks if a string is a palindrome in JavaScript.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Write a function that checks if a string is a palindrome in JavaScript. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
3,240,495
kk
Java
var_decl
beginner
Java тілінде 524176 мәнімен data айнымалысын қалай жариялауға болады?
int data = 524176;
### Instruction: Java тілінде 524176 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 524176;
18,305,259
ru
Unity
array_ops
intermediate
Напишите на 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; }
434,525
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 394.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(394))
### Instruction: Write a function in Python that calculates the factorial of 394. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(394))
3,519,796
en
Python
var_decl
beginner
How to declare a variable offset with value 469665 in Python?
offset = 469665
### Instruction: How to declare a variable offset with value 469665 in Python? ### Response: offset = 469665
93,432,592
en
C++
logic_ops
intermediate
Write logic to check if the year 2038 is a leap year in C++.
public bool IsLeap() { int y = 2038; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2038 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2038; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,192,874
ru
JavaScript
var_decl
beginner
Как объявить переменную score со значением 511935 в JavaScript?
let score = 511935;
### Instruction: Как объявить переменную score со значением 511935 в JavaScript? ### Response: let score = 511935;
1,742,449
ru
Python
var_decl
beginner
Как объявить переменную data со значением 123814 в Python?
data = 123814
### Instruction: Как объявить переменную data со значением 123814 в Python? ### Response: data = 123814
2,737,697
kk
JavaScript
var_decl
beginner
JavaScript тілінде 364671 мәнімен speed айнымалысын қалай жариялауға болады?
let speed = 364671;
### Instruction: JavaScript тілінде 364671 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: let speed = 364671;
572,004
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 3432.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(3432));
### Instruction: Write a function in C# that calculates the factorial of 3432. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(3432));
42,613,309
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1919 високосным.
public bool IsLeap() { int y = 1919; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1919 високосным. ### Response: public bool IsLeap() { int y = 1919; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
364,959
kk
Unity
factorial
advanced
Unity тілінде 8111 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8111)); }
### Instruction: Unity тілінде 8111 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8111)); }
16,842,850
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аеёиоуыэюя')
12,726,382
kk
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; }
21,906,708
en
C#
string_ops
intermediate
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(); }
31,933,319
kk
Java
string_ops
advanced
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
4,391,248
ru
Java
var_decl
beginner
Как объявить переменную offset со значением 670796 в Java?
int offset = 670796;
### Instruction: Как объявить переменную offset со значением 670796 в Java? ### Response: int offset = 670796;
14,768,405
kk
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); }
58,495,165
en
Unity
string_ops
advanced
Write a function that checks if a string is a palindrome in 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: Write a function that checks if a string is a palindrome in 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; }
12,576,034
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; }
1,691,742
en
C++
var_decl
beginner
How to declare a variable timer with value 328654 in C++?
int timer = 328654;
### Instruction: How to declare a variable timer with value 328654 in C++? ### Response: int timer = 328654;
55,780,058
kk
Unity
logic_ops
advanced
Unity тилінде 166 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 166; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 166 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 166; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
30,445,546
kk
C++
logic_ops
advanced
C++ тилінде 2084 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2084; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2084 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2084; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
92,527
en
Python
var_decl
beginner
How to declare a variable index with value 114090 in Python?
index = 114090
### Instruction: How to declare a variable index with value 114090 in Python? ### Response: index = 114090
4,321,043
ru
C#
var_decl
beginner
Как объявить переменную timer со значением 504241 в C#?
int timer = 504241;
### Instruction: Как объявить переменную timer со значением 504241 в C#? ### Response: int timer = 504241;
70,953,387
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
38,306,635
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
18,402,492
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
18,152,533
en
Unity
logic_ops
intermediate
Write logic to check if the year 1966 is a leap year in Unity.
public bool IsLeap() { int y = 1966; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1966 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1966; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
39,116,199
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
41,475,488
en
Unity
logic_ops
advanced
Write logic to check if the year 1928 is a leap year in Unity.
public bool IsLeap() { int y = 1928; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1928 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1928; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,703,805
ru
C++
var_decl
beginner
Как объявить переменную limit со значением 772090 в C++?
int limit = 772090;
### Instruction: Как объявить переменную limit со значением 772090 в C++? ### Response: int limit = 772090;
87,989,261
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); }
84,004,889
kk
C++
logic_ops
advanced
C++ тилінде 2075 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2075; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2075 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2075; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
17,593,127
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; }
72,236,758
ru
C++
string_ops
advanced
Напишите на C++ функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C++ функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,197,363
en
C#
var_decl
beginner
How to declare a variable limit with value 505851 in C#?
int limit = 505851;
### Instruction: How to declare a variable limit with value 505851 in C#? ### Response: int limit = 505851;
207,660
kk
JavaScript
var_decl
beginner
JavaScript тілінде 561672 мәнімен health айнымалысын қалай жариялауға болады?
let health = 561672;
### Instruction: JavaScript тілінде 561672 мәнімен health айнымалысын қалай жариялауға болады? ### Response: let health = 561672;
81,812
kk
C#
factorial
advanced
C# тілінде 7251 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(7251));
### Instruction: C# тілінде 7251 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(7251));
33,713,704
en
Unity
logic_ops
intermediate
Write a function that determines if the number 432 is prime in Unity.
public bool IsPrime() { int n = 432; 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 432 is prime in Unity. ### Response: public bool IsPrime() { int n = 432; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
33,041,355
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
63,377,352
kk
C#
string_ops
intermediate
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; }
2,502,138
en
Java
var_decl
beginner
How to declare a variable value with value 211434 in Java?
int value = 211434;
### Instruction: How to declare a variable value with value 211434 in Java? ### Response: int value = 211434;
99,124,250
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]
70,682,136
kk
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; }
72,596,445
en
Unity
string_ops
advanced
Write a function that counts vowels in a text in Unity.
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 Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
19,814,061
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,411,865
kk
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; }
2,084,683
ru
Java
var_decl
beginner
Как объявить переменную x со значением 104028 в Java?
int x = 104028;
### Instruction: Как объявить переменную x со значением 104028 в Java? ### Response: int x = 104028;
1,408,888
kk
C++
var_decl
beginner
C++ тілінде 784688 мәнімен total айнымалысын қалай жариялауға болады?
int total = 784688;
### Instruction: C++ тілінде 784688 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 784688;
82,334,540
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
29,357,272
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
2,986,627
ru
Python
var_decl
beginner
Как объявить переменную y со значением 527827 в Python?
y = 527827
### Instruction: Как объявить переменную y со значением 527827 в Python? ### Response: y = 527827
3,101,680
en
C++
var_decl
beginner
How to declare a variable rate with value 512971 in C++?
int rate = 512971;
### Instruction: How to declare a variable rate with value 512971 in C++? ### Response: int rate = 512971;
2,716,120
kk
Java
var_decl
beginner
Java тілінде 217928 мәнімен size айнымалысын қалай жариялауға болады?
int size = 217928;
### Instruction: Java тілінде 217928 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 217928;
59,486,313
kk
Python
logic_ops
advanced
Python тилінде 2060 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2060 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2060 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2060 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
65,631,341
kk
Java
string_ops
intermediate
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,009,108
kk
Unity
var_decl
beginner
Unity тілінде 979283 мәнімен total айнымалысын қалай жариялауға болады?
int total = 979283;
### Instruction: Unity тілінде 979283 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 979283;
38,257,607
en
Java
string_ops
advanced
Write a function that counts vowels in a text in Java.
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 Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
93,320,298
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
21,522,265
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
53,642,625
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
4,601,818
kk
Python
var_decl
beginner
Python тілінде 633448 мәнімен score айнымалысын қалай жариялауға болады?
score = 633448
### Instruction: Python тілінде 633448 мәнімен score айнымалысын қалай жариялауға болады? ### Response: score = 633448
1,828,909
ru
C#
var_decl
beginner
Как объявить переменную health со значением 826842 в C#?
int health = 826842;
### Instruction: Как объявить переменную health со значением 826842 в C#? ### Response: int health = 826842;
10,786,967
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
702,814
ru
C#
var_decl
beginner
Как объявить переменную index со значением 706772 в C#?
int index = 706772;
### Instruction: Как объявить переменную index со значением 706772 в C#? ### Response: int index = 706772;
2,169,185
en
Java
var_decl
beginner
How to declare a variable score with value 454467 in Java?
int score = 454467;
### Instruction: How to declare a variable score with value 454467 in Java? ### Response: int score = 454467;
1,451,404
en
Unity
var_decl
beginner
How to declare a variable value with value 696416 in Unity?
int value = 696416;
### Instruction: How to declare a variable value with value 696416 in Unity? ### Response: int value = 696416;
34,440,393
kk
Java
logic_ops
intermediate
Java тилінде 1988 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1988; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1988 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1988; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
588,349
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 6848.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6848)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 6848. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6848)); }
75,356,583
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
72,998,930
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 481 простым.
public bool IsPrime() { int n = 481; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 481 простым. ### Response: public bool IsPrime() { int n = 481; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,696,178
en
C#
var_decl
beginner
How to declare a variable result with value 577102 in C#?
int result = 577102;
### Instruction: How to declare a variable result with value 577102 in C#? ### Response: int result = 577102;
2,048,029
en
Python
var_decl
beginner
How to declare a variable level with value 851611 in Python?
level = 851611
### Instruction: How to declare a variable level with value 851611 in Python? ### Response: level = 851611
83,619,744
kk
C++
string_ops
advanced
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
279,533
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 7372.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(7372)); }
### Instruction: Write a function in Unity that calculates the factorial of 7372. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(7372)); }