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 |
|---|---|---|---|---|---|---|---|
37,856,150 | 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(''); |
4,778,765 | kk | C++ | var_decl | beginner | C++ тілінде 62893 мәнімен data айнымалысын қалай жариялауға болады? | int data = 62893; | ### Instruction:
C++ тілінде 62893 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 62893; |
84,982,607 | ru | JavaScript | string_ops | advanced | Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
52,830 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 7100. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(7100)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 7100.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(7100)) |
81,505,560 | 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;
} |
23,311,043 | en | JavaScript | logic_ops | intermediate | Write a function that determines if the number 122 is prime in JavaScript. | function isPrime() {
let n = 122;
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 122 is prime in JavaScript.
### Response:
function isPrime() {
let n = 122;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
299,453 | ru | JavaScript | sum_n | intermediate | Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 148. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(148)); | ### Instruction:
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 148.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(148)); |
159,698 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 7625. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(7625) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 7625.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(7625) << std::endl; |
13,634,201 | ru | Unity | string_ops | advanced | Напишите на 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;
} |
2,724,140 | en | Python | var_decl | beginner | How to declare a variable level with value 558394 in Python? | level = 558394 | ### Instruction:
How to declare a variable level with value 558394 in Python?
### Response:
level = 558394 |
4,576,846 | kk | Python | var_decl | beginner | Python тілінде 4461 мәнімен data айнымалысын қалай жариялауға болады? | data = 4461 | ### Instruction:
Python тілінде 4461 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
data = 4461 |
1,425,663 | ru | Java | var_decl | beginner | Как объявить переменную speed со значением 382589 в Java? | int speed = 382589; | ### Instruction:
Как объявить переменную speed со значением 382589 в Java?
### Response:
int speed = 382589; |
65,250,225 | kk | Unity | string_ops | intermediate | Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
38,611,920 | 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); |
789,256 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 609611 мәнімен rate айнымалысын қалай жариялауға болады? | let rate = 609611; | ### Instruction:
JavaScript тілінде 609611 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
let rate = 609611; |
88,302,082 | ru | Java | array_ops | intermediate | Напишите на Java функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на Java функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
79,892,976 | en | Unity | logic_ops | intermediate | Write a function that determines if the number 187 is prime in Unity. | public bool IsPrime() {
int n = 187;
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 187 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 187;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,349,773 | en | Unity | var_decl | beginner | How to declare a variable timer with value 546056 in Unity? | int timer = 546056; | ### Instruction:
How to declare a variable timer with value 546056 in Unity?
### Response:
int timer = 546056; |
83,862,659 | en | Python | logic_ops | intermediate | Write logic to check if the year 2087 is a leap year in Python. | def is_leap():
year = 2087
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2087 is a leap year in Python.
### Response:
def is_leap():
year = 2087
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
3,461,564 | ru | JavaScript | var_decl | beginner | Как объявить переменную buffer со значением 800861 в JavaScript? | let buffer = 800861; | ### Instruction:
Как объявить переменную buffer со значением 800861 в JavaScript?
### Response:
let buffer = 800861; |
424,787 | kk | Unity | sum_n | intermediate | Unity тілінде 1-ден 5459-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(5459));
} | ### Instruction:
Unity тілінде 1-ден 5459-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(5459));
} |
2,884,532 | en | JavaScript | var_decl | beginner | How to declare a variable y with value 962349 in JavaScript? | let y = 962349; | ### Instruction:
How to declare a variable y with value 962349 in JavaScript?
### Response:
let y = 962349; |
242,321 | ru | Java | sum_n | intermediate | Напиши функцию на Java, которая считает сумму чисел от 1 до 2388. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(2388)); | ### Instruction:
Напиши функцию на Java, которая считает сумму чисел от 1 до 2388.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(2388)); |
3,618,919 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 693353 мәнімен health айнымалысын қалай жариялауға болады? | let health = 693353; | ### Instruction:
JavaScript тілінде 693353 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
let health = 693353; |
3,566,452 | ru | Unity | var_decl | beginner | Как объявить переменную x со значением 452405 в Unity? | int x = 452405; | ### Instruction:
Как объявить переменную x со значением 452405 в Unity?
### Response:
int x = 452405; |
829,564 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 6359. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(6359)); | ### Instruction:
Write a function in Java that calculates the factorial of 6359.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(6359)); |
2,472,650 | en | Python | var_decl | beginner | How to declare a variable offset with value 31567 in Python? | offset = 31567 | ### Instruction:
How to declare a variable offset with value 31567 in Python?
### Response:
offset = 31567 |
794,554 | en | Java | var_decl | beginner | How to declare a variable result with value 77923 in Java? | int result = 77923; | ### Instruction:
How to declare a variable result with value 77923 in Java?
### Response:
int result = 77923; |
77,780,857 | kk | C# | logic_ops | advanced | C# тилінде 2028 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2028;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2028 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2028;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
95,176,451 | ru | Java | string_ops | intermediate | Напишите на 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;
} |
39,027,403 | ru | Python | logic_ops | advanced | Напишите на Python функцию, определяющую, является ли число 418 простым. | def is_prime():
n = 418
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 418 простым.
### Response:
def is_prime():
n = 418
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
93,066,094 | 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] |
392,701 | ru | JavaScript | var_decl | beginner | Как объявить переменную weight со значением 985960 в JavaScript? | let weight = 985960; | ### Instruction:
Как объявить переменную weight со значением 985960 в JavaScript?
### Response:
let weight = 985960; |
81,148,392 | 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); |
2,550,028 | kk | C++ | var_decl | beginner | C++ тілінде 91607 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 91607; | ### Instruction:
C++ тілінде 91607 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 91607; |
29,098,452 | ru | C# | logic_ops | advanced | Напишите на C# функцию, определяющую, является ли число 11 простым. | public bool IsPrime() {
int n = 11;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 11 простым.
### Response:
public bool IsPrime() {
int n = 11;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,917,299 | ru | Python | var_decl | beginner | Как объявить переменную amount со значением 272808 в Python? | amount = 272808 | ### Instruction:
Как объявить переменную amount со значением 272808 в Python?
### Response:
amount = 272808 |
2,031,330 | en | C++ | var_decl | beginner | How to declare a variable y with value 390901 in C++? | int y = 390901; | ### Instruction:
How to declare a variable y with value 390901 in C++?
### Response:
int y = 390901; |
2,431,478 | en | Unity | var_decl | beginner | How to declare a variable rate with value 117352 in Unity? | int rate = 117352; | ### Instruction:
How to declare a variable rate with value 117352 in Unity?
### Response:
int rate = 117352; |
39,628,718 | en | Python | array_ops | intermediate | Write a function that reverses a list in Python. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Write a function that reverses a list in Python.
### Response:
def reverse_list(arr):
return arr[::-1] |
36,458,834 | 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;
} |
1,739,501 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 281162 мәнімен offset айнымалысын қалай жариялауға болады? | let offset = 281162; | ### Instruction:
JavaScript тілінде 281162 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
let offset = 281162; |
49,540,248 | en | C# | array_ops | intermediate | Write a function that filters only even numbers from a list in C#. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in C#.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
13,814,216 | en | C# | logic_ops | advanced | Write logic to check if the year 1994 is a leap year in C#. | public bool IsLeap() {
int 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 C#.
### Response:
public bool IsLeap() {
int y = 1994;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
98,309,908 | 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();
} |
4,318,710 | en | C# | var_decl | beginner | How to declare a variable offset with value 478450 in C#? | int offset = 478450; | ### Instruction:
How to declare a variable offset with value 478450 in C#?
### Response:
int offset = 478450; |
1,508,148 | en | C++ | var_decl | beginner | How to declare a variable buffer with value 547903 in C++? | int buffer = 547903; | ### Instruction:
How to declare a variable buffer with value 547903 in C++?
### Response:
int buffer = 547903; |
76,388,637 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 2066 високосным. | function isLeap() {
let y = 2066;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 2066 високосным.
### Response:
function isLeap() {
let y = 2066;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
4,395,494 | ru | Python | var_decl | beginner | Как объявить переменную offset со значением 3291 в Python? | offset = 3291 | ### Instruction:
Как объявить переменную offset со значением 3291 в Python?
### Response:
offset = 3291 |
2,224,837 | en | Python | var_decl | beginner | How to declare a variable result with value 600520 in Python? | result = 600520 | ### Instruction:
How to declare a variable result with value 600520 in Python?
### Response:
result = 600520 |
38,751,705 | 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;
} |
1,374,402 | kk | Python | var_decl | beginner | Python тілінде 407518 мәнімен timer айнымалысын қалай жариялауға болады? | timer = 407518 | ### Instruction:
Python тілінде 407518 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
timer = 407518 |
87,412,196 | 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);
} |
33,549,934 | en | Java | string_ops | intermediate | Write a function that converts a string to uppercase in Java. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in Java.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
53,078,439 | 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;
} |
3,129,206 | en | C# | var_decl | beginner | How to declare a variable result with value 690093 in C#? | int result = 690093; | ### Instruction:
How to declare a variable result with value 690093 in C#?
### Response:
int result = 690093; |
40,460,993 | en | Unity | array_ops | intermediate | Write a function that finds the maximum number in an array in Unity. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Write a function that finds the maximum number in an array in Unity.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
69,568,804 | ru | C++ | logic_ops | intermediate | Напишите на C++ логику проверки, является ли год 1962 високосным. | public bool IsLeap() {
int y = 1962;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 1962 високосным.
### Response:
public bool IsLeap() {
int y = 1962;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
51,538,924 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая переводит строку в верхний регистр. | def to_upper(s):
return s.upper() | ### Instruction:
Напишите на Python функцию, которая переводит строку в верхний регистр.
### Response:
def to_upper(s):
return s.upper() |
84,608,557 | 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;
} |
22,860,710 | en | Python | string_ops | advanced | Write a function that converts a string to uppercase in Python. | def to_upper(s):
return s.upper() | ### Instruction:
Write a function that converts a string to uppercase in Python.
### Response:
def to_upper(s):
return s.upper() |
58,435,844 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 2036 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 2036;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 2036 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 2036;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
77,454,046 | kk | Python | logic_ops | intermediate | Python тилінде 14 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 14
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 14 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 14
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
3,674,260 | en | Unity | var_decl | beginner | How to declare a variable buffer with value 781368 in Unity? | int buffer = 781368; | ### Instruction:
How to declare a variable buffer with value 781368 in Unity?
### Response:
int buffer = 781368; |
29,211,854 | 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;
} |
58,175,908 | en | Unity | string_ops | intermediate | Write a function that converts a string to uppercase in Unity. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in Unity.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
2,611,492 | en | C++ | var_decl | beginner | How to declare a variable level with value 4375 in C++? | int level = 4375; | ### Instruction:
How to declare a variable level with value 4375 in C++?
### Response:
int level = 4375; |
87,181,369 | ru | 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;
} |
2,139,567 | kk | Python | var_decl | beginner | Python тілінде 731456 мәнімен weight айнымалысын қалай жариялауға болады? | weight = 731456 | ### Instruction:
Python тілінде 731456 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
weight = 731456 |
474,435 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 358655 мәнімен index айнымалысын қалай жариялауға болады? | let index = 358655; | ### Instruction:
JavaScript тілінде 358655 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
let index = 358655; |
1,238,503 | en | C++ | var_decl | beginner | How to declare a variable health with value 502006 in C++? | int health = 502006; | ### Instruction:
How to declare a variable health with value 502006 in C++?
### Response:
int health = 502006; |
2,583,961 | en | JavaScript | var_decl | beginner | How to declare a variable index with value 85284 in JavaScript? | let index = 85284; | ### Instruction:
How to declare a variable index with value 85284 in JavaScript?
### Response:
let index = 85284; |
3,977,655 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 354817 мәнімен score айнымалысын қалай жариялауға болады? | let score = 354817; | ### Instruction:
JavaScript тілінде 354817 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
let score = 354817; |
78,359,534 | 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;
} |
26,068,519 | ru | C++ | string_ops | intermediate | Напишите на 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;
} |
49,705,853 | ru | Java | string_ops | intermediate | Напишите на 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;
} |
64,195,592 | 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;
} |
80,288,867 | ru | Python | logic_ops | intermediate | Напишите на Python логику проверки, является ли год 1912 високосным. | def is_leap():
year = 1912
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1912 високосным.
### Response:
def is_leap():
year = 1912
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
69,006,013 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 445 простым. | public bool IsPrime() {
int n = 445;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 445 простым.
### Response:
public bool IsPrime() {
int n = 445;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
88,426,748 | ru | Java | string_ops | intermediate | Напишите на 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;
} |
45,812,046 | en | JavaScript | string_ops | intermediate | 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(''); |
92,360,051 | kk | Unity | logic_ops | intermediate | Unity тилінде 321 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 321;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 321 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 321;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
84,427,528 | en | C# | string_ops | intermediate | 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;
} |
46,758,294 | ru | C# | logic_ops | intermediate | Напишите на C# логику проверки, является ли год 1904 високосным. | public bool IsLeap() {
int y = 1904;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 1904 високосным.
### Response:
public bool IsLeap() {
int y = 1904;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
91,303,562 | en | Unity | array_ops | advanced | 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;
} |
76,420,785 | ru | 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;
} |
174,946 | ru | Unity | sum_n | intermediate | Напиши функцию на Unity, которая считает сумму чисел от 1 до 4083. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(4083));
} | ### Instruction:
Напиши функцию на Unity, которая считает сумму чисел от 1 до 4083.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(4083));
} |
14,405 | kk | Unity | func_def | intermediate | Unity тілінде speed қабылдап, оны екі еселейтін getResult функциясын жаз. | int getResult(int speed) {
return speed * 2;
} | ### Instruction:
Unity тілінде speed қабылдап, оны екі еселейтін getResult функциясын жаз.
### Response:
int getResult(int speed) {
return speed * 2;
} |
28,270,763 | en | Java | array_ops | intermediate | 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;
} |
21,578,199 | en | C++ | array_ops | intermediate | Write a function that finds the maximum number in an array in C++. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Write a function that finds the maximum number in an array in C++.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
18,058,526 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
51,555,636 | en | Python | array_ops | advanced | 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] |
10,939,765 | en | JavaScript | array_ops | intermediate | 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); |
32,152 | kk | C++ | sum_n | intermediate | C++ тілінде 1-ден 1540-ге дейінгі сандардың қосындысын есептейтін функция жаз. | 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(1540) << std::endl; | ### Instruction:
C++ тілінде 1-ден 1540-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### 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(1540) << std::endl; |
52,073,661 | ru | Unity | string_ops | intermediate | Напишите на Unity функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на Unity функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
73,191,087 | en | C++ | logic_ops | intermediate | Write a function that determines if the number 287 is prime in C++. | public bool IsPrime() {
int n = 287;
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 287 is prime in C++.
### Response:
public bool IsPrime() {
int n = 287;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
90,810,275 | en | C# | logic_ops | intermediate | Write logic to check if the year 1956 is a leap year in C#. | public bool IsLeap() {
int y = 1956;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1956 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 1956;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
45,161,937 | en | C++ | string_ops | intermediate | 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;
} |
60,133,781 | 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(); |
43,126,316 | 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;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.